From 60c1ccd33e0e87bacb45d87a9fc3e58b7a9e0723 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 25 Feb 2010 23:29:42 +0000 Subject: Working VisualC suport in IDE's (dll's are still missing). Fixed a few warnings. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Function_Type.cxx | 2 +- fluid/fluid.cxx | 16 ++++++++++- fluid/ide_support.cxx | 2 ++ fluid/ide_visualc.cxx | 67 +++++++++++++++++++--------------------------- 4 files changed, 46 insertions(+), 41 deletions(-) (limited to 'fluid') diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 30a3b725e..0c33a50be 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -869,7 +869,7 @@ void Fl_Data_Type::write_code1() { if (!c) return; const char *fn = filename_; char *data = 0; - size_t nData = -1; + int nData = -1; // path should be set correctly already if (filename_ && !write_sourceview) { FILE *f = fopen(filename_, "rb"); diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 92786fe10..49f8b50cd 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1598,6 +1598,19 @@ void dbxcode_cb(Fl_Widget*, void*) } } +void dbvisualc_cb(Fl_Widget*, void*) +{ + int i; + Fl_Plugin_Manager pm("commandline"); + for (i=0; iname(), "ideVisualC.fluid.fltk.org")==0) { + pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db", "/Users/matt/dev/fltk-1.3.0"); + break; + } + } +} + //////////////////////////////////////////////////////////////// extern Fl_Menu_Item New_Menu[]; @@ -1693,7 +1706,8 @@ Fl_Menu_Item Main_Menu[] = { {"Execute &Command...",FL_ALT+'x',(Fl_Callback *)show_shell_window}, {"Execute &Again...",FL_ALT+'g',(Fl_Callback *)do_shell_command}, {"--fltkdb",0,(Fl_Callback *)fltkdb_cb,0,FL_MENU_INVISIBLE}, - {"--dbxcode",0,(Fl_Callback *)dbxcode_cb,0,FL_MENU_INVISIBLE}, + {"--dbxcode3",0,(Fl_Callback *)dbxcode_cb,0,FL_MENU_INVISIBLE}, + {"--dbvisualc6",0,(Fl_Callback *)dbvisualc_cb,0,FL_MENU_INVISIBLE}, {0}, {"&Help",0,0,0,FL_SUBMENU}, {"&About FLUID...",0,about_cb}, diff --git a/fluid/ide_support.cxx b/fluid/ide_support.cxx index e639f829a..5110bf202 100644 --- a/fluid/ide_support.cxx +++ b/fluid/ide_support.cxx @@ -680,6 +680,7 @@ int create_new_database(const char *filename) db.add_source(files_db, "test/blocks.cxx"); db.add_lib(fltk_lib); xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework")); + visualc_only(db.add_external_lib(files_db, "winmm.lib")); demo_db.depends_on(db); } @@ -1058,6 +1059,7 @@ int create_new_database(const char *filename) db.add_lib(fltk_jpeg_lib); db.add_lib(fltk_png_lib); xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework")); + visualc_only(db.add_external_lib(files_db, "winmm.lib")); demo_db.depends_on(db); } diff --git a/fluid/ide_visualc.cxx b/fluid/ide_visualc.cxx index 3126a0bca..ccc5e83fa 100644 --- a/fluid/ide_visualc.cxx +++ b/fluid/ide_visualc.cxx @@ -76,43 +76,22 @@ class VisualC6_IDE { Fl_Preferences filesDB; int nFiles; Fl_Preferences ideDB; - /* - XCID xcRootNodeID; - XCID xcBuildConfigurationListID; - XCID xcMainGroupID; - XCID xcProductsGroupID; - XCID xcAppsGroupID; - XCID xcLibsGroupID; - XCID xcTestsGroupID; - XCID xcBuildConfigurationDebugID; - XCID xcBuildConfigurationReleaseID; - */ public: VisualC6_IDE(Fl_Preferences &db, const char *rootDirA) : rootDir(strdup(rootDirA)), - tgtAppsDB(db, "targets/apps"), - tgtLibsDB(db, "targets/libs"), - tgtTestsDB(db, "targets/tests"), - filesDB(db, "files"), - ideDB(db, "ide/VisualC") + tgtAppsDB(db, "targets/apps"), + tgtLibsDB(db, "targets/libs"), + tgtTestsDB(db, "targets/tests"), + filesDB(db, "files"), + ideDB(db, "ide/VisualC") { db.get("projectName", projectName, "Unnamed", 80); nTgtApps = tgtAppsDB.groups(); nTgtLibs = tgtLibsDB.groups(); nTgtTests = tgtTestsDB.groups(); nFiles = filesDB.groups(); - /* - getXCID(ideDB, "xcRootNodeID", xcRootNodeID); - getXCID(ideDB, "xcBuildConfigurationListID", xcBuildConfigurationListID); - getXCID(ideDB, "xcMainGroupID", xcMainGroupID); - getXCID(ideDB, "xcProductsGroupID", xcProductsGroupID); - getXCID(ideDB, "xcAppsGroupID", xcAppsGroupID); - getXCID(ideDB, "xcLibsGroupID", xcLibsGroupID); - getXCID(ideDB, "xcTestsGroupID", xcTestsGroupID); - getXCID(ideDB, "xcBuildConfigurationDebugID", xcBuildConfigurationDebugID); - getXCID(ideDB, "xcBuildConfigurationReleaseID", xcBuildConfigurationReleaseID); - */ } + ~VisualC6_IDE() { if (rootDir) free(rootDir); } @@ -179,7 +158,7 @@ public: for (i=0; i