Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
osgeo4w backports
  • Loading branch information
jef-n committed Jul 17, 2015
1 parent a6f5203 commit 34de8df
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 13 deletions.
32 changes: 24 additions & 8 deletions ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -20,10 +20,14 @@ set VERSION=%1
set PACKAGE=%2
set PACKAGENAME=%3
set ARCH=%4
set SHA=%5
set SITE=%6
if "%VERSION%"=="" goto usage
if "%PACKAGE%"=="" goto usage
if "%PACKAGENAME%"=="" goto usage
if "%ARCH%"=="" goto usage
if not "%SHA%"=="" set SHA=-%SHA%
if "%SITE%"=="" set SITE=qgis.org

set BUILDDIR=%CD%\build-nightly-%ARCH%

Expand Down Expand Up @@ -94,7 +98,7 @@ set CMAKE_OPT=^

:devenv
set PYTHONPATH=
path %PF86%\CMake\bin;%PF86%\CMake 2.8\bin;%PATH%;c:\cygwin\bin
path %PF86%\CMake\bin;%PATH%;c:\cygwin\bin

PROMPT qgis%VERSION%$g

Expand Down Expand Up @@ -141,7 +145,9 @@ set >buildenv.log

if exist qgsversion.h del qgsversion.h

if exist CMakeCache.txt goto skipcmake
if exist CMakeCache.txt if exist skipcmake goto skipcmake

touch %SRCDIR%\CMakeLists.txt

echo CMAKE: %DATE% %TIME%
if errorlevel 1 goto error
Expand All @@ -150,8 +156,8 @@ set LIB=%LIB%;%OSGEO4W_ROOT%\lib
set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include

cmake %CMAKE_OPT% ^
-D BUILDNAME="%PACKAGENAME%-%VERSION%-Nightly-VC10-%ARCH%" ^
-D SITE="qgis.org" ^
-D BUILDNAME="%PACKAGENAME%-%VERSION%%SHA%-Nightly-VC10-%ARCH%" ^
-D SITE="%SITE%" ^
-D PEDANTIC=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_SERVER=TRUE ^
Expand Down Expand Up @@ -201,7 +207,15 @@ if exist ..\skiptests goto skiptests

echo RUN_TESTS: %DATE% %TIME%

set oldtemp=%TEMP%
set oldtmp=%TMP%
set oldpath=%PATH%

set TEMP=%TEMP%\%PACKAGENAME%-%ARCH%
set TMP=%TEMP%
if exist "%TEMP%" rmdir /s /q "%TEMP%"
mkdir "%TEMP%"

for %%g IN (%GRASS_VERSIONS%) do (
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
Expand All @@ -211,13 +225,15 @@ PATH %path%;%BUILDDIR%\output\plugins\%BUILDCONF%
cmake --build %BUILDDIR% --target Nightly --config %BUILDCONF%
if errorlevel 1 echo TESTS WERE NOT SUCCESSFUL.

set TEMP=%oldtemp%
set TMP=%oldtmp%
PATH %oldpath%

:skiptests

if exist %PKGDIR% (
if exist "%PKGDIR%" (
echo REMOVE: %DATE% %TIME%
rmdir /s /q %PKGDIR%
rmdir /s /q "%PKGDIR%"
)

echo INSTALL: %DATE% %TIME%
Expand Down Expand Up @@ -301,8 +317,8 @@ if errorlevel 1 (echo tar failed & goto error)
goto end

:usage
echo usage: %0 version package packagename arch
echo sample: %0 2.1.0 38 qgis-dev x86_64
echo usage: %0 version package packagename arch [sha [site]]
echo sample: %0 2.10.0 38 qgis-dev x86_64 339dbf1 qgis.org
exit

:error
Expand Down
18 changes: 13 additions & 5 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -20,10 +20,14 @@ set VERSION=%1
set PACKAGE=%2
set PACKAGENAME=%3
set ARCH=%4
set SHA=%5
set SITE=%6
if "%VERSION%"=="" goto usage
if "%PACKAGE%"=="" goto usage
if "%PACKAGENAME%"=="" goto usage
if "%ARCH%"=="" goto usage
if not "%SHA%"=="" set SHA=-%SHA%
if "%SITE%"=="" set SITE=qgis.org

set BUILDDIR=%CD%\build-%ARCH%

Expand Down Expand Up @@ -137,7 +141,9 @@ set >buildenv.log

if exist qgsversion.h del qgsversion.h

if exist CMakeCache.txt goto skipcmake
if exist CMakeCache.txt if exist skipcmake goto skipcmake

touch %SRCDIR%\CMakeLists.txt

echo CMAKE: %DATE% %TIME%
if errorlevel 1 goto error
Expand All @@ -146,6 +152,8 @@ set LIB=%LIB%;%OSGEO4W_ROOT%\lib
set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include

cmake %CMAKE_OPT% ^
-D BUILDNAME="%PACKAGENAME%-%VERSION%%SHA%-Release-VC10-%ARCH%" ^
-D SITE="%SITE%" ^
-D PEDANTIC=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_SERVER=TRUE ^
Expand Down Expand Up @@ -210,9 +218,9 @@ PATH %oldpath%
:skiptests
:package

if exist %PKGDIR% (
if exist "%PKGDIR%" (
echo REMOVE: %DATE% %TIME%
rmdir /s /q %PKGDIR%
rmdir /s /q "%PKGDIR%"
)

echo INSTALL: %DATE% %TIME%
Expand Down Expand Up @@ -452,8 +460,8 @@ if errorlevel 1 (echo tar devel failed & goto error)
goto end

:usage
echo usage: %0 version package packagename arch
echo sample: %0 2.0.1 3 qgis x86
echo usage: %0 version package packagename arch [sha [site]]
echo sample: %0 2.0.1 3 qgis x86 f802808
exit

:error
Expand Down

0 comments on commit 34de8df

Please sign in to comment.