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