2013-10-20 02:51:35 +02:00
|
|
|
@echo off
|
2012-10-06 13:10:25 +02:00
|
|
|
REM ***************************************************************************
|
|
|
|
REM package-nightly.cmd
|
|
|
|
REM ---------------------
|
|
|
|
REM begin : January 2011
|
|
|
|
REM copyright : (C) 2011 by Juergen E. Fischer
|
|
|
|
REM email : jef at norbit dot de
|
|
|
|
REM ***************************************************************************
|
|
|
|
REM * *
|
|
|
|
REM * This program is free software; you can redistribute it and/or modify *
|
|
|
|
REM * it under the terms of the GNU General Public License as published by *
|
|
|
|
REM * the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
REM * (at your option) any later version. *
|
|
|
|
REM * *
|
|
|
|
REM ***************************************************************************
|
2015-04-10 16:34:17 +02:00
|
|
|
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
set VERSION=%1
|
|
|
|
set PACKAGE=%2
|
|
|
|
set PACKAGENAME=%3
|
2013-10-20 02:51:35 +02:00
|
|
|
set ARCH=%4
|
2015-07-02 18:23:44 +02:00
|
|
|
set SHA=%5
|
|
|
|
set SITE=%6
|
2013-10-20 02:51:35 +02:00
|
|
|
if "%VERSION%"=="" goto usage
|
|
|
|
if "%PACKAGE%"=="" goto usage
|
|
|
|
if "%PACKAGENAME%"=="" goto usage
|
|
|
|
if "%ARCH%"=="" goto usage
|
2015-07-02 18:23:44 +02:00
|
|
|
if not "%SHA%"=="" set SHA=-%SHA%
|
|
|
|
if "%SITE%"=="" set SITE=qgis.org
|
2019-11-30 11:24:49 +01:00
|
|
|
if "%TARGET%"=="" set TARGET=Nightly
|
2019-12-03 14:23:17 +01:00
|
|
|
if "%BUILDNAME%"=="" set BUILDNAME=%PACKAGENAME%-%VERSION%%SHA%-%TARGET%-VC14-%ARCH%
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2020-04-20 18:10:35 +02:00
|
|
|
if "%BUILDDIR%"=="" set BUILDDIR=%CD%\build-%PACKAGENAME%-%ARCH%
|
2013-10-20 02:51:35 +02:00
|
|
|
if not exist "%BUILDDIR%" mkdir %BUILDDIR%
|
2014-04-18 16:20:52 +02:00
|
|
|
if not exist "%BUILDDIR%" (echo could not create build directory %BUILDDIR% & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
call msvc-env.bat %ARCH%
|
2020-05-06 09:28:06 -07:00
|
|
|
call gdal-dev-env.bat
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
set O4W_ROOT=%OSGEO4W_ROOT:\=/%
|
|
|
|
set LIB_DIR=%O4W_ROOT%
|
|
|
|
|
2019-11-30 11:24:49 +01:00
|
|
|
if "%ARCH%"=="x86" (
|
|
|
|
set CMAKE_OPT=^
|
|
|
|
-D SPATIALINDEX_LIBRARY=%O4W_ROOT%/lib/spatialindex-32.lib
|
|
|
|
) else (
|
|
|
|
set CMAKE_OPT=^
|
|
|
|
-D SPATIALINDEX_LIBRARY=%O4W_ROOT%/lib/spatialindex-64.lib ^
|
|
|
|
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE
|
|
|
|
)
|
2013-10-20 02:51:35 +02:00
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
|
2018-01-26 17:30:50 +01:00
|
|
|
set GRASS_VERSIONS=%GRASS7_VERSION%
|
2016-01-29 09:29:49 +01:00
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
set TAR=tar.exe
|
2018-06-21 08:51:41 +02:00
|
|
|
if exist "c:\cygwin\bin\tar.exe" set TAR=c:\cygwin\bin\tar.exe
|
2018-06-20 09:48:55 +02:00
|
|
|
if exist "c:\cygwin64\bin\tar.exe" set TAR=c:\cygwin64\bin\tar.exe
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
set BUILDCONF=RelWithDebInfo
|
|
|
|
|
|
|
|
cd ..\..
|
|
|
|
set SRCDIR=%CD%
|
|
|
|
|
|
|
|
if "%BUILDDIR:~1,1%"==":" %BUILDDIR:~0,2%
|
|
|
|
cd %BUILDDIR%
|
|
|
|
|
2015-04-10 14:44:10 +02:00
|
|
|
set PKGDIR=%OSGEO4W_ROOT%\apps\%PACKAGENAME%
|
|
|
|
|
2012-06-19 02:57:38 +02:00
|
|
|
if exist repackage goto package
|
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
if not exist build.log goto build
|
|
|
|
|
|
|
|
REM
|
|
|
|
REM try renaming the logfile to see if it's locked
|
|
|
|
REM
|
|
|
|
|
|
|
|
if exist build.tmp del build.tmp
|
2014-04-18 16:20:52 +02:00
|
|
|
if exist build.tmp (echo could not remove build.tmp & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
ren build.log build.tmp
|
|
|
|
if exist build.log goto locked
|
|
|
|
if not exist build.tmp goto locked
|
|
|
|
|
|
|
|
ren build.tmp build.log
|
|
|
|
if exist build.tmp goto locked
|
|
|
|
if not exist build.log goto locked
|
|
|
|
|
|
|
|
goto build
|
|
|
|
|
|
|
|
:locked
|
|
|
|
echo Logfile locked
|
|
|
|
if exist build.tmp del build.tmp
|
|
|
|
goto error
|
|
|
|
|
|
|
|
:build
|
2014-04-18 16:20:52 +02:00
|
|
|
echo BEGIN: %DATE% %TIME%
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
set >buildenv.log
|
|
|
|
|
2014-02-21 22:39:04 +01:00
|
|
|
if exist qgsversion.h del qgsversion.h
|
|
|
|
|
2015-07-02 18:23:44 +02:00
|
|
|
if exist CMakeCache.txt if exist skipcmake goto skipcmake
|
|
|
|
|
|
|
|
touch %SRCDIR%\CMakeLists.txt
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2014-04-18 16:20:52 +02:00
|
|
|
echo CMAKE: %DATE% %TIME%
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
if "%CMAKEGEN%"=="" set CMAKEGEN=Ninja
|
2019-11-30 11:24:49 +01:00
|
|
|
if "%OSGEO4W_CXXFLAGS%"=="" set OSGEO4W_CXXFLAGS=/MD /Z7 /MP /Od /D NDEBUG
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2018-10-11 21:04:56 +02:00
|
|
|
for %%i in (%PYTHONHOME%) do set PYVER=%%~ni
|
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
cmake -G "%CMAKEGEN%" ^
|
2019-11-30 11:24:49 +01:00
|
|
|
-D CMAKE_CXX_COMPILER="%CXX:\=/%" ^
|
|
|
|
-D CMAKE_C_COMPILER="%CC:\=/%" ^
|
2016-10-05 14:22:17 +02:00
|
|
|
-D CMAKE_LINKER="%CMAKE_COMPILER_PATH:\=/%/link.exe" ^
|
2019-11-30 11:24:49 +01:00
|
|
|
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="%OSGEO4W_CXXFLAGS%" ^
|
|
|
|
-D CMAKE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^
|
2021-03-26 23:33:51 +01:00
|
|
|
-D SUBMIT_URL="https://cdash.orfeo-toolbox.org/submit.php?project=QGIS" ^
|
2019-12-03 14:23:17 +01:00
|
|
|
-D BUILDNAME="%BUILDNAME%" ^
|
2015-07-02 18:23:44 +02:00
|
|
|
-D SITE="%SITE%" ^
|
2011-01-29 15:16:57 +00:00
|
|
|
-D PEDANTIC=TRUE ^
|
2013-02-19 20:06:33 +01:00
|
|
|
-D WITH_QSPATIALITE=TRUE ^
|
2014-11-28 16:00:53 +01:00
|
|
|
-D WITH_SERVER=TRUE ^
|
|
|
|
-D SERVER_SKIP_ECW=TRUE ^
|
2016-01-29 09:29:49 +01:00
|
|
|
-D WITH_GRASS=TRUE ^
|
2017-10-14 23:41:23 +02:00
|
|
|
-D WITH_3D=TRUE ^
|
2016-01-29 09:29:49 +01:00
|
|
|
-D WITH_GRASS7=TRUE ^
|
2021-01-14 13:00:20 +01:00
|
|
|
-D WITH_HANA=TRUE ^
|
2018-06-20 09:48:55 +02:00
|
|
|
-D GRASS_PREFIX7=%GRASS_PREFIX:\=/% ^
|
2013-01-09 16:46:30 +01:00
|
|
|
-D WITH_ORACLE=TRUE ^
|
2014-05-20 08:18:55 +02:00
|
|
|
-D WITH_CUSTOM_WIDGETS=TRUE ^
|
2013-10-20 02:51:35 +02:00
|
|
|
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
|
2011-01-29 15:16:57 +00:00
|
|
|
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
|
2019-11-30 11:24:49 +01:00
|
|
|
-D SETUPAPI_LIBRARY="%SETUPAPI_LIBRARY%" ^
|
2019-09-06 20:45:05 +02:00
|
|
|
-D PROJ_LIBRARY=%O4W_ROOT%/apps/proj-dev/lib/proj.lib ^
|
2019-08-09 16:39:43 +02:00
|
|
|
-D PROJ_INCLUDE_DIR=%O4W_ROOT%/apps/proj-dev/include ^
|
|
|
|
-D GDAL_LIBRARY=%O4W_ROOT%/apps/gdal-dev/lib/gdal_i.lib ^
|
|
|
|
-D GDAL_INCLUDE_DIR=%O4W_ROOT%/apps/gdal-dev/include ^
|
2013-01-09 18:52:47 +01:00
|
|
|
-D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^
|
2012-04-17 22:43:02 +02:00
|
|
|
-D SQLITE3_LIBRARY=%O4W_ROOT%/lib/sqlite3_i.lib ^
|
|
|
|
-D SPATIALITE_LIBRARY=%O4W_ROOT%/lib/spatialite_i.lib ^
|
2017-01-15 01:21:02 +01:00
|
|
|
-D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python3.exe ^
|
2018-10-11 21:04:56 +02:00
|
|
|
-D SIP_BINARY_PATH=%PYTHONHOME:\=/%/sip.exe ^
|
2021-03-28 21:49:40 +02:00
|
|
|
-D PYTHON_INCLUDE_DIR=%PYTHONHOME:\=/%/include ^
|
2018-10-11 21:04:56 +02:00
|
|
|
-D PYTHON_LIBRARY=%PYTHONHOME:\=/%/libs/%PYVER%.lib ^
|
2011-01-29 15:16:57 +00:00
|
|
|
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
|
2017-01-15 01:21:02 +01:00
|
|
|
-D QT_HEADERS_DIR=%O4W_ROOT%/apps/qt5/include ^
|
2011-01-29 15:16:57 +00:00
|
|
|
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^
|
|
|
|
-D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^
|
|
|
|
-D FCGI_LIBRARY=%O4W_ROOT%/lib/libfcgi.lib ^
|
2017-01-15 01:21:02 +01:00
|
|
|
-D QCA_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\Qt5\include\QtCrypto ^
|
2017-02-04 20:25:34 +01:00
|
|
|
-D QCA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qca-qt5.lib ^
|
2017-01-15 01:21:02 +01:00
|
|
|
-D QSCINTILLA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qscintilla2.lib ^
|
2019-08-10 18:11:31 +02:00
|
|
|
-D DART_TESTING_TIMEOUT=60 ^
|
2021-03-07 23:25:38 +01:00
|
|
|
-D PUSH_TO_CDASH=TRUE ^
|
2016-10-05 14:22:17 +02:00
|
|
|
%CMAKE_OPT% ^
|
|
|
|
%SRCDIR:\=/%
|
2014-04-18 16:20:52 +02:00
|
|
|
if errorlevel 1 (echo cmake failed & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2018-06-20 09:48:55 +02:00
|
|
|
if "%CONFIGONLY%"=="1" (echo Exiting after configuring build directory: %CD% & goto end)
|
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
:skipcmake
|
2017-02-07 14:39:07 +01:00
|
|
|
if exist ..\noclean (echo skip clean & goto skipclean)
|
2014-04-18 16:20:52 +02:00
|
|
|
echo CLEAN: %DATE% %TIME%
|
|
|
|
cmake --build %BUILDDIR% --target clean --config %BUILDCONF%
|
|
|
|
if errorlevel 1 (echo clean failed & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2014-02-21 22:39:04 +01:00
|
|
|
:skipclean
|
2017-02-07 14:39:07 +01:00
|
|
|
if exist ..\skipbuild (echo skip build & goto skipbuild)
|
2014-04-18 16:20:52 +02:00
|
|
|
echo ALL_BUILD: %DATE% %TIME%
|
2019-11-30 11:24:49 +01:00
|
|
|
cmake --build %BUILDDIR% --target %TARGET%Build --config %BUILDCONF%
|
|
|
|
set /P tag=<%BUILDDIR%\Testing\TAG
|
|
|
|
findstr "<Error>" %BUILDDIR%\Testing\%tag%\Build.xml >nul
|
|
|
|
if not errorlevel 1 (
|
|
|
|
cmake --build %BUILDDIR% --target %TARGET%Submit --config %BUILDCONF%
|
2018-02-14 18:13:26 +01:00
|
|
|
if errorlevel 1 echo SUBMITTING BUILD ERRORS WAS NOT SUCCESSFUL.
|
2019-11-30 11:24:49 +01:00
|
|
|
echo build failed
|
2018-02-14 18:13:26 +01:00
|
|
|
goto error
|
|
|
|
)
|
2013-10-20 02:51:35 +02:00
|
|
|
|
2017-02-07 14:39:07 +01:00
|
|
|
:skipbuild
|
2015-04-17 17:55:24 +02:00
|
|
|
if exist ..\skiptests goto skiptests
|
|
|
|
|
|
|
|
echo RUN_TESTS: %DATE% %TIME%
|
|
|
|
|
2018-02-25 16:42:36 +01:00
|
|
|
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShow /t REG_DWORD /d 1 /f
|
|
|
|
|
2015-07-13 17:43:24 +02:00
|
|
|
set oldtemp=%TEMP%
|
2015-07-15 11:41:05 +02:00
|
|
|
set oldtmp=%TMP%
|
2015-04-17 17:55:24 +02:00
|
|
|
set oldpath=%PATH%
|
2015-07-13 17:43:24 +02:00
|
|
|
|
2015-07-15 11:41:05 +02:00
|
|
|
set TEMP=%TEMP%\%PACKAGENAME%-%ARCH%
|
|
|
|
set TMP=%TEMP%
|
2015-07-17 10:37:47 +02:00
|
|
|
if exist "%TEMP%" rmdir /s /q "%TEMP%"
|
|
|
|
mkdir "%TEMP%"
|
2015-07-13 17:43:24 +02:00
|
|
|
|
2015-04-17 17:55:24 +02:00
|
|
|
for %%g IN (%GRASS_VERSIONS%) do (
|
2019-03-22 23:03:15 +01:00
|
|
|
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
|
|
|
|
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
|
2013-10-20 02:51:35 +02:00
|
|
|
)
|
2017-02-20 00:16:07 +01:00
|
|
|
PATH %path%;%BUILDDIR%\output\plugins
|
|
|
|
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
|
2015-04-17 17:55:24 +02:00
|
|
|
|
2019-11-30 11:24:49 +01:00
|
|
|
cmake --build %BUILDDIR% --target %TARGET%Test --config %BUILDCONF%
|
2015-04-17 17:55:24 +02:00
|
|
|
if errorlevel 1 echo TESTS WERE NOT SUCCESSFUL.
|
2018-11-26 23:13:16 +01:00
|
|
|
|
2015-07-13 17:43:24 +02:00
|
|
|
set TEMP=%oldtemp%
|
2015-07-15 11:41:05 +02:00
|
|
|
set TMP=%oldtmp%
|
2015-04-17 17:55:24 +02:00
|
|
|
PATH %oldpath%
|
|
|
|
|
2019-11-30 11:24:49 +01:00
|
|
|
cmake --build %BUILDDIR% --target %TARGET%Submit --config %BUILDCONF%
|
2018-11-26 23:13:16 +01:00
|
|
|
if errorlevel 1 echo TEST SUBMISSION WAS NOT SUCCESSFUL.
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2019-11-30 11:24:49 +01:00
|
|
|
:skiptests
|
|
|
|
if exist ..\skippackage goto end
|
|
|
|
|
2015-07-17 10:37:47 +02:00
|
|
|
if exist "%PKGDIR%" (
|
2014-04-18 16:20:52 +02:00
|
|
|
echo REMOVE: %DATE% %TIME%
|
2015-07-17 10:37:47 +02:00
|
|
|
rmdir /s /q "%PKGDIR%"
|
2013-09-25 22:43:42 +02:00
|
|
|
)
|
2013-09-21 14:16:38 +02:00
|
|
|
|
2014-04-18 16:20:52 +02:00
|
|
|
echo INSTALL: %DATE% %TIME%
|
2016-10-05 14:22:17 +02:00
|
|
|
cmake --build %BUILDDIR% --target install --config %BUILDCONF%
|
2013-10-20 02:51:35 +02:00
|
|
|
if errorlevel 1 (echo INSTALL failed & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2012-06-19 02:57:38 +02:00
|
|
|
:package
|
2014-04-18 16:20:52 +02:00
|
|
|
echo PACKAGE: %DATE% %TIME%
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
cd ..
|
2015-04-10 14:44:10 +02:00
|
|
|
|
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversions@/%GRASS_VERSIONS%/g' postinstall-dev.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo creation of desktop postinstall failed & goto error)
|
2018-06-20 09:48:55 +02:00
|
|
|
|
2015-04-10 14:44:10 +02:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversions@/%GRASS_VERSIONS%/g' preremove-dev.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo creation of desktop preremove failed & goto error)
|
2015-04-10 14:44:10 +02:00
|
|
|
|
2021-02-16 11:55:48 +01:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/^call py3_env.bat/call gdal-dev-py3-env.bat/' designer.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-designer.bat.tmpl
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo creation of designer template failed & goto error)
|
2015-04-10 14:44:10 +02:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo creation of registry template & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2020-05-08 01:25:46 +02:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/^call py3_env.bat/call gdal-dev-py3-env.bat/' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
|
2019-08-09 16:39:43 +02:00
|
|
|
if errorlevel 1 (echo creation of desktop template failed & goto error)
|
|
|
|
|
2019-09-07 19:28:24 +02:00
|
|
|
set batches=bin/%PACKAGENAME%.bat.tmpl
|
2015-04-10 14:44:10 +02:00
|
|
|
for %%g IN (%GRASS_VERSIONS%) do (
|
2019-03-22 23:03:15 +01:00
|
|
|
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
|
|
|
|
for /F "delims=." %%i in ("!gv!") do set v=%%i
|
2018-11-10 16:28:22 +01:00
|
|
|
|
2020-05-08 01:25:46 +02:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/^call py3_env.bat/call gdal-dev-py3-env.bat/' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g!v!.bat.tmpl
|
2015-04-10 14:44:10 +02:00
|
|
|
if errorlevel 1 (echo creation of desktop template failed & goto error)
|
2018-11-10 16:28:22 +01:00
|
|
|
set batches=!batches! bin/%PACKAGENAME%-g!v!.bat.tmpl
|
2015-04-10 14:44:10 +02:00
|
|
|
)
|
|
|
|
|
2020-12-11 14:31:38 +01:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/^call py3_env.bat/call gdal-dev-py3-env.bat/' python.bat.tmpl >%OSGEO4W_ROOT%\bin\python-%PACKAGENAME%.bat.tmpl
|
2018-01-26 17:30:50 +01:00
|
|
|
if errorlevel 1 (echo creation of python wrapper template failed & goto error)
|
2015-04-10 14:44:10 +02:00
|
|
|
|
2020-07-14 00:25:56 +02:00
|
|
|
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/^call py3_env.bat/call gdal-dev-py3-env.bat/' process.bat.tmpl >%OSGEO4W_ROOT%\bin\qgis_process-%PACKAGENAME%.bat.tmpl
|
2020-04-17 14:04:31 +02:00
|
|
|
if errorlevel 1 (echo creation of qgis process wrapper template failed & goto error)
|
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
touch exclude
|
2018-01-26 17:30:50 +01:00
|
|
|
if exist ..\skipbuild (echo skip build & goto skipbuild)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2013-10-20 02:51:35 +02:00
|
|
|
move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo move of desktop executable failed & goto error)
|
2017-02-18 19:12:20 +01:00
|
|
|
copy qgis.vars %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.vars
|
|
|
|
if errorlevel 1 (echo copy of desktop executable vars failed & goto error)
|
2012-06-19 02:57:38 +02:00
|
|
|
|
2014-08-24 10:17:51 +02:00
|
|
|
if not exist %PKGDIR%\qtplugins\sqldrivers mkdir %PKGDIR%\qtplugins\sqldrivers
|
2017-02-06 01:15:05 +01:00
|
|
|
move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlocispatial.dll %PKGDIR%\qtplugins\sqldrivers
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo move of oci sqldriver failed & goto error)
|
2017-02-06 01:15:05 +01:00
|
|
|
move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlspatialite.dll %PKGDIR%\qtplugins\sqldrivers
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo move of spatialite sqldriver failed & goto error)
|
2014-08-20 12:06:34 +02:00
|
|
|
|
2014-08-24 10:17:51 +02:00
|
|
|
if not exist %PKGDIR%\qtplugins\designer mkdir %PKGDIR%\qtplugins\designer
|
2017-02-06 01:15:05 +01:00
|
|
|
move %OSGEO4W_ROOT%\apps\qt5\plugins\designer\qgis_customwidgets.dll %PKGDIR%\qtplugins\designer
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo move of customwidgets failed & goto error)
|
2014-08-20 12:06:34 +02:00
|
|
|
|
2017-01-15 01:21:02 +01:00
|
|
|
if not exist %PKGDIR%\python\PyQt5\uic\widget-plugins mkdir %PKGDIR%\python\PyQt5\uic\widget-plugins
|
2018-10-11 21:04:56 +02:00
|
|
|
move %PYTHONHOME%\Lib\site-packages\PyQt5\uic\widget-plugins\qgis_customwidgets.py %PKGDIR%\python\PyQt5\uic\widget-plugins
|
2014-08-24 10:17:51 +02:00
|
|
|
if errorlevel 1 (echo move of customwidgets binding failed & goto error)
|
2014-08-20 14:24:37 +02:00
|
|
|
|
2019-09-08 22:09:21 +02:00
|
|
|
for %%i in (dbghelp.dll symsrv.dll) do (
|
|
|
|
copy "%DBGHLP_PATH%\%%i" %OSGEO4W_ROOT%\apps\%PACKAGENAME%
|
|
|
|
if errorlevel 1 (echo %%i not found & goto error)
|
|
|
|
)
|
|
|
|
|
2013-10-20 02:51:35 +02:00
|
|
|
if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME%
|
2018-06-20 09:48:55 +02:00
|
|
|
%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
|
2011-01-29 15:16:57 +00:00
|
|
|
--exclude-from exclude ^
|
2014-08-24 10:17:51 +02:00
|
|
|
--exclude "*.pyc" ^
|
2011-01-29 15:16:57 +00:00
|
|
|
apps/%PACKAGENAME% ^
|
2013-04-27 10:16:53 +02:00
|
|
|
bin/%PACKAGENAME%-bin.exe ^
|
2017-02-21 10:50:14 +01:00
|
|
|
bin/%PACKAGENAME%-bin.vars ^
|
2015-04-10 16:34:17 +02:00
|
|
|
%batches% ^
|
2015-06-27 07:19:16 +02:00
|
|
|
bin/%PACKAGENAME%-designer.bat.tmpl ^
|
2015-04-10 16:34:17 +02:00
|
|
|
bin/python-%PACKAGENAME%.bat.tmpl ^
|
2020-04-17 14:04:31 +02:00
|
|
|
bin/qgis_process-%PACKAGENAME%.bat.tmpl ^
|
2011-01-29 15:16:57 +00:00
|
|
|
etc/postinstall/%PACKAGENAME%.bat ^
|
2014-04-18 16:20:52 +02:00
|
|
|
etc/preremove/%PACKAGENAME%.bat
|
2013-10-20 02:51:35 +02:00
|
|
|
if errorlevel 1 (echo tar failed & goto error)
|
2011-01-29 15:16:57 +00:00
|
|
|
|
2014-10-22 18:54:14 +02:00
|
|
|
if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb
|
2018-06-20 09:48:55 +02:00
|
|
|
%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^
|
2014-10-22 18:54:14 +02:00
|
|
|
apps/%PACKAGENAME%/pdb
|
|
|
|
if errorlevel 1 (echo tar failed & goto error)
|
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
goto end
|
|
|
|
|
2013-10-20 02:51:35 +02:00
|
|
|
:usage
|
2015-07-02 18:23:44 +02:00
|
|
|
echo usage: %0 version package packagename arch [sha [site]]
|
|
|
|
echo sample: %0 2.11.0 38 qgis-dev x86_64 339dbf1 qgis.org
|
2017-08-05 22:21:59 +02:00
|
|
|
exit /b 1
|
2013-10-20 02:51:35 +02:00
|
|
|
|
2011-01-29 15:16:57 +00:00
|
|
|
:error
|
|
|
|
echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME%
|
|
|
|
if exist %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2
|
2017-10-14 23:41:23 +02:00
|
|
|
exit /b 1
|
2011-01-29 15:16:57 +00:00
|
|
|
|
|
|
|
:end
|
2014-04-18 16:20:52 +02:00
|
|
|
echo FINISHED: %DATE% %TIME%
|
2015-04-10 16:34:17 +02:00
|
|
|
|
|
|
|
endlocal
|