summaryrefslogtreecommitdiff
path: root/CodeWarrior/Win32
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2002-07-11 22:40:11 +0000
committerMatthias Melcher <fltk@matthiasm.com>2002-07-11 22:40:11 +0000
commitcd9ae1abd5b926331116bfbc6a71f517f3c34c90 (patch)
tree5b47215451049b689062e4eaba9482bc5acff9ca /CodeWarrior/Win32
parent9feef1e696525f8969970394ec3695944f403b79 (diff)
Added Metrowerks CodeWarrior support for Windows (MacOS soon to come)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'CodeWarrior/Win32')
-rw-r--r--CodeWarrior/Win32/CWDLLPrefix.H37
-rw-r--r--CodeWarrior/Win32/CWStaticPrefix.H36
-rw-r--r--CodeWarrior/Win32/FLTK.mcpbin0 -> 1804193 bytes
-rw-r--r--CodeWarrior/Win32/FLTK_Data/CWSettingsWindows.stgbin0 -> 8095 bytes
-rw-r--r--CodeWarrior/Win32/README.txt44
-rw-r--r--CodeWarrior/Win32/config.h188
-rwxr-xr-xCodeWarrior/Win32/installFLTK.bat56
-rwxr-xr-xCodeWarrior/Win32/installFluid.bat27
-rw-r--r--CodeWarrior/Win32/stationary/App_using_FLTK_static/FLTK_App_Static.mcpbin0 -> 78639 bytes
-rw-r--r--CodeWarrior/Win32/stationary/App_using_FLTK_static/hello.cxx43
-rwxr-xr-xCodeWarrior/Win32/uninstallFLTKandFluid.bat20
11 files changed, 451 insertions, 0 deletions
diff --git a/CodeWarrior/Win32/CWDLLPrefix.H b/CodeWarrior/Win32/CWDLLPrefix.H
new file mode 100644
index 000000000..6c6457a04
--- /dev/null
+++ b/CodeWarrior/Win32/CWDLLPrefix.H
@@ -0,0 +1,37 @@
+//
+//
+//
+// Metrowerks CodeWarrior Prefix File for dynamic libraries
+//
+// Copyright 1998-2002 by Bill Spitzak and others.
+//
+// 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 to "fltk-bugs@fltk.org".
+//
+
+#define WIN32_LEAN_AND_MEAN
+#define WIN32_EXTRA_LEAN
+#define VC_EXTRA_LEAN
+
+#include <Win32Headers.h>
+
+#define FL_DLL
+#define FL_LIBRARY
+
+//
+//
+//
diff --git a/CodeWarrior/Win32/CWStaticPrefix.H b/CodeWarrior/Win32/CWStaticPrefix.H
new file mode 100644
index 000000000..46bd6e378
--- /dev/null
+++ b/CodeWarrior/Win32/CWStaticPrefix.H
@@ -0,0 +1,36 @@
+//
+//
+//
+// Metrowerks CodeWarrior Prefix File for static libraries
+//
+// Copyright 1998-2002 by Bill Spitzak and others.
+//
+// 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 to "fltk-bugs@fltk.org".
+//
+
+#define WIN32_LEAN_AND_MEAN
+#define WIN32_EXTRA_LEAN
+#define VC_EXTRA_LEAN
+
+#include <Win32Headers.h>
+
+#define FL_STATIC
+
+//
+//
+//
diff --git a/CodeWarrior/Win32/FLTK.mcp b/CodeWarrior/Win32/FLTK.mcp
new file mode 100644
index 000000000..0e5b792ea
--- /dev/null
+++ b/CodeWarrior/Win32/FLTK.mcp
Binary files differ
diff --git a/CodeWarrior/Win32/FLTK_Data/CWSettingsWindows.stg b/CodeWarrior/Win32/FLTK_Data/CWSettingsWindows.stg
new file mode 100644
index 000000000..fff71fa19
--- /dev/null
+++ b/CodeWarrior/Win32/FLTK_Data/CWSettingsWindows.stg
Binary files differ
diff --git a/CodeWarrior/Win32/README.txt b/CodeWarrior/Win32/README.txt
new file mode 100644
index 000000000..41c2d5318
--- /dev/null
+++ b/CodeWarrior/Win32/README.txt
@@ -0,0 +1,44 @@
+
+FLTK Project files for Metrowerks CodeWarrior 8 on Win32
+--------------------------------------------------------
+
+Loading:
+
+ The Win32 version of the CW project file for Windows98,
+ Windows2000, etc. is located in
+ fltk-1.1.x/CodeWarrior/Win32/FLTK.mcp
+
+Targets:
+
+ The first three targets can be use to install and test
+ FLTK for CodeWarrior.
+
+ The first target, 'Install FLTK Release', will compile
+ all FLTK libraries and install them in the Windows support
+ folders of CW.
+
+ 'Install Fluid plugin' compiles the interactive UI builder
+ Fluid and installs it as a compiler plugin in CW. Fluid
+ resource files end with the extension ".fl" and can be added
+ to a target using the 'File Mappings' panel. After adding
+ the Fluid plugin via 'run', CodeWarrior must be restarted.
+
+ The third target, 'Build And Run Demos', will only compile
+ without errors after the Fluid plugin has been installed.
+
+Fluid Plugin:
+
+ The Fluid Plugin allows .fl files to be compiled into .cxx
+ and .h files. It will try to find Fluid (fluid.exe or
+ fluidd.exe) first in one of the target paths, then in either
+ CodeWarriors Bin and Copiler Plugin folder.
+
+ The Plugin makes the home directory of the .fl file the
+ current directory and call Fluid with the -c option.
+
+ After Fluid has created the .cxx and .h file, the plugin
+ will notify CW that those files were externally changed.
+
+
+Have fun!
+ \ No newline at end of file
diff --git a/CodeWarrior/Win32/config.h b/CodeWarrior/Win32/config.h
new file mode 100644
index 000000000..5a1d43a98
--- /dev/null
+++ b/CodeWarrior/Win32/config.h
@@ -0,0 +1,188 @@
+/*
+ * "$Id: config.h,v 1.1.2.1 2002/07/11 22:40:11 matthiaswm Exp $"
+ *
+ * Configuration file for the Fast Light Tool Kit (FLTK) for Visual C++.
+ *
+ * Copyright 1998-2002 by Bill Spitzak and others.
+ *
+ * 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 to "fltk-bugs@fltk.org".
+ */
+
+/*
+ * Where to find files...
+ */
+
+#define FLTK_DATADIR "C:/FLTK"
+#define FLTK_DOCDIR "C:/FLTK/DOC"
+
+/*
+ * BORDER_WIDTH:
+ *
+ * Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
+ * supported. 3 is the historic FLTK look. 2 looks more like Microsoft
+ * Windows, KDE, and Qt, and is the default when building for Windows.
+ * 1 is a plausible future evolution... Note that this may be simulated
+ * at runtime by redefining the boxtypes using Fl::set_boxtype().
+ */
+
+#define BORDER_WIDTH 2
+
+/*
+ * HAVE_GL:
+ *
+ * Do you have OpenGL? Set this to 0 if you don't have or plan to use
+ * OpenGL, and FLTK will be smaller.
+ */
+
+#define HAVE_GL 1
+
+/*
+ * HAVE_GL_GLU_H:
+ *
+ * Do you have the OpenGL Utility Library header file?
+ * (many broken Mesa RPMs do not...)
+ */
+
+#define HAVE_GL_GLU_H 1
+
+/*
+ * USE_COLORMAP:
+ *
+ * Setting this to zero will save a good deal of code (especially for
+ * fl_draw_image), but FLTK will only work on TrueColor visuals.
+ */
+
+#define USE_COLORMAP 1
+
+/*
+ * HAVE_XDBE:
+ *
+ * Do we have the X double-buffer extension?
+ */
+
+#define HAVE_XDBE 0
+
+/*
+ * USE_XDBE:
+ *
+ * Actually try to use the double-buffer extension? Set this to zero
+ * disable use of XDBE without breaking the list_visuals program.
+ */
+
+#define USE_XDBE HAVE_XDBE
+
+/*
+ * HAVE_OVERLAY:
+ *
+ * Use the X overlay extension? FLTK will try to use an overlay
+ * visual for Fl_Overlay_Window, the Gl_Window overlay, and for the
+ * menus. Setting this to zero will remove a substantial amount of
+ * code from FLTK. Overlays have only been tested on SGI servers!
+ */
+
+#define HAVE_OVERLAY 0
+
+/*
+ * HAVE_GL_OVERLAY:
+ *
+ * It is possible your GL has an overlay even if X does not. If so,
+ * set this to 1.
+ */
+
+#define HAVE_GL_OVERLAY 1
+
+/*
+ * WORDS_BIGENDIAN:
+ *
+ * Byte order of your machine: 1 = big-endian, 0 = little-endian.
+ */
+
+#define WORDS_BIGENDIAN 0
+
+/*
+ * U16, U32, U64:
+ *
+ * Types used by fl_draw_image. One of U32 or U64 must be defined.
+ * U16 is optional but FLTK will work better with it!
+ */
+
+#define U16 unsigned short
+#define U32 unsigned
+#undef U64
+
+/*
+ * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
+ *
+ * Where is <dirent.h> (used only by fl_file_chooser and scandir).
+ */
+
+/*#undef HAVE_DIRENT_H */
+/*#undef HAVE_SYS_NDIR_H */
+/*#undef HAVE_SYS_DIR_H */
+/*#undef HAVE_NDIR_H */
+/*#undef HAVE_SCANDIR */
+
+/*
+ * Possibly missing sprintf-style functions:
+ */
+
+#define HAVE_VSNPRINTF 1
+#define HAVE_SNPRINTF 1
+
+/*
+ * String functions...
+ */
+
+#define HAVE_STRCASECMP 1
+/*#undef HAVE_STRLCAT*/
+/*#undef HAVE_STRLCPY*/
+
+/*
+ * HAVE_POLL:
+ *
+ * Use poll() if we don't have select().
+ */
+
+#define HAVE_POLL 0
+
+/*
+ * Do we have various image libraries?
+ */
+
+#undef HAVE_LIBPNG
+#undef HAVE_LIBZ
+#undef HAVE_LIBJPEG
+
+/*
+ * Which header file do we include for libpng?
+ */
+
+#undef HAVE_PNG_H
+#undef HAVE_LIBPNG_PNG_H
+
+/*
+ * Do we have the png_xyz() functions?
+ */
+
+#undef HAVE_PNG_GET_VALID
+#undef HAVE_PNG_SET_TRNS_TO_ALPHA
+
+
+/*
+ * End of "$Id: config.h,v 1.1.2.1 2002/07/11 22:40:11 matthiaswm Exp $".
+ */
diff --git a/CodeWarrior/Win32/installFLTK.bat b/CodeWarrior/Win32/installFLTK.bat
new file mode 100755
index 000000000..cfffb3199
--- /dev/null
+++ b/CodeWarrior/Win32/installFLTK.bat
@@ -0,0 +1,56 @@
+@echo off
+
+echo FLTK library installation for Metrowerks' CodeWarrior
+echo .
+
+:: --- copy FLTK header files into Win32 support directory
+
+if exist "%CWFOLDER%" goto copyHeaders
+
+echo ERROR: Can't copy headers files
+echo Codewarrior header files folder not found
+goto skipHeaderCopy
+
+:copyHeaders
+echo Copying header files...
+xcopy /Y /C /E /I /Q ..\..\FL "%CWFOLDER%\Win32-x86 FLTK\Headers\FL"
+
+:skipHeaderCopy
+
+
+:: --- copy FLTK libraries into Win32 support directory
+
+if exist "%CWFOLDER%" goto copyLibs
+
+echo ERROR: Can't copy libraries
+echo Codewarrior libraries folder not found
+goto skipLibsCopy
+
+:copyLibs
+echo Copying libraries...
+xcopy /Y /C /E /I /Q ..\..\lib "%CWFOLDER%\Win32-x86 FLTK\Libraries"
+
+:skipLibsCopy
+
+:: --- copy FLTK dll into test directory to make 'editor' test work
+
+echo Copying dll to 'test'...
+xcopy /Y /Q ..\..\lib\fltkdll.dll ..\..\test
+
+:: --- copy FLTK stationary into stationary directory
+
+if exist "%CWFOLDER%\Stationery\Win32 C++" goto copyStat
+
+echo ERROR: Can't copy stationary
+echo Codewarrior stationary folder not found
+goto skipStatCopy
+
+:copyStat
+echo Copying FLTK stationary...
+xcopy /Y /C /E /I /Q "stationary" "%CWFOLDER%\Stationery\Win32 C++\WIN32 FLTK GUI App"
+
+:skipStatCopy
+
+echo .
+pause
+
diff --git a/CodeWarrior/Win32/installFluid.bat b/CodeWarrior/Win32/installFluid.bat
new file mode 100755
index 000000000..fba430381
--- /dev/null
+++ b/CodeWarrior/Win32/installFluid.bat
@@ -0,0 +1,27 @@
+@echo off
+
+echo FLTK Fluid plugin installation for Metrowerks' CodeWarrior
+echo .
+
+:: --- copy Fluid and Fluid Plugin into the CW directories
+
+if exist "%CWFOLDER%\Bin\Plugins\Compiler" goto copyPlugin
+
+echo ERROR: Can't Fluid Plugin
+echo Codewarrior Plugin folder not found
+goto skipPluginCopy
+
+:copyPlugin
+echo Copying Fluid Plugin...
+copy ..\..\fluid\fluid.exe "%CWFOLDER%\Bin\Plugins\Compiler"
+copy ..\..\fluid\FluidCompiler.dll "%CWFOLDER%\Bin\Plugins\Compiler"
+
+:skipPluginCopy
+
+echo .
+echo Metrowerks CodeWarrior needs to be restarted to make the
+echo Fluid Plugin available. Please restart CodeWarrior now
+echo to compile the FLTK Test and Demo files.
+echo .
+pause
+
diff --git a/CodeWarrior/Win32/stationary/App_using_FLTK_static/FLTK_App_Static.mcp b/CodeWarrior/Win32/stationary/App_using_FLTK_static/FLTK_App_Static.mcp
new file mode 100644
index 000000000..ab94d5d7b
--- /dev/null
+++ b/CodeWarrior/Win32/stationary/App_using_FLTK_static/FLTK_App_Static.mcp
Binary files differ
diff --git a/CodeWarrior/Win32/stationary/App_using_FLTK_static/hello.cxx b/CodeWarrior/Win32/stationary/App_using_FLTK_static/hello.cxx
new file mode 100644
index 000000000..58d35762d
--- /dev/null
+++ b/CodeWarrior/Win32/stationary/App_using_FLTK_static/hello.cxx
@@ -0,0 +1,43 @@
+//
+// "$Id: hello.cxx,v 1.1.2.1 2002/07/11 22:40:11 matthiaswm Exp $"
+//
+// Hello, World! program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2002 by Bill Spitzak and others.
+//
+// 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 to "fltk-bugs@fltk.org".
+//
+
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Box.H>
+
+int main(int argc, char **argv) {
+ Fl_Window *window = new Fl_Window(300,180);
+ Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
+ box->labelfont(FL_BOLD+FL_ITALIC);
+ box->labelsize(36);
+ box->labeltype(FL_SHADOW_LABEL);
+ window->end();
+ window->show(argc, argv);
+ return Fl::run();
+}
+
+//
+// End of "$Id: hello.cxx,v 1.1.2.1 2002/07/11 22:40:11 matthiaswm Exp $".
+//
diff --git a/CodeWarrior/Win32/uninstallFLTKandFluid.bat b/CodeWarrior/Win32/uninstallFLTKandFluid.bat
new file mode 100755
index 000000000..4cbfb391e
--- /dev/null
+++ b/CodeWarrior/Win32/uninstallFLTKandFluid.bat
@@ -0,0 +1,20 @@
+@echo off
+
+echo Uninstall FLTK and Fluid for Metrowerks' CodeWarrior
+echo .
+
+echo Deleting FLTK Libararies and Includes
+if exist "%CWFOLDER%\Win32-x86 FLTK\Headers\FL" rd /S /Q "%CWFOLDER%\Win32-x86 FLTK\Headers\FL"
+if exist "%CWFOLDER%\Win32-x86 FLTK\Libraries" rd /S /Q "%CWFOLDER%\Win32-x86 FLTK\Libraries"
+if exist "%CWFOLDER%\Win32-x86 FLTK" rd /S /Q "%CWFOLDER%\Win32-x86 FLTK"
+
+echo Deleting Fluid Plugin
+if exist "%CWFOLDER%\Bin\Plugins\Compiler\fluid.exe" del "%CWFOLDER%\Bin\Plugins\Compiler\fluid.exe"
+if exist "%CWFOLDER%\Bin\Plugins\Compiler\FluidCompiler.dll" del "%CWFOLDER%\Bin\Plugins\Compiler\FluidCompiler.dll"
+
+echo Deleting FLTK Stationary
+if exist "%CWFOLDER%\Stationery\Win32 C++\WIN32 FLTK GUI App" rd /S /Q "%CWFOLDER%\Stationery\Win32 C++\WIN32 FLTK GUI App"
+
+echo .
+pause
+