diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 12ed5888c..5696214aa 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -189,3 +189,108 @@ jobs: - name: releasetest run: | $GITHUB_WORKSPACE/tools/test/releasetest/releasetest + + build-windows-msvc2022-qt67: + runs-on: windows-latest + steps: + - uses: actions/checkout@main + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.7.3' + host: 'windows' + target: 'desktop' + # - name: Set up MSBuild + # uses: microsoft/setup-msbuild@v2 + # with: + # vs-version: '[17.6,17.13)' + - name: Install VisualStudio tools + run: | + choco install visualstudio2022community --package-parameters "--includeRecommended --includeOptional" + choco install visualstudio2022buildtools + choco install visualstudio2022-workload-nativedesktop + choco install visualstudio2022-workload-vctools + choco install jom + - name: Set up MSVC environment + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" + set CL=/MP + set + where where + where cl + where devenv + where nmake + where jom + - name: Configure for debug + shell: cmd + run: | + qmake -version + .\configure.bat --enable-debug + - name: Build for debug + shell: cmd + run: | + cd src + jom + jom install + cd ..\tools + jom + jom install + - name: Test modules + shell: cmd + run: | + cd test + testall.bat + - name: Configure for release + shell: cmd + run: | + .\configure.bat + - name: Build for release + shell: cmd + run: | + cd src + jom + jom install + cd ..\tools + jom + jom install + - name: Test + shell: cmd + run: | + tools\releasetest\releasetest.bat + + # build-windows-msvc2019-qt67: + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@main + # - name: Install Qt + # uses: jurplel/install-qt-action@latest + # with: + # version: '6.7.3' + # host: 'windows' + # target: 'desktop' + + # build-windows-msvc2019-qt65: + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@main + # - name: Install Qt + # uses: jurplel/install-qt-action@latest + # with: + # version: '6.5.2' + # host: 'windows' + # target: 'desktop' + + # choco install visualstudio2019buildtools --params "--add Microsoft.VisualStudio.Workload.VCTools" + # refreshenv + + # build-windows-msvc2019-qt62: + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@main + # - name: Install Qt + # uses: jurplel/install-qt-action@latest + # with: + # version: '6.2.7' + # host: 'windows' + # target: 'desktop' diff --git a/configure.bat b/configure.bat index fbe3cc493..cad06a6f0 100644 --- a/configure.bat +++ b/configure.bat @@ -58,9 +58,12 @@ if "%DEBUG%" == "yes" ( :: :: Generates tfenv.bat :: +for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I +if "%MAKE%" == "" ( + for %%I in (jom.exe) do if exist %%~$path:I set MAKE=%%~$path:I +) for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I for %%I in (cmake.exe) do if exist %%~$path:I set CMAKE=%%~$path:I -for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I for %%I in (devenv.com) do if exist %%~$path:I set DEVENV=%%~$path:I @@ -233,17 +236,17 @@ if ERRORLEVEL 1 ( :: Builds TreeFrog cd %BASEDIR%src -if exist Makefile ( nmake -k distclean >nul 2>&1 ) +if exist Makefile ( "%MAKE%" -k distclean >nul 2>&1 ) qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI% cd %BASEDIR%tools -if exist Makefile ( nmake -k distclean >nul 2>&1 ) +if exist Makefile ( "%MAKE%" -k distclean >nul 2>&1 ) qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%' -nmake qmake +"%MAKE%" qmake echo; -echo First, run "nmake install" in src directory. -echo Next, run "nmake install" in tools directory. +echo First, run "%MAKE% install" in src directory. +echo Next, run "%MAKE% install" in tools directory. :exit exit /b diff --git a/tools/test/releasetest/releasetest.bat b/tools/test/releasetest/releasetest.bat index 94db8a0a0..64fdaf2fa 100644 --- a/tools/test/releasetest/releasetest.bat +++ b/tools/test/releasetest/releasetest.bat @@ -6,7 +6,6 @@ set APPNAME=blogapp set APPDIR=%BASEDIR%%APPNAME% set DBFILE=%APPDIR%\db\dbfile set PORT=18800 -set MAKE=nmake VERBOSE=1 set CL=/MP cd /D %BASEDIR% @@ -17,15 +16,23 @@ if not "%TFENV%" == "" ( call "..\..\..\tfenv.bat" ) -for %%I in (nmake.exe) do if exist %%~$path:I set NMAKE=%%~$path:I +for %%I in (nmake.exe) do if exist %%~$path:I set MAKE=%%~$path:I +if "%MAKE%" == "" ( + for %%I in (jom.exe) do if exist %%~$path:I set MAKE=%%~$path:I + if not "%MAKE%" == "" ( + set MAKE=jom + ) +) else ( + set MAKE=nmake VERBOSE=1 +) for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I for %%I in (cmake.exe) do if exist %%~$path:I set CMAKE=%%~$path:I for %%I in (sqlite3.exe) do if exist %%~$path:I set SQLITE=%%~$path:I if "%SQLITE%" == "" for %%I in (sqlite3-bin.exe) do if exist %%~$path:I set SQLITE=%%~$path:I -if "%NMAKE%" == "" ( +if "%MAKE%" == "" ( echo; - echo nmake.exe command not found. + echo nmake.exe not found. call :CleanUp pause exit /B 1 @@ -62,13 +69,12 @@ cd %APPDIR% echo n | tspawn s blog tspawn w foo -:: Set ExecutionPolicy -for %%I in (tadpoled.exe) do if exist %%~$path:I set TADPOLED=%%~$path:I -for %%I in (tadpole.exe) do if exist %%~$path:I set TADPOLE=%%~$path:I - -powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser -Force" -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 -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 +@REM :: Set ExecutionPolicy +@REM for %%I in (tadpoled.exe) do if exist %%~$path:I set TADPOLED=%%~$path:I +@REM for %%I in (tadpole.exe) do if exist %%~$path:I set TADPOLE=%%~$path:I +@REM powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser -Force" +@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 +@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 :: Test in debug mode @@ -83,7 +89,7 @@ call :QMakeBuild debug if ERRORLEVEL 1 exit /B %ERRORLEVEL% call :CheckWebApp treefrogd if ERRORLEVEL 1 exit /B %ERRORLEVEL% -nmake distclean >nul 2>nul +%MAKE% distclean >nul 2>nul :: Test in release mode if not "%CMAKE%" == "" ( @@ -97,7 +103,7 @@ call :QMakeBuild release if ERRORLEVEL 1 exit /B %ERRORLEVEL% call :CheckWebApp treefrog if ERRORLEVEL 1 exit /B %ERRORLEVEL% -nmake distclean >nul 2>nul +%MAKE% distclean >nul 2>nul echo; echo Test OK @@ -137,7 +143,7 @@ exit /B 0 cd /D %APPDIR% del /Q /F lib\*.* qmake -r CONFIG+=%1 -nmake +%MAKE% if ERRORLEVEL 1 ( echo; echo Build Error!