1999-10-14 22:14:04 +00:00
|
|
|
@echo off
|
1999-10-12 21:50:30 +00:00
|
|
|
rem makedata.bat
|
|
|
|
rem batch file for Windows for creating the ICU data files
|
|
|
|
rem parameter:
|
|
|
|
rem %1 path where the icu folder resides
|
|
|
|
|
|
|
|
if "%1"=="" goto :error
|
|
|
|
|
|
|
|
if "%ICU_DATA%"=="" set ICU_DATA=%1\icu\data\
|
1999-10-14 22:14:04 +00:00
|
|
|
|
|
|
|
rem toolversion: Debug or Release
|
|
|
|
set toolversion=Release
|
1999-10-27 18:40:52 +00:00
|
|
|
if not "%2"=="" set toolversion=%2
|
1999-10-12 21:50:30 +00:00
|
|
|
|
1999-12-14 16:30:54 +00:00
|
|
|
nmake /f makedata.mak icup=%1 cfg=%2 %3 %4
|
1999-12-13 03:44:22 +00:00
|
|
|
|
|
|
|
goto :end
|
|
|
|
|
1999-12-06 06:54:34 +00:00
|
|
|
rem setup mkhelper to read ucmfiles.mk and ucmlocal.mk
|
|
|
|
set conv=mkhelper\%toolversion%\mkhelper -n UCM_SOURCE -n UCM_SOURCE_LOCAL makeconv\ucmfiles.mk makeconv\ucmlocal.mk
|
|
|
|
|
1999-12-02 23:26:44 +00:00
|
|
|
echo create conversion tables
|
1999-12-06 06:54:34 +00:00
|
|
|
rem delete preexisting files to prevent upper/lowercase file name problems
|
|
|
|
del "%ICU_DATA%*.cnv"
|
|
|
|
del "%ICU_DATA%*_cnv.c"
|
|
|
|
del *_cnv.obj
|
|
|
|
%conv% -p "$toolversion$\makeconv \"$ICU_DATA$" -s "\"">makeconv\mkcnvtmp.bat
|
1999-12-02 23:26:44 +00:00
|
|
|
cd makeconv
|
1999-12-06 06:54:34 +00:00
|
|
|
call mkcnvtmp.bat
|
1999-12-02 23:26:44 +00:00
|
|
|
|
|
|
|
echo create locale resource bundles
|
|
|
|
cd ..\genrb
|
|
|
|
call genrb %toolversion% %1
|
|
|
|
|
|
|
|
echo create binary collation tables
|
|
|
|
cd ..\gencol
|
|
|
|
%toolversion%\gencol
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
1999-11-20 01:10:07 +00:00
|
|
|
echo create unames.dat and unames_dat.c from UnicodeData.txt
|
|
|
|
gennames\%toolversion%\gennames -v- -c- "%ICU_DATA%UnicodeData-3.0.0.txt"
|
|
|
|
genccode\%toolversion%\genccode "%ICU_DATA%unames.dat"
|
|
|
|
|
1999-11-23 02:17:43 +00:00
|
|
|
echo create cnvalias.dat and cnvalias_dat.c from convrtrs.txt
|
|
|
|
gencnval\%toolversion%\gencnval -c-
|
|
|
|
genccode\%toolversion%\genccode "%ICU_DATA%cnvalias.dat"
|
|
|
|
|
1999-11-30 23:05:49 +00:00
|
|
|
echo create tz.dat from tz.txt
|
1999-12-05 05:59:33 +00:00
|
|
|
gentz\%toolversion%\gentz -c- gentz\tz.txt
|
1999-11-30 23:05:49 +00:00
|
|
|
genccode\%toolversion%\genccode "%ICU_DATA%tz.dat"
|
|
|
|
|
1999-12-06 06:54:34 +00:00
|
|
|
echo create the converters
|
|
|
|
%conv% -p "genccode\$toolversion$\genccode \"$ICU_DATA$" -s "\"" -old ".ucm" -new ".cnv">mkconv.bat
|
|
|
|
call mkconv.bat
|
|
|
|
|
1999-11-20 01:10:07 +00:00
|
|
|
echo create the data DLL
|
1999-12-06 06:54:34 +00:00
|
|
|
type mkobj.cl>mkobj.tmp
|
|
|
|
echo "%ICU_DATA%unames_dat.c">>mkobj.tmp
|
|
|
|
echo "%ICU_DATA%cnvalias_dat.c">>mkobj.tmp
|
|
|
|
echo "%ICU_DATA%tz_dat.c">>mkobj.tmp
|
|
|
|
%conv% -p "\"$ICU_DATA$" -s "\"" -old ".ucm" -new "_cnv.c">>mkobj.tmp
|
|
|
|
cl @mkobj.tmp
|
|
|
|
|
1999-11-20 01:10:07 +00:00
|
|
|
echo "/out:%ICU_DATA%icudata.dll">mkdll.tmp
|
|
|
|
echo unames_dat.obj>>mkdll.tmp
|
1999-11-23 02:17:43 +00:00
|
|
|
echo cnvalias_dat.obj>>mkdll.tmp
|
1999-11-30 23:05:49 +00:00
|
|
|
echo tz_dat.obj>>mkdll.tmp
|
1999-12-06 06:54:34 +00:00
|
|
|
%conv% -old ".ucm" -new "_cnv.obj">>mkdll.tmp
|
1999-11-20 01:10:07 +00:00
|
|
|
type mkdll.lk>>mkdll.tmp
|
|
|
|
link @mkdll.tmp
|
|
|
|
|
1999-11-22 17:56:30 +00:00
|
|
|
echo create the common, memory-mappable file
|
|
|
|
del "%ICU_DATA%icudata.dat"
|
|
|
|
echo %ICU_DATA%unames.dat>mkmap.tmp
|
1999-11-23 22:48:23 +00:00
|
|
|
echo %ICU_DATA%cnvalias.dat>>mkmap.tmp
|
1999-11-30 23:05:49 +00:00
|
|
|
echo %ICU_DATA%tz.dat>>mkmap.tmp
|
1999-12-06 06:54:34 +00:00
|
|
|
%conv% -p "$ICU_DATA$" -old ".ucm" -new ".cnv">>mkmap.tmp
|
1999-11-22 17:56:30 +00:00
|
|
|
gencmn\%toolversion%\gencmn 1000000 mkmap.tmp
|
|
|
|
|
1999-11-26 19:35:18 +00:00
|
|
|
|
1999-10-12 21:50:30 +00:00
|
|
|
goto :end
|
|
|
|
|
|
|
|
:error
|
|
|
|
echo call makedata with the absolute path to the icu directory
|
|
|
|
echo for example, if the full path is d:\mytools\icu then call
|
|
|
|
echo makedata d:\mytools
|
1999-10-27 18:40:52 +00:00
|
|
|
echo a second, optional, parameter can be Debug or Release to specify the tools versions
|
1999-11-20 01:10:07 +00:00
|
|
|
echo.
|
|
|
|
echo the current directory must be the icu\source\tools directory with makedata.bat
|
|
|
|
echo also, the cl compiler and link linker must be on the PATH
|
1999-10-12 21:50:30 +00:00
|
|
|
|
|
|
|
:end
|