Skip to content

Commit f69e0b9

Browse files
committed
Add x86 support to build_freetype.bat
The build script now detects the platform (`x64` vs `x86`) of `cl` and builds into the appropriate folder. This only works when `cl` is set up via `setup_cl_xxx.bat`. If `cl` is added directly to `PATH`, the detection will likely fail because it relies on the `%Platform%` variable.
1 parent 3358c50 commit f69e0b9

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

non-source/foreign/freetype2/build_freetype.bat

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ SET FILES=%FILES% %ROOT%\src\base\ftsystem.c
88
SET FILES=%FILES% %ROOT%\src\base\ftinit.c
99
SET FILES=%FILES% %ROOT%\src\base\ftdebug.c
1010
SET FILES=%FILES% %ROOT%\src\base\ftbase.c
11-
REM SET FILES=%FILES% %ROOT%\src\base\ftbbox.c
12-
REM SET FILES=%FILES% %ROOT%\src\base\ftglyph.c
1311
SET FILES=%FILES% %ROOT%\src\base\ftbitmap.c
1412
SET FILES=%FILES% %ROOT%\src\sfnt\sfnt.c
1513
SET FILES=%FILES% %ROOT%\src\truetype\truetype.c
@@ -20,11 +18,16 @@ SET FILES=%FILES% %ROOT%\src\psnames\psnames.c
2018
SET FILES=%FILES% %ROOT%\src\pshinter\pshinter.c
2119

2220
SET BUILD_DIR=%ROOT%\..\x64
23-
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
21+
IF "%Platform%" == "X86" (
22+
SET BUILD_DIR=%ROOT%\..\x86
23+
) ELSE IF "%Platform%" == "x86" (
24+
SET BUILD_DIR=%ROOT%\..\x86
25+
)
26+
IF NOT EXIST "%BUILD_DIR%" MKDIR "%BUILD_DIR%"
2427
cd %BUILD_DIR%
2528

26-
del *.pdb
29+
del *.pdb > NUL 2> NUL
2730
cl /c /nologo /Zi /O2 /Fd:freetype.pdb /DFT2_BUILD_LIBRARY /I%ROOT% %FILES%
2831
lib /nologo /OUT:freetype.lib *.obj
29-
del *.obj
32+
del *.obj > NUL 2> NUL
3033
popd
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
1.15 MB
Binary file not shown.
292 KB
Binary file not shown.

0 commit comments

Comments
 (0)