Improved IDE support: Fluid now compiles fine under Xcode (and all framework on which it depends).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7ea3819b28
commit
3b7e794719
@ -191,13 +191,13 @@ Fl_Target_Prefs::Fl_Target_Prefs(Fl_Preferences::ID id)
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_source(Fl_IDE_Prefs &fdb, const char *pathAndName) {
|
||||
Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
|
||||
Fl_IDE_Prefs p(*this, "sources");
|
||||
p.add_with_key("refUUID", file.name());
|
||||
return p.add_with_key("refUUID", file.name());
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_fl(Fl_IDE_Prefs &fdb, const char *pathAndName) {
|
||||
Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
|
||||
Fl_IDE_Prefs p(*this, "fl");
|
||||
p.add_with_key("refUUID", file.name());
|
||||
return p.add_with_key("refUUID", file.name());
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::depends_on(Fl_IDE_Prefs &dep) {
|
||||
@ -206,9 +206,16 @@ Fl_Preferences::ID Fl_Target_Prefs::depends_on(Fl_IDE_Prefs &dep) {
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_lib(Fl_IDE_Prefs &lib) {
|
||||
Fl_IDE_Prefs p(*this, "libs");
|
||||
p.add_with_key("refUUID", lib.name());
|
||||
this->depends_on(lib);
|
||||
Fl_IDE_Prefs p(*this, "libs");
|
||||
return p.add_with_key("refUUID", lib.name());
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_external_lib(Fl_IDE_Prefs &fdb, const char *name) {
|
||||
char buf[1024]; sprintf(buf, "%s.lib", name);
|
||||
Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", buf));
|
||||
Fl_IDE_Prefs p(*this, "externals");
|
||||
return p.add_with_key("refUUID", file.name());
|
||||
}
|
||||
|
||||
|
||||
@ -479,6 +486,7 @@ int create_new_database(const char *filename)
|
||||
fltk_png_lib.add_source(files_db, "png/pngrutil.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngpread.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrtran.c");
|
||||
fltk_png_lib.add_external_lib(files_db, "z");
|
||||
fltk_images_lib.add_lib(fltk_png_lib);
|
||||
}
|
||||
Fl_Target_Prefs fltk_jpeg_lib(libs_db.add_with_key("name", "fltk_jpeg")); {
|
||||
@ -535,72 +543,472 @@ int create_new_database(const char *filename)
|
||||
Fl_IDE_Prefs apps_db(targets_db, "apps");
|
||||
|
||||
Fl_Target_Prefs fluid_app(apps_db.add_with_key("name", "Fluid")); {
|
||||
fluid_app.add_source(files_db, "fluid/about_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/align_widget.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/alignment_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fluid_Image.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/fluid.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/code.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/template_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Window_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/print_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/CodeEditor.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/factory.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/file.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Function_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Group_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Menu_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/function_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/align_widget.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/factory.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Widget_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Window_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/fluid.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fluid_Image.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/function_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/ide_support.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/CodeEditor.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/ide_xcode.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/template_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/undo.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Group_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/about_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/widget_panel.cxx");
|
||||
fluid_app.add_lib(fltk_lib);
|
||||
fluid_app.add_lib(fltk_forms_lib);
|
||||
fluid_app.add_lib(fltk_images_lib);
|
||||
fluid_app.add_lib(fltk_jpeg_lib);
|
||||
fluid_app.add_lib(fltk_png_lib);
|
||||
fluid_app.add_external_lib(files_db, "z");
|
||||
}
|
||||
|
||||
// --- create test applications
|
||||
Fl_IDE_Prefs tests_db(targets_db, "tests");
|
||||
|
||||
#if 0
|
||||
Fl_Target_Prefs demo_db(tests_db.add_with_key("name", "xDemo")); {
|
||||
Fl_Target_Prefs demo_db(tests_db.add_with_key("name", "Demo")); {
|
||||
demo_db.add_source(files_db, "test/demo.cxx");
|
||||
demo_db.add_lib(fltk_lib);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "matt"));
|
||||
db.add_source(files_db, "test/matt.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
// --- Dependency on Fluid files - does not imply matt_ui.cxx and .h!
|
||||
//ab.add_fl("test/matt_ui.fl")
|
||||
// --- This looks silly. Should we have predefined library sets (db.add_sound_libs())
|
||||
//db.add_external_OSX("audio.framework");
|
||||
//db.add_external_UX("libaudio.so");
|
||||
//db.add_external_MSWIN("directsound.dll");
|
||||
// --- Create dependencies. Library dependencies are implied?!
|
||||
//demo_db.depends_on(db);
|
||||
}
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "moop"));
|
||||
db.add_source(files_db, "test/hello.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
#endif
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "adjuster"));
|
||||
db.add_source(files_db, "test/adjuster.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
//demo_db.depends_on(db);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "valuator"));
|
||||
db.add_fl(files_db, "test/valuator.fl");
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "arc"));
|
||||
db.add_source(files_db, "test/arc.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
//demo_db.depends_on(db);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
// TODO: add all test apps here
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "ask"));
|
||||
db.add_source(files_db, "test/ask.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "bitmap"));
|
||||
db.add_source(files_db, "test/bitmap.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "blocks"));
|
||||
db.add_source(files_db, "test/blocks.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
//db.add_lib(fltk_audio_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "boxtype"));
|
||||
db.add_source(files_db, "test/boxtype.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "browser"));
|
||||
db.add_source(files_db, "test/browser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "button"));
|
||||
db.add_source(files_db, "test/button.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "buttons"));
|
||||
db.add_source(files_db, "test/buttons.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "checkers"));
|
||||
db.add_source(files_db, "test/checkers.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "clock"));
|
||||
db.add_source(files_db, "test/clock.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "colbrowser"));
|
||||
db.add_source(files_db, "test/colbrowser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_forms_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "color_chooser"));
|
||||
db.add_source(files_db, "test/color_chooser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "cube"));
|
||||
db.add_source(files_db, "test/cube.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "CubeView"));
|
||||
db.add_source(files_db, "test/CubeView.cxx");
|
||||
db.add_source(files_db, "test/CubeMain.cxx");
|
||||
db.add_fl(files_db, "test/CubeViewUI.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "cursor"));
|
||||
db.add_source(files_db, "test/cursor.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "curve"));
|
||||
db.add_source(files_db, "test/curve.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "doublebuffer"));
|
||||
db.add_source(files_db, "test/doublebuffer.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "editor"));
|
||||
db.add_source(files_db, "test/editor.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "fast_slow"));
|
||||
db.add_fl(files_db, "test/fast_slow.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "file_chooser"));
|
||||
db.add_source(files_db, "test/file_chooser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "fonts"));
|
||||
db.add_source(files_db, "test/fonts.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "forms"));
|
||||
db.add_source(files_db, "test/forms.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "fractals"));
|
||||
db.add_source(files_db, "test/fractals.cxx");
|
||||
db.add_source(files_db, "test/fracviewer.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
db.add_lib(fltk_forms_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "fullscreen"));
|
||||
db.add_source(files_db, "test/fullscreen.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "gl_overlay"));
|
||||
db.add_source(files_db, "test/gl_overlay.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "glpuzzle"));
|
||||
db.add_source(files_db, "test/glpuzzle.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "hello"));
|
||||
db.add_source(files_db, "test/hello.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "help"));
|
||||
db.add_source(files_db, "test/help.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "iconize"));
|
||||
db.add_source(files_db, "test/iconize.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "image"));
|
||||
db.add_source(files_db, "test/image.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "inactive"));
|
||||
db.add_fl(files_db, "test/inactive.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "input"));
|
||||
db.add_source(files_db, "test/input.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "input_choice"));
|
||||
db.add_source(files_db, "test/input_choice.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "keyboard"));
|
||||
db.add_source(files_db, "test/keyboard.cxx");
|
||||
db.add_fl(files_db, "test/keyboard_ui.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "label"));
|
||||
db.add_source(files_db, "test/label.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_forms_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "line_style"));
|
||||
db.add_source(files_db, "test/line_style.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "list_visuals"));
|
||||
db.add_source(files_db, "test/list_visuals.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "mandelbrot"));
|
||||
db.add_source(files_db, "test/mandelbrot.cxx");
|
||||
db.add_fl(files_db, "test/mandelbrot_ui.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "menubar"));
|
||||
db.add_source(files_db, "test/menubar.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "message"));
|
||||
db.add_source(files_db, "test/message.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "minimum"));
|
||||
db.add_source(files_db, "test/minimum.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "navigation"));
|
||||
db.add_source(files_db, "test/navigation.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "native-filechooser"));
|
||||
db.add_source(files_db, "test/native-filechooser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "output"));
|
||||
db.add_source(files_db, "test/output.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_forms_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "overlay"));
|
||||
db.add_source(files_db, "test/overlay.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "pack"));
|
||||
db.add_source(files_db, "test/pack.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "pixmap_browser"));
|
||||
db.add_source(files_db, "test/pixmap_browser.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "pixmap"));
|
||||
db.add_source(files_db, "test/pixmap.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "preferences"));
|
||||
db.add_fl(files_db, "test/preferences.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "radio"));
|
||||
db.add_fl(files_db, "test/radio.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "resizebox"));
|
||||
db.add_source(files_db, "test/resizebox.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "resize"));
|
||||
db.add_fl(files_db, "test/resize.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "scroll"));
|
||||
db.add_source(files_db, "test/scroll.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "shape"));
|
||||
db.add_source(files_db, "test/shape.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "subwindow"));
|
||||
db.add_source(files_db, "test/subwindow.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "sudoku"));
|
||||
db.add_source(files_db, "test/sudoku.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
//db.add_lib(fltk_audio_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "symbols"));
|
||||
db.add_source(files_db, "test/symbols.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "table"));
|
||||
db.add_source(files_db, "test/table.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "tabs"));
|
||||
db.add_fl(files_db, "test/tabs.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "threads"));
|
||||
db.add_source(files_db, "test/threads.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "tile"));
|
||||
db.add_source(files_db, "test/tile.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "tiled_image"));
|
||||
db.add_source(files_db, "test/tiled_image.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "tree"));
|
||||
db.add_source(files_db, "test/tree.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "utf8"));
|
||||
db.add_source(files_db, "test/utf8.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "valuators"));
|
||||
db.add_fl(files_db, "test/valuators.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
db->flush();
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
Fl_Preferences::ID add_fl(Fl_IDE_Prefs &fdb, const char *pathAndName);
|
||||
Fl_Preferences::ID depends_on(Fl_IDE_Prefs &dep);
|
||||
Fl_Preferences::ID add_lib(Fl_IDE_Prefs &lib);
|
||||
Fl_Preferences::ID add_external_lib(Fl_IDE_Prefs &fdb, const char *name);
|
||||
};
|
||||
|
||||
|
||||
|
@ -188,6 +188,16 @@ public:
|
||||
fprintf(out, "\t\t%s /* %s.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* %s.framework */; };\n", xcBuildFrameworkID, name, xcProductID, name);
|
||||
fprintf(out, "\t\t%s /* %s.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = %s /* %s.framework */; };\n", xcCopyFrameworkID, name, xcProductID, name);
|
||||
}
|
||||
Fl_Preferences extsDB(targetDB, "externals"); n = extsDB.groups();
|
||||
for (i=0; i<n; i++) {
|
||||
Fl_Preferences extDB(extsDB, i);
|
||||
GET_UUID(refUUID, extDB);
|
||||
MAKE_XCID(xcBuildFrameworkID, extDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
MAKE_XCID(xcFileID, fileDB);
|
||||
const char *name = fileDB.fileName();
|
||||
fprintf(out, "\t\t%s /* lib%s.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* lib%s.dylib */; };\n", xcBuildFrameworkID, name, xcFileID, name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -417,52 +427,24 @@ public:
|
||||
filetype = "sourcecode.c.c";
|
||||
} else if (strcmp(ext, ".mm")==0) {
|
||||
filetype = "sourcecode.cpp.objcpp";
|
||||
} else if (strcmp(ext, ".lib")==0) {
|
||||
fprintf(out,
|
||||
"\t\t%s /* lib%s.dylib */ = {isa = PBXFileReference; "
|
||||
"lastKnownFileType = \"compiled.mach-o.dylib\"; "
|
||||
"name = lib%s.dylib; path = /usr/lib/libz.dylib; "
|
||||
"sourceTree = \"<absolute>\"; };\n",
|
||||
xcFileID, fileDB.fileName(), fileDB.fileName() );
|
||||
filetype = 0L;
|
||||
} else if (strcmp(ext, ".plist")==0) {
|
||||
filetype = "text.plist.xml";
|
||||
}
|
||||
fprintf(out,
|
||||
if (filetype)
|
||||
fprintf(out,
|
||||
"\t\t%s /* %s */ = {isa = PBXFileReference; fileEncoding = 4; "
|
||||
"lastKnownFileType = %s; name = %s; "
|
||||
"path = ../../%s; sourceTree = SOURCE_ROOT; };\n",
|
||||
xcFileID, fullName, filetype, fullName, pathAndName);
|
||||
}
|
||||
#if 0
|
||||
// write all sources from the given target
|
||||
Fl_Preferences sourcesDB(targetDB, "sources");
|
||||
int i, n = sourcesDB.groups();
|
||||
for (i=0; i<n; i++) {
|
||||
Fl_Preferences sourceDB(sourcesDB, i);
|
||||
GET_UUID(refUUID, sourceDB);
|
||||
MAKE_XCID(xcBuildFileID, sourceDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
MAKE_XCID(xcFileID, fileDB);
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t%s /* %s in Sources */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };\n", xcBuildSourceID, fullName, xcFileID, fullName);
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<nTgtApps; i++) {
|
||||
Fl_Preferences targetDB(tgtAppsDB, i);
|
||||
char name[80]; targetDB.get("name", name, "DBERROR", 80);
|
||||
MAKE_XCID(xcAppFileID, targetDB);
|
||||
fprintf(out,
|
||||
"%s /* %s.app */ = {isa = PBXFileReference; "
|
||||
"explicitFileType = wrapper.application; includeInIndex = 0; "
|
||||
"path = %s.app; sourceTree = BUILT_PRODUCTS_DIR; };\n",
|
||||
xcAppFileID, name, name);
|
||||
}
|
||||
/*
|
||||
for (i=0; i<nTgtLibs; i++) {
|
||||
Fl_Preferences targetDB(tgtLibsDB, i);
|
||||
writeFrameworksBuildPhase(out, targetDB);
|
||||
}
|
||||
for (i=0; i<nTgtTests; i++) {
|
||||
Fl_Preferences targetDB(tgtTestsDB, i);
|
||||
writeFrameworksBuildPhase(out, targetDB);
|
||||
}
|
||||
*/
|
||||
// FIXME: .cxx .app .plist .fl .dylib .framework etc.
|
||||
#endif
|
||||
fprintf(out, "/* End PBXFileReference section */\n\n");
|
||||
return 0;
|
||||
}
|
||||
@ -483,9 +465,19 @@ public:
|
||||
GET_UUID(refUUID, libDB);
|
||||
MAKE_XCID(xcBuildFrameworkID, libDB);
|
||||
Fl_Preferences tgtLibDB(tgtLibsDB, refUUID);
|
||||
char name[80]; tgtLibDB.get("name", name, "DBERROR", 80);;
|
||||
char name[80]; tgtLibDB.get("name", name, "DBERROR", 80);
|
||||
fprintf(out, "\t\t\t\t%s /* %s.framework in Frameworks */,\n", xcBuildFrameworkID, name);
|
||||
}
|
||||
Fl_Preferences extsDB(targetDB, "externals");
|
||||
n = extsDB.groups();
|
||||
for (i=0; i<n; i++) {
|
||||
Fl_Preferences extDB(extsDB, i);
|
||||
GET_UUID(refUUID, extDB);
|
||||
MAKE_XCID(xcBuildFrameworkID, extDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
const char *name = fileDB.fileName();
|
||||
fprintf(out, "\t\t\t\t%s /* lib%s.dylib in Frameworks */,\n", xcBuildFrameworkID, name);
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\trunOnlyForDeploymentPostprocessing = 0;\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
@ -540,6 +532,16 @@ public:
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t\t\t%s /* %s */,\n", xcFileID, fullName);
|
||||
}
|
||||
Fl_Preferences extsDB(targetDB, "externals");
|
||||
n = extsDB.groups();
|
||||
for (j=0; j<n; j++) {
|
||||
Fl_Preferences extDB(extsDB, j);
|
||||
GET_UUID(refUUID, extDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
MAKE_XCID(xcFileID, fileDB);
|
||||
const char *name = fileDB.fileName();
|
||||
fprintf(out, "\t\t\t\t%s /* lib%s.dylib */,\n", xcFileID, name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -992,6 +994,7 @@ public:
|
||||
fprintf(out, "\t\t\t\t\t../../ide/XCode3/,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../png,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../jpeg,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tINFOPLIST_FILE = \"plists/%s-Info.plist\";\n", name);
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = /Applications;\n");
|
||||
@ -1022,6 +1025,7 @@ public:
|
||||
fprintf(out, "\t\t\t\t\t../../ide/XCode3/,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../png,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../jpeg,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tINFOPLIST_FILE = \"plists/%s-Info.plist\";\n", name);
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = /Applications;\n");
|
||||
@ -1062,6 +1066,8 @@ public:
|
||||
fprintf(out, "\t\t\t\tHEADER_SEARCH_PATHS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t../../ide/XCode3/,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../png,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../jpeg,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tINFOPLIST_FILE = \"plists/%s-Info.plist\";\n", name);
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = \"@executable_path/../Frameworks\";\n");
|
||||
@ -1096,6 +1102,8 @@ public:
|
||||
fprintf(out, "\t\t\t\tHEADER_SEARCH_PATHS = (\n");
|
||||
fprintf(out, "\t\t\t\t../../ide/XCode3/,\n");
|
||||
fprintf(out, "\t\t\t\t../../,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../png,\n");
|
||||
fprintf(out, "\t\t\t\t\t../../jpeg,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tINFOPLIST_FILE = \"plists/%s-Info.plist\";\n", name);
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = \"@executable_path/../Frameworks\";\n");
|
||||
|
Loading…
Reference in New Issue
Block a user