Skip to content

Commit 17e39e0

Browse files
updated
1 parent ae48843 commit 17e39e0

File tree

3 files changed

+61
-37
lines changed

3 files changed

+61
-37
lines changed

.github/workflows/actions.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
run: |
191191
$GITHUB_WORKSPACE/tools/test/releasetest/releasetest
192192
193-
build-windows-msvc2022-qt67:
193+
build-windows-qt67-msvc2022:
194194
runs-on: windows-latest
195195
steps:
196196
- uses: actions/checkout@main
@@ -202,7 +202,6 @@ jobs:
202202
target: 'desktop'
203203
- name: Install VisualStudio tools
204204
run: |
205-
#choco install visualstudio2022community -y --package-parameters "--includeRecommended --includeOptional"
206205
choco install visualstudio2022community -y
207206
choco install visualstudio2022-workload-nativedesktop -y
208207
choco install sqlite -y
@@ -233,10 +232,13 @@ jobs:
233232
cd ..\tools
234233
nmake
235234
nmake install
236-
cd test
237-
releasetest\releasetest.bat
235+
- name: Test release
236+
shell: cmd
237+
run: |
238+
cd tools\test
239+
call releasetest\releasetest.bat
238240
239-
build-windows-msvc2019-qt67:
241+
build-windows-qt67-msvc2019:
240242
runs-on: windows-latest
241243
steps:
242244
- uses: actions/checkout@main
@@ -248,10 +250,8 @@ jobs:
248250
target: 'desktop'
249251
- name: Install VisualStudio tools
250252
run: |
251-
choco install visualstudio2019community -y --package-parameters "--includeRecommended"
253+
choco install visualstudio2019community -y
252254
choco install visualstudio2019-workload-nativedesktop -y
253-
# choco install visualstudio2019-workload-vctools -y
254-
# choco install visualstudio2019buildtools
255255
choco install sqlite -y
256256
- name: Build for debug mode
257257
shell: cmd
@@ -282,10 +282,13 @@ jobs:
282282
cd ..\tools
283283
nmake
284284
nmake install
285-
cd test
286-
releasetest\releasetest.bat
285+
- name: Test release
286+
shell: cmd
287+
run: |
288+
cd tools\test
289+
call releasetest\releasetest.bat
287290
288-
build-windows-msvc2019-qt65:
291+
build-windows-qt65-msvc2019:
289292
runs-on: windows-latest
290293
steps:
291294
- uses: actions/checkout@main
@@ -329,10 +332,13 @@ jobs:
329332
cd ..\tools
330333
nmake
331334
nmake install
332-
cd test
333-
releasetest\releasetest.bat
335+
- name: Test release
336+
shell: cmd
337+
run: |
338+
cd tools\test
339+
call releasetest\releasetest.bat
334340
335-
build-windows-msvc2019-qt62:
341+
build-windows-qt62-msvc2019:
336342
runs-on: windows-latest
337343
steps:
338344
- uses: actions/checkout@main
@@ -376,5 +382,8 @@ jobs:
376382
cd ..\tools
377383
nmake
378384
nmake install
379-
cd test
380-
releasetest\releasetest.bat
385+
- name: Test release
386+
shell: cmd
387+
run: |
388+
cd tools\test
389+
call releasetest\releasetest.bat

configure.bat

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ if "%DEBUG%" == "yes" (
5858
::
5959
:: Generates tfenv.bat
6060
::
61+
for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I
62+
if "%MAKE%" == "" (
63+
for %%I in (jom.exe) do if exist %%~$path:I set MAKE=%%~$path:I
64+
)
6165
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
6266
for %%I in (cmake.exe) do if exist %%~$path:I set CMAKE=%%~$path:I
63-
for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I
6467
for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I
6568
for %%I in (devenv.com) do if exist %%~$path:I set DEVENV=%%~$path:I
6669

@@ -233,17 +236,17 @@ if ERRORLEVEL 1 (
233236

234237
:: Builds TreeFrog
235238
cd %BASEDIR%src
236-
if exist Makefile ( nmake -k distclean >nul 2>&1 )
239+
if exist Makefile ( "%MAKE%" -k distclean >nul 2>&1 )
237240
qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
238241

239242
cd %BASEDIR%tools
240-
if exist Makefile ( nmake -k distclean >nul 2>&1 )
243+
if exist Makefile ( "%MAKE%" -k distclean >nul 2>&1 )
241244
qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
242-
nmake qmake
245+
"%MAKE%" qmake
243246

244247
echo;
245-
echo First, run "nmake install" in src directory.
246-
echo Next, run "nmake install" in tools directory.
248+
echo First, run "%MAKE% install" in src directory.
249+
echo Next, run "%MAKE% install" in tools directory.
247250

248251
:exit
249252
exit /b

tools/test/releasetest/releasetest.bat

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ set APPNAME=blogapp
66
set APPDIR=%BASEDIR%%APPNAME%
77
set DBFILE=%APPDIR%\db\dbfile
88
set PORT=18800
9-
set MAKE=nmake VERBOSE=1
109
set CL=/MP
1110

1211
cd /D %BASEDIR%
@@ -17,15 +16,23 @@ if not "%TFENV%" == "" (
1716
call "..\..\..\tfenv.bat"
1817
)
1918

20-
for %%I in (nmake.exe) do if exist %%~$path:I set NMAKE=%%~$path:I
19+
for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I
20+
if "%MAKE%" == "" (
21+
for %%I in (jom.exe) do if exist %%~$path:I set MAKE=%%~$path:I
22+
if not "%MAKE%" == "" (
23+
set MAKE=jom
24+
)
25+
) else (
26+
set MAKE=nmake VERBOSE=1
27+
)
2128
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
2229
for %%I in (cmake.exe) do if exist %%~$path:I set CMAKE=%%~$path:I
2330
for %%I in (sqlite3.exe) do if exist %%~$path:I set SQLITE=%%~$path:I
2431
if "%SQLITE%" == "" for %%I in (sqlite3-bin.exe) do if exist %%~$path:I set SQLITE=%%~$path:I
2532

26-
if "%NMAKE%" == "" (
33+
if "%MAKE%" == "" (
2734
echo;
28-
echo nmake.exe command not found.
35+
echo nmake.exe not found.
2936
call :CleanUp
3037
pause
3138
exit /B 1
@@ -62,14 +69,12 @@ cd %APPDIR%
6269
echo n | tspawn s blog
6370
tspawn w foo
6471

65-
:: Set ExecutionPolicy
66-
for %%I in (tadpoled.exe) do if exist %%~$path:I set TADPOLED=%%~$path:I
67-
for %%I in (tadpole.exe) do if exist %%~$path:I set TADPOLE=%%~$path:I
68-
69-
powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser -Force"
70-
powershell -command "New-NetFirewallRule -DisplayName MyAppAccess1 -Direction Inbound -Action Allow -Profile Public,Private -Program '%TADPOLED%' -Protocol TCP -LocalPort %PORT% -RemoteAddress 127.0.0.1" >nul 2>&1
71-
powershell -command "New-NetFirewallRule -DisplayName MyAppAccess2 -Direction Inbound -Action Allow -Profile Public,Private -Program '%TADPOLE%' -Protocol TCP -LocalPort %PORT% -RemoteAddress 127.0.0.1" >nul 2>&1
72-
72+
@REM :: Set ExecutionPolicy
73+
@REM for %%I in (tadpoled.exe) do if exist %%~$path:I set TADPOLED=%%~$path:I
74+
@REM for %%I in (tadpole.exe) do if exist %%~$path:I set TADPOLE=%%~$path:I
75+
@REM powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser -Force"
76+
@REM powershell -command "New-NetFirewallRule -DisplayName MyAppAccess1 -Direction Inbound -Action Allow -Profile Public,Private -Program '%TADPOLED%' -Protocol TCP -LocalPort %PORT% -RemoteAddress 127.0.0.1" >nul 2>&1
77+
@REM powershell -command "New-NetFirewallRule -DisplayName MyAppAccess2 -Direction Inbound -Action Allow -Profile Public,Private -Program '%TADPOLE%' -Protocol TCP -LocalPort %PORT% -RemoteAddress 127.0.0.1" >nul 2>&1
7378

7479
:: Test in debug mode
7580
if not "%CMAKE%" == "" (
@@ -83,7 +88,7 @@ call :QMakeBuild debug
8388
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
8489
call :CheckWebApp treefrogd
8590
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
86-
nmake distclean >nul 2>nul
91+
%MAKE% distclean >nul 2>nul
8792

8893
:: Test in release mode
8994
if not "%CMAKE%" == "" (
@@ -97,7 +102,7 @@ call :QMakeBuild release
97102
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
98103
call :CheckWebApp treefrog
99104
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
100-
nmake distclean >nul 2>nul
105+
%MAKE% distclean >nul 2>nul
101106

102107
echo;
103108
echo Test OK
@@ -137,7 +142,7 @@ exit /B 0
137142
cd /D %APPDIR%
138143
del /Q /F lib\*.*
139144
qmake -r CONFIG+=%1
140-
nmake
145+
%MAKE%
141146
if ERRORLEVEL 1 (
142147
echo;
143148
echo Build Error!
@@ -151,6 +156,13 @@ exit /B 0
151156
::
152157
:CheckWebApp
153158
cd /D %APPDIR%
159+
160+
for %%I in (%1) do if exist %%~$path:I set TREEFROG=%%~$path:I
161+
if "%TREEFROG%" == "" (
162+
echo %1 command not found!
163+
exit /B 1
164+
)
165+
154166
"%1" -v
155167
"%1" -l
156168
"%1" --show-routes

0 commit comments

Comments
 (0)