2013-10-20 02:51:35 +02:00
@ echo off
2012-10-06 13:10:25 +02:00
REM ***************************************************************************
REM package.cmd
REM ---------------------
REM begin : July 2009
REM copyright : (C) 2009 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 ***************************************************************************
2013-07-29 22:24:19 +02:00
set GRASS_VERSION = 6.4.3
2009-07-29 08:59:18 +00:00
2009-08-18 11:59:43 +00:00
set VERSION = %1
set PACKAGE = %2
2009-09-20 08:46:24 +00:00
set PACKAGENAME = %3
2013-10-20 02:51:35 +02:00
set ARCH = %4
if " %VERSION% " == " " goto usage
if " %PACKAGE% " == " " goto usage
if " %PACKAGENAME% " == " " goto usage
if " %ARCH% " == " " goto usage
2009-08-18 11:59:43 +00:00
2013-10-20 02:51:35 +02:00
set BUILDDIR = %CD% \build-%ARCH%
set LOG = %BUILDDIR% \build.log
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
if " %OSGEO4W_ROOT% " == " " (
if " %ARCH% " == " x86 " (
set OSGEO4W_ROOT = C:\OSGeo4W
) else (
set OSGEO4W_ROOT = C:\OSGeo4W64
)
)
if not exist " %BUILDDIR% " mkdir %BUILDDIR%
if not exist " %BUILDDIR% " ( echo " could not create build directory %BUILDDIR% " & goto error )
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
if not exist " %OSGEO4W_ROOT% \bin\o4w_env.bat " ( echo " o4w_env.bat not found " & goto error )
2009-07-29 08:59:18 +00:00
call " %OSGEO4W_ROOT% \bin\o4w_env.bat "
2009-08-12 10:28:40 +00:00
set O4W_ROOT = %OSGEO4W_ROOT:\=/%
set LIB_DIR = %O4W_ROOT%
2009-07-29 08:59:18 +00:00
2013-10-21 22:16:29 +02:00
if not " %PROGRAMFILES(X86)% " == " " set PF86 = %PROGRAMFILES(X86)%
if " %PF86% " == " " set PF86 = %PROGRAMFILES%
if " %PF86% " == " " ( echo " PROGRAMFILES not set " & goto error )
2013-10-20 02:51:35 +02:00
if " %ARCH% " == " x86 " goto devenv_x86
goto devenv_x86_64
: devenv_x86
2013-10-21 22:16:29 +02:00
set VS90COMNTOOLS = %PF86% \Microsoft Visual Studio 9.0\Common7\Tools\
call " %PF86% \Microsoft Visual Studio 9.0\VC\vcvarsall.bat " x86
2013-10-20 02:51:35 +02:00
2009-08-18 11:59:43 +00:00
set DEVENV =
if exist " %DevEnvDir% \vcexpress.exe " set DEVENV = vcexpress
if exist " %DevEnvDir% \devenv.exe " set DEVENV = devenv
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
set CMAKE_OPT = ^
-G " Visual Studio 9 2008 " ^
-D SIP_BINARY_PATH=%O4W_ROOT% /apps/Python27/sip.exe ^
-D QT_ZLIB_LIBRARY=%O4W_ROOT% /lib/zlib.lib ^
-D QT_PNG_LIBRARY=%O4W_ROOT% /lib/libpng13.lib
goto devenv
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
: devenv_x86_64
2013-10-21 22:16:29 +02:00
call " %PF86% \Microsoft Visual Studio 10.0\VC\vcvarsall.bat " amd64
2013-10-20 02:51:35 +02:00
set DEVENV = devenv
set CMAKE_OPT = ^
-G " Visual Studio 10 Win64 " ^
-D SPATIALINDEX_LIBRARY=%O4W_ROOT% /lib/spatialindex-64.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT% /bin/sip.exe ^
2013-10-21 22:16:29 +02:00
-D SETUPAPI_LIBRARY=" %PF86% /Microsoft SDKs/Windows/v7.0A/Lib/x64/SetupAPI.Lib "
2013-10-20 02:51:35 +02:00
: devenv
set PYTHONPATH =
2013-10-21 22:16:29 +02:00
path %PF86% \CMake 2.8\bin;%PATH% ;c:\cygwin\bin
2013-10-20 02:51:35 +02:00
if " %DEVENV% " == " " ( echo " DEVENV not found " & goto error )
PROMPT qgis%VERSION% $g
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
set BUILDCONF = Release
2009-08-18 11:59:43 +00:00
cd ..\..
set SRCDIR = %CD%
if " %BUILDDIR:~1,1% " == " : " %BUILDDIR:~0,2%
cd %BUILDDIR%
2009-07-29 08:59:18 +00:00
2012-06-16 17:29:54 +02:00
if exist repackage goto package
2009-07-29 08:59:18 +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
2013-10-20 02:51:35 +02:00
if exist build.tmp ( echo " could not remove build.tmp " & goto error )
2009-07-29 08:59:18 +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
echo Logging to %LOG%
echo BEGIN: %DATE% %TIME% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo " could not write to log %LOG% " & goto error )
2009-07-29 08:59:18 +00:00
set > buildenv.log
if exist CMakeCache.txt goto skipcmake
echo CMAKE: %DATE% %TIME% >> %LOG% 2 >& 1
if errorlevel 1 goto error
2011-01-29 15:16:57 +00:00
set LIB = %LIB% ;%OSGEO4W_ROOT% \lib
set INCLUDE = %INCLUDE% ;%OSGEO4W_ROOT% \include
2013-01-27 20:33:50 +01:00
set GRASS_PREFIX = %O4W_ROOT% /apps/grass/grass-%GRASS_VERSION%
2011-01-29 15:16:57 +00:00
2013-10-20 02:51:35 +02:00
cmake %CMAKE_OPT% ^
2009-08-18 21:32:20 +00:00
-D PEDANTIC=TRUE ^
2013-02-19 20:06:33 +01:00
-D WITH_QSPATIALITE=TRUE ^
2010-11-12 10:56:07 +00:00
-D WITH_MAPSERVER=TRUE ^
2013-05-22 14:17:12 +02:00
-D MAPSERVER_SKIP_ECW=TRUE ^
2011-07-10 13:36:29 +02:00
-D WITH_GLOBE=TRUE ^
2012-06-25 13:11:45 +02:00
-D WITH_TOUCH=TRUE ^
2013-01-09 16:46:30 +01:00
-D WITH_ORACLE=TRUE ^
2013-10-20 02:51:35 +02:00
-D WITH_GRASS=TRUE ^
-D CMAKE_CXX_FLAGS_RELEASE=" /MD /MP /O2 /Ob2 /D NDEBUG " ^
2009-08-18 21:32:20 +00:00
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
2013-01-09 18:52:47 +01:00
-D GEOS_LIBRARY=%O4W_ROOT% /lib/geos_c.lib ^
2012-06-16 13:10:25 +02:00
-D SQLITE3_LIBRARY=%O4W_ROOT% /lib/sqlite3_i.lib ^
-D SPATIALITE_LIBRARY=%O4W_ROOT% /lib/spatialite_i.lib ^
2009-08-12 10:28:40 +00:00
-D PYTHON_EXECUTABLE=%O4W_ROOT% /bin/python.exe ^
2012-01-24 09:11:57 +01:00
-D PYTHON_INCLUDE_PATH=%O4W_ROOT% /apps/Python27/include ^
-D PYTHON_LIBRARY=%O4W_ROOT% /apps/Python27/libs/python27.lib ^
2009-08-12 10:28:40 +00:00
-D QT_BINARY_DIR=%O4W_ROOT% /bin ^
-D QT_LIBRARY_DIR=%O4W_ROOT% /lib ^
-D QT_HEADERS_DIR=%O4W_ROOT% /include/qt4 ^
2010-01-07 18:30:33 +00:00
-D QWT_INCLUDE_DIR=%O4W_ROOT% /include/qwt ^
-D QWT_LIBRARY=%O4W_ROOT% /lib/qwt5.lib ^
2009-08-22 15:32:29 +00:00
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT% /apps/%PACKAGENAME% ^
2010-08-21 14:53:50 +00:00
-D FCGI_INCLUDE_DIR=%O4W_ROOT% /include ^
-D FCGI_LIBRARY=%O4W_ROOT% /lib/libfcgi.lib ^
2009-08-18 11:59:43 +00:00
%SRCDIR% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo " cmake failed " & goto error )
2009-07-29 08:59:18 +00:00
2009-08-12 10:28:40 +00:00
REM bail out if python or grass was not found
grep -Eq " ^ (Python not being built|Could not find GRASS) " %LOG%
2013-10-20 02:51:35 +02:00
if not errorlevel 1 ( echo " python or grass not found " & goto error )
2009-08-10 16:08:11 +00:00
2009-07-29 08:59:18 +00:00
: skipcmake
echo ZERO_CHECK: %DATE% %TIME% >> %LOG% 2 >& 1
2009-08-18 11:59:43 +00:00
%DEVENV% qgis%VERSION% .sln /Project ZERO_CHECK /Build %BUILDCONF% /Out %LOG% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo " ZERO_CHECK failed " & goto error )
2009-07-29 08:59:18 +00:00
echo ALL_BUILD: %DATE% %TIME% >> %LOG% 2 >& 1
2009-08-18 11:59:43 +00:00
%DEVENV% qgis%VERSION% .sln /Project ALL_BUILD /Build %BUILDCONF% /Out %LOG% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo " ALL_BUILD failed " & goto error )
set PKGDIR = %OSGEO4W_ROOT% \apps\%PACKAGENAME%
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
if exist %PKGDIR% (
2013-09-21 23:45:50 +02:00
echo REMOVE: %DATE% %TIME% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
rmdir /s /q %PKGDIR%
2013-09-21 23:45:50 +02:00
)
2013-09-21 14:16:38 +02:00
2009-07-29 08:59:18 +00:00
echo INSTALL: %DATE% %TIME% >> %LOG% 2 >& 1
2009-08-18 11:59:43 +00:00
%DEVENV% qgis%VERSION% .sln /Project INSTALL /Build %BUILDCONF% /Out %LOG% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo INSTALL failed & goto error )
2009-07-29 08:59:18 +00:00
2012-06-16 17:29:54 +02:00
: package
2009-07-29 08:59:18 +00:00
echo PACKAGE: %DATE% %TIME% >> %LOG% 2 >& 1
cd ..
2012-06-16 17:29:54 +02:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' postinstall-common.bat > %OSGEO4W_ROOT% \etc\postinstall\\%PACKAGENAME% -common.bat
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' postinstall-desktop.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% .bat
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' preremove-desktop.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% .bat
2011-04-28 20:54:43 +00:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' qgis.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% .bat.tmpl
2011-05-23 18:35:54 +02:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' browser.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -browser.bat.tmpl
2011-04-28 20:54:43 +00:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' qgis.reg.tmpl > %OSGEO4W_ROOT% \apps\%PACKAGENAME% \bin\qgis.reg.tmpl
2009-07-29 08:59:18 +00:00
2012-06-16 17:29:54 +02:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' postinstall-server.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% -server.bat
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' preremove-server.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% -server.bat
2013-09-21 23:45:50 +02:00
if not exist %OSGEO4W_ROOT% \httpd.d mkdir %OSGEO4W_ROOT% \httpd.d
2012-06-16 17:29:54 +02:00
sed -e 's/@package@/%PACKAGENAME% /g' -e 's/@version@/%VERSION% /g' -e 's/@grassversion@/%GRASS_VERSION% /g' httpd.conf.tmpl > %OSGEO4W_ROOT% \httpd.d\httpd_%PACKAGENAME% .conf.tmpl
2010-01-20 18:24:59 +00:00
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
2013-10-20 02:51:35 +02:00
REM if errorlevel 1 (echo creation of qgisconfig.py.tmpl failed & goto error)
2009-08-05 08:15:05 +00:00
2013-10-20 02:51:35 +02:00
REM del %PKGDIR%\python\qgis\qgisconfig.py
2009-08-05 08:15:05 +00:00
touch exclude
2013-10-20 02:51:35 +02:00
for %% i in ( " " " -common " " -server " " -devel " " -grass-plugin " " -globe-plugin " " -oracle-provider " ) do (
if not exist %ARCH% \release\qgis\%PACKAGENAME% %% i mkdir %ARCH% \release\qgis\%PACKAGENAME% %% i
)
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -common/%PACKAGENAME% -common-%VERSION% -%PACKAGE% .tar.bz2 ^
2012-06-16 17:29:54 +02:00
--exclude-from exclude ^
--exclude " *.pyc " ^
" apps/ %PACKAGENAME% /bin/qgispython.dll " ^
" apps/ %PACKAGENAME% /bin/qgis_analysis.dll " ^
" apps/ %PACKAGENAME% /bin/qgis_networkanalysis.dll " ^
" apps/ %PACKAGENAME% /bin/qgis_core.dll " ^
" apps/ %PACKAGENAME% /bin/qgis_gui.dll " ^
" apps/ %PACKAGENAME% /doc/ " ^
" apps/ %PACKAGENAME% /plugins/delimitedtextprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/gdalprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/gpxprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/memoryprovider.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/mssqlprovider.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/ogrprovider.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/owsprovider.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/postgresprovider.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/qgissqlanyconnection.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/spatialiteprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/sqlanywhereprovider.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/wcsprovider.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/wfsprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/wmsprovider.dll " ^
" apps/ %PACKAGENAME% /resources/qgis.db " ^
" apps/ %PACKAGENAME% /resources/spatialite.db " ^
" apps/ %PACKAGENAME% /resources/srs.db " ^
2013-04-12 10:52:30 +03:00
" apps/ %PACKAGENAME% /resources/symbology-ng-style.db " ^
2013-09-20 10:18:54 +02:00
" apps/ %PACKAGENAME% /resources/cpt-city-qgis-min/ " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /svg/ " ^
" apps/ %PACKAGENAME% /crssync.exe " ^
" etc/postinstall/ %PACKAGENAME% -common.bat " ^
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar common failed & goto error )
2012-06-16 17:29:54 +02:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -server/%PACKAGENAME% -server-%VERSION% -%PACKAGE% .tar.bz2 ^
2012-06-16 17:29:54 +02:00
--exclude-from exclude ^
--exclude " *.pyc " ^
" apps/ %PACKAGENAME% /bin/qgis_mapserv.fcgi.exe " ^
" apps/ %PACKAGENAME% /bin/admin.sld " ^
" apps/ %PACKAGENAME% /bin/wms_metadata.xml " ^
" httpd.d/httpd_ %PACKAGENAME% .conf.tmpl " ^
" etc/postinstall/ %PACKAGENAME% -server.bat " ^
" etc/preremove/ %PACKAGENAME% -server.bat " ^
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar server failed & goto error )
move %PKGDIR% \bin\qgis.exe %OSGEO4W_ROOT% \bin\%PACKAGENAME% -bin.exe
move %PKGDIR% \bin\qbrowser.exe %OSGEO4W_ROOT% \bin\%PACKAGENAME% -browser-bin.exe
2012-06-16 17:29:54 +02:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% /%PACKAGENAME% -%VERSION% -%PACKAGE% .tar.bz2 ^
2009-08-04 17:59:34 +00:00
--exclude-from exclude ^
2010-11-17 21:05:02 +00:00
--exclude " *.pyc " ^
2013-04-27 10:16:53 +02:00
" bin/ %PACKAGENAME% -browser-bin.exe " ^
" bin/ %PACKAGENAME% -bin.exe " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /bin/qgis.reg.tmpl " ^
" apps/ %PACKAGENAME% /i18n/ " ^
" apps/ %PACKAGENAME% /icons/ " ^
" apps/ %PACKAGENAME% /images/ " ^
" apps/ %PACKAGENAME% /plugins/coordinatecaptureplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/dxf2shpconverterplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/evis.dll " ^
" apps/ %PACKAGENAME% /plugins/georefplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/gpsimporterplugin.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/heatmapplugin.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/interpolationplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/offlineeditingplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/oracleplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/rasterterrainplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/roadgraphplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/spatialqueryplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/spitplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/sqlanywhereplugin.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/topolplugin.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /plugins/zonalstatisticsplugin.dll " ^
" apps/ %PACKAGENAME% /qgis_help.exe " ^
2013-02-17 22:14:13 +01:00
" apps/qt4/plugins/sqldrivers/qsqlspatialite.dll " ^
2012-06-16 17:29:54 +02:00
" apps/ %PACKAGENAME% /python/ " ^
" apps/ %PACKAGENAME% /resources/customization.xml " ^
" bin/ %PACKAGENAME% .bat.tmpl " ^
" bin/ %PACKAGENAME% -browser.bat.tmpl " ^
" etc/postinstall/ %PACKAGENAME% .bat " ^
" etc/preremove/ %PACKAGENAME% .bat " ^
2010-08-11 19:03:55 +00:00
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar desktop failed & goto error )
2010-08-11 19:03:55 +00:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -grass-plugin/%PACKAGENAME% -grass-plugin-%VERSION% -%PACKAGE% .tar.bz2 ^
2010-08-11 19:03:55 +00:00
--exclude-from exclude ^
2010-11-17 22:03:14 +00:00
--exclude " *.pyc " ^
2010-08-11 19:03:55 +00:00
" apps/ %PACKAGENAME% /grass " ^
" apps/ %PACKAGENAME% /bin/qgisgrass.dll " ^
" apps/ %PACKAGENAME% /plugins/grassrasterprovider.dll " ^
" apps/ %PACKAGENAME% /plugins/grassplugin.dll " ^
" apps/ %PACKAGENAME% /plugins/grassprovider.dll " ^
2013-04-02 00:03:02 +02:00
" apps/ %PACKAGENAME% /plugins/libgrass_gis. %GRASS_VERSION% .dll " ^
2010-08-11 19:03:55 +00:00
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar grass-plugin failed & goto error )
2009-07-29 08:59:18 +00:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -globe-plugin/%PACKAGENAME% -globe-plugin-%VERSION% -%PACKAGE% .tar.bz2 ^
2012-06-16 17:29:54 +02:00
--exclude-from exclude ^
--exclude " *.pyc " ^
2011-07-10 13:36:29 +02:00
" apps/ %PACKAGENAME% /globe " ^
" apps/ %PACKAGENAME% /plugins/globeplugin.dll " ^
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar globe-plugin failed & goto error )
2011-07-10 13:36:29 +02:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -oracle-provider/%PACKAGENAME% -oracle-provider-%VERSION% -%PACKAGE% .tar.bz2 ^
2013-01-09 16:46:30 +01:00
" apps/ %PACKAGENAME% /plugins/oracleprovider.dll " ^
apps/qt4/plugins/sqldrivers/qsqlocispatial.dll ^
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar oracle-provider failed & goto error )
2013-01-09 16:46:30 +01:00
2013-10-20 02:51:35 +02:00
tar -C %OSGEO4W_ROOT% -cjf %ARCH% /release/qgis/%PACKAGENAME% -devel/%PACKAGENAME% -devel-%VERSION% -%PACKAGE% .tar.bz2 ^
2012-06-16 17:29:54 +02:00
--exclude-from exclude ^
--exclude " *.pyc " ^
" apps/ %PACKAGENAME% /FindQGIS.cmake " ^
" apps/ %PACKAGENAME% /include/ " ^
" apps/ %PACKAGENAME% /lib/ " ^
>> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
if errorlevel 1 ( echo tar devel failed & goto error )
2012-06-16 17:29:54 +02:00
2009-07-29 08:59:18 +00:00
goto end
2013-10-20 02:51:35 +02:00
: usage
echo usage: %0 version package packagename arch
echo sample: %0 2.0.1 3 qgis x86
exit
2009-07-29 08:59:18 +00:00
: error
echo BUILD ERROR %ERRORLEVEL% : %DATE% %TIME%
echo BUILD ERROR %ERRORLEVEL% : %DATE% %TIME% >> %LOG% 2 >& 1
2013-10-20 02:51:35 +02:00
for %% i in ( " " " -common " " -server " " -devel " " -grass-plugin " " -globe-plugin " " -oracle-provider " ) do (
if exist %ARCH% \release\qgis\%PACKAGENAME% %% i\%PACKAGENAME% %% i-%VERSION% -%PACKAGE% .tar.bz2 del %ARCH% \release\qgis\%PACKAGENAME% %% i\%PACKAGENAME% %% i-%VERSION% -%PACKAGE% .tar.bz2
)
2009-07-29 08:59:18 +00:00
: end
echo FINISHED: %DATE% %TIME% >> %LOG% 2 >& 1