Navigation Menu

Skip to content

Commit

Permalink
osgeo4w updates
Browse files Browse the repository at this point in the history
- move desktop and browser executables to main bin
- backport QGIS_PREFIX_PATH support in QgsApplicaton
- make batch files location independant
- update to grass 6.4.3RC3
  • Loading branch information
jef-n committed Apr 25, 2013
1 parent f440b60 commit 384f880
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
7 changes: 3 additions & 4 deletions ms-windows/osgeo4w/browser.bat.tmpl
@@ -1,8 +1,7 @@
@echo off

SET OSGEO4W_ROOT=@osgeo4w@
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "~dp0\o4w_env.bat
call "%OSGEO4W_ROOT%"\apps\grass\grass-@grassversion@\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\apps\@package@\bin\qbrowser.exe %*
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\bin\@package@-browser.exe %*
8 changes: 5 additions & 3 deletions ms-windows/osgeo4w/package.cmd
@@ -1,5 +1,5 @@
@echo off
set GRASS_VERSION=6.4.3RC2
set GRASS_VERSION=6.4.3RC3

set BUILDDIR=%CD%\build
REM set BUILDDIR=%TEMP%\qgis_unstable
Expand Down Expand Up @@ -206,11 +206,13 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2 ^
>>%LOG% 2>&1
if errorlevel 1 goto error

move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.exe
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
"apps/%PACKAGENAME%/bin/qbrowser.exe" ^
"apps/%PACKAGENAME%/bin/qgis.exe" ^
"bin/%PACKAGENAME%-browser.exe" ^
"bin/%PACKAGENAME%.exe" ^
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
"apps/%PACKAGENAME%/i18n/" ^
"apps/%PACKAGENAME%/icons/" ^
Expand Down
7 changes: 3 additions & 4 deletions ms-windows/osgeo4w/qgis.bat.tmpl
@@ -1,8 +1,7 @@
@echo off

SET OSGEO4W_ROOT=@osgeo4w@
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%"\apps\grass\grass-@grassversion@\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\@package@\bin\qgis.exe %*
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\bin\@package@.exe %*
18 changes: 13 additions & 5 deletions src/core/qgsapplication.cpp
Expand Up @@ -127,14 +127,22 @@ void QgsApplication::init( QString customConfigPath )
}
else
{
char *prefixPath = getenv( "QGIS_PREFIX_PATH" );
if ( !prefixPath )
{
#if defined(Q_WS_MACX) || defined(Q_WS_WIN32) || defined(WIN32)
setPrefixPath( applicationDirPath(), true );
setPrefixPath( applicationDirPath(), true );
#else
QDir myDir( applicationDirPath() );
myDir.cdUp();
QString myPrefix = myDir.absolutePath();
setPrefixPath( myPrefix, true );
QDir myDir( applicationDirPath() );
myDir.cdUp();
QString myPrefix = myDir.absolutePath();
setPrefixPath( myPrefix, true );
#endif
}
else
{
setPrefixPath( prefixPath, true );
}
}

if ( !customConfigPath.isEmpty() )
Expand Down

0 comments on commit 384f880

Please sign in to comment.