]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/process_sample_bcb.bat
set WXWIN_COMPATIBILITY_2_2 to 1 by default
[wxWidgets.git] / distrib / msw / process_sample_bcb.bat
1 @echo off
2 if "%WXWIN%=="" goto nowxdir
3 if "%1"=="" goto bad
4 if not exist %1.cpp goto nocpp
5 find /c "BIDE" %1.cpp
6 if not errorlevel 1 goto already
7
8
9
10
11 @echo off
12 echo #this is for mak/bpr files in sample\dir > %1.mak
13
14 echo #----------------------------------------------------------------------------- >> %1.mak
15 echo #this is a source makefile for Borland CBuilder IDE v1,3 >> %1.mak
16 echo #You may need to add \ at the end of the lines if your editor breaks them up >> %1.mak
17 echo #----------------------------------------------------------------------------- >> %1.mak
18
19 echo PROJECT = %1.exe >> %1.mak >> %1.mak
20 echo RESFILES = %1.res >> %1.mak >> %1.mak
21
22 echo OBJFILES = >> %1.mak
23 echo RESDEPEN = $(RESFILES) >> %1.mak
24 echo LIBFILES = >> %1.mak
25
26 echo !ifndef BCB >> %1.mak
27 echo BCB = $(MAKEDIR)\.. >> %1.mak
28 echo !endif >> %1.mak
29 echo #----------------------------------------------------------------------------- >> %1.mak
30 echo CFLAG1 = -Od -v -a1 -c -w-hid >> %1.mak
31 echo #disable optimisations debug byte align (matches my make for the library) >> %1.mak
32 echo CFLAG2 = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__ -I$(BCB)\include;$(BCB)\include\vcl;%WXWIN%\include -H=BC32.CSM >> %1.mak
33 echo PFLAGS = >> %1.mak
34 echo RFLAGS = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__ -I$(BCB)\include;%WXWIN%\include >> %1.mak
35 echo LFLAGS = -L$(BCB)\lib;$(BCB)\lib\obj;%WXWIN%\lib -aa -Tpe -v -V4.0 -c >> %1.mak
36 echo IFLAGS = >> %1.mak
37 echo LINKER = ilink32 >> %1.mak
38 echo #----------------------------------------------------------------------------- >> %1.mak
39 echo ALLOBJ = c0w32.obj $(OBJFILES) >> %1.mak
40 echo ALLRES = $(RESFILES) >> %1.mak
41 rem xpm.lib seems to have disappeared from libraries ?? 14 Jun 2001
42 rem echo ALLLIB = $(LIBFILES) vcl.lib xpm.lib wx32.lib ole2w32.lib import32.lib cw32mt.lib odbc32.lib winpng.lib tiff.lib jpeg.lib zlib.lib >> %1.mak
43 echo ALLLIB = $(LIBFILES) vcl.lib wx32.lib ole2w32.lib import32.lib cw32mt.lib odbc32.lib winpng.lib tiff.lib jpeg.lib zlib.lib >> %1.mak
44 echo #--------------------------------------------------------------------------- >> %1.mak
45 echo .autodepend >> %1.mak
46 echo. >> %1.mak
47
48 echo #----------------------------------------------------------------------------- >> %1.mak
49 echo $(PROJECT): $(OBJFILES) $(RESDEPEN) >> %1.mak
50
51
52 copy %1.mak %1.bpr
53 rem bpr is for cb4 mak for cb1
54 copy %1.cpp %1_old.cpp
55
56 echo //Source code file for CBuilder/ wxWindows modified by Chris Elliott (biol75@.york.ac.uk) > %1.cpp
57 echo #ifdef __BIDE__ >> %1.cpp
58 echo #define _NO_VCL >> %1.cpp
59 echo #include "condefs.h" >> %1.cpp
60 echo #define WinMain WinMain >> %1.cpp
61
62 if "%2"=="" goto skipfile
63 echo USEUNIT ("%2.cpp"); // use a line like this if you have more than one .cpp file >> %1.cpp
64 if "%3"=="" goto skipfile
65 echo USEUNIT ("%3.cpp"); // use a line like this if you have more than one .cpp file >> %1.cpp
66 if "%4"=="" goto skipfile
67 echo USEUNIT ("%4.cpp"); // use a line like this if you have more than one .cpp file >> %1.cpp
68 if "%5"=="" goto skipfile
69 echo USEUNIT ("%5.cpp"); // use a line like this if you have more than one .cpp file >> %1.cpp
70 :skipfile
71 echo USERC ("%1.rc"); >> %1.cpp
72 echo #endif >> %1.cpp
73
74 type %1_old.cpp >> %1.cpp
75
76 goto end
77
78 :nowxdir
79 echo Please use the MSDOS command SET WXWIN=DRV:PATH_TO_WX before trying this batch file
80 echo e.g. SET WXWIN=c:\wx
81 goto end
82
83 :bad
84 echo No file to modify passed on command line :
85 echo Usage: process_sample_bcb filename_without_ext
86 echo No file to modify passed on command line : Usage process_sample_bcb filename_without_ext >> %WXWIN%\distrib\msw\proc_bcb.log
87 goto end
88
89
90 :nocpp
91 echo original %1.cpp file not found
92 echo original %1.cpp file not found >> %WXWIN%\distrib\msw\proc_bcb.log
93 goto end
94
95 :already
96 echo Source file %1.cpp appears to already be converted with __BIDE__ defined
97 echo Source file %1.cpp appears to already be converted with __BIDE__ defined >> %WXWIN%\distrib\msw\proc_bcb.log
98
99
100
101
102 :end