// // "$Id$" // // IDE and Build File generation for the Fast Light Tool Kit (FLTK). // // Copyright 2010 by Matthias Melcher. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // /* VisualC 6 IDE FILES This module generates all files needed for a VisualC++ 6.0 description of the FLTK project. Thanks to the developers of Visual Studion, VC6 files can be read and converted by all newer versions of VisualC++ as well (tested up to VC2008). There is no need to write any newer file formats. The VC6 file formats are very simple. The project is described in a .dsw file which basically just lists all targets and their interdependencies. The targets are then described in .dsp files which list the included source files and the build options. */ #include "ide_support.h" #include #include #include "../src/flstring.h" #include "Fl_Type.h" static void DOSPath(char *s) { for (;;) { switch (*s) { case 0: return; case '/': *s = '\\'; } s++; } } /* * This class creates all VisualC++ 6.0 IDE files. */ class VisualC6_IDE { char *rootDir; char projectName[80]; Fl_Preferences tgtAppsDB; int nTgtApps; Fl_Preferences tgtLibsDB; int nTgtLibs; Fl_Preferences tgtTestsDB; int nTgtTests; Fl_Preferences filesDB; int nFiles; Fl_Preferences ideDB; 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") { db.get("projectName", projectName, "Unnamed", 80); nTgtApps = tgtAppsDB.groups(); nTgtLibs = tgtLibsDB.groups(); nTgtTests = tgtTestsDB.groups(); nFiles = filesDB.groups(); } ~VisualC6_IDE() { if (rootDir) free(rootDir); } /* * Write a project description */ int writeProjectSection(FILE *f, Fl_Preferences &targetDB, char dll=0) { char name[80]; targetDB.get("name", name, "DBERROR", 80); if (dll) strcat(name, "dll"); fprintf(f, "###############################################################################\r\n"); fprintf(f, "\r\n"); fprintf(f, "Project: \"%s\"=\".\\%s.dsp\" - Package Owner=<4>\r\n", name, name); fprintf(f, "\r\n"); fprintf(f, "Package=<5>\r\n"); fprintf(f, "{{{\r\n"); fprintf(f, "}}}\r\n"); fprintf(f, "\r\n"); fprintf(f, "Package=<4>\r\n"); fprintf(f, "{{{\r\n"); Fl_Preferences depsDB(targetDB, "deps"); int i, n = depsDB.groups(); for (i=0; iget("name", depName, "DBERROR", 80); fprintf(f, " Begin Project Dependency\r\n"); fprintf(f, " Project_Dep_Name %s\r\n", depName); fprintf(f, " End Project Dependency\r\n"); } } fprintf(f, "}}}\r\n"); fprintf(f, "\r\n"); return 0; } /* * Write the .dsw project file */ int writeProjectFile(const char *filepath) { char filename[2048]; fl_snprintf(filename, 2047, "%s/%s.dsw", filepath, "fltk"); FILE *f = fopen(filename, "wb"); if (!f) { fl_alert("Can't open file:\n%s", filename); return -1; } fprintf(f, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n"); fprintf(f, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n"); fprintf(f, "\r\n"); int i; // Applications for (i=0; i\r\n", name); fprintf(f, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n"); fprintf(f, "# ** DO NOT EDIT **\r\n"); fprintf(f, "\r\n"); fprintf(f, "# TARGTYPE \"Win32 (x86) Application\" 0x0101\r\n"); fprintf(f, "\r\n"); fprintf(f, "CFG=%s - Win32 Debug\r\n", name); fprintf(f, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n"); fprintf(f, "!MESSAGE use the Export Makefile command and run\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\".\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE You can specify a configuration when running NMAKE\r\n"); fprintf(f, "!MESSAGE by defining the macro CFG on the command line. For example:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s - Win32 Debug\"\r\n", name, name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE Possible choices for configuration are:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE \"%s - Win32 Release\" (based on \"Win32 (x86) Application\")\r\n", name); fprintf(f, "!MESSAGE \"%s - Win32 Debug\" (based on \"Win32 (x86) Application\")\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "\r\n"); fprintf(f, "# Begin Project\r\n"); fprintf(f, "# PROP AllowPerConfigDependencies 0\r\n"); fprintf(f, "# PROP Scc_ProjName \"\"\r\n"); fprintf(f, "# PROP Scc_LocalPath \"\"\r\n"); fprintf(f, "CPP=cl.exe\r\n"); fprintf(f, "MTL=midl.exe\r\n"); fprintf(f, "RSC=rc.exe\r\n"); fprintf(f, "\r\n"); fprintf(f, "!IF \"$(CFG)\" == \"%s - Win32 Release\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "# PROP BASE Use_MFC 0\r\n"); fprintf(f, "# PROP BASE Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP BASE Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Target_Dir \"\"\r\n"); fprintf(f, "# PROP Use_MFC 0\r\n"); fprintf(f, "# PROP Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Ignore_Export_Lib 0\r\n"); fprintf(f, "# PROP Target_Dir \"\"\r\n"); fprintf(f, "# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /YX /FD /c\r\n"); fprintf(f, "# ADD CPP /nologo /MD /GX /Os /Ob2 /I \".\" /I \"../..\" /I \"../../zlib\" /I \"../../png\" /I \"../../jpeg\" /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"WIN32_LEAN_AND_MEAN\" /D \"VC_EXTRA_LEAN\" /D \"WIN32_EXTRA_LEAN\" /YX /FD /c\r\n"); fprintf(f, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /o \"NUL\" /win32\r\n"); fprintf(f, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /o \"NUL\" /win32\r\n"); fprintf(f, "# ADD BASE RSC /l 0x409 /d \"NDEBUG\"\r\n"); fprintf(f, "# ADD RSC /l 0x409 /d \"NDEBUG\"\r\n"); fprintf(f, "BSC32=bscmake.exe\r\n"); fprintf(f, "# ADD BASE BSC32 /nologo\r\n"); fprintf(f, "# ADD BSC32 /nologo\r\n"); fprintf(f, "LINK32=link.exe\r\n"); fprintf(f, "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386\r\n"); fprintf(f, "# ADD LINK32 "); Fl_Preferences libsDB(targetDB, "libs"); int i, n = libsDB.groups(); for (i=0; i\r\n", name); fprintf(f, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n"); fprintf(f, "# ** DO NOT EDIT **\r\n"); fprintf(f, "\r\n"); fprintf(f, "# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\r\n"); fprintf(f, "\r\n"); fprintf(f, "CFG=%s - Win32 Debug\r\n", name); fprintf(f, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n"); fprintf(f, "!MESSAGE use the Export Makefile command and run\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\".\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE You can specify a configuration when running NMAKE\r\n"); fprintf(f, "!MESSAGE by defining the macro CFG on the command line. For example:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s - Win32 Debug\"\r\n", name, name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE Possible choices for configuration are:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE \"%s - Win32 Release\" (based on \"Win32 (x86) Static Library\")\r\n", name); fprintf(f, "!MESSAGE \"%s - Win32 Debug\" (based on \"Win32 (x86) Static Library\")\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "\r\n"); fprintf(f, "# Begin Project\r\n"); fprintf(f, "# PROP AllowPerConfigDependencies 0\r\n"); fprintf(f, "# PROP Scc_ProjName \"\"\r\n"); fprintf(f, "# PROP Scc_LocalPath \"\"\r\n"); fprintf(f, "CPP=cl.exe\r\n"); fprintf(f, "RSC=rc.exe\r\n"); fprintf(f, "\r\n"); fprintf(f, "!IF \"$(CFG)\" == \"%s - Win32 Release\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "# PROP BASE Use_MFC 0\r\n"); fprintf(f, "# PROP BASE Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP BASE Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Target_Dir \"\"\r\n"); fprintf(f, "# PROP Use_MFC 0\r\n"); fprintf(f, "# PROP Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Target_Dir \"\"\r\n"); fprintf(f, "# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /YX /FD /c\r\n"); fprintf(f, "# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I \".\" /I \"../..\" /I \"../../zlib\" /I \"../../png\" /I \"../../jpeg\" /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"WIN32_LEAN_AND_MEAN\" /D \"VC_EXTRA_LEAN\" /D \"WIN32_EXTRA_LEAN\" /YX /FD /c\r\n"); fprintf(f, "# SUBTRACT CPP /Os\r\n"); fprintf(f, "# ADD BASE RSC /l 0x409\r\n"); fprintf(f, "# ADD RSC /l 0x409\r\n"); fprintf(f, "BSC32=bscmake.exe\r\n"); fprintf(f, "# ADD BASE BSC32 /nologo\r\n"); fprintf(f, "# ADD BSC32 /nologo\r\n"); fprintf(f, "LIB32=link.exe -lib\r\n"); fprintf(f, "# ADD BASE LIB32 /nologo\r\n"); fprintf(f, "# ADD LIB32 /nologo /out:\"..\\..\\lib\\%s.lib\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "!ELSEIF \"$(CFG)\" == \"%s - Win32 Debug\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "# PROP BASE Use_MFC 0\r\n"); fprintf(f, "# PROP BASE Use_Debug_Libraries 1\r\n"); fprintf(f, "# PROP BASE Output_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Intermediate_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Target_Dir \"\"\r\n"); fprintf(f, "# PROP Use_MFC 0\r\n"); fprintf(f, "# PROP Use_Debug_Libraries 1\r\n"); fprintf(f, "# PROP Output_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Intermediate_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Target_Dir \"\"\r\n"); fprintf(f, "# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /YX /FD /c\r\n"); fprintf(f, "# ADD CPP /nologo /MDd /GX /Z7 /Od /I \".\" /I \"../..\" /I \"../../zlib\" /I \"../../png\" /I \"../../jpeg\" /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"WIN32_LEAN_AND_MEAN\" /D \"VC_EXTRA_LEAN\" /D \"WIN32_EXTRA_LEAN\" /FR /YX /FD /c\r\n"); fprintf(f, "# ADD BASE RSC /l 0x409\r\n"); fprintf(f, "# ADD RSC /l 0x409\r\n"); fprintf(f, "BSC32=bscmake.exe\r\n"); fprintf(f, "# ADD BASE BSC32 /nologo\r\n"); fprintf(f, "# ADD BSC32 /nologo\r\n"); fprintf(f, "LIB32=link.exe -lib\r\n"); fprintf(f, "# ADD BASE LIB32 /nologo\r\n"); fprintf(f, "# ADD LIB32 /nologo /out:\"..\\..\\lib\\%sd.lib\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "!ENDIF \r\n"); fprintf(f, "\r\n"); fprintf(f, "# Begin Target\r\n"); fprintf(f, "\r\n"); fprintf(f, "# Name \"%s - Win32 Release\"\r\n", name); fprintf(f, "# Name \"%s - Win32 Debug\"\r\n", name); Fl_Preferences sourcesDB(targetDB, "sources"); int i, n = sourcesDB.groups(); for (i=0; i\r\n", name); fprintf(f, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n"); fprintf(f, "# ** DO NOT EDIT **\r\n"); fprintf(f, "\r\n"); fprintf(f, "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\r\n"); fprintf(f, "\r\n"); fprintf(f, "CFG=%s - Win32 Debug\r\n", name); fprintf(f, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n"); fprintf(f, "!MESSAGE use the Export Makefile command and run\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\".\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE You can specify a configuration when running NMAKE\r\n"); fprintf(f, "!MESSAGE by defining the macro CFG on the command line. For example:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s - Win32 Debug\"\r\n", name, name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE Possible choices for configuration are:\r\n"); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "!MESSAGE \"%s - Win32 Release\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n", name); fprintf(f, "!MESSAGE \"%s - Win32 Debug\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n", name); fprintf(f, "!MESSAGE \r\n"); fprintf(f, "\r\n"); fprintf(f, "# Begin Project\r\n"); fprintf(f, "# PROP AllowPerConfigDependencies 0\r\n"); fprintf(f, "# PROP Scc_ProjName \"\"\r\n"); fprintf(f, "# PROP Scc_LocalPath \"\"\r\n"); fprintf(f, "CPP=cl.exe\r\n"); fprintf(f, "MTL=midl.exe\r\n"); fprintf(f, "RSC=rc.exe\r\n"); fprintf(f, "\r\n"); fprintf(f, "!IF \"$(CFG)\" == \"%s - Win32 Release\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "# PROP BASE Use_MFC 0\r\n"); fprintf(f, "# PROP BASE Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP BASE Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Target_Dir \"\"\r\n"); fprintf(f, "# PROP Use_MFC 0\r\n"); fprintf(f, "# PROP Use_Debug_Libraries 0\r\n"); fprintf(f, "# PROP Output_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Intermediate_Dir \"Release/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Ignore_Export_Lib 0\r\n"); fprintf(f, "# PROP Target_Dir \"\"\r\n"); fprintf(f, "# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /YX /FD /c\r\n"); fprintf(f, "# ADD CPP /nologo /MD /W3 /GX /Os /Ob2 /I \"../../zlib\" /I \"../../png\" /I \"../../jpeg\" /I \".\" /I \"../..\" /D \"FL_DLL\" /D \"FL_LIBRARY\" /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"WIN32_LEAN_AND_MEAN\" /D \"VC_EXTRA_LEAN\" /D \"WIN32_EXTRA_LEAN\" /YX /c\r\n"); fprintf(f, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /o /win32 \"NUL\"\r\n"); fprintf(f, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /o /win32 \"NUL\"\r\n"); fprintf(f, "# ADD BASE RSC /l 0x409 /d \"NDEBUG\"\r\n"); fprintf(f, "# ADD RSC /l 0x409 /d \"NDEBUG\"\r\n"); fprintf(f, "BSC32=bscmake.exe\r\n"); fprintf(f, "# ADD BASE BSC32 /nologo\r\n"); fprintf(f, "# ADD BSC32 /nologo\r\n"); fprintf(f, "LINK32=link.exe\r\n"); fprintf(f, "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386\r\n"); fprintf(f, "# ADD LINK32 opengl32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /version:1.0 /subsystem:windows /dll /pdb:\"%s.pdb\" /machine:I386\r\n", name); fprintf(f, "# SUBTRACT LINK32 /pdb:none\r\n"); fprintf(f, "\r\n"); fprintf(f, "!ELSEIF \"$(CFG)\" == \"%s - Win32 Debug\"\r\n", name); fprintf(f, "\r\n"); fprintf(f, "# PROP BASE Use_MFC 0\r\n"); fprintf(f, "# PROP BASE Use_Debug_Libraries 1\r\n"); fprintf(f, "# PROP BASE Output_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Intermediate_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP BASE Target_Dir \"\"\r\n"); fprintf(f, "# PROP Use_MFC 0\r\n"); fprintf(f, "# PROP Use_Debug_Libraries 1\r\n"); fprintf(f, "# PROP Output_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Intermediate_Dir \"Debug/$(ProjectName)\"\r\n"); fprintf(f, "# PROP Ignore_Export_Lib 0\r\n"); fprintf(f, "# PROP Target_Dir \"\"\r\n"); fprintf(f, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /YX /FD /c\r\n"); fprintf(f, "# ADD CPP /nologo /MDd /GX /ZI /Od /I \".\" /I \"../..\" /I \"..\\..\\zlib\" /I \"..\\..\\png\" /I \"..\\..\\jpeg\" /D \"FL_DLL\" /D \"FL_LIBRARY\" /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"WIN32_LEAN_AND_MEAN\" /D \"VC_EXTRA_LEAN\" /D \"WIN32_EXTRA_LEAN\" /YX /c\r\n"); fprintf(f, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /o /win32 \"NUL\"\r\n"); fprintf(f, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /o /win32 \"NUL\"\r\n"); fprintf(f, "# ADD BASE RSC /l 0x409 /d \"_DEBUG\"\r\n"); fprintf(f, "# ADD RSC /l 0x409 /d \"_DEBUG\"\r\n"); fprintf(f, "BSC32=bscmake.exe\r\n"); fprintf(f, "# ADD BASE BSC32 /nologo\r\n"); fprintf(f, "# ADD BSC32 /nologo\r\n"); fprintf(f, "LINK32=link.exe\r\n"); fprintf(f, "# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept\r\n"); fprintf(f, "# ADD LINK32 opengl32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /version:1.0 /subsystem:windows /dll /pdb:\"%sd.pdb\" /debug /machine:I386 /out:\"../../test/%sd.dll\" /pdbtype:sept\r\n", name, name); fprintf(f, "# SUBTRACT LINK32 /pdb:none /incremental:no\r\n"); fprintf(f, "\r\n"); fprintf(f, "!ENDIF \r\n"); fprintf(f, "\r\n"); fprintf(f, "# Begin Target\r\n"); fprintf(f, "\r\n"); fprintf(f, "# Name \"%s - Win32 Release\"\r\n", name); fprintf(f, "# Name \"%s - Win32 Debug\"\r\n", name); Fl_Preferences sourcesDB(targetDB, "sources"); int i, n = sourcesDB.groups(); for (i=0; i : create IDE files for MS IDE's able to read VC6 projects"; } int arg(int argc, char **argv, int &i) { if (argc>=i+1 && strcmp(argv[i], "--dbvisualc6")==0) { if (argc>=i+3 && argv[i+1][0]!='-' && argv[i+2][0]!='-') { fprintf(stderr, "Creating VisualC++ 6.0 IDE from %s in %s\n", argv[i+1], argv[i+2]); exit_early = 1; generate_fltk_VisualC6_support(argv[i+1], argv[i+2]); i = i+3; return 3; } else { fprintf(stderr, "Missing argument: --dbvisualc6 \n"); return 1; } } return 0; } int test(const char *a1, const char *a2, const char *a3) { generate_fltk_VisualC6_support(a1, a2); return 0; } }; Fl_IDE_VisualC_Plugin IDE_VisualC_Plugin; // // End of "$Id$". //