Skip to content

Commit bfa62df

Browse files
author
Steve Simpson
committed
Added a generic Windows CE (WinCE) build target
It needs some work and I have not tried it. But it should be simple enough to massage into shape.
1 parent a41885f commit bfa62df

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

build-targets/Wince.cmd

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
@echo off
2+
setlocal ENABLEEXTENSIONS
3+
setlocal ENABLEDELAYEDEXPANSION
4+
5+
set SCRIPT_NAME=%~nx0
6+
set SCRIPT_PATH=%~dp0
7+
set SCRIPT_PATH=%SCRIPT_PATH:~0,-1%
8+
for %%* in (%SCRIPT_PATH%) do set SCRIPT_FOLDER=%%~nx*
9+
set SCRIPT_ARGS=%*
10+
11+
rem You can use tt as a temporary file for stashing stuff
12+
set tt=%Time: =0%
13+
set tt=%tt::=%
14+
set tt=%tt:.=%
15+
set tt=%tt:,=%
16+
set tt=%TEMP%\%tt%.%SCRIPT_NAME%
17+
18+
set PWD=%CD%
19+
20+
call :%*
21+
exit /b %errorlevel%
22+
23+
:subroutines
24+
25+
rem Use this as a basis for making a custom qt build-target for your device
26+
rem It needs a bit of work, but should be easy enough to massage into shape
27+
28+
:configure
29+
30+
set TOOL_CHAIN=%1
31+
32+
if "%TOOL_CHAIN%" neq "msvc2008" (
33+
echo.
34+
echo ##############
35+
echo #
36+
echo # Configure failed -- Invalid tool chain, Windows CE (WinCE) only supports msvc2008
37+
echo.
38+
set errorlevel=899
39+
goto :eof
40+
)
41+
42+
rem Set QT_XPLATFORM_BASE to name the base name of your device's mkspec folder
43+
set QT_XPLATFORM_BASE=wince600Generic-armv4i
44+
45+
set CONFIG_OPTIONS=-opensource -release -no-phonon-backend -no-phonon -no-multimedia -no-audio-backend -no-script -no-dbus -no-openssl -no-openvg -no-declarative -nomake demos -nomake examples -nomake tools
46+
rem set CONFIG_OPTIONS=%CONFIG_OPTIONS% -no-webkit
47+
set CONFIG_OPTIONS=%CONFIG_OPTIONS% -webkit
48+
set CONFIG_OPTIONS=%CONFIG_OPTIONS% -qt-freetype
49+
set CONFIG_OPTIONS=%CONFIG_OPTIONS% -D QT_NO_PRINTER -D QT_NO_PRINTDIALOG
50+
51+
echo y | "%QTSRCDIR%\configure" -platform win32-%TOOL_CHAIN% -xplatform %QT_XPLATFORM_BASE%-%TOOL_CHAIN% %CONFIG_OPTIONS%
52+
53+
goto :eof
54+
55+
:build
56+
57+
rem The libraries that MS ships with Windows CE are lame
58+
rem Many of the includes redefine macros and other such things
59+
rem The following PATH order was found by trial and error
60+
rem Your mileage may vary...
61+
62+
rem Change TARGET_WINCE_VER to match the version of Windows CE that your device targets
63+
set TARGET_WINCE_VER=wce600
64+
65+
rem Change OEM_SDK_NAME to match the name of the SDK that ships for your device
66+
set OEM_SDK_NAME=GenericWinceDevice
67+
68+
set PATH=%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bin;%PATH%
69+
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\VCPackages;%PATH%
70+
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE;%PATH%
71+
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\Tools;%PATH%
72+
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin;%PATH%
73+
set PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\ce\BIN\x86_arm;%PATH%
74+
75+
set INCLUDE=%ProgramFiles(x86)%\Windows CE Tools\%TARGET_WINCE_VER%\%OEM_SDK_NAME%\Include\Armv4i;%INCLUDE%
76+
set INCLUDE=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\ce\include;%INCLUDE%
77+
set INCLUDE=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\ce\atlmfc\include;%INCLUDE%
78+
79+
set LIB=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\ce\atlmfc\lib\armv4i;%LIB%
80+
set LIB=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;%LIB%
81+
set LIB=%ProgramFiles(x86)%\Windows CE Tools\%TARGET_WINCE_VER%\%OEM_SDK_NAME%\Lib\Armv4i;%LIB%
82+
83+
set LIBPATH=%LIB%
84+
85+
jom /NOLOGO /D
86+
87+
goto :eof

0 commit comments

Comments
 (0)