diff --git a/.ci/azure-pipelines/azure-pipelines.yml b/.ci/azure-pipelines/azure-pipelines.yml deleted file mode 100644 index 73406cb0724c..000000000000 --- a/.ci/azure-pipelines/azure-pipelines.yml +++ /dev/null @@ -1,221 +0,0 @@ -variables: - LR: release-3_12 - LTR: release-3_10 - CTEST_CUSTOM_TESTS_IGNORE: "ProcessingGdalAlgorithmsRasterTest;ProcessingGdalAlgorithmsVectorTest;ProcessingGrass7AlgorithmsImageryTest;ProcessingGrass7AlgorithmsRasterTest;ProcessingGrass7AlgorithmsVectorTest;ProcessingGuiTest;ProcessingOtbAlgorithmsTest;ProcessingQgisAlgorithmsTestPt1;ProcessingQgisAlgorithmsTestPt2;ProcessingQgisAlgorithmsTestPt3;ProcessingQgisAlgorithmsTestPt4;ProcessingScriptUtilsTest;PyQgsAnnotation;PyQgsAppStartup;PyQgsAuthManagerOAuth2OWSTest;PyQgsAuthManagerPasswordOWSTest;PyQgsAuthManagerPKIOWSTest;PyQgsAuthManagerProxy;PyQgsAuthSettingsWidget;PyQgsAuxiliaryStorage;PyQgsBlockingNetworkRequest;PyQgsExifTools;PyQgsFileDownloader;PyQgsFileUtils;PyQgsGeometryTest;PyQgsImageCache;PyQgsImportIntoPostGIS;PyQgsLayoutAtlas;PyQgsLayoutLegend;PyQgsLayoutMap;PyQgsLayoutMapGrid;PyQgsMapLayer;PyQgsOfflineEditingWFS;PyQgsOGRProvider;PyQgsOGRProviderGpkg;PyQgsOGRProviderSqlite;PyQgsPalLabelingCanvas;PyQgsPalLabelingLayout;PyQgsPalLabelingPlacement;PyQgsPointDisplacementRenderer;PyQgsProject;PyQgsProviderConnectionGpkg;PyQgsProviderConnectionPostgres;PyQgsPythonProvider;PyQgsRasterFileWriter;PyQgsRasterLayer;PyQgsSelectiveMasking;PyQgsServerAccessControlWMSGetlegendgraphic;PyQgsServerApi;PyQgsServerCacheManager;PyQgsServerLocaleOverride;PyQgsServerSecurity;PyQgsServerSettings;PyQgsServerWMS;PyQgsServerWMSDimension;PyQgsServerWMSGetFeatureInfo;PyQgsServerWMSGetLegendGraphic;PyQgsServerWMSGetMap;PyQgsServerWMSGetPrint;PyQgsServerWMSGetPrintExtra;PyQgsServerWMSGetPrintOutputs;PyQgsServerWMSGetPrintAtlas;PyQgsServerWMTS;PyQgsSettings;PyQgsShapefileProvider;PyQgsSpatialiteProvider;PyQgsSvgCache;PyQgsSymbolLayer;PyQgsTaskManager;PyQgsTextRenderer;PyQgsVectorFileWriter;PyQgsVectorLayer;PyQgsVectorLayerUtils;PyQgsVirtualLayerProvider;PyQgsWFSProviderGUI;PyQgsZipUtils;qgis_3drenderingtest;qgis_alignrastertest;qgis_arcgisrestutilstest;qgis_banned_keywords;qgis_browsermodeltest;qgis_callouttest;qgis_compositionconvertertest;qgis_coordinatereferencesystemtest;qgis_datadefinedsizelegendtest;qgis_datumtransformdialog;qgis_diagramtest;qgis_doxygen_order;qgis_dxfexporttest;qgis_expressiontest;qgis_filedownloader;qgis_geometrycheckstest;qgis_geometrytest;qgis_grassprovidertest7;qgis_imagecachetest;qgis_invertedpolygonrenderertest;qgis_labelingenginetest;qgis_layerdefinitiontest;qgis_layout3dmaptest;qgis_layouthtmltest;qgis_layoutlabeltest;qgis_layoutmapgridtest;qgis_layoutmaptest;qgis_layoutpicturetest;qgis_layoutscalebartest;qgis_layouttabletest;qgis_legendrenderertest;qgis_licenses;qgis_defwindowtitle;qgis_maprendererjobtest;qgis_maprotationtest;qgis_mapsettingsutilstest;qgis_maptooladdfeatureline;qgis_mimedatautilstest;qgis_networkaccessmanagertest;qgis_openclutilstest;qgis_painteffecttest;qgis_pallabelingtest;qgis_processingtest;qgis_projecttest;qgis_qgisappclipboard;qgis_rasterlayersaveasdialog;qgis_shellcheck;qgis_sipify;qgis_sip_include;qgis_sip_uptodate;qgis_spelling;qgis_styletest;qgis_svgcachetest;qgis_taskmanagertest;qgis_transformdialog;qgis_vectorfilewritertest;qgis_wcsprovidertest;qgis_ziplayertest;qgis_meshcalculator;qgis_pointlocatortest;PyQgsExpressionBuilderWidget;PyQgsDatumTransform;qgis_vertextool;PyQgsCoordinateOperationWidget;PyQgsProviderConnectionSpatialite;qgis_maptoolsplitpartstest;qgis_vectortilelayertest;qgis_ogrproviderguitest" - Agent.Source.Git.ShallowFetchDepth: 120 - -trigger: - branches: - include: -# - master - - $(LR) - - $(LTR) - - azure-pipelines - -pr: -#- master -- $(LR) -- $(LTR) - -jobs: -- job: OSGeo4W - pool: - vmImage: vs2017-win2016 - timeoutInMinutes: 360 - strategy: - maxParallel: 4 - matrix: - x86: - OSGEO4W_ROOT: C:\OSGeo4W - OSGEO4W_ARCH: x86 - CLCACHE_DIR: c:\clcache-x86 - PLATFORM: x86 - CC: C:\OSGeo4W\bin\clcache.bat - CXX: C:\OSGeo4W\bin\clcache.bat - - x86_64: - OSGEO4W_ROOT: C:\OSGeo4W64 - OSGEO4W_ARCH: x86_64 - CLCACHE_DIR: c:\clcache-x86_64 - PLATFORM: x64 - CC: C:\OSGeo4W64\bin\clcache.bat - CXX: C:\OSGeo4W64\bin\clcache.bat - - steps: - - bash: | - if [ "$BUILD_REASON" = "PullRequest" ]; then - branch=$SYSTEM_PULLREQUEST_TARGETBRANCH - pr=$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER - else - branch=$BUILD_SOURCEBRANCHNAME - fi - - echo "BRANCH: ${branch}" - echo "PR: ${pr}" - echo "LR: ${LR}" - echo "LTR: ${LTR}" - - case "${branch}" in - "${LTR}") - OSGEO4W_PKG=qgis-ltr-dev - OSGEO4W_DEPS=qgis-ltr-dev-deps - ;; - "${LR}") - OSGEO4W_PKG=qgis-rel-dev - OSGEO4W_DEPS=qgis-rel-dev-deps - ;; - *) - OSGEO4W_PKG=qgis-dev - OSGEO4W_DEPS=qgis-dev-deps - ;; - esac - - target=Experimental - major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) - minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) - patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) - binary=$(curl --location-trusted http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//") - (( binary++ )) || true - - version=$major.$minor.$patch - sha="${BUILD_SOURCEVERSION:0:10}" - - if [ "$BUILD_REASON" = "PullRequest" ]; then - buildname="PR $pr / $branch ($BUILD_BUILDID) ($sha) ($OSGEO4W_PKG $target $OSGEO4W_ARCH)" # no colons allowed here - else - buildname="$OSGEO4W_PKG-$version-$sha-$target-VC14-$OSGEO4W_ARCH" - fi - - url=$buildname - url=${url//(/%28} - url=${url//)/%29} - url=${url// /+} - url="https://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercombine=and&filtercount=4&showfilters=0&filtercombine=and&field1=buildname&compare1=61&value1=$url&field2=site&compare2=65&value2=azure-pipelines&field3=buildstarttime&compare3=83&value3=$(date +%Y-%m-%d --date=yesterday)&field4=buildstarttime&compare4=84&value4=$(date +%Y-%m-%d --date=tomorrow)" - - echo "##vso[task.setvariable variable=TARGET]$target" - echo "##vso[task.setvariable variable=OSGEO4W_PKG]$OSGEO4W_PKG" - echo "##vso[task.setvariable variable=OSGEO4W_DEPS]$OSGEO4W_DEPS" - echo "##vso[task.setvariable variable=MAJOR]$major" - echo "##vso[task.setvariable variable=MINOR]$minor" - echo "##vso[task.setvariable variable=PATCH]$patch" - echo "##vso[task.setvariable variable=BINARY]$binary" - echo "##vso[task.setvariable variable=VERSION]$version" - echo "##vso[task.setvariable variable=BUILDNAME]$buildname" - echo "##vso[task.setvariable variable=DASHURL]${url//&/^&}" - - displayName: 'Setup build variables' - - - script: curl --output c:\setup-x86.exe https://cygwin.com/setup-x86.exe - displayName: 'Download cygwin Installer' - - - script: curl --output c:\osgeo4w-setup.exe http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/osgeo4w-setup-%OSGEO4W_ARCH%.exe - displayName: 'Download OSGeo4W Installer' - - - script: curl --location-trusted --output c:\ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip - displayName: 'Download Ninja' - -# - script: curl --location-trusted --output c:\depends.zip http://www.dependencywalker.com/depends22_%PLATFORM%.zip -# displayName: 'Download Dependency walker' - -# Too large… -# - task: Cache@2 -# inputs: -# key: 'cygwin | $(Date:yyyyMMdd)' -# path: 'c:\cygwin' -# restoreKeys: | -# cygwin | $(Date:yyyyMM) -# cygwin | $(Date:yyyy) -# cygwin -# displayName: Cache cygwin - - - powershell: ms-windows/osgeo4w/runasadmin.ps1 c:\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/temp/cygwin -P "bison,flex,git,poppler,doxygen,unzip" - displayName: 'Installing cygwin' - -# Too large… -# - task: Cache@2 -# inputs: -# key: 'osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMMdd)' -# path: '$(OSGEO4W_ROOT)' -# restoreKeys: | -# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMMdd) -# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyyMM) -# osgeo4w | $(OSGEO4W_ARCH) | $(Date:yyyy) -# osgeo4w | $(OSGEO4W_ARCH) -# displayName: Cache OSGeo4W - - - powershell: ms-windows/osgeo4w/runasadmin.ps1 c:\osgeo4w-setup.exe --autoaccept --advanced --arch $env:OSGEO4W_ARCH --quiet-mode --upgrade-also --root $env:OSGEO4W_ROOT --only-site -s http://ftp.osuosl.org/pub/osgeo/download/osgeo4w -l c:\temp\osgeo4w -P $env:OSGEO4W_DEPS -P python3-clcache - displayName: 'Installing OSGeo4W' - - - script: | - rmdir /s /q c:\temp\cygwin - rmdir /s /q c:\temp\osgeo4w - displayName: 'Clear package caches' - - - script: c:\cygwin\bin\unzip -o c:\ninja.zip -d %OSGEO4W_ROOT%\bin - displayName: 'Extracting Ninja' - -# - script: c:\cygwin\bin\unzip -o c:\depends.zip -d %OSGEO4W_ROOT%\bin -# displayName: 'Extracting Dependency Walker' - - - script: | - PATH %OSGEO4W_ROOT%\bin;%ProgramFiles%\CMake\bin;%PATH% - cmake --version - ctest --version - ninja --version - displayName: 'Display tool versions' - -# Too large… -# - task: Cache@2 -# inputs: -# key: 'clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd) | $(Hours)' -# path: '$(CLCACHE_DIR)' -# restoreKeys: | -# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd) | $(Hours) -# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMMdd) -# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyyMM) -# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) | $(Date:yyyy) -# clcache | $(OSGEO4W_ARCH) | $(OSGEO4W_PKG) -# displayName: Cache clcache - - - script: | - echo on - PATH c:\cygwin\bin;%OSGEO4W_ROOT%\bin;%PATH% - cd ms-windows\osgeo4w - touch skippackage - set OSGEO4W_CXXFLAGS=/MD /MP /Od /D NDEBUG - @echo ##[section]%OSGEO4W_ARCH% results available at %DASHURL% - package-nightly.cmd %VERSION% %BINARY% %OSGEO4W_PKG% %OSGEO4W_ARCH% %BUILD_SOURCEVERSION:~0,10% azure-pipelines - displayName: 'Building QGIS' - -# - script: | -# echo on -# PATH %OSGEO4W_ROOT%\bin;%PATH% -# cd ms-windows\osgeo4w\build-%OSGEO4W_PKG%-%OSGEO4W_ARCH% -# set /P tag=>$GITHUB_OUTPUT + + osgeo4w-build: + name: OSGeo4W Windows Build + needs: osgeo4w-packages + runs-on: windows-latest + env: + O4W_REPO: jef-n/OSGeo4W + + strategy: + matrix: ${{ fromJson(needs.osgeo4w-packages.outputs.matrix) }} + + permissions: + pull-requests: write + + steps: + - name: Restore build cache + uses: actions/cache/restore@v4 + with: + path: ccache + key: build-ccache-osgeo4w-${{ matrix.pkg }}-${{ github.event.pull_request.base.ref || github.ref_name }} + restore-keys: | + build-ccache-osgeo4w-${{ matrix.pkg }} + + - name: Build QGIS + shell: cmd + env: + PKG: ${{ matrix.pkg }} + GITHUB_EVENT_NUMBER: ${{ github.event.number }} + REF: ${{ github.ref }} + PKGDESC: "QGIS build of ${{ github.ref }}" + OSGEO4W_BUILD_RDEPS: 0 + PATH: C:\WINDOWS\system32;C:\Windows + CCACHE_DIR: ${{ github.workspace }}/ccache + SITE: github.com + run: | + curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/%O4W_REPO%/master/bootstrap.cmd>bootstrap.cmd + curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/%O4W_REPO%/master/bootstrap.sh>bootstrap.sh + + set O4W_GIT_REPO=%GITHUB_SERVER_URL%/%O4W_REPO% + call bootstrap.cmd %PKG% + + %GITHUB_WORKSPACE%\scripts\ccache -sv + + - id: upload + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.pkg }} + path: x86_64/ + retention-days: 1 + + - name: Save build cache for push only + uses: actions/cache/save@v4 + if: github.event_name == 'push' + with: + path: ccache + key: build-ccache-osgeo4w-${{ matrix.pkg }}-${{ github.ref_name }}-${{ github.run_id }} + + - run: npm install xml-js + if: github.event_name == 'pull_request' + - name: 'Post artifact download link and test results as comment on PR' + uses: actions/github-script@v7 + if: github.event_name == 'pull_request' + with: + script: | + let fs = require('fs'); + let tag = String(fs.readFileSync("src/${{ matrix.pkg }}/osgeo4w/build/Testing/TAG")).split("\r\n")[0] + let buildId = require('xml-js').xml2js(fs.readFileSync("src/${{ matrix.pkg }}/osgeo4w/build/Testing/" + tag + "/Done.xml"), {compact:true, ignoreDeclaration:true})['Done']['buildId']['_text'] + + const prComments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number + }); + const PREFIX = "## OSGeo4W package ${{ matrix.pkg }} ready!"; + let body = PREFIX + "\n\n" + "Package repository archive of this PR is available for testing [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload.outputs.artifact-id }})."; + body += "\n\n*(Built from commit ${{ github.event.pull_request.head.sha }})*\n"; + body += "\n\n*(Test results are [here](https://cdash.orfeo-toolbox.org/viewTest.php?buildid=" + buildId + "))*"; + + const winBuildComment = prComments.data?.find(c => c.body.startsWith(PREFIX)); + if (!!winBuildComment) { + // update the existing comment + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: winBuildComment.id, + body: body + }); + } else { + // submit a new comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: body + }); + } diff --git a/.gitignore b/.gitignore index 375a9e2d6b36..c1d96f30b493 100644 --- a/.gitignore +++ b/.gitignore @@ -44,20 +44,6 @@ desktop.ini doc/INSTALL.tex i18n/*.qm ms-windows/*.exe* -ms-windows/Installer-Files/postinstall.bat -ms-windows/Installer-Files/preremove.bat -ms-windows/nsis/ -ms-windows/osgeo4w/addons/ -ms-windows/osgeo4w/binary-* -ms-windows/osgeo4w/build-* -ms-windows/osgeo4w/nsis/ -ms-windows/osgeo4w/packages-x86/ -ms-windows/osgeo4w/packages-x86_64/ -ms-windows/osgeo4w/unpacked/ -ms-windows/osgeo4w/untgz/ -ms-windows/packages/ -ms-windows/progs/ -ms-windows/untgz/ python/plugins/grassprovider/description/algorithms.json python/plugins/grassprovider/tests/testdata/directions.tif.aux.xml python/plugins/processing/tests/testdata/*.aux.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index c0c02a97f25d..80d0070e49d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,17 +85,15 @@ if (USE_OPENCL) endif() # Configure CCache if available -if(NOT MSVC) - option(USE_CCACHE "Use ccache" ON) - if (USE_CCACHE) - find_program(CCACHE_FOUND ccache) - if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) - message(STATUS "ccache found") - endif(CCACHE_FOUND) - endif(USE_CCACHE) -endif(NOT MSVC) +option(USE_CCACHE "Use ccache" ON) +if (USE_CCACHE) + find_program(CCACHE_FOUND ccache) + if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + message(STATUS "ccache found") + endif(CCACHE_FOUND) +endif(USE_CCACHE) if (IOS) set (DEFAULT_FORCE_STATIC_LIBS TRUE) @@ -638,8 +636,8 @@ if (ENABLE_TESTS) add_custom_target(check COMMAND xvfb-run --server-args=-screen\ 0\ 1024x768x24 ctest --output-on-failure) # Define SOURCETREE fixture - add_test(NAME logGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh log) - add_test(NAME checkGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh check) + add_test(NAME logGitStatus COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh log) + add_test(NAME checkGitStatus COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh check) set_tests_properties(logGitStatus PROPERTIES FIXTURES_SETUP SOURCETREE) set_property(TEST logGitStatus PROPERTY SKIP_RETURN_CODE 2) set_tests_properties(checkGitStatus PROPERTIES FIXTURES_CLEANUP SOURCETREE) diff --git a/external/mdal/frmts/mdal_h2i.cpp b/external/mdal/frmts/mdal_h2i.cpp index 0b2ca0f33dbb..be5b2b6834ad 100644 --- a/external/mdal/frmts/mdal_h2i.cpp +++ b/external/mdal/frmts/mdal_h2i.cpp @@ -137,7 +137,7 @@ bool MDAL::DriverH2i::parseJsonFile( const std::string filePath, MetadataH2i &me metadata.dirPath = MDAL::dirName( filePath ); } - catch ( Json::exception &e ) + catch ( Json::exception & ) { return false; } diff --git a/external/mdal/mdal_utils.cpp b/external/mdal/mdal_utils.cpp index efcbc1b6489a..4691f00b99a8 100644 --- a/external/mdal/mdal_utils.cpp +++ b/external/mdal/mdal_utils.cpp @@ -17,7 +17,9 @@ #include #ifdef _MSC_VER +#ifndef UNICODE #define UNICODE +#endif #include #include #include @@ -1113,12 +1115,12 @@ std::vector MDAL::Library::libraryFilesInDir( const std::string &di { std::vector filesList; #ifdef _WIN32 - WIN32_FIND_DATA data; + WIN32_FIND_DATAA data; HANDLE hFind; std::string pattern = dirPath; pattern.push_back( '*' ); - hFind = FindFirstFile( pattern.c_str(), &data ); + hFind = FindFirstFileA( pattern.c_str(), &data ); if ( hFind == INVALID_HANDLE_VALUE ) return filesList; @@ -1129,7 +1131,7 @@ std::vector MDAL::Library::libraryFilesInDir( const std::string &di if ( !fileName.empty() && fileExtension( fileName ) == ".dll" ) filesList.push_back( fileName ); } - while ( FindNextFile( hFind, &data ) != 0 ); + while ( FindNextFileA( hFind, &data ) != 0 ); FindClose( hFind ); #else @@ -1140,8 +1142,8 @@ std::vector MDAL::Library::libraryFilesInDir( const std::string &di std::string fileName( de->d_name ); if ( !fileName.empty() ) { - std::string extentsion = fileExtension( fileName ); - if ( extentsion == ".so" || extentsion == ".dylib" ) + std::string extension = fileExtension( fileName ); + if ( extension == ".so" || extension == ".dylib" ) filesList.push_back( fileName ); } de = readdir( dir ); @@ -1160,7 +1162,7 @@ bool MDAL::Library::loadLibrary() #ifdef _WIN32 UINT uOldErrorMode = SetErrorMode( SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS ); - d->mLibrary = LoadLibrary( d->mLibraryFile.c_str() ); + d->mLibrary = LoadLibraryA( d->mLibraryFile.c_str() ); SetErrorMode( uOldErrorMode ); #else d->mLibrary = dlopen( d->mLibraryFile.c_str(), RTLD_LAZY ); diff --git a/external/qspatialite/CMakeLists.txt b/external/qspatialite/CMakeLists.txt index 33536dafe913..527f383303c7 100644 --- a/external/qspatialite/CMakeLists.txt +++ b/external/qspatialite/CMakeLists.txt @@ -7,18 +7,18 @@ add_definitions(-DQT_SHARED) include_directories(SYSTEM ${SQLITE3_INCLUDE_DIR} - ${Qt5Sql_PRIVATE_INCLUDE_DIRS} + ${${QT_VERSION_BASE}Sql_PRIVATE_INCLUDE_DIRS} ) -set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp) -QT5_WRAP_CPP(QSQLSPATIALITE_SRC qsql_spatialite.h smain.h) +set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp qsql_spatialite.h smain.h) add_library(qsqlspatialite SHARED ${QSQLSPATIALITE_SRC}) + target_link_libraries(qsqlspatialite - ${Qt5Core_LIBRARIES} - ${Qt5Sql_LIBRARIES} - spatialite::spatialite - qgis_core + ${QT_VERSION_BASE}::Core + ${QT_VERSION_BASE}::Sql + spatialite::spatialite + qgis_core ) install(TARGETS qsqlspatialite diff --git a/external/qspatialite/qsql_spatialite.cpp b/external/qspatialite/qsql_spatialite.cpp index 0e8f15a25f76..5a75a04748b3 100644 --- a/external/qspatialite/qsql_spatialite.cpp +++ b/external/qspatialite/qsql_spatialite.cpp @@ -632,7 +632,7 @@ bool QSpatiaLiteDriver::open( const QString &db, const QString &, const QString bool openReadOnlyOption = false; bool openUriOption = false; - const auto opts = conOpts.splitRef( QLatin1Char( ';' ) ); + const auto opts = conOpts.split( QLatin1Char( ';' ) ); for ( auto option : opts ) { option = option.trimmed(); diff --git a/external/untwine/api/QgisUntwine_win.cpp b/external/untwine/api/QgisUntwine_win.cpp index 7469655df8f8..47d355ce3675 100644 --- a/external/untwine/api/QgisUntwine_win.cpp +++ b/external/untwine/api/QgisUntwine_win.cpp @@ -28,7 +28,7 @@ bool QgisUntwine::start(Options& options) cmdline += "--" + op.first + " \"" + op.second + "\" "; PROCESS_INFORMATION processInfo; - STARTUPINFO startupInfo; + STARTUPINFOA startupInfo; ZeroMemory(&processInfo, sizeof(PROCESS_INFORMATION)); ZeroMemory(&startupInfo, sizeof(STARTUPINFO)); diff --git a/ms-windows/Installer-Files/InstallHeaderImage.bmp b/ms-windows/Installer-Files/InstallHeaderImage.bmp deleted file mode 100644 index 2332341daa04..000000000000 Binary files a/ms-windows/Installer-Files/InstallHeaderImage.bmp and /dev/null differ diff --git a/ms-windows/Installer-Files/Install_QGIS.ico b/ms-windows/Installer-Files/Install_QGIS.ico deleted file mode 100644 index 752cb9e25f09..000000000000 Binary files a/ms-windows/Installer-Files/Install_QGIS.ico and /dev/null differ diff --git a/ms-windows/Installer-Files/LICENSE.txt b/ms-windows/Installer-Files/LICENSE.txt deleted file mode 100644 index d1327eb937e7..000000000000 --- a/ms-windows/Installer-Files/LICENSE.txt +++ /dev/null @@ -1,28 +0,0 @@ - QGIS is Copyright (C) QGIS Development Team - and the respective authors, 2004. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - In addition, as a special exception, the QGIS Development Team gives - permission to link the code of this program with the Qt library, - including but not limited to the following versions (both free and - commercial): Qt/Non-commercial Windows, Qt/Windows, Qt/X11, Qt/Mac, - and Qt/Embedded (or with modified versions of Qt that use the same - license as Qt), and distribute linked combinations including the two. - You must obey the GNU General Public License in all respects for all - of the code used other than Qt. If you modify this file, you may - extend this exception to your version of the file, but you are not - obligated to do so. If you do not wish to do so, delete this exception - statement from your version. diff --git a/ms-windows/Installer-Files/QGIS-WebSite.URL b/ms-windows/Installer-Files/QGIS-WebSite.URL deleted file mode 100644 index 79dcf3a24495..000000000000 --- a/ms-windows/Installer-Files/QGIS-WebSite.URL +++ /dev/null @@ -1,2 +0,0 @@ -[InternetShortcut] -URL=http://qgis.org/ diff --git a/ms-windows/Installer-Files/QGIS.ico b/ms-windows/Installer-Files/QGIS.ico deleted file mode 100644 index da327712e77d..000000000000 Binary files a/ms-windows/Installer-Files/QGIS.ico and /dev/null differ diff --git a/ms-windows/Installer-Files/QGIS_Web.ico b/ms-windows/Installer-Files/QGIS_Web.ico deleted file mode 100644 index e07ad44c0b52..000000000000 Binary files a/ms-windows/Installer-Files/QGIS_Web.ico and /dev/null differ diff --git a/ms-windows/Installer-Files/UnInstallHeaderImage.bmp b/ms-windows/Installer-Files/UnInstallHeaderImage.bmp deleted file mode 100644 index 06567269dc2d..000000000000 Binary files a/ms-windows/Installer-Files/UnInstallHeaderImage.bmp and /dev/null differ diff --git a/ms-windows/Installer-Files/Uninstall_QGIS.ico b/ms-windows/Installer-Files/Uninstall_QGIS.ico deleted file mode 100644 index 4119d01d3a69..000000000000 Binary files a/ms-windows/Installer-Files/Uninstall_QGIS.ico and /dev/null differ diff --git a/ms-windows/Installer-Files/WelcomeFinishPage.bmp b/ms-windows/Installer-Files/WelcomeFinishPage.bmp deleted file mode 100644 index 3fb81c4b741b..000000000000 Binary files a/ms-windows/Installer-Files/WelcomeFinishPage.bmp and /dev/null differ diff --git a/ms-windows/Installer-Files/WelcomeFinishPage_old.bmp b/ms-windows/Installer-Files/WelcomeFinishPage_old.bmp deleted file mode 100644 index 72e3579bc255..000000000000 Binary files a/ms-windows/Installer-Files/WelcomeFinishPage_old.bmp and /dev/null differ diff --git a/ms-windows/Installer-Files/sidelogomaster.svg b/ms-windows/Installer-Files/sidelogomaster.svg deleted file mode 100644 index c6044e4a13bb..000000000000 --- a/ms-windows/Installer-Files/sidelogomaster.svg +++ /dev/null @@ -1 +0,0 @@ -QGIS \ No newline at end of file diff --git a/ms-windows/Installer-Files/sidelogomaster.xcf.bz2 b/ms-windows/Installer-Files/sidelogomaster.xcf.bz2 deleted file mode 100644 index 16b6b71e66a8..000000000000 Binary files a/ms-windows/Installer-Files/sidelogomaster.xcf.bz2 and /dev/null differ diff --git a/ms-windows/QGIS-Installer.nsi b/ms-windows/QGIS-Installer.nsi deleted file mode 100644 index 892a7083aa93..000000000000 --- a/ms-windows/QGIS-Installer.nsi +++ /dev/null @@ -1,569 +0,0 @@ -;-------------------------------------------------------------------------- -; QGIS-Installer.nsi - QGIS Installer for Windows -; --------------------- -; Date : September 2008 -; Copyright : (C) 2008 by Marco Pasetti -; Email : marco dot pasetti at alice dot it -;-------------------------------------------------------------------------- -; # -; This program is free software; you can redistribute it and/or modify # -; it under the terms of the GNU General Public License as published by # -; the Free Software Foundation; either version 2 of the License, or # -; (at your option) any later version. # -; # -;-------------------------------------------------------------------------- - -;Extended for creatensis.pl by Jürgen E. Fischer - -;---------------------------------------------------------------------------------------------------------------------------- - -; Added by Tim to get optimal compression -SetCompressor /SOLID lzma - -; Added by Tim to allow privilege elevation in vista -RequestExecutionLevel admin - -;---------------------------------------------------------------------------------------------------------------------------- - -;NSIS Includes - -!include "x64.nsh" -!include "MUI.nsh" -!include "LogicLib.nsh" - -;---------------------------------------------------------------------------------------------------------------------------- - -;Set the installer variables, depending on the selected version to build - -!addplugindir osgeo4w/untgz -!addplugindir osgeo4w/nsis -!addplugindir osgeo4w/inetc - -;---------------------------------------------------------------------------------------------------------------------------- - -;Publisher variables - -!define PUBLISHER "QGIS Development Team" -!define WEB_SITE "https://qgis.org" -!define WIKI_PAGE "https://qgis.org/en/docs/" - -;---------------------------------------------------------------------------------------------------------------------------- - -;General Definitions - -;Name of the application shown during install -Name "${DISPLAYED_NAME}" - -;Name of the output file (installer executable) -OutFile "${INSTALLER_NAME}" - -;Tell the installer to show Install and Uninstall details as default -ShowInstDetails hide -ShowUnInstDetails hide - -;---------------------------------------------------------------------------------------------------------------------------- - -; .onInit Function (called when the installer is nearly finished initializing) - -; Check if QGIS is already installed on the system and, if yes, what version and binary release; -; depending on that, select the install procedure: - -; 1. first installation = if QGIS is not already installed -; install QGIS asking for the install PATH - -; 2. upgrade installation = if an older release of QGIS is already installed -; call the uninstaller of the currently installed QGIS release -; if the uninstall procedure succeeded, call the current installer without asking for the install PATH -; QGIS will be installed in the same PATH of the previous installation - -; 3. downgrade installation = if a newer release of QGIS is already installed -; call the uninstaller of the currently installed QGIS release -; if the uninstall procedure succeeded, call the current installer without asking for the install PATH -; QGIS will be installed in the same PATH of the previous installation - -; 4. repair installation = if the same release of QGIS is already installed -; call the uninstaller of the currently installed QGIS release -; if the uninstall procedure succeeded, call the current installer asking for the install PATH - -Function .onInit -!ifdef INNER - WriteUninstaller "${UNINSTALLERDEST}\uninstall.exe" - Quit -!endif - ${If} ${ARCH} == "x86_64" - ${If} ${RunningX64} - DetailPrint "Installer running on 64-bit host" - ; disable registry redirection (enable access to 64-bit portion of registry) - SetRegView 64 - ; change install dir - ${If} $INSTDIR == "" - StrCpy $INSTDIR "$PROGRAMFILES64\${QGIS_BASE}" - ${EndIf} - ${EndIf} - ${EndIf} - - ${If} $INSTDIR == "" - StrCpy $INSTDIR "$PROGRAMFILES\${QGIS_BASE}" - ${EndIf} - - Var /GLOBAL ASK_FOR_PATH - StrCpy $ASK_FOR_PATH "YES" - - Var /GLOBAL UNINSTALL_STRING - Var /GLOBAL INSTALL_PATH - - Var /GLOBAL INSTALLED_VERSION_NUMBER - Var /GLOBAL INSTALLED_SVN_REVISION - Var /GLOBAL INSTALLED_BINARY_REVISION - - Var /GLOBAL INSTALLED_VERSION_INT - - Var /GLOBAL DISPLAYED_INSTALLED_VERSION - - Var /GLOBAL MESSAGE_0_ - Var /GLOBAL MESSAGE_1_ - Var /GLOBAL MESSAGE_2_ - Var /GLOBAL MESSAGE_3_ - - ReadRegStr $UNINSTALL_STRING HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "UninstallString" - ReadRegStr $INSTALL_PATH HKLM "Software\${QGIS_BASE}" "InstallPath" - ReadRegStr $INSTALLED_VERSION_NUMBER HKLM "Software\${QGIS_BASE}" "VersionNumber" - ReadRegStr $INSTALLED_BINARY_REVISION HKLM "Software\${QGIS_BASE}" "BinaryRevision" - - ReadRegStr $INSTALLED_VERSION_INT HKLM "Software\${QGIS_BASE}" "VersionInt" - ${If} $INSTALLED_VERSION_INT == "" - # First using new scheme: 1080001 - # Previous: SvnRevision 14615 + BinaryRevision 0 - ReadRegStr $INSTALLED_SVN_REVISION HKLM "Software\${QGIS_BASE}" "SvnRevision" - IntOp $INSTALLED_VERSION_INT $INSTALLED_SVN_REVISION + $INSTALLED_BINARY_REVISION - ${EndIf} - - StrCpy $MESSAGE_0_ "${QGIS_BASE} is already installed on your system.$\r$\n" - StrCpy $MESSAGE_0_ "$MESSAGE_0_$\r$\n" - - ${If} $INSTALLED_BINARY_REVISION == "" - StrCpy $DISPLAYED_INSTALLED_VERSION "$INSTALLED_VERSION_NUMBER" - ${Else} - StrCpy $DISPLAYED_INSTALLED_VERSION "$INSTALLED_VERSION_NUMBER-$INSTALLED_BINARY_REVISION" - ${EndIf} - - StrCpy $MESSAGE_0_ "$MESSAGE_0_The installed release is $DISPLAYED_INSTALLED_VERSION$\r$\n" - - StrCpy $MESSAGE_1_ "$MESSAGE_0_$\r$\n" - StrCpy $MESSAGE_1_ "$MESSAGE_1_You are going to install a newer release of ${QGIS_BASE}$\r$\n" - StrCpy $MESSAGE_1_ "$MESSAGE_1_$\r$\n" - StrCpy $MESSAGE_1_ "$MESSAGE_1_Press OK to uninstall QGIS $DISPLAYED_INSTALLED_VERSION" - StrCpy $MESSAGE_1_ "$MESSAGE_1_ and install ${DISPLAYED_NAME} or Cancel to quit." - - StrCpy $MESSAGE_2_ "$MESSAGE_0_$\r$\n" - StrCpy $MESSAGE_2_ "$MESSAGE_2_You are going to install an older release of ${QGIS_BASE}$\r$\n" - StrCpy $MESSAGE_2_ "$MESSAGE_2_$\r$\n" - StrCpy $MESSAGE_2_ "$MESSAGE_2_Press OK to uninstall QGIS $DISPLAYED_INSTALLED_VERSION" - StrCpy $MESSAGE_2_ "$MESSAGE_2_ and install ${DISPLAYED_NAME} or Cancel to quit." - - StrCpy $MESSAGE_3_ "$MESSAGE_0_$\r$\n" - StrCpy $MESSAGE_3_ "$MESSAGE_3_This is the latest release available.$\r$\n" - StrCpy $MESSAGE_3_ "$MESSAGE_3_$\r$\n" - StrCpy $MESSAGE_3_ "$MESSAGE_3_Press OK to reinstall ${DISPLAYED_NAME} or Cancel to quit." - - ${If} $INSTALLED_VERSION_INT = 0 - ${Else} - ${If} $INSTALLED_VERSION_INT < ${VERSION_INT} - MessageBox MB_OKCANCEL "$MESSAGE_1_" IDOK upgrade IDCANCEL quit_upgrade - upgrade: - StrCpy $ASK_FOR_PATH "NO" - ExecWait '"$UNINSTALL_STRING" _?=$INSTALL_PATH' $0 - Goto continue_upgrade - quit_upgrade: - Abort - continue_upgrade: - ${ElseIf} $INSTALLED_VERSION_INT > ${VERSION_INT} - MessageBox MB_OKCANCEL "$MESSAGE_2_" IDOK downgrade IDCANCEL quit_downgrade - downgrade: - StrCpy $ASK_FOR_PATH "NO" - ExecWait '"$UNINSTALL_STRING" _?=$INSTALL_PATH' $0 - Goto continue_downgrade - quit_downgrade: - Abort - continue_downgrade: - ${ElseIf} $INSTALLED_VERSION_INT = ${VERSION_INT} - MessageBox MB_OKCANCEL "$MESSAGE_3_" IDOK reinstall IDCANCEL quit_reinstall - reinstall: - ExecWait '"$UNINSTALL_STRING" _?=$INSTALL_PATH' $0 - Goto continue_reinstall - quit_reinstall: - Abort - continue_reinstall: - ${EndIf} - - ${If} $0 = 0 - ${Else} - Abort - ${EndIf} - ${EndIf} -FunctionEnd - -;---------------------------------------------------------------------------------------------------------------------------- - -;CheckUpdate Function -;Check if to show the MUI_PAGE_DIRECTORY during the installation (to ask for the install PATH) - -Function CheckUpdate - - ${If} $ASK_FOR_PATH == "NO" - Abort - ${EndIf} - -FunctionEnd - -;---------------------------------------------------------------------------------------------------------------------------- - -;Interface Settings - -!define MUI_ABORTWARNING -!define MUI_ICON ".\Installer-Files\Install_QGIS.ico" -!define MUI_UNICON ".\Installer-Files\Uninstall_QGIS.ico" -!define MUI_HEADERIMAGE_BITMAP_NOSTETCH ".\Installer-Files\InstallHeaderImage.bmp" -!define MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ".\Installer-Files\UnInstallHeaderImage.bmp" -!define MUI_WELCOMEFINISHPAGE_BITMAP ".\Installer-Files\WelcomeFinishPage.bmp" -!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\Installer-Files\WelcomeFinishPage.bmp" - -;---------------------------------------------------------------------------------------------------------------------------- - -;Installer Pages - -!define MUI_WELCOMEPAGE_TITLE_3LINES -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE ${LICENSE_FILE} - -!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckUpdate -!insertmacro MUI_PAGE_DIRECTORY - -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_INSTFILES -!define MUI_FINISHPAGE_TITLE_3LINES -!insertmacro MUI_PAGE_FINISH - -!insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -!insertmacro MUI_UNPAGE_FINISH - -;---------------------------------------------------------------------------------------------------------------------------- - -; Language files -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "German" -!insertmacro MUI_LANGUAGE "French" -!insertmacro MUI_LANGUAGE "Russian" -!insertmacro MUI_LANGUAGE "Japanese" -!insertmacro MUI_LANGUAGE "Italian" -!insertmacro MUI_LANGUAGE "Polish" -!insertmacro MUI_LANGUAGE "Spanish" -!insertmacro MUI_LANGUAGE "PortugueseBR" -!insertmacro MUI_LANGUAGE "Portuguese" -!insertmacro MUI_LANGUAGE "Czech" -!insertmacro MUI_LANGUAGE "Croatian" -!insertmacro MUI_LANGUAGE "Thai" -!insertmacro MUI_LANGUAGE "Dutch" - -;---------------------------------------------------------------------------------------------------------------------------- - -;Installer Sections - -;Declares the variables for optional Sample Data Sections -Var /GLOBAL HTTP_PATH -Var /GLOBAL ARCHIVE_NAME -Var /GLOBAL EXTENDED_ARCHIVE_NAME -Var /GLOBAL ORIGINAL_UNTAR_FOLDER -Var /GLOBAL CUSTOM_UNTAR_FOLDER -Var /GLOBAL ARCHIVE_SIZE_KB -Var /GLOBAL ARCHIVE_SIZE_MB -Var /GLOBAL DOWNLOAD_MESSAGE_ - -!ifndef INNER -Section "QGIS" SecQGIS - SectionIn RO - - ;Added by Tim to set the reg key so we get default plugin loading - !include plugins.nsh - ;Added by Tim to set the reg key so we get default python & py plugins - !include python_plugins.nsh - - ;Set the INSTALL_DIR variable - Var /GLOBAL INSTALL_DIR - - ${If} $ASK_FOR_PATH == "NO" - StrCpy $INSTALL_DIR "$INSTALL_PATH" - ${Else} - StrCpy $INSTALL_DIR "$INSTDIR" - ${EndIf} - - ;Set to try to overwrite existing files - SetOverwrite try - - ;Set the GIS_DATABASE directory - SetShellVarContext current - Var /GLOBAL GIS_DATABASE - StrCpy $GIS_DATABASE "$DOCUMENTS\GIS DataBase" - - ;Create the GIS_DATABASE directory - CreateDirectory "$GIS_DATABASE" - - ;add Installer files - SetOutPath "$INSTALL_DIR\icons" - File .\Installer-Files\QGIS.ico - File .\Installer-Files\QGIS_Web.ico - SetOutPath "$INSTALL_DIR" - File .\Installer-Files\postinstall.bat - File .\Installer-Files\preremove.bat - - ;add QGIS files - SetOutPath "$INSTALL_DIR" - File /r ${PACKAGE_FOLDER}\*.* - -!ifndef INNER - SetOutPath $INSTDIR - File uninstall.exe -!endif - - ;Registry Key Entries - - ;HKEY_LOCAL_MACHINE Install entries - ;Set the Name, Version and Revision of QGIS+ PublisherInfo + InstallPath - WriteRegStr HKLM "Software\${QGIS_BASE}" "Name" "${QGIS_BASE}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "VersionNumber" "${VERSION_NUMBER}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "VersionName" "${VERSION_NAME}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "VersionInt" "${VERSION_INT}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "BinaryRevision" "${BINARY_REVISION}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "Publisher" "${PUBLISHER}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "WebSite" "${WEB_SITE}" - WriteRegStr HKLM "Software\${QGIS_BASE}" "InstallPath" "$INSTALL_DIR" - - ;HKEY_LOCAL_MACHINE Uninstall entries - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "DisplayName" "${DISPLAYED_NAME}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "DisplayVersion" "${VERSION_NUMBER}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "UninstallString" "$INSTALL_DIR\uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "DisplayIcon" "$INSTALL_DIR\icons\QGIS.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "EstimatedSize" 1 - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "HelpLink" "${WIKI_PAGE}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "URLInfoAbout" "${WEB_SITE}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" "Publisher" "${PUBLISHER}" - - ;Create the Desktop Shortcut - SetShellVarContext current - - ;Create the Windows Start Menu Shortcuts - SetShellVarContext all - - CreateDirectory "$SMPROGRAMS\${QGIS_BASE}" - - GetFullPathName /SHORT $0 $INSTALL_DIR - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP", "$DESKTOP\${QGIS_BASE}").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0' - - ReadEnvStr $0 COMSPEC - nsExec::ExecToLog '"$0" /c "$INSTALL_DIR\postinstall.bat"' - - IfFileExists "$INSTALL_DIR\etc\reboot" RebootNecessary NoRebootNecessary - -RebootNecessary: - IfSilent FlagRebootNecessary - SetRebootFlag true - Return - -FlagRebootNecessary: - SetErrorLevel 3010 ; ERROR_SUCCESS_REBOOT_REQUIRED - Return - -NoRebootNecessary: - Return - -SectionEnd -!endif - -Function DownloadDataSet - - IntOp $ARCHIVE_SIZE_MB $ARCHIVE_SIZE_KB / 1024 - - StrCpy $DOWNLOAD_MESSAGE_ "The installer will download the $EXTENDED_ARCHIVE_NAME sample data set.$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_The archive is about $ARCHIVE_SIZE_MB MB and may take" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_ several minutes to be downloaded.$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_The $EXTENDED_ARCHIVE_NAME will be copied to:$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$GIS_DATABASE\$CUSTOM_UNTAR_FOLDER.$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_$\r$\n" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_Press OK to continue or Cancel to skip the download and complete the ${QGIS_BASE}" - StrCpy $DOWNLOAD_MESSAGE_ "$DOWNLOAD_MESSAGE_ installation without the $EXTENDED_ARCHIVE_NAME data set.$\r$\n" - - MessageBox MB_OKCANCEL "$DOWNLOAD_MESSAGE_" IDOK download IDCANCEL cancel_download - - download: - SetShellVarContext current - InitPluginsDir - inetc::get /caption "$ARCHIVE_NAME" /canceltext "Cancel" "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME" /end - Pop $0 # return value = exit code, "OK" means OK - StrCmp $0 "OK" download_ok download_failed - - download_ok: - InitPluginsDir - untgz::extract "-d" "$GIS_DATABASE" "$TEMP\$ARCHIVE_NAME" - Pop $0 - StrCmp $0 "success" untar_ok untar_failed - - untar_ok: - Rename "$GIS_DATABASE\$ORIGINAL_UNTAR_FOLDER" "$GIS_DATABASE\$CUSTOM_UNTAR_FOLDER" - Delete "$TEMP\$ARCHIVE_NAME" - Goto end - - download_failed: - DetailPrint "$0" ;print error message to log - MessageBox MB_OK "Download Failed.$\r$\n${QGIS_BASE} will be installed without the $EXTENDED_ARCHIVE_NAME sample data set." - Goto end - - cancel_download: - MessageBox MB_OK "Download Canceled.$\r$\n${QGIS_BASE} will be installed without the $EXTENDED_ARCHIVE_NAME sample data set." - Goto end - - untar_failed: - DetailPrint "$0" ;print error message to log - - end: - -FunctionEnd - -Section /O "North Carolina Data Set" SecNorthCarolinaSDB - - ;Set the size (in KB) of the archive file - StrCpy $ARCHIVE_SIZE_KB 138629 - - ;Set the size (in KB) of the unpacked archive file - AddSize 293314 - - StrCpy $HTTP_PATH "https://grass.osgeo.org/sampledata" - StrCpy $ARCHIVE_NAME "nc_spm_latest.tar.gz" - StrCpy $EXTENDED_ARCHIVE_NAME "North Carolina" - StrCpy $ORIGINAL_UNTAR_FOLDER "nc_spm_08" - StrCpy $CUSTOM_UNTAR_FOLDER "North-Carolina" - - Call DownloadDataSet - -SectionEnd - -Section /O "South Dakota (Spearfish) Data Set" SecSpearfishSDB - - ;Set the size (in KB) of the archive file - StrCpy $ARCHIVE_SIZE_KB 20803 - - ;Set the size (in KB) of the unpacked archive file - AddSize 42171 - - StrCpy $HTTP_PATH "https://grass.osgeo.org/sampledata" - StrCpy $ARCHIVE_NAME "spearfish_grass60data-0.3.tar.gz" - StrCpy $EXTENDED_ARCHIVE_NAME "South Dakota (Spearfish)" - StrCpy $ORIGINAL_UNTAR_FOLDER "spearfish60" - StrCpy $CUSTOM_UNTAR_FOLDER "Spearfish60" - - Call DownloadDataSet - -SectionEnd - -Section /O "Alaska Data Set" SecAlaskaSDB - - ;Set the size (in KB) of the archive file - StrCpy $ARCHIVE_SIZE_KB 10253 - - ;Set the size (in KB) of the unpacked archive file - AddSize 33914 - - StrCpy $HTTP_PATH "https://qgis.org/downloads/data" - StrCpy $ARCHIVE_NAME "qgis_sample_data.tar.gz" - StrCpy $EXTENDED_ARCHIVE_NAME "Alaska" - StrCpy $ORIGINAL_UNTAR_FOLDER "qgis_sample_data" - StrCpy $CUSTOM_UNTAR_FOLDER "Alaska" - - Call DownloadDataSet - -SectionEnd - -;---------------------------------------------------------------------------------------------------------------------------- - -;Uninstaller Section - -!ifdef INNER -Section "Uninstall" - ${If} ${ARCH} == "x86_64" - ${If} ${RunningX64} - DetailPrint "Installer running on 64-bit host" - ; disable registry redirection (enable access to 64-bit portion of registry) - SetRegView 64 - ${EndIf} - ${EndIf} - - GetFullPathName /SHORT $0 $INSTDIR - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP", "$DESKTOP\${QGIS_BASE}").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0' - System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0' - - ReadEnvStr $0 COMSPEC - nsExec::ExecToLog '"$0" /c "$INSTDIR\preremove.bat"' - - Delete "$INSTDIR\uninstall.exe" - Delete "$INSTDIR\*.bat.done" - Delete "$INSTDIR\*.log" - Delete "$INSTDIR\*.txt" - Delete "$INSTDIR\*.ico" - Delete "$INSTDIR\*.bat" - Delete "$INSTDIR\*.dll" - - RMDir /r "$INSTDIR\bin" - RMDir /r "$INSTDIR\apps" - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\include" - RMDir /r "$INSTDIR\lib" - RMDir /r "$INSTDIR\share" - RMDir /r "$INSTDIR\icons" - RMDir /r "$INSTDIR\src" - RMDir /r "$INSTDIR\contrib" - RMDir /r "$INSTDIR\manifest" - RMDir /r "$INSTDIR\man" - - ;if empty, remove the install folder - RMDir "$INSTDIR" - - ;remove the Desktop ShortCut - SetShellVarContext all - Delete "$DESKTOP\${QGIS_BASE}\QGIS Desktop (${VERSION_NUMBER}).lnk" - Delete "$DESKTOP\${QGIS_BASE}\QGIS Browser (${VERSION_NUMBER}).lnk" - Delete "$DESKTOP\${QGIS_BASE}\OSGeo4W.lnk" - RmDir "$DESKTOP\${QGIS_BASE}" - - ;remove the Programs Start ShortCut - SetShellVarContext all - RMDir /r "$SMPROGRAMS\${QGIS_BASE}" - - ;remove the Registry Entries - DeleteRegKey HKLM "Software\${QGIS_BASE}" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" -SectionEnd -!endif - -;---------------------------------------------------------------------------------------------------------------------------- - -!ifndef INNER -;Installer Section Descriptions -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecQGIS} "Install ${QGIS_BASE}" - !insertmacro MUI_DESCRIPTION_TEXT ${SecNorthCarolinaSDB} "Download and install the North Carolina sample data set" - !insertmacro MUI_DESCRIPTION_TEXT ${SecSpearfishSDB} "Download and install the South Dakota (Spearfish) sample data set" - !insertmacro MUI_DESCRIPTION_TEXT ${SecAlaskaSDB} "Download and install the Alaska sample database (shapefiles and TIFF data)" -!insertmacro MUI_FUNCTION_DESCRIPTION_END -!endif - -;---------------------------------------------------------------------------------------------------------------------------- diff --git a/ms-windows/osgeo4w/configonly.bat b/ms-windows/osgeo4w/configonly.bat deleted file mode 100644 index ee2aa6254187..000000000000 --- a/ms-windows/osgeo4w/configonly.bat +++ /dev/null @@ -1,46 +0,0 @@ -@echo off -REM *************************************************************************** -REM configonly.cmd -REM --------------------- -REM begin : June 2018 -REM copyright : (C) 2018 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 *************************************************************************** - -set ARCH=%1 -if "%ARCH%"=="x86" ( - set CMAKEGEN=Visual Studio 14 2015 -) else ( - set CMAKEGEN=Visual Studio 14 2015 Win64 - set ARCH=x86_64 -) - -set CONFIGONLY=1 - -setlocal enabledelayedexpansion - -for /f "tokens=*" %%L in (..\..\CMakeLists.txt) do ( - set L=%%L - set V=!L:SET(CPACK_PACKAGE_VERSION_=! - if not !V!==!L! ( - set V=!V:"=! - set V=!V:^)=! - set _major=!V:MAJOR =! - set _minor=!V:MINOR =! - set _patch=!V:PATCH =! - if not !_major!==!V! set MAJOR=!_major! - if not !_minor!==!V! set MINOR=!_minor! - if not !_patch!==!V! set PATCH=!_patch! - ) -) - -package-nightly.cmd %MAJOR%.%MINOR%.%PATCH% 99 qgis-test %ARCH% - -endlocal diff --git a/ms-windows/osgeo4w/creatensis.pl b/ms-windows/osgeo4w/creatensis.pl deleted file mode 100755 index 81d349d7989f..000000000000 --- a/ms-windows/osgeo4w/creatensis.pl +++ /dev/null @@ -1,567 +0,0 @@ -#!/usr/bin/env perl -# creates a NSIS installer from OSGeo4W packages -# note: works also on Unix - -# Copyright (C) 2010 Jürgen E. Fischer - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# -# Download OSGeo4W packages -# - -BEGIN { - # ignore requireAdministrator execution level while producing the - # uninstaller - $ENV{"__COMPAT_LAYER"} = 'RUNASINVOKER'; -} - -use strict; -use warnings; -use Getopt::Long; -use Pod::Usage; - -my $keep = 0; -my $verbose = 0; - -my $packagename = "QGIS"; -my $releasename; -my $shortname = "qgis"; -my $version; -my $binary; -my $root = "http://download.osgeo.org/osgeo4w"; -my $ininame = "setup.ini"; -my $arch = "x86_64"; -my $signwith; -my $signpass; -my $help; - -my $result = GetOptions( - "verbose+" => \$verbose, - "keep" => \$keep, - "signwith=s" => \$signwith, - "signpass=s" => \$signpass, - "releasename=s" => \$releasename, - "version=s" => \$version, - "binary=i" => \$binary, - "packagename=s" => \$packagename, - "shortname=s" => \$shortname, - "ininame=s" => \$ininame, - "mirror=s" => \$root, - "arch=s" => \$arch, - "help" => \$help - ); - -die "certificate not found" if defined $signwith && ! -f $signwith; - -pod2usage(1) if $help; - -my $wgetopt = $verbose ? "" : "-nv"; - -unless(-f "nsis/System.dll") { - mkdir "nsis", 0755 unless -d "nsis"; - system "wget $wgetopt -Onsis/System.dll http://qgis.org/downloads/System.dll"; - die "download of System.dll failed" if $?; -} - -my $archpath = $arch eq "" ? "" : "/$arch"; -my $archpostfix = $arch eq "" ? "" : "-$arch"; -my $unpacked = "unpacked" . ($arch eq "" ? "" : "-$arch"); -my $packages = "packages" . ($arch eq "" ? "" : "-$arch"); - -mkdir $packages, 0755 unless -d $packages; -chdir $packages; - -system "wget $wgetopt -c http://qgis.org/downloads/Untgz.zip" unless -f "Untgz.zip"; -die "download of Untgz.zip failed" if $?; - -system "wget $wgetopt -c https://qgis.org/downloads/Inetc.zip" unless -f "Inetc.zip"; -die "download of Inetc.zip failed" if $?; - -my %dep; -my %file; -my %lic; -my %sdesc; -my %md5; -my $package; - -system "wget $wgetopt -O setup.ini $root$archpath/$ininame"; -die "download of setup.ini failed" if $?; -open F, "setup.ini" || die "setup.ini not found"; -while() { - my $file; - my $md5; - - chop; - if(/^@ (\S+)/) { - $package = $1; - } elsif( /^requires: (.*)$/ ) { - @{$dep{$package}} = split / /, $1; - } elsif( ($file,$md5) = /^install:\s+(\S+)\s+.*\s+(\S+)$/) { - $file{$package} = $file unless exists $file{$package}; - $file =~ s/^.*\///; - $md5{$file} = $md5 unless exists $md5{$file}; - } elsif( ($file,$md5) = /^license:\s+(\S+)\s+.*\s+(\S+)$/) { - $lic{$package} = $file unless exists $lic{$package}; - $file =~ s/^.*\///; - $md5{$file} = $md5 unless exists $md5{$file}; - } elsif( /^sdesc:\s*"(.*)"\s*$/) { - $sdesc{$package} = $1 unless exists $sdesc{$package}; - } -} -close F; - -my %pkgs; - -sub getDeps { - my $pkg = shift; - - my $deponly = $pkg =~ /-$/; - $pkg =~ s/-$//; - - unless($deponly) { - return if exists $pkgs{$pkg}; - print " Including package $pkg\n" if $verbose; - $pkgs{$pkg} = 1; - } elsif( exists $pkgs{$pkg} ) { - print " Excluding package $pkg\n" if $verbose; - delete $pkgs{$pkg}; - return; - } else { - print " Including dependencies of package $pkg\n" if $verbose; - } - - foreach my $p ( @{ $dep{$pkg} } ) { - getDeps($p); - } -} - -unless(@ARGV) { - print "Defaulting to qgis-full package...\n" if $verbose; - push @ARGV, "qgis-full"; -} - -getDeps($_) for @ARGV; - -if(-f "../addons/bin/NCSEcw4_RO.dll") { - print "Enabling ECW support...\n" if $verbose; - getDeps("gdal-ecw") -} - -my @lic; -my @desc; -foreach my $p ( keys %pkgs ) { - my @f; - unless( exists $file{$p} ) { - print "No file for package $p found.\n" if $verbose; - next; - } - push @f, "$root/$file{$p}"; - - if( exists $lic{$p} ) { - push @f, "$root/$lic{$p}"; - my($l) = $lic{$p} =~ /([^\/]+)$/; - push @lic, $l; - push @desc, $sdesc{$p}; - } - - for my $f (@f) { - $f =~ s/\/\.\//\//g; - - my($file) = $f =~ /([^\/]+)$/; - - next if -f $file; - - print "Downloading $file [$f]...\n" if $verbose; - system "wget $wgetopt -c $f"; - die "download of $f failed" if $? or ! -f $file; - - if( exists $md5{$file} ) { - my $md5; - open F, "md5sum '$file'|"; - while() { - if( /^(\S+)\s+\*?(.*)$/ && $2 eq $file ) { - $md5 = $1; - } - } - close F; - - die "No md5sum of $p determined [$file]" unless defined $md5; - if( $md5 eq $md5{$file} ) { - print "md5sum of $file verified.\n" if $verbose; - } else { - die "md5sum mismatch for $file [$md5 vs $md5{$file{$p}}]" - } - } - else - { - die "md5sum for $file not found.\n"; - } - } -} - -chdir ".."; - -# -# Unpack them -# Add nircmd -# Add addons -# - -if( -d $unpacked ) { - unless( $keep ) { - print "Removing $unpacked directory\n" if $verbose; - system "rm -rf $unpacked"; - } else { - print "Keeping $unpacked directory\n" if $verbose; - } -} - -my $taropt = "v" x $verbose; - -unless(-d $unpacked ) { - mkdir "$unpacked", 0755; - mkdir "$unpacked/bin", 0755; - mkdir "$unpacked/etc", 0755; - mkdir "$unpacked/etc/setup", 0755; - - # Create package database - open O, ">$unpacked/etc/setup/installed.db"; - print O "INSTALLED.DB 2\n"; - - foreach my $pn ( keys %pkgs ) { - my $p = $file{$pn}; - unless( defined $p ) { - print "No package found for $pn\n" if $verbose; - next; - } - - $p =~ s#^.*/#$packages/#; - - unless( -r $p ) { - print "Package $p not found.\n" if $verbose; - next; - } - - print O "$pn $p 0\n"; - - print "Unpacking $p...\n" if $verbose; - system "bash -c 'tar $taropt -C $unpacked -xjvf $p | gzip -c >$unpacked/etc/setup/$pn.lst.gz && [ \${PIPESTATUS[0]} == 0 -a \${PIPESTATUS[1]} == 0 ]'"; - die "unpacking of $p failed" if $?; - } - - close O; - - chdir $unpacked; - - mkdir "bin", 0755; - - unless( -f "bin/nircmd.exe" ) { - unless( -f "../$packages/nircmd.zip" ) { - system "cd ../$packages; wget $wgetopt -c http://www.nirsoft.net/utils/nircmd.zip"; - die "download of nircmd.zip failed" if $?; - } - - mkdir "apps", 0755; - mkdir "apps/nircmd", 0755; - system "cd apps/nircmd; unzip ../../../$packages/nircmd.zip && mv nircmd.exe nircmdc.exe ../../bin"; - die "unpacking of nircmd failed" if $?; - } - - if( -d "../addons" ) { - print " Including addons...\n" if $verbose; - system "tar -C ../addons -cf - . | tar $taropt -xf -"; - die "copying of addons failed" if $?; - } - - chdir ".."; -} - -my($major, $minor, $patch); - -open F, "../../CMakeLists.txt"; -while() { - if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/i) { - $major = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/i) { - $minor = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/i) { - $patch = $1; - } elsif(/SET\(RELEASE_NAME "(.+)"\)/i) { - $releasename = $1 unless defined $releasename; - } -} -close F; - -$version = "$major.$minor.$patch" unless defined $version; - -my($pmajor,$pminor,$ppatch) = $version =~ /^(\d+)\.(\d+)\.(\d+)$/; -die "Invalid version $version" unless defined $ppatch; - -unless( defined $binary ) { - if( -f "binary$archpostfix-$version" ) { - open P, "binary$archpostfix-$version"; - $binary =

; - close P; - $binary++; - } else { - $binary = 1; - } -} - -# -# Create postinstall.bat -# - -open F, ">../Installer-Files/postinstall.bat"; - -my $r = ">>postinstall.log 2>&1\r\n"; - -print F "\@echo off\r\n"; -print F "if exist postinstall.log del postinstall.log\r\n"; -print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%$r"; -print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%$r"; - -print F "del preremove-conf.bat$r"; -my $c = ">>preremove-conf.bat\r\n"; -print F "echo set OSGEO4W_ROOT=%OSGEO4W_ROOT%$c"; -print F "echo set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%$c"; -print F "echo set OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%$c"; -print F "echo set OSGEO4W_DESKTOP=%OSGEO4W_DESKTOP%$c"; - -print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%$r"; -print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%$r"; -print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%$r"; -print F "echo OSGEO4W_DESKTOP=%OSGEO4W_DESKTOP%$r"; -print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%$r"; -print F "cd /d %OSGEO4W_ROOT%$r"; - -chdir $unpacked; -for my $p () { - $p =~ s/\//\\/g; - my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/; - - print F "echo Running postinstall $file...$r"; - print F "%COMSPEC% /c $p$r"; - print F "ren $p $file.done$r"; -} -chdir ".."; - -print F "ren postinstall.bat postinstall.bat.done$r"; - -close F; - -open F, ">../Installer-Files/preremove.bat"; - -$r = ">>%TEMP%\\$packagename-OSGeo4W-$version-$binary-preremove.log 2>&1\r\n"; - -print F "\@echo off\r\n"; -print F "call \"%~dp0\\preremove-conf.bat\"$r"; -print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%$r"; -print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%$r"; -print F "echo OSGEO4W_DESKTOP=%OSGEO4W_DESKTOP%$r"; -print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%$r"; -print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%$r"; -print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%$r"; -print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%$r"; -print F "cd /d \"%OSGEO4W_ROOT%\"$r"; - -chdir $unpacked; -for my $p () { - $p =~ s/\//\\/g; - my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/; - - print F "echo Running preremove $file...$r"; - print F "%COMSPEC% /c $p$r"; - print F "ren $p $file.done$r"; -} -chdir ".."; - -print F "ren preremove.bat preremove.bat.done$r"; - -close F; - -unless(-d "untgz") { - system "unzip $packages/Untgz.zip"; - die "unpacking Untgz.zip failed" if $?; -} - -unless(-d "inetc") { - mkdir "inetc", 0755; - system "unzip -p $packages/Inetc.zip Plugins/x86-ansi/INetC.dll >inetc/INetC.dll"; - die "unpacking Inetc.zip failed" if $?; -} - -chdir ".."; - - -print "Creating license file\n" if $verbose; -open O, ">license.tmp"; -my $lic; -for my $l ( ( "osgeo4w/$unpacked/apps/$shortname/doc/LICENSE", "../COPYING", "./Installer-Files/LICENSE.txt" ) ) { - next unless -f $l; - $lic = $l; - last; -} - -die "no license found" unless defined $lic; - -my $i = 0; -if( @lic ) { - print O "License overview:\n"; - print O "1. QGIS\n"; - $i = 1; - for my $l ( @desc ) { - print O ++$i . ". $l\n"; - } - $i = 0; - print O "\n\n----------\n\n" . ++$i . ". License of 'QGIS'\n\n"; -} - -print " Including QGIS license $lic\n" if $verbose; -open I, $lic; -while() { - s/\s*$/\n/; - print O; -} -close I; - -for my $l (@lic) { - print " Including license $l\n" if $verbose; - - open I, "osgeo4w/$packages/$l" or die "License $l not found."; - print O "\n\n----------\n\n" . ++$i . ". License of '" . shift(@desc) . "'\n\n"; - while() { - s/\s*$/\n/; - print O; - } - close I; -} - -close O; - -my $license = "license.tmp"; -if( -f "osgeo4w/$unpacked/apps/$shortname/doc/LICENSE" ) { - open O, ">osgeo4w/$unpacked/apps/$shortname/doc/LICENSE"; - open I, $license; - while() { - print O; - } - close O; - close I; - - $license = "osgeo4w/$unpacked/apps/$shortname/doc/LICENSE"; -} - - -print "Running NSIS\n" if $verbose; - -my $installerbase = "$packagename-OSGeo4W-$version-$binary-Setup$archpostfix"; - -my $run; -my $instdest; - -if($^O eq "cygwin") { - $run = "cygstart "; - $instdest = `cygpath -w \$PWD`; -} else { - $run = "wine "; - $instdest = `winepath -w \$PWD`; -} - -$instdest =~ s/\s+$//; -$instdest =~ s/\\/\\\\/g; - - -my $args = ""; -$args .= " -V$verbose"; -$args .= " -DVERSION_NAME='$releasename'"; -$args .= " -DVERSION_NUMBER='$version'"; -$args .= " -DBINARY_REVISION=$binary"; -$args .= sprintf( " -DVERSION_INT='%d%02d%02d%02d'", $pmajor, $pminor, $ppatch, $binary ); -$args .= sprintf( " -DQGIS_BASE='$packagename %d.%d'", $pmajor, $pminor ); -$args .= " -DDISPLAYED_NAME=\"$packagename $version '$releasename'\""; -$args .= " -DPACKAGE_FOLDER=osgeo4w/$unpacked"; -$args .= " -DLICENSE_FILE='$license'"; -$args .= " -DARCH='$arch'"; -$args .= " QGIS-Installer.nsi"; - -sub sign { - my $base = shift; - - my $cmd = "osslsigncode sign"; - $cmd .= " -pkcs12 \"$signwith\""; - $cmd .= " -pass \"$signpass\"" if defined $signpass; - $cmd .= " -n \"$packagename $version '$releasename'\""; - $cmd .= " -h sha256"; - $cmd .= " -i \"https://qgis.org\""; - $cmd .= " -t \"http://timestamp.digicert.com\""; - $cmd .= " -in \"$base.exe\""; - $cmd .= " $base-signed.exe"; - system $cmd; - die "signing failed [$cmd]" if $?; - - rename("$base-signed.exe", "$base.exe") or die "rename failed: $!"; -} - -my $cmd; -unlink "makeuinst.exe"; -$cmd = "makensis -DINNER=1 -DUNINSTALLERDEST='$instdest' -DINSTALLER_NAME='makeuinst.exe' $args"; -system $cmd; -die "running makensis failed [$cmd]" if $?; -die "makeuinst.exe not created" unless -f "makeuinst.exe"; - -unlink "uninstall.exe"; -chmod 0755, "makeuinst.exe"; -system "${run}makeuinst.exe"; -sleep 5; -die "uninstall.exe not created" unless -f "uninstall.exe"; -unlink "makeuinst.exe"; - -sign "uninstall" if $signwith; - -$cmd = "makensis -DINSTALLER_NAME='$installerbase.exe' $args"; -system $cmd; -die "running makensis failed [$cmd]" if $?; - -sign "$installerbase" if $signwith; - -open P, ">osgeo4w/binary$archpostfix-$version"; -print P $binary; -close P; - -system "md5sum $installerbase.exe >$installerbase.exe.md5sum"; - -__END__ - -=head1 NAME - -creatensis.pl - create NSIS package from OSGeo4W packages - -=head1 SYNOPSIS - -creatensis.pl [options] [packages...] - - Options: - -verbose increase verbosity - -releasename=name name of release (defaults to CMakeLists.txt setting) - -keep don't start with a fresh unpacked directory - -signwith=cert.p12 optionally sign package with certificate (requires osslsigncode) - -signpass=password password of certificate - -version=m.m.p package version (defaults to CMakeLists.txt setting) - -binary=b binary version of package - -ininame=filename name of the setup.ini (defaults to setup.ini) - -packagename=s name of package (defaults to 'QGIS') - -shortname=s shortname used for batch file (defaults to 'qgis') - -mirror=s default mirror (defaults to 'http://download.osgeo.org/osgeo4w') - -arch=s architecture (x86 or x86_64; defaults to 'x86_64') - -help this help - - If no packages are given 'qgis-full' and it's dependencies will be retrieved - and packaged. - - Packages with a appended '-' are excluded, but their dependencies are included. -=cut diff --git a/ms-windows/osgeo4w/designer.bat.tmpl b/ms-windows/osgeo4w/designer.bat.tmpl deleted file mode 100644 index 6778fb445cf0..000000000000 --- a/ms-windows/osgeo4w/designer.bat.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -@echo off -call "%~dp0\o4w_env.bat" -call qt5_env.bat -call py3_env.bat -path %OSGEO4W_ROOT%\apps\@package@\bin;%PATH% -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins -cd %USERPROFILE% -start "Qt Designer with QGIS custom widgets" /B "%OSGEO4W_ROOT%\apps\qt5\bin\designer.exe" %* diff --git a/ms-windows/osgeo4w/httpd.conf.tmpl b/ms-windows/osgeo4w/httpd.conf.tmpl deleted file mode 100644 index 382be280173d..000000000000 --- a/ms-windows/osgeo4w/httpd.conf.tmpl +++ /dev/null @@ -1,28 +0,0 @@ -LoadModule fcgid_module modules/mod_fcgid.so - -DefaultInitEnv O4W_QT_PREFIX "@osgeo4w@/apps/Qt5" -DefaultInitEnv O4W_QT_BINARIES "@osgeo4w@/apps/Qt5/bin" -DefaultInitEnv O4W_QT_PLUGINS "@osgeo4w@/apps/Qt5/plugins" -DefaultInitEnv O4W_QT_LIBRARIES "@osgeo4w@/apps/Qt5/lib" -DefaultInitEnv O4W_QT_TRANSLATIONS "@osgeo4w@/apps/Qt5/translations" -DefaultInitEnv O4W_QT_HEADERS "@osgeo4w@/apps/Qt5/include" -DefaultInitEnv O4W_QT_DOC "@osgeo4w@/apps/Qt5/doc" - -DefaultInitEnv PATH "@osgeo4w@\apps\qt5\bin;@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\@grasspath@\bin;@osgeo4w@\apps\grass\@grasspath@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem" -DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@" -DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt5\plugins" -DefaultInitEnv TEMP "@temp@" -DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python37" -DefaultInitEnv PYTHONPATH "@osgeo4w@\apps\Python37;@osgeo4w@\apps\Python37\Scripts" - -Alias /@package@/ @osgeo4w@/apps/@package@/bin/ - - - SetHandler fcgid-script - Options ExecCGI - # Order/Allow is for Apache 2.2 - #Order allow,deny - #Allow from all - # Require is for Apache 2.4 - Require all granted - diff --git a/ms-windows/osgeo4w/msvc-env.bat b/ms-windows/osgeo4w/msvc-env.bat deleted file mode 100644 index 0dae07f8be41..000000000000 --- a/ms-windows/osgeo4w/msvc-env.bat +++ /dev/null @@ -1,91 +0,0 @@ -@echo off -REM *************************************************************************** -REM msvc-env.cmd -REM --------------------- -REM begin : June 2018 -REM copyright : (C) 2018 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 *************************************************************************** - -if not "%PROGRAMFILES(X86)%"=="" set PF86=%PROGRAMFILES(X86)% -if "%PF86%"=="" set PF86=%PROGRAMFILES% -if "%PF86%"=="" (echo PROGRAMFILES not set & goto error) - -if "%VCSDK%"=="" set VCSDK=10.0.14393.0 - -set ARCH=%1 -if "%ARCH%"=="x86" goto x86 -if "%ARCH%"=="x86_64" goto x86_64 -goto usage - -:x86 -set VCARCH=x86 -set CMAKE_COMPILER_PATH=%PF86%\Microsoft Visual Studio 14.0\VC\bin -set DBGHLP_PATH=%PF86%\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger\x86 -set SETUPAPI_LIBRARY=%PF86%\Windows Kits\10\Lib\%VCSDK%\um\x86\SetupAPI.Lib -goto archset - -:x86_64 -set VCARCH=amd64 -set CMAKE_COMPILER_PATH=%PF86%\Microsoft Visual Studio 14.0\VC\bin\amd64 -set DBGHLP_PATH=%PF86%\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger\x64 -set SETUPAPI_LIBRARY=%PF86%\Windows Kits\10\Lib\%VCSDK%\um\x64\SetupAPI.Lib - -:archset -if not exist "%SETUPAPI_LIBRARY%" (echo SETUPAPI_LIBRARY not found & goto error) - -if "%CC%"=="" set CC=%CMAKE_COMPILER_PATH:\=/%/cl.exe -if "%CXX%"=="" set CXX=%CMAKE_COMPILER_PATH:\=/%/cl.exe -set CLCACHE_CL=%CMAKE_COMPILER_PATH:\=/%/cl.exe - -if "%OSGEO4W_ROOT%"=="" if "%ARCH%"=="x86" ( - set OSGEO4W_ROOT=C:\OSGeo4W -) else ( - set OSGEO4W_ROOT=C:\OSGeo4W64 -) - -if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" (echo o4w_env.bat not found & goto error) -call "%OSGEO4W_ROOT%\bin\o4w_env.bat" -call "%OSGEO4W_ROOT%\bin\py3_env.bat" -call "%OSGEO4W_ROOT%\bin\qt5_env.bat" - -set VS140COMNTOOLS=%PF86%\Microsoft Visual Studio 14.0\Common7\Tools\ -call "%PF86%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VCARCH% - -path %path%;%PF86%\Microsoft Visual Studio 14.0\VC\bin - -set GRASS7= -if exist %OSGEO4W_ROOT%\bin\grass74.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass74.bat -if exist %OSGEO4W_ROOT%\bin\grass76.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass76.bat -if exist %OSGEO4W_ROOT%\bin\grass78.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass78.bat -if "%GRASS7%"=="" (echo GRASS7 not found & goto error) -for /f "usebackq tokens=1" %%a in (`%GRASS7% --config path`) do set GRASS_PREFIX=%%a - -set PYTHONPATH= -if exist "%PROGRAMFILES%\CMake\bin" path %PATH%;%PROGRAMFILES%\CMake\bin -if exist "%PF86%\CMake\bin" path %PATH%;%PF86%\CMake\bin -if exist c:\cygwin64\bin path %PATH%;c:\cygwin64\bin -if exist c:\cygwin\bin path %PATH%;c:\cygwin\bin - -set LIB=%LIB%;%OSGEO4W_ROOT%\apps\Qt5\lib;%OSGEO4W_ROOT%\lib -set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\apps\Qt5\include;%OSGEO4W_ROOT%\include - -goto end - -:usage -echo usage: %0 [x86^|x86_64] -echo sample: %0 x86_64 -exit /b 1 - -:error -echo ENV ERROR %ERRORLEVEL%: %DATE% %TIME% -exit /b 1 - -:end diff --git a/ms-windows/osgeo4w/ninja/ninja.bat b/ms-windows/osgeo4w/ninja/ninja.bat deleted file mode 100644 index e8b08649b144..000000000000 --- a/ms-windows/osgeo4w/ninja/ninja.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -call %OSGEO4W_ROOT%\bin\o4w_env.bat -call py3_env.bat -call qt5_env.bat -call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -path %PATH%;c:\cygwin\bin;c:\program files\cmake\bin -%OSGEO4W_ROOT%\bin\ninja -j4 -C ..\build-qgis-dev-x86_64 diff --git a/ms-windows/osgeo4w/ninja/ninja.sln b/ms-windows/osgeo4w/ninja/ninja.sln deleted file mode 100644 index 7a7812b16bd6..000000000000 --- a/ms-windows/osgeo4w/ninja/ninja.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ninja", "ninja.vcxproj", "{02B448C7-945C-46D6-954C-AEAE0653BA59}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - RelWithDebInfo|Win32 = RelWithDebInfo|Win32 - RelWithDebInfo|x64 = RelWithDebInfo|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {02B448C7-945C-46D6-954C-AEAE0653BA59}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 - {02B448C7-945C-46D6-954C-AEAE0653BA59}.RelWithDebInfo|Win32.Build.0 = Release|Win32 - {02B448C7-945C-46D6-954C-AEAE0653BA59}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {02B448C7-945C-46D6-954C-AEAE0653BA59}.RelWithDebInfo|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ms-windows/osgeo4w/ninja/ninja.vcxproj b/ms-windows/osgeo4w/ninja/ninja.vcxproj deleted file mode 100644 index 347ae90b7176..000000000000 --- a/ms-windows/osgeo4w/ninja/ninja.vcxproj +++ /dev/null @@ -1,108 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {02B448C7-945C-46D6-954C-AEAE0653BA59} - MakeFileProj - 8.1 - - - - Makefile - true - v140 - - - Makefile - false - v140 - - - Makefile - true - v140 - - - Makefile - false - v140 - - - - - - - - - - - - - - - - - - - - - ninja -C ../build-qgis-dev-x86 all - ..\build-qgis-dev-x86\output\bin\qgis.exe - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - ..\build-qgis-dev-x86 - - ninja -C ../build-qgis-dev-x86 clean all - ninja -C ../build-qgis-dev-x86 clean - - - ninja -C ../build-qgis-dev-x86 all - ..\build-qgis-dev-x86\output\bin\qgis.exe - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - ..\build-qgis-dev-x86 - - ninja -C ../build-qgis-dev-x86 clean all - ninja -C ../build-qgis-dev-x86 clean - - - ninja -C ../build-qgis-dev-x86_64 -j4 -k1000 all - ninja -C ../build-qgis-dev-x86_64 -j4 -k1000 clean all - ninja -C ../build-qgis-dev-x86_64 clean - ..\build-qgis-dev-x86_64\output\bin\qgis.exe - - - ninja -C ../build-qgis-dev-x86_64 -j4 -k1000 all - ninja -C ../build-qgis-dev-x86_64 -j4 -k1000 clean all - ninja -C ../build-qgis-dev-x86_64 clean - ..\build-qgis-dev-x86_64\output\bin\qgis.exe - - - - x86.log - - - - - x86.log - - - - - - \ No newline at end of file diff --git a/ms-windows/osgeo4w/package-nightly.cmd b/ms-windows/osgeo4w/package-nightly.cmd deleted file mode 100644 index f1e89aaf8332..000000000000 --- a/ms-windows/osgeo4w/package-nightly.cmd +++ /dev/null @@ -1,325 +0,0 @@ -@echo off -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 *************************************************************************** - -setlocal enabledelayedexpansion - -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 -if "%TARGET%"=="" set TARGET=Nightly -if "%BUILDNAME%"=="" set BUILDNAME=%PACKAGENAME%-%VERSION%%SHA%-%TARGET%-VC14-%ARCH% - -if "%BUILDDIR%"=="" set BUILDDIR=%CD%\build-%PACKAGENAME%-%ARCH% -if not exist "%BUILDDIR%" mkdir %BUILDDIR% -if not exist "%BUILDDIR%" (echo could not create build directory %BUILDDIR% & goto error) - -call msvc-env.bat %ARCH% -call gdal-dev-env.bat - -set O4W_ROOT=%OSGEO4W_ROOT:\=/% -set LIB_DIR=%O4W_ROOT% - -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 -) - -for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi -set GRASS_VERSIONS=%GRASS7_VERSION% - -set TAR=tar.exe -if exist "c:\cygwin\bin\tar.exe" set TAR=c:\cygwin\bin\tar.exe -if exist "c:\cygwin64\bin\tar.exe" set TAR=c:\cygwin64\bin\tar.exe - -set BUILDCONF=RelWithDebInfo - -cd ..\.. -set SRCDIR=%CD% - -if "%BUILDDIR:~1,1%"==":" %BUILDDIR:~0,2% -cd %BUILDDIR% - -set PKGDIR=%OSGEO4W_ROOT%\apps\%PACKAGENAME% - -if exist repackage goto package - -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 -if exist build.tmp (echo could not remove build.tmp & goto error) - -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 BEGIN: %DATE% %TIME% - -set >buildenv.log - -if exist qgsversion.h del qgsversion.h - -if exist CMakeCache.txt if exist skipcmake goto skipcmake - -touch %SRCDIR%\CMakeLists.txt - -echo CMAKE: %DATE% %TIME% - -if "%CMAKEGEN%"=="" set CMAKEGEN=Ninja -if "%OSGEO4W_CXXFLAGS%"=="" set OSGEO4W_CXXFLAGS=/MD /Z7 /MP /Od /D NDEBUG - -for %%i in (%PYTHONHOME%) do set PYVER=%%~ni - -cmake -G "%CMAKEGEN%" ^ - -D CMAKE_CXX_COMPILER="%CXX:\=/%" ^ - -D CMAKE_C_COMPILER="%CC:\=/%" ^ - -D CMAKE_LINKER="%CMAKE_COMPILER_PATH:\=/%/link.exe" ^ - -D CMAKE_CXX_FLAGS_RELWITHDEBINFO="%OSGEO4W_CXXFLAGS%" ^ - -D CMAKE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^ - -D SUBMIT_URL="https://cdash.orfeo-toolbox.org/submit.php?project=QGIS" ^ - -D BUILDNAME="%BUILDNAME%" ^ - -D SITE="%SITE%" ^ - -D PEDANTIC=TRUE ^ - -D WITH_QSPATIALITE=TRUE ^ - -D WITH_SERVER=TRUE ^ - -D SERVER_SKIP_ECW=TRUE ^ - -D WITH_GRASS=TRUE ^ - -D WITH_3D=TRUE ^ - -D WITH_GRASS7=TRUE ^ - -D WITH_HANA=TRUE ^ - -D GRASS_PREFIX7=%GRASS_PREFIX:\=/% ^ - -D WITH_ORACLE=TRUE ^ - -D WITH_CUSTOM_WIDGETS=TRUE ^ - -D CMAKE_BUILD_TYPE=%BUILDCONF% ^ - -D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^ - -D SETUPAPI_LIBRARY="%SETUPAPI_LIBRARY%" ^ - -D PROJ_LIBRARY=%O4W_ROOT%/apps/proj-dev/lib/proj.lib ^ - -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 ^ - -D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^ - -D SQLITE3_LIBRARY=%O4W_ROOT%/lib/sqlite3_i.lib ^ - -D SPATIALITE_LIBRARY=%O4W_ROOT%/lib/spatialite_i.lib ^ - -D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python3.exe ^ - -D SIP_BINARY_PATH=%PYTHONHOME:\=/%/sip.exe ^ - -D PYTHON_INCLUDE_DIR=%PYTHONHOME:\=/%/include ^ - -D PYTHON_LIBRARY=%PYTHONHOME:\=/%/libs/%PYVER%.lib ^ - -D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^ - -D QT_HEADERS_DIR=%O4W_ROOT%/apps/qt5/include ^ - -D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^ - -D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^ - -D FCGI_LIBRARY=%O4W_ROOT%/lib/libfcgi.lib ^ - -D QCA_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\Qt5\include\QtCrypto ^ - -D QCA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qca-qt5.lib ^ - -D QSCINTILLA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qscintilla2.lib ^ - -D DART_TESTING_TIMEOUT=60 ^ - -D PUSH_TO_CDASH=TRUE ^ - %CMAKE_OPT% ^ - %SRCDIR:\=/% -if errorlevel 1 (echo cmake failed & goto error) - -if "%CONFIGONLY%"=="1" (echo Exiting after configuring build directory: %CD% & goto end) - -:skipcmake -if exist ..\noclean (echo skip clean & goto skipclean) -echo CLEAN: %DATE% %TIME% -cmake --build %BUILDDIR% --target clean --config %BUILDCONF% -if errorlevel 1 (echo clean failed & goto error) - -:skipclean -if exist ..\skipbuild (echo skip build & goto skipbuild) -echo ALL_BUILD: %DATE% %TIME% -cmake --build %BUILDDIR% --target %TARGET%Build --config %BUILDCONF% -set /P tag=<%BUILDDIR%\Testing\TAG -findstr "" %BUILDDIR%\Testing\%tag%\Build.xml >nul -if not errorlevel 1 ( - cmake --build %BUILDDIR% --target %TARGET%Submit --config %BUILDCONF% - if errorlevel 1 echo SUBMITTING BUILD ERRORS WAS NOT SUCCESSFUL. - echo build failed - goto error -) - -:skipbuild -if exist ..\skiptests goto skiptests - -echo RUN_TESTS: %DATE% %TIME% - -reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShow /t REG_DWORD /d 1 /f - -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\%%g\lib - set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g -) -PATH %path%;%BUILDDIR%\output\plugins -set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins - -cmake --build %BUILDDIR% --target %TARGET%Test --config %BUILDCONF% -if errorlevel 1 echo TESTS WERE NOT SUCCESSFUL. - -set TEMP=%oldtemp% -set TMP=%oldtmp% -PATH %oldpath% - -cmake --build %BUILDDIR% --target %TARGET%Submit --config %BUILDCONF% -if errorlevel 1 echo TEST SUBMISSION WAS NOT SUCCESSFUL. - -:skiptests -if exist ..\skippackage goto end - -if exist "%PKGDIR%" ( - echo REMOVE: %DATE% %TIME% - rmdir /s /q "%PKGDIR%" -) - -echo INSTALL: %DATE% %TIME% -cmake --build %BUILDDIR% --target install --config %BUILDCONF% -if errorlevel 1 (echo INSTALL failed & goto error) - -:package -echo PACKAGE: %DATE% %TIME% - -cd .. - -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 -if errorlevel 1 (echo creation of desktop postinstall failed & goto error) - -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 -if errorlevel 1 (echo creation of desktop preremove failed & goto error) - -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 -if errorlevel 1 (echo creation of designer template failed & goto error) -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl -if errorlevel 1 (echo creation of registry template & goto error) - -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 -if errorlevel 1 (echo creation of desktop template failed & goto error) - -set batches=bin/%PACKAGENAME%.bat.tmpl -for %%g IN (%GRASS_VERSIONS%) do ( - for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a - for /F "delims=." %%i in ("!gv!") do set v=%%i - - 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 - if errorlevel 1 (echo creation of desktop template failed & goto error) - set batches=!batches! bin/%PACKAGENAME%-g!v!.bat.tmpl -) - -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 -if errorlevel 1 (echo creation of python wrapper template failed & goto error) - -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 -if errorlevel 1 (echo creation of qgis process wrapper template failed & goto error) - -touch exclude -if exist ..\skipbuild (echo skip build & goto skipbuild) - -move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe -if errorlevel 1 (echo move of desktop executable failed & goto error) -copy qgis.vars %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.vars -if errorlevel 1 (echo copy of desktop executable vars failed & goto error) - -if not exist %PKGDIR%\qtplugins\sqldrivers mkdir %PKGDIR%\qtplugins\sqldrivers -move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlocispatial.dll %PKGDIR%\qtplugins\sqldrivers -if errorlevel 1 (echo move of oci sqldriver failed & goto error) -move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlspatialite.dll %PKGDIR%\qtplugins\sqldrivers -if errorlevel 1 (echo move of spatialite sqldriver failed & goto error) - -if not exist %PKGDIR%\qtplugins\designer mkdir %PKGDIR%\qtplugins\designer -move %OSGEO4W_ROOT%\apps\qt5\plugins\designer\qgis_customwidgets.dll %PKGDIR%\qtplugins\designer -if errorlevel 1 (echo move of customwidgets failed & goto error) - -if not exist %PKGDIR%\python\PyQt5\uic\widget-plugins mkdir %PKGDIR%\python\PyQt5\uic\widget-plugins -move %PYTHONHOME%\Lib\site-packages\PyQt5\uic\widget-plugins\qgis_customwidgets.py %PKGDIR%\python\PyQt5\uic\widget-plugins -if errorlevel 1 (echo move of customwidgets binding failed & goto error) - -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) -) - -if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME% -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - apps/%PACKAGENAME% ^ - bin/%PACKAGENAME%-bin.exe ^ - bin/%PACKAGENAME%-bin.vars ^ - %batches% ^ - bin/%PACKAGENAME%-designer.bat.tmpl ^ - bin/python-%PACKAGENAME%.bat.tmpl ^ - bin/qgis_process-%PACKAGENAME%.bat.tmpl ^ - etc/postinstall/%PACKAGENAME%.bat ^ - etc/preremove/%PACKAGENAME%.bat -if errorlevel 1 (echo tar failed & goto error) - -if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb -%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^ - apps/%PACKAGENAME%/pdb -if errorlevel 1 (echo tar failed & goto error) - -goto end - -:usage -echo usage: %0 version package packagename arch [sha [site]] -echo sample: %0 2.11.0 38 qgis-dev x86_64 339dbf1 qgis.org -exit /b 1 - -:error -echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME% -if exist %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 -exit /b 1 - -:end -echo FINISHED: %DATE% %TIME% - -endlocal diff --git a/ms-windows/osgeo4w/package.cmd b/ms-windows/osgeo4w/package.cmd deleted file mode 100644 index ee7c45dfd616..000000000000 --- a/ms-windows/osgeo4w/package.cmd +++ /dev/null @@ -1,482 +0,0 @@ -@echo off -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 *************************************************************************** - -setlocal enabledelayedexpansion - -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 -if "%BUILDNAME%"=="" set BUILDNAME=%PACKAGENAME%-%VERSION%%SHA%-Release-VC14-%ARCH% - -set BUILDDIR=%CD%\build-%PACKAGENAME%-%ARCH% -if not exist "%BUILDDIR%" mkdir %BUILDDIR% -if not exist "%BUILDDIR%" (echo could not create build directory %BUILDDIR% & goto error) - -call msvc-env.bat %ARCH% - -set O4W_ROOT=%OSGEO4W_ROOT:\=/% -set LIB_DIR=%O4W_ROOT% - -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 -) - -for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi -set GRASS_VERSIONS=%GRASS7_VERSION% - -set TAR=tar.exe -if exist "c:\cygwin\bin\tar.exe" set TAR=c:\cygwin\bin\tar.exe -if exist "c:\cygwin64\bin\tar.exe" set TAR=c:\cygwin64\bin\tar.exe - -set BUILDCONF=Release - -cd ..\.. -set SRCDIR=%CD% - -if "%BUILDDIR:~1,1%"==":" %BUILDDIR:~0,2% -cd %BUILDDIR% - -set PKGDIR=%OSGEO4W_ROOT%\apps\%PACKAGENAME% - -if exist repackage goto package - -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 -if exist build.tmp (echo could not remove build.tmp & goto error) - -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 BEGIN: %DATE% %TIME% - -set >buildenv.log - -if exist qgsversion.h del qgsversion.h - -if exist CMakeCache.txt if exist skipcmake goto skipcmake - -touch %SRCDIR%\CMakeLists.txt - -echo CMAKE: %DATE% %TIME% -if errorlevel 1 goto error - -if "%CMAKEGEN%"=="" set CMAKEGEN=Ninja -if "%CC%"=="" set CC="%CMAKE_COMPILER_PATH:\=/%/cl.exe" -if "%CXX%"=="" set CXX="%CMAKE_COMPILER_PATH:\=/%/cl.exe" -if "%OSGEO4W_CXXFLAGS%"=="" set OSGEO4W_CXXFLAGS=/MD /Z7 /MP /O2 /Ob2 /D NDEBUG - -for %%i in (%PYTHONHOME%) do set PYVER=%%~ni - -cmake -G "%CMAKEGEN%" ^ - -D CMAKE_CXX_COMPILER="%CXX:\=/%" ^ - -D CMAKE_C_COMPILER="%CC:\=/%" ^ - -D CMAKE_LINKER="%CMAKE_COMPILER_PATH:\=/%/link.exe" ^ - -D CMAKE_CXX_FLAGS_RELEASE="%OSGEO4W_CXXFLAGS%" ^ - -D CMAKE_PDB_OUTPUT_DIRECTORY_RELEASE=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^ - -D CMAKE_SHARED_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^ - -D CMAKE_MODULE_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^ - -D SUBMIT_URL="https://cdash.orfeo-toolbox.org/submit.php?project=QGIS" ^ - -D BUILDNAME="%BUILDNAME%" ^ - -D SITE="%SITE%" ^ - -D PEDANTIC=TRUE ^ - -D WITH_QSPATIALITE=TRUE ^ - -D WITH_SERVER=TRUE ^ - -D WITH_HANA=TRUE ^ - -D SERVER_SKIP_ECW=TRUE ^ - -D WITH_GRASS=TRUE ^ - -D WITH_3D=TRUE ^ - -D WITH_GRASS7=TRUE ^ - -D GRASS_PREFIX7=%GRASS_PREFIX:\=/% ^ - -D WITH_ORACLE=TRUE ^ - -D WITH_CUSTOM_WIDGETS=TRUE ^ - -D CMAKE_BUILD_TYPE=%BUILDCONF% ^ - -D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^ - -D SETUPAPI_LIBRARY="%SETUPAPI_LIBRARY%" ^ - -D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^ - -D SQLITE3_LIBRARY=%O4W_ROOT%/lib/sqlite3_i.lib ^ - -D SPATIALITE_LIBRARY=%O4W_ROOT%/lib/spatialite_i.lib ^ - -D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python3.exe ^ - -D SIP_BINARY_PATH=%PYTHONHOME:\=/%/sip.exe ^ - -D PYTHON_INCLUDE_DIR=%PYTHONHOME:\=/%/include ^ - -D PYTHON_LIBRARY=%PYTHONHOME:\=/%/libs/%PYVER%.lib ^ - -D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^ - -D QT_HEADERS_DIR=%O4W_ROOT%/apps/qt5/include ^ - -D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^ - -D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^ - -D FCGI_LIBRARY=%O4W_ROOT%/lib/libfcgi.lib ^ - -D QCA_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\Qt5\include\QtCrypto ^ - -D QCA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qca-qt5.lib ^ - -D QSCINTILLA_LIBRARY=%OSGEO4W_ROOT%\apps\Qt5\lib\qscintilla2.lib ^ - -D DART_TESTING_TIMEOUT=60 ^ - %CMAKE_OPT% ^ - %SRCDIR:\=/% -if errorlevel 1 (echo cmake failed & goto error) - -if "%CONFIGONLY%"=="1" (echo Exiting after configuring build directory: %CD% & goto end) - -:skipcmake -if exist ..\noclean (echo skip clean & goto skipclean) -echo CLEAN: %DATE% %TIME% -cmake --build %BUILDDIR% --target clean --config %BUILDCONF% -if errorlevel 1 (echo clean failed & goto error) - -:skipclean -if exist ..\skipbuild (echo skip build & goto skipbuild) -echo ALL_BUILD: %DATE% %TIME% -cmake --build %BUILDDIR% --config %BUILDCONF% -if errorlevel 1 (echo build failed & goto error) - -:skipbuild -if exist ..\skiptests goto skiptests - -echo RUN_TESTS: %DATE% %TIME% - -reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v DontShow /t REG_DWORD /d 1 /f - -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\%%g\lib - set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g -) -PATH %path%;%BUILDDIR%\output\plugins -set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins - -cmake --build %BUILDDIR% --target Experimental --config %BUILDCONF% -if errorlevel 1 echo TESTS WERE NOT SUCCESSFUL. - -set TEMP=%oldtemp% -set TMP=%oldtmp% -PATH %oldpath% - -:skiptests -if exist ..\skippackage goto end - -if exist "%PKGDIR%" ( - echo REMOVE: %DATE% %TIME% - rmdir /s /q "%PKGDIR%" -) - -echo INSTALL: %DATE% %TIME% -cmake --build %BUILDDIR% --target install --config %BUILDCONF% -if errorlevel 1 (echo INSTALL failed & goto error) - -:package -echo PACKAGE: %DATE% %TIME% - -cd .. -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall-common.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-common.bat -if errorlevel 1 (echo creation of common postinstall failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall-desktop.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat -if errorlevel 1 (echo creation of desktop postinstall failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' preremove-desktop.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat -if errorlevel 1 (echo creation of desktop preremove failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl -if errorlevel 1 (echo creation of desktop template failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' designer.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-designer.bat.tmpl -if errorlevel 1 (echo creation of designer template failed & goto error) -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl -if errorlevel 1 (echo creation of registry template & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall-server.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-server.bat -if errorlevel 1 (echo creation of server postinstall failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' preremove-server.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-server.bat -if errorlevel 1 (echo creation of server preremove failed & goto error) - -if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' httpd.conf.tmpl >%OSGEO4W_ROOT%\httpd.d\httpd_%PACKAGENAME%.conf.tmpl -if errorlevel 1 (echo creation of httpd.conf template failed & goto error) - -set packages="" "-common" "-server" "-devel" "-oracle-provider" "-grass-plugin-common" - -for %%g IN (%GRASS_VERSIONS%) do ( - for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a - for /F "delims=." %%i in ("!gv!") do set v=%%i - set w=!v! - if !v!==6 set w= - - sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' postinstall-grass.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-grass-plugin!w!.bat - if errorlevel 1 (echo creation of grass desktop postinstall failed & goto error) - sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' preremove-grass.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-grass-plugin!w!.bat - if errorlevel 1 (echo creation of grass desktop preremove failed & goto error) - sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-grass!v!.bat.tmpl - if errorlevel 1 (echo creation of grass desktop template failed & goto error) - - set packages=!packages! "-grass-plugin!w!" -) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' python.bat.tmpl >%OSGEO4W_ROOT%\bin\python-%PACKAGENAME%.bat.tmpl -if errorlevel 1 (echo creation of python wrapper template failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' process.bat.tmpl >%OSGEO4W_ROOT%\bin\qgis_process-%PACKAGENAME%.bat.tmpl -if errorlevel 1 (echo creation of qgis process wrapper template failed & goto error) - -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' preremove-grass-plugin-common.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-grass-plugin-common.bat -if errorlevel 1 (echo creation of grass common preremove failed & goto error) -sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall-grass-plugin-common.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-grass-plugin-common.bat -if errorlevel 1 (echo creation of grass common postinstall failed & goto error) - -touch exclude -if exist ..\skipbuild (echo skip build & goto skipbuild) - -for %%i in (%packages%) 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 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - "apps/%PACKAGENAME%/bin/qgispython.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_analysis.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_3d.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_core.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_gui.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_native.dll" ^ - "apps/%PACKAGENAME%/bin/qgis_process.exe" ^ - "apps/%PACKAGENAME%/doc/" ^ - "apps/%PACKAGENAME%/plugins/authmethod_basic.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_delimitedtext.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_esritoken.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_gpx.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_identcert.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_mssql.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_pkcs12.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_pkipaths.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_postgres.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_postgresraster.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_spatialite.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_virtuallayer.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_wcs.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_wfs.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_wms.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_arcgismapserver.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_arcgisfeatureserver.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_mdal.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_hana.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_oauth2.dll" ^ - "apps/%PACKAGENAME%/plugins/authmethod_maptilerhmacsha256.dll" ^ - "apps/%PACKAGENAME%/resources/qgis.db" ^ - "apps/%PACKAGENAME%/resources/spatialite.db" ^ - "apps/%PACKAGENAME%/resources/srs.db" ^ - "apps/%PACKAGENAME%/resources/symbology-style.xml" ^ - "apps/%PACKAGENAME%/resources/cpt-city-qgis-min/" ^ - "apps/%PACKAGENAME%/svg/" ^ - "apps/%PACKAGENAME%/crssync.exe" ^ - "etc/postinstall/%PACKAGENAME%-common.bat" -if errorlevel 1 (echo tar common failed & goto error) - -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-server/%PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - "apps/%PACKAGENAME%/bin/qgis_mapserv.fcgi.exe" ^ - "apps/%PACKAGENAME%/bin/qgis_server.dll" ^ - "apps/%PACKAGENAME%/bin/admin.sld" ^ - "apps/%PACKAGENAME%/bin/wms_metadata.xml" ^ - "apps/%PACKAGENAME%/resources/server/" ^ - "apps/%PACKAGENAME%/server/" ^ - "apps/%PACKAGENAME%/python/qgis/_server.pyd" ^ - "apps/%PACKAGENAME%/python/qgis/_server.pyi" ^ - "apps/%PACKAGENAME%/python/qgis/server/" ^ - "httpd.d/httpd_%PACKAGENAME%.conf.tmpl" ^ - "etc/postinstall/%PACKAGENAME%-server.bat" ^ - "etc/preremove/%PACKAGENAME%-server.bat" -if errorlevel 1 (echo tar server failed & goto error) - -move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe -if errorlevel 1 (echo move of desktop executable failed & goto error) -copy qgis.vars %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.vars -if errorlevel 1 (echo copy of desktop executable vars failed & goto error) - -if not exist %PKGDIR%\qtplugins\sqldrivers mkdir %PKGDIR%\qtplugins\sqldrivers -move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlocispatial.dll %PKGDIR%\qtplugins\sqldrivers -if errorlevel 1 (echo move of oci sqldriver failed & goto error) -move %OSGEO4W_ROOT%\apps\qt5\plugins\sqldrivers\qsqlspatialite.dll %PKGDIR%\qtplugins\sqldrivers -if errorlevel 1 (echo move of spatialite sqldriver failed & goto error) - -if not exist %PKGDIR%\qtplugins\designer mkdir %PKGDIR%\qtplugins\designer -move %OSGEO4W_ROOT%\apps\qt5\plugins\designer\qgis_customwidgets.dll %PKGDIR%\qtplugins\designer -if errorlevel 1 (echo move of customwidgets failed & goto error) - -if not exist %PKGDIR%\python\PyQt5\uic\widget-plugins mkdir %PKGDIR%\python\PyQt5\uic\widget-plugins -move %PYTHONHOME%\Lib\site-packages\PyQt5\uic\widget-plugins\qgis_customwidgets.py %PKGDIR%\python\PyQt5\uic\widget-plugins -if errorlevel 1 (echo move of customwidgets binding failed & goto error) - -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) -) - -if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME% -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - --exclude "apps/%PACKAGENAME%/python/qgis/_server.pyd" ^ - --exclude "apps/%PACKAGENAME%/python/qgis/_server.pyi" ^ - --exclude "apps/%PACKAGENAME%/python/qgis/_server.lib" ^ - --exclude "apps/%PACKAGENAME%/python/qgis/server" ^ - --exclude "apps/%PACKAGENAME%/server/" ^ - "bin/%PACKAGENAME%-bin.exe" ^ - "bin/%PACKAGENAME%-bin.vars" ^ - "bin/python-%PACKAGENAME%.bat.tmpl" ^ - "bin/qgis_process-%PACKAGENAME%.bat.tmpl" ^ - "apps/%PACKAGENAME%/bin/qgis_app.dll" ^ - "apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^ - "apps/%PACKAGENAME%/i18n/" ^ - "apps/%PACKAGENAME%/icons/" ^ - "apps/%PACKAGENAME%/images/" ^ - "apps/%PACKAGENAME%/plugins/plugin_offlineediting.dll" ^ - "apps/%PACKAGENAME%/plugins/plugin_topology.dll" ^ - "apps/%PACKAGENAME%/plugins/plugin_geometrychecker.dll" ^ - "apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlspatialite.dll" ^ - "apps/%PACKAGENAME%/qtplugins/designer/" ^ - "apps/%PACKAGENAME%/python/" ^ - "apps/%PACKAGENAME%/resources/customization.xml" ^ - "apps/%PACKAGENAME%/resources/themes/" ^ - "apps/%PACKAGENAME%/resources/data/" ^ - "apps/%PACKAGENAME%/resources/metadata-ISO/" ^ - "apps/%PACKAGENAME%/resources/opencl_programs/" ^ - "apps/%PACKAGENAME%/resources/palettes/" ^ - "apps/%PACKAGENAME%/resources/2to3migration.txt" ^ - "apps/%PACKAGENAME%/resources/qgis_global_settings.ini" ^ - "apps/%PACKAGENAME%/qgiscrashhandler.exe" ^ - "apps/%PACKAGENAME%/dbghelp.dll" ^ - "apps/%PACKAGENAME%/symsrv.dll" ^ - "bin/%PACKAGENAME%.bat.tmpl" ^ - "bin/%PACKAGENAME%-designer.bat.tmpl" ^ - "etc/postinstall/%PACKAGENAME%.bat" ^ - "etc/preremove/%PACKAGENAME%.bat" -if errorlevel 1 (echo tar desktop failed & goto error) - -if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb -%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^ - apps/%PACKAGENAME%/pdb -if errorlevel 1 (echo tar failed & goto error) - -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin-common/%PACKAGENAME%-grass-plugin-common-%VERSION%-%PACKAGE%.tar.bz2 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.d.rast6.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.d.rast7.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.g.info6.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.g.info7.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.r.in6.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.r.in7.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.v.in6.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/modules/qgis.v.in7.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/bin/qgis.g.browser6.exe" ^ - --exclude "apps/%PACKAGENAME%/grass/bin/qgis.g.browser7.exe" ^ - "apps/%PACKAGENAME%/grass" ^ - "etc/postinstall/%PACKAGENAME%-grass-plugin-common.bat" ^ - "etc/preremove/%PACKAGENAME%-grass-plugin-common.bat" -if errorlevel 1 (echo tar grass-plugin failed & goto error) - -for %%g IN (%GRASS_VERSIONS%) do ( - for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a - for /F "delims=." %%i in ("!gv!") do set v=%%i - set w=!v! - if !v!==6 set w= - - %TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin!w!/%PACKAGENAME%-grass-plugin!w!-%VERSION%-%PACKAGE%.tar.bz2 ^ - "apps/%PACKAGENAME%/bin/qgisgrass!v!.dll" ^ - "apps/%PACKAGENAME%/grass/bin/qgis.g.browser!v!.exe" ^ - "apps/%PACKAGENAME%/grass/modules/qgis.d.rast!v!.exe" ^ - "apps/%PACKAGENAME%/grass/modules/qgis.g.info!v!.exe" ^ - "apps/%PACKAGENAME%/grass/modules/qgis.r.in!v!.exe" ^ - "apps/%PACKAGENAME%/grass/modules/qgis.v.in!v!.exe" ^ - "apps/%PACKAGENAME%/plugins/plugin_grass!v!.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_grass!v!.dll" ^ - "apps/%PACKAGENAME%/plugins/provider_grassraster!v!.dll" ^ - "bin/%PACKAGENAME%-grass!v!.bat.tmpl" ^ - "etc/postinstall/%PACKAGENAME%-grass-plugin!w!.bat" ^ - "etc/preremove/%PACKAGENAME%-grass-plugin!w!.bat" - if errorlevel 1 (echo tar grass-plugin!w! failed & goto error) -) - -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-oracle-provider/%PACKAGENAME%-oracle-provider-%VERSION%-%PACKAGE%.tar.bz2 ^ - "apps/%PACKAGENAME%/plugins/oracleprovider.dll" ^ - "apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlocispatial.dll" -if errorlevel 1 (echo tar oracle-provider failed & goto error) - -%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-devel/%PACKAGENAME%-devel-%VERSION%-%PACKAGE%.tar.bz2 ^ - --exclude-from exclude ^ - --exclude "*.pyc" ^ - "apps/%PACKAGENAME%/FindQGIS.cmake" ^ - "apps/%PACKAGENAME%/include/" ^ - "apps/%PACKAGENAME%/lib/" -if errorlevel 1 (echo tar devel failed & goto error) - -goto end - -:usage -echo usage: %0 version package packagename arch [sha [site]] -echo sample: %0 2.0.1 3 qgis x86 f802808 -exit /b 1 - -:error -echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME% -for %%i in (%packages%) 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 -) -exit /b 1 - -:end -echo FINISHED: %DATE% %TIME% - -endlocal diff --git a/ms-windows/osgeo4w/postinstall-common.bat b/ms-windows/osgeo4w/postinstall-common.bat deleted file mode 100644 index 4cbee4a1bf3e..000000000000 --- a/ms-windows/osgeo4w/postinstall-common.bat +++ /dev/null @@ -1,5 +0,0 @@ -call "%OSGEO4W_ROOT%\bin\o4w_env.bat" -call qt5_env.bat -path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -"%OSGEO4W_ROOT%\apps\@package@\crssync" diff --git a/ms-windows/osgeo4w/postinstall-desktop.bat b/ms-windows/osgeo4w/postinstall-desktop.bat deleted file mode 100644 index 392aeccfde0a..000000000000 --- a/ms-windows/osgeo4w/postinstall-desktop.bat +++ /dev/null @@ -1,25 +0,0 @@ -textreplace -std -t bin\@package@.bat -textreplace -std -t bin\@package@-designer.bat -textreplace -std -t bin\python-@package@.bat -textreplace -std -t bin\qgis_process-@package@.bat - -REM get short path without blanks -for %%i in ("%OSGEO4W_ROOT%") do set O4W_ROOT=%%~fsi -if "%OSGEO4W_DESKTOP%"=="" set OSGEO4W_DESKTOP=~$folder.common_desktop$ - -call "%OSGEO4W_ROOT%\bin\@package@.bat" --postinstall - -if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%" -if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%" - -if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@" "" "" "" "" "~$folder.mydocuments$" -if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@" "" "" "" "" "~$folder.mydocuments$" - -if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "Qt Designer with QGIS @version@ custom widgets" "exec hide """%OSGEO4W_ROOT%\bin\@package@-designer.bat"" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico" "" "" "~$folder.mydocuments$" -if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_DESKTOP%" "Qt Designer with QGIS @version@ custom widgets" "exec hide %O4W_ROOT%\bin\@package@-designer.bat" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico" "" "" "~$folder.mydocuments$" - -set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\% -textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg" -nircmd elevate "%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg" -del /s /q "%OSGEO4W_ROOT%\apps\@package@\python\*.pyc" -exit /b 0 diff --git a/ms-windows/osgeo4w/postinstall-dev.bat b/ms-windows/osgeo4w/postinstall-dev.bat deleted file mode 100644 index 870873951314..000000000000 --- a/ms-windows/osgeo4w/postinstall-dev.bat +++ /dev/null @@ -1,55 +0,0 @@ -setlocal enabledelayedexpansion - -textreplace -std -t bin\@package@.bat -textreplace -std -t bin\@package@-designer.bat -textreplace -std -t bin\python-@package@.bat -textreplace -std -t bin\qgis_process-@package@.bat - -if "%OSGEO4W_DESKTOP%"=="" set OSGEO4W_DESKTOP=~$folder.common_desktop$ - -if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%" -if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%" - -call "%OSGEO4W_ROOT%\bin\@package@.bat" --postinstall - -if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@" "" "" "" "" "~$folder.mydocuments$" -if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@" "" "" "" "" "~$folder.mydocuments$" - -for %%g in (@grassversions@) do ( - set gv= - for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a - if not "!gv!"=="" ( - for /F "delims=." %%i in ("!gv!") do set v=%%i - - copy "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" - copy "%OSGEO4W_ROOT%\bin\@package@-bin.vars" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars" - textreplace -std -map @grassmajor@ !v! -t bin\@package@-g!v!.bat - call "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat" --postinstall - - if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@ with GRASS !gv! (Nightly)" "" "" "" "" "~$folder.mydocuments$" - if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@ with GRASS !gv! (Nightly)" "" "" "" "" "~$folder.mydocuments$" - ) -) - -if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "Qt Designer with QGIS @version@ custom widgets (Nightly)" "exec hide """%OSGEO4W_ROOT%\bin\@package@-designer.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" "" "" "~$folder.mydocuments$" -if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_DESKTOP%" "Qt Designer with QGIS @version@ custom widgets (Nightly)" "exec hide """%OSGEO4W_ROOT%\bin\@package@-designer.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" "" "" "~$folder.mydocuments$" - -set O4W_ROOT=%OSGEO4W_ROOT% -set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\% -textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg" -set OSGEO4W_ROOT=%O4W_ROOT% - -REM Do not register extensions if release is installed -if not exist "%O4W_ROOT%\apps\qgis\bin\qgis.reg" nircmd elevate "%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg" - -call "%OSGEO4W_ROOT%\bin\o4w_env.bat" -call qt5_env.bat -call gdal-dev-env.bat -path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -"%OSGEO4W_ROOT%\apps\@package@\crssync" - -del /s /q "%OSGEO4W_ROOT%\apps\@package@\*.pyc" -exit /b 0 - -endlocal diff --git a/ms-windows/osgeo4w/postinstall-grass-plugin-common.bat b/ms-windows/osgeo4w/postinstall-grass-plugin-common.bat deleted file mode 100644 index 892c9d81cc32..000000000000 --- a/ms-windows/osgeo4w/postinstall-grass-plugin-common.bat +++ /dev/null @@ -1,2 +0,0 @@ -del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc" -exit /b 0 diff --git a/ms-windows/osgeo4w/postinstall-grass.bat b/ms-windows/osgeo4w/postinstall-grass.bat deleted file mode 100644 index b851c2cde834..000000000000 --- a/ms-windows/osgeo4w/postinstall-grass.bat +++ /dev/null @@ -1,13 +0,0 @@ -textreplace -std -t bin\@package@-grass@grassmajor@.bat - -if "%OSGEO4W_DESKTOP%"=="" set OSGEO4W_DESKTOP=~$folder.common_desktop$ - -copy bin\@package@-bin.exe bin\@package@-bin-g@grassmajor@.exe -copy bin\@package@-bin.vars bin\@package@-bin-g@grassmajor@.vars -call "%OSGEO4W_ROOT%\bin\@package@-grass@grassmajor@.bat" --postinstall - -if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%" -if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%" - -if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@ with GRASS @grassversion@" "" "" "" "" "~$folder.mydocuments$" -if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@ with GRASS @grassversion@" "" "" "" "" "~$folder.mydocuments$" diff --git a/ms-windows/osgeo4w/postinstall-server.bat b/ms-windows/osgeo4w/postinstall-server.bat deleted file mode 100644 index db7085284168..000000000000 --- a/ms-windows/osgeo4w/postinstall-server.bat +++ /dev/null @@ -1,5 +0,0 @@ -textreplace -std ^ - -map @windir@ "%WINDIR%" ^ - -map @temp@ "%TEMP%" ^ - -t httpd.d\httpd_@package@.conf -del httpd.d\httpd_@package@.conf.tmpl diff --git a/ms-windows/osgeo4w/preremove-desktop.bat b/ms-windows/osgeo4w/preremove-desktop.bat deleted file mode 100644 index 242a205480ca..000000000000 --- a/ms-windows/osgeo4w/preremove-desktop.bat +++ /dev/null @@ -1,15 +0,0 @@ -del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@.lnk" -del "%OSGEO4W_STARTMENU%\QGIS Browser @version@.lnk" -del "%OSGEO4W_STARTMENU%\Qt Designer with QGIS @version@ custom widgets.lnk" -rmdir "%OSGEO4W_STARTMENU%" -del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@.lnk" -del "%OSGEO4W_DESKTOP%\QGIS Browser @version@.lnk" -del "%OSGEO4W_DESKTOP%\Qt Designer with QGIS @version@ custom widgets.lnk" -rmdir "%OSGEO4W_DESKTOP%" -del "%OSGEO4W_ROOT%\bin\@package@.bat" -del "%OSGEO4W_ROOT%\bin\@package@-bin.vars" -del "%OSGEO4W_ROOT%\bin\@package@-bin.env" -del "%OSGEO4W_ROOT%\bin\@package@-designer.bat" -del "%OSGEO4W_ROOT%\apps\@package@\python\qgis\qgisconfig.py" -del "%OSGEO4W_ROOT%\apps\@package@\bin\qgis.reg" -del /s /q "%OSGEO4W_ROOT%\apps\@package@\python\*.pyc" diff --git a/ms-windows/osgeo4w/preremove-dev.bat b/ms-windows/osgeo4w/preremove-dev.bat deleted file mode 100644 index ae7532026c20..000000000000 --- a/ms-windows/osgeo4w/preremove-dev.bat +++ /dev/null @@ -1,30 +0,0 @@ -setlocal enabledelayedexpansion - -for %%g in (@grassversions@) do ( - for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a - for /F "delims=." %%i in ("!gv!") do set v=%%i - - del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk" - del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk" - del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk" - del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk" - del "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat" - del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" - del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.env" - del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars" -) - -del "%OSGEO4W_STARTMENU%\Qt Designer with QGIS @version@ custom widgets (Nightly).lnk" -rmdir "%OSGEO4W_STARTMENU%" -del "%OSGEO4W_DESKTOP%\Qt Designer with QGIS @version@ custom widgets (Nightly).lnk" -rmdir "%OSGEO4W_DESKTOP%" - -del "%OSGEO4W_ROOT%\bin\@package@-bin.env" -del "%OSGEO4W_ROOT%\bin\@package@-designer.bat" -del "%OSGEO4W_ROOT%\bin\python-@package@.bat" -del "%OSGEO4W_ROOT%\bin\qgis_process-@package@.bat" -del "%OSGEO4W_ROOT%\apps\@package@\python\qgis\qgisconfig.py" -del "%OSGEO4W_ROOT%\apps\@package@\bin\qgis.reg" -del /s /q "%OSGEO4W_ROOT%\apps\@package@\*.pyc" - -endlocal diff --git a/ms-windows/osgeo4w/preremove-grass-plugin-common.bat b/ms-windows/osgeo4w/preremove-grass-plugin-common.bat deleted file mode 100644 index 59ae472ac964..000000000000 --- a/ms-windows/osgeo4w/preremove-grass-plugin-common.bat +++ /dev/null @@ -1 +0,0 @@ -del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc" diff --git a/ms-windows/osgeo4w/preremove-grass.bat b/ms-windows/osgeo4w/preremove-grass.bat deleted file mode 100644 index 1b2c2abc33c4..000000000000 --- a/ms-windows/osgeo4w/preremove-grass.bat +++ /dev/null @@ -1,10 +0,0 @@ -del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS @grassversion@.lnk" -del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS @grassversion@.lnk" -rmdir "%OSGEO4W_STARTMENU%" -del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS @grassversion@.lnk" -del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS @grassversion@.lnk" -rmdir "%OSGEO4W_DESKTOP%" -del "%OSGEO4W_ROOT%\bin\@package@-grass@grassmajor@.bat" -del "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.exe" -del "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.vars" -del "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.env" diff --git a/ms-windows/osgeo4w/preremove-server.bat b/ms-windows/osgeo4w/preremove-server.bat deleted file mode 100644 index 91f3f99f79fa..000000000000 --- a/ms-windows/osgeo4w/preremove-server.bat +++ /dev/null @@ -1 +0,0 @@ -del "%OSGEO4W_ROOT%\httpd.d\httpd_@package@.conf" diff --git a/ms-windows/osgeo4w/process.bat.tmpl b/ms-windows/osgeo4w/process.bat.tmpl deleted file mode 100644 index 87746d50bdc4..000000000000 --- a/ms-windows/osgeo4w/process.bat.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -@echo off -call "%~dp0\o4w_env.bat" -call qt5_env.bat -call py3_env.bat -@echo off -path %OSGEO4W_ROOT%\apps\@package@\bin;%PATH% -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -set GDAL_FILENAME_IS_UTF8=YES -rem Set VSI cache to be used as buffer, see #6448 -set VSI_CACHE=TRUE -set VSI_CACHE_SIZE=1000000 -set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins -set PYTHONPATH=%OSGEO4W_ROOT%\apps\@package@\python;%PYTHONPATH% -"%OSGEO4W_ROOT%\apps\@package@\bin\qgis_process.exe" %* diff --git a/ms-windows/osgeo4w/python.bat.tmpl b/ms-windows/osgeo4w/python.bat.tmpl deleted file mode 100644 index 3282dcd50e5d..000000000000 --- a/ms-windows/osgeo4w/python.bat.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -@echo off -call "%~dp0\o4w_env.bat" -call qt5_env.bat -call py3_env.bat -@echo off -path %OSGEO4W_ROOT%\apps\@package@\bin;%PATH% -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -set GDAL_FILENAME_IS_UTF8=YES -rem Set VSI cache to be used as buffer, see #6448 -set VSI_CACHE=TRUE -set VSI_CACHE_SIZE=1000000 -set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins -set PYTHONPATH=%OSGEO4W_ROOT%\apps\@package@\python;%PYTHONPATH% -"%PYTHONHOME%\python" %* diff --git a/ms-windows/osgeo4w/qgis-grass.bat.tmpl b/ms-windows/osgeo4w/qgis-grass.bat.tmpl deleted file mode 100644 index 4d45dca5a881..000000000000 --- a/ms-windows/osgeo4w/qgis-grass.bat.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -@echo off -call "%~dp0\o4w_env.bat" -call qt5_env.bat -call py3_env.bat -set savedpath=%PATH% -call "%OSGEO4W_ROOT%\apps\grass\@grasspath@\etc\env.bat" -@echo off -path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\@grasspath@\lib;%OSGEO4W_ROOT%\apps\grass\@grasspath@\bin;%savedpath% -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -set GDAL_FILENAME_IS_UTF8=YES -rem Set VSI cache to be used as buffer, see #6448 -set VSI_CACHE=TRUE -set VSI_CACHE_SIZE=1000000 -set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins -start "QGIS" /B "%OSGEO4W_ROOT%\bin\@package@-bin-g@grassmajor@.exe" %* diff --git a/ms-windows/osgeo4w/qgis.bat.tmpl b/ms-windows/osgeo4w/qgis.bat.tmpl deleted file mode 100644 index e3c09c80e4b3..000000000000 --- a/ms-windows/osgeo4w/qgis.bat.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -@echo off -call "%~dp0\o4w_env.bat" -call qt5_env.bat -call py3_env.bat -@echo off -path %OSGEO4W_ROOT%\apps\@package@\bin;%PATH% -set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ -set GDAL_FILENAME_IS_UTF8=YES -rem Set VSI cache to be used as buffer, see #6448 -set VSI_CACHE=TRUE -set VSI_CACHE_SIZE=1000000 -set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins -start "QGIS" /B "%OSGEO4W_ROOT%\bin\@package@-bin.exe" %* diff --git a/ms-windows/osgeo4w/qgis.reg.tmpl b/ms-windows/osgeo4w/qgis.reg.tmpl deleted file mode 100644 index 9bbd6b5afc2d..000000000000 --- a/ms-windows/osgeo4w/qgis.reg.tmpl +++ /dev/null @@ -1,48 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CLASSES_ROOT\QGIS Project] -@="QGIS Project" - -[HKEY_CLASSES_ROOT\QGIS Project\DefaultIcon] -@="@osgeo4w@\\apps\\@package@\\icons\\qgis-qgs.ico" - -[HKEY_CLASSES_ROOT\QGIS Project\Shell] - -[HKEY_CLASSES_ROOT\QGIS Project\Shell\open] -@="" - -[HKEY_CLASSES_ROOT\QGIS Project\Shell\open\command] -@="\"@osgeo4w@\\bin\\@package@.bat\" \"%1\"" - -[HKEY_CLASSES_ROOT\.qgs] -@="QGIS Project" - -[HKEY_CLASSES_ROOT\.qgz] -@="QGIS Project" - -[HKEY_CLASSES_ROOT\QGIS Composer Template] -@="QGIS Composer Template" - -[HKEY_CLASSES_ROOT\QGIS Composer Template\DefaultIcon] -@="@osgeo4w@\\apps\\@package@\\icons\\qgis-qpt.ico" - -[HKEY_CLASSES_ROOT\.qpt] -@="QGIS Composer Template" - -[HKEY_CLASSES_ROOT\QGIS Layer Settings] -@="QGIS Layer Settings" - -[HKEY_CLASSES_ROOT\QGIS Layer Settings\DefaultIcon] -@="@osgeo4w@\\apps\\@package@\\icons\\qgis-qml.ico" - -[HKEY_CLASSES_ROOT\.qml] -@="QGIS Layer Settings" - -[HKEY_CLASSES_ROOT\QGIS Layer Definition] -@="QGIS Layer Definition" - -[HKEY_CLASSES_ROOT\QGIS Layer Definition\DefaultIcon] -@="@osgeo4w@\\apps\\@package@\\icons\\qgis-qlr.ico" - -[HKEY_CLASSES_ROOT\.qlr] -@="QGIS Layer Definition" diff --git a/ms-windows/osgeo4w/qgis.vars b/ms-windows/osgeo4w/qgis.vars deleted file mode 100644 index 2fa37cfef9cb..000000000000 --- a/ms-windows/osgeo4w/qgis.vars +++ /dev/null @@ -1,30 +0,0 @@ -PATH -GDAL_DATA -GDAL_DRIVER_PATH -GDAL_FILENAME_IS_UTF8 -GEOTIFF_CSV -GISBASE -GRASS_HTML_BROWSER -GRASS_PROJSHARE -GRASS_PYTHON -GRASS_SH -GRASS_WISH -JPEGMEM -NLS_LANG -OSGEO4W_ROOT -PROJ_LIB -PYTHONHOME -PYTHONPATH -QGIS_PREFIX_PATH -QT_PLUGIN_PATH -QT_RASTER_CLIP_LIMIT -VSI_CACHE -VSI_CACHE_SIZE -O4W_QT_PREFIX -O4W_QT_BINARIES -O4W_QT_PLUGINS -O4W_QT_LIBRARIES -O4W_QT_TRANSLATIONS -O4W_QT_HEADERS -PGEO_DRIVER_TEMPLATE -OGR_SKIP diff --git a/ms-windows/osgeo4w/runasadmin.ps1 b/ms-windows/osgeo4w/runasadmin.ps1 deleted file mode 100644 index ab2b4fca35a0..000000000000 --- a/ms-windows/osgeo4w/runasadmin.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#-RunAsAdministrator -Write-Output ($args -join ' ') -$cmd, $args = $args -Start-Process $cmd -Wait -ArgumentList $args -NoNewWindow diff --git a/ms-windows/plugins.nsh b/ms-windows/plugins.nsh deleted file mode 100644 index 335ed71ba0e2..000000000000 --- a/ms-windows/plugins.nsh +++ /dev/null @@ -1,14 +0,0 @@ -############################### reg2nsis begin ################################# -# This NSIS-script was generated by the Reg2Nsis utility # -# Author : Artem Zankovich # -# URL : http://aarrtteemm.nm.ru # -# Usage : You can freely inserts this into your setup script as inline text # -# or include file with the help of !include directive. # -# Please don't remove this header. # -################################################################################ - -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "grassplugin" "true" -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "offlineeditingplugin" "true" -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "topolplugin" "true" - -############################### reg2nsis end ################################# diff --git a/ms-windows/python_plugins.nsh b/ms-windows/python_plugins.nsh deleted file mode 100644 index 7a86b37ec826..000000000000 --- a/ms-windows/python_plugins.nsh +++ /dev/null @@ -1,14 +0,0 @@ -############################### reg2nsis begin ################################# -# This NSIS-script was generated by the Reg2Nsis utility # -# Author : Artem Zankovich # -# URL : http://aarrtteemm.nm.ru # -# Usage : You can freely inserts this into your setup script as inline text # -# or include file with the help of !include directive. # -# Please don't remove this header. # -################################################################################ - -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\PythonPlugins" "GdalTools" "true" -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\PythonPlugins" "db_manager" "true" -WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\PythonPlugins" "processing" "true" - -############################### reg2nsis end ################################# diff --git a/ms-windows/quickpackage.sh b/ms-windows/quickpackage.sh deleted file mode 100755 index a146c1fa12ab..000000000000 --- a/ms-windows/quickpackage.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# quickpackage.sh -# --------------------- -# Date : November 2010 -# Copyright : (C) 2010 by Tim Sutton -# Email : tim at kartoza dot com -########################################################################### -# # -# This program is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -########################################################################### - - -# This script is just for if you want to run the nsis (under linux) part -# of the package building process. Typically you should use -# -# osgeo4w/creatensis.pl -# -# rather to do the complete package build process. However running this -# script can be useful if you have manually tweaked the package contents -# under osgeo4w/unpacked and want to create a new package based on that. -# -# Tim Sutton November 2010 - -makensis \ --DVERSION_NUMBER='1.7.0' \ --DVERSION_NAME='Wroclaw' \ --DSVN_REVISION='0' \ --DQGIS_BASE='QGIS' \ --DINSTALLER_NAME='QGIS-1-7-0-Setup.exe' \ --DDISPLAYED_NAME='QGIS 1.7.0' \ --DBINARY_REVISION=1 \ --DINSTALLER_TYPE=OSGeo4W \ --DPACKAGE_FOLDER=osgeo4w/unpacked \ --DSHORTNAME=qgis \ -QGIS-Installer.nsi diff --git a/ms-windows/x64.nsh b/ms-windows/x64.nsh deleted file mode 100644 index e694c1e61369..000000000000 --- a/ms-windows/x64.nsh +++ /dev/null @@ -1,54 +0,0 @@ -; --------------------- -; x64.nsh -; --------------------- -; -; A few simple macros to handle installations on x64 machines. -; -; RunningX64 checks if the installer is running on x64. -; -; ${If} ${RunningX64} -; MessageBox MB_OK "running on x64" -; ${EndIf} -; -; DisableX64FSRedirection disables file system redirection. -; EnableX64FSRedirection enables file system redirection. -; -; SetOutPath $SYSDIR -; ${DisableX64FSRedirection} -; File some.dll # extracts to C:\Windows\System32 -; ${EnableX64FSRedirection} -; File some.dll # extracts to C:\Windows\SysWOW64 -; - -!ifndef ___X64__NSH___ -!define ___X64__NSH___ - -!include LogicLib.nsh - -!macro _RunningX64 _a _b _t _f - !insertmacro _LOGICLIB_TEMP - System::Call kernel32::GetCurrentProcess()i.s - System::Call kernel32::IsWow64Process(is,*i.s) - Pop $_LOGICLIB_TEMP - !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}` -!macroend - -!define RunningX64 `"" RunningX64 ""` - -!macro DisableX64FSRedirection - - System::Call kernel32::Wow64EnableWow64FsRedirection(i0) - -!macroend - -!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection" - -!macro EnableX64FSRedirection - - System::Call kernel32::Wow64EnableWow64FsRedirection(i1) - -!macroend - -!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection" - -!endif # !___X64__NSH___ diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index e9847f5041b6..3bd86feef79d 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -515,6 +515,10 @@ if (ANDROID) else() add_executable(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 ${QGIS_APPMAIN_SRCS}) + if(MSVC AND BUILD_WITH_QT6) + qt_disable_unicode_defines(${QGIS_APP_NAME}) + endif(MSVC AND BUILD_WITH_QT6) + # require c++17 target_compile_features(${QGIS_APP_NAME} PRIVATE cxx_std_17) target_compile_definitions(${QGIS_APP_NAME} PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"") diff --git a/src/app/main.cpp b/src/app/main.cpp index 5cb8ee81e586..bce6f9f1ae43 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -177,10 +177,10 @@ void usage( const QString &appName ) << QStringLiteral( " the PostGIS extension\n" ) ; // OK #ifdef Q_OS_WIN - MessageBox( nullptr, - msg.join( QString() ).toLocal8Bit().constData(), - "QGIS command line options", - MB_OK ); + MessageBoxA( nullptr, + msg.join( QString() ).toLocal8Bit().constData(), + "QGIS command line options", + MB_OK ); #else std::cout << msg.join( QString() ).toLocal8Bit().constData(); #endif @@ -219,7 +219,7 @@ void myPrint( const char *fmt, ... ) #if defined(Q_OS_WIN) char buffer[1024]; vsnprintf( buffer, sizeof buffer, fmt, ap ); - OutputDebugString( buffer ); + OutputDebugStringA( buffer ); #else vfprintf( stderr, fmt, ap ); #endif diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index c6856c998c8d..af244470b57c 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -13054,7 +13054,11 @@ void QgisApp::openURL( QString url, bool useQgisDocDirectory ) CFRelease( urlRef ); #elif defined(Q_OS_WIN) if ( url.startsWith( "file://", Qt::CaseInsensitive ) ) +#ifdef UNICODE + ShellExecute( 0, 0, url.mid( 7 ).toStdWString().c_str(), 0, 0, SW_SHOWNORMAL ); +#else ShellExecute( 0, 0, url.mid( 7 ).toLocal8Bit().constData(), 0, 0, SW_SHOWNORMAL ); +#endif else QDesktopServices::openUrl( url ); #else diff --git a/src/core/layout/qgslayoutitemlegend.cpp b/src/core/layout/qgslayoutitemlegend.cpp index 6d1a02d3cfda..1ccef7dc7c81 100644 --- a/src/core/layout/qgslayoutitemlegend.cpp +++ b/src/core/layout/qgslayoutitemlegend.cpp @@ -1198,7 +1198,7 @@ void QgsLayoutItemLegend::doUpdateFilterByMap() { mapExtent.transform( mapTransform ); } - catch ( QgsCsException &cse ) + catch ( QgsCsException & ) { continue; } diff --git a/src/core/mesh/qgstopologicalmesh.cpp b/src/core/mesh/qgstopologicalmesh.cpp index b789f224f99d..e6b040f7e067 100644 --- a/src/core/mesh/qgstopologicalmesh.cpp +++ b/src/core/mesh/qgstopologicalmesh.cpp @@ -703,7 +703,7 @@ QgsMeshEditingError QgsTopologicalMesh::counterClockwiseFaces( QgsMeshFace &face if ( error != QgsMeshEditingError() ) return error; - if ( clockwise > 0 )// clockwise --> reverse the order of the index; + if ( clockwise )// clockwise --> reverse the order of the index; { for ( int i = 0; i < faceSize / 2; ++i ) { diff --git a/src/core/pal/labelposition.cpp b/src/core/pal/labelposition.cpp index ba1a576c58d8..caf010ed7af1 100644 --- a/src/core/pal/labelposition.cpp +++ b/src/core/pal/labelposition.cpp @@ -574,7 +574,7 @@ double LabelPosition::getDistanceToPoint( double xp, double yp, bool useOuterBou geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, xp, yp ) ); contains = ( GEOSPreparedContainsProperly_r( geosctxt, mPreparedOuterBoundsGeos, point.get() ) == 1 ); } - catch ( GEOSException &e ) + catch ( GEOSException & ) { contains = false; } diff --git a/src/core/pointcloud/qgslazdecoder.cpp b/src/core/pointcloud/qgslazdecoder.cpp index 67a4e3b7d462..efde5717dba5 100644 --- a/src/core/pointcloud/qgslazdecoder.cpp +++ b/src/core/pointcloud/qgslazdecoder.cpp @@ -38,7 +38,9 @@ #include "lazperf/readers.hpp" #if defined(_MSC_VER) +#ifndef UNICODE #define UNICODE +#endif #include #include #endif diff --git a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp index b4868da229b2..276167147f58 100644 --- a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp +++ b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp @@ -688,7 +688,7 @@ void QgsPointCloudLayerRenderer::renderTriangulatedSurface( QgsPointCloudRenderC { delaunator.reset( new delaunator::Delaunator( points ) ); } - catch ( std::exception &e ) + catch ( std::exception & ) { // something went wrong, better to retrieve initial state QgsDebugMsgLevel( QStringLiteral( "Error with triangulation" ), 4 ); diff --git a/src/core/qgsattributetableconfig.h b/src/core/qgsattributetableconfig.h index ba50862a3312..9daf64a74a2f 100644 --- a/src/core/qgsattributetableconfig.h +++ b/src/core/qgsattributetableconfig.h @@ -48,7 +48,7 @@ class CORE_EXPORT QgsAttributeTableConfig /** * Defines the configuration of a column in the attribute table. */ - struct ColumnConfig + struct CORE_EXPORT ColumnConfig { //! Constructor for ColumnConfig ColumnConfig() = default; diff --git a/src/core/qgsexpressioncontext.cpp b/src/core/qgsexpressioncontext.cpp index b05f99490a5e..8e0b9c2bcedd 100644 --- a/src/core/qgsexpressioncontext.cpp +++ b/src/core/qgsexpressioncontext.cpp @@ -106,7 +106,11 @@ void QgsExpressionContextScope::addVariable( const QgsExpressionContextScope::St bool QgsExpressionContextScope::removeVariable( const QString &name ) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return mVariables.remove( name ); +#else return mVariables.remove( name ) > 0; +#endif } bool QgsExpressionContextScope::hasVariable( const QString &name ) const diff --git a/src/core/qgsopenclutils.cpp b/src/core/qgsopenclutils.cpp index 39fab282a0d0..beb1cf53e157 100644 --- a/src/core/qgsopenclutils.cpp +++ b/src/core/qgsopenclutils.cpp @@ -25,6 +25,9 @@ #include #ifdef Q_OS_WIN +#if defined(UNICODE) && !defined(_UNICODE) +#define _UNICODE +#endif #include #include #endif @@ -100,7 +103,12 @@ void QgsOpenClUtils::init() } #ifdef Q_OS_WIN - HMODULE hModule = GetModuleHandle( "OpenCL.dll" ); +#ifdef _UNICODE +#define _T(x) L##x +#else +#define _T(x) x +#endif + HMODULE hModule = GetModuleHandle( _T( "OpenCL.dll" ) ); if ( hModule ) { TCHAR pszFileName[1024]; @@ -114,13 +122,13 @@ void QgsOpenClUtils::init() DWORD dwLen = GetFileVersionInfoSize( pszFileName, &dwUseless ); if ( dwLen ) { - LPTSTR lpVI = ( LPSTR ) malloc( dwLen ); + LPTSTR lpVI = ( LPTSTR ) malloc( dwLen * sizeof( TCHAR ) ); if ( lpVI ) { if ( GetFileVersionInfo( pszFileName, 0, dwLen, lpVI ) ) { VS_FIXEDFILEINFO *lpFFI; - if ( VerQueryValue( lpVI, "\\", ( LPVOID * ) &lpFFI, ( UINT * ) &dwUseless ) ) + if ( VerQueryValue( lpVI, _T( "\\" ), ( LPVOID * ) &lpFFI, ( UINT * ) &dwUseless ) ) { QgsMessageLog::logMessage( QObject::tr( "OpenCL Product version: %1.%2.%3.%4" ) .arg( lpFFI->dwProductVersionMS >> 16 ) @@ -163,13 +171,23 @@ void QgsOpenClUtils::init() QgsDebugMsgLevel( QString( "d:%1 subBlock:%2" ).arg( d ).arg( subBlock ), 2 ); - BOOL r = VerQueryValue( lpVI, subBlock.toUtf8(), ( LPVOID * )&lpBuffer, ( UINT * )&dwUseless ); + BOOL r = VerQueryValue( lpVI, +#ifdef UNICODE + subBlock.toStdWString().c_str(), +#else + subBlock.toUtf8(), +#endif + ( LPVOID * )&lpBuffer, ( UINT * )&dwUseless ); if ( r && lpBuffer && lpBuffer != INVALID_HANDLE_VALUE && dwUseless < 1023 ) { QgsMessageLog::logMessage( QObject::tr( "Found OpenCL version info %1: %2" ) .arg( d ) +#ifdef UNICODE + .arg( QString::fromUtf16( ( const ushort * ) lpBuffer ) ), +#else .arg( QString::fromLocal8Bit( lpBuffer ) ), +#endif LOGMESSAGE_TAG, Qgis::MessageLevel::Info ); } } diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index a9a7a64db345..ae6d3f0850d2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1618,6 +1618,13 @@ else() PROPERTIES COMPILE_FLAGS "-w -Wno-deprecated-declarations") endif() +if(MSVC) + set_source_files_properties( + ${CMAKE_BINARY_DIR}/src/gui/qgis_gui_autogen/mocs_compilation.cpp + PROPERTIES COMPILE_FLAGS "/bigobj" + ) +endif() + ############################################################# # qgis_gui library @@ -1713,7 +1720,7 @@ GENERATE_EXPORT_HEADER( set(QGIS_GUI_HDRS ${QGIS_GUI_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/qgis_gui.h) if(NOT APPLE OR NOT QGIS_MACAPP_FRAMEWORK) - if (WIN32 ) + if (WIN32) include_directories(${CMAKE_SOURCE_DIR}/src/native/win) elseif (APPLE) include_directories(${CMAKE_SOURCE_DIR}/src/native/mac) diff --git a/src/native/CMakeLists.txt b/src/native/CMakeLists.txt index cedc517814a1..73edb952b1ad 100644 --- a/src/native/CMakeLists.txt +++ b/src/native/CMakeLists.txt @@ -144,7 +144,7 @@ if (UNIX AND NOT APPLE AND NOT ANDROID) target_link_libraries(qgis_native ${QT_VERSION_BASE}::DBus) endif() -if (MSVC) +if (MSVC AND NOT BUILD_WITH_QT6) find_package(${QT_VERSION_BASE}WinExtras) target_link_libraries(qgis_native shell32) diff --git a/src/native/win/qgswinnative.cpp b/src/native/win/qgswinnative.cpp index 008c207a35aa..dbc83f6819b2 100644 --- a/src/native/win/qgswinnative.cpp +++ b/src/native/win/qgswinnative.cpp @@ -23,16 +23,24 @@ #include #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include #include #include #include #include +#endif #include "wintoastlib.h" #include #include #include +#ifdef UNICODE +#define _T(x) L##x +#else +#define _T(x) x +#endif + struct LPITEMIDLISTDeleter { @@ -57,6 +65,7 @@ void QgsWinNative::initializeMainWindow( QWindow *window, const QString &version ) { mWindow = window; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if ( mTaskButton ) return; // already initialized! @@ -64,6 +73,7 @@ void QgsWinNative::initializeMainWindow( QWindow *window, mTaskButton->setWindow( window ); mTaskProgress = mTaskButton->progress(); mTaskProgress->setVisible( false ); +#endif QString appName = qgetenv( "QGIS_WIN_APP_NAME" ); if ( appName.isEmpty() ) @@ -126,7 +136,7 @@ void QgsWinNative::showFileProperties( const QString &path ) info.nShow = SW_SHOWNORMAL; info.fMask = SEE_MASK_INVOKEIDLIST; info.lpIDList = pidl.get(); - info.lpVerb = "properties"; + info.lpVerb = _T( "properties" ); ShellExecuteEx( &info ); } @@ -134,24 +144,31 @@ void QgsWinNative::showFileProperties( const QString &path ) void QgsWinNative::showUndefinedApplicationProgress() { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) mTaskProgress->setMaximum( 0 ); mTaskProgress->show(); +#endif } void QgsWinNative::setApplicationProgress( double progress ) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) mTaskProgress->setMaximum( 100 ); mTaskProgress->show(); mTaskProgress->setValue( static_cast< int >( std::round( progress ) ) ); +#endif } void QgsWinNative::hideApplicationProgress() { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) mTaskProgress->hide(); +#endif } void QgsWinNative::onRecentProjectsChanged( const std::vector &recentProjects ) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QWinJumpList jumplist; jumplist.recent()->clear(); for ( const RecentProjectProperties &recentProject : recentProjects ) @@ -163,6 +180,7 @@ void QgsWinNative::onRecentProjectsChanged( const std::vectorsetArguments( QStringList( recentProject.path ) ); jumplist.recent()->addItem( newProject ); } +#endif } class NotificationHandler : public WinToastLib::IWinToastHandler @@ -228,7 +246,11 @@ bool QgsWinNative::openTerminalAtPath( const QString &path ) return process.startDetached( &pid ); } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool QgsWinNativeEventFilter::nativeEventFilter( const QByteArray &eventType, void *message, long * ) +#else +bool QgsWinNativeEventFilter::nativeEventFilter( const QByteArray &eventType, void *message, qintptr * ) +#endif { static const QByteArray sWindowsGenericMSG{ "windows_generic_MSG" }; if ( !message || eventType != sWindowsGenericMSG ) diff --git a/src/native/win/qgswinnative.h b/src/native/win/qgswinnative.h index 9f0e7479d144..c67902998128 100644 --- a/src/native/win/qgswinnative.h +++ b/src/native/win/qgswinnative.h @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#ifndef QGSMACNATIVE_H -#define QGSMACNATIVE_H +#ifndef QGSWINNATIVE_H +#define QGSWINNATIVE_H #include "qgsnative.h" #include @@ -25,8 +25,10 @@ #include #pragma comment(lib,"Shell32.lib") +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) class QWinTaskbarButton; class QWinTaskbarProgress; +#endif class QWindow; @@ -35,7 +37,11 @@ class QgsWinNativeEventFilter : public QObject, public QAbstractNativeEventFilte Q_OBJECT public: +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool nativeEventFilter( const QByteArray &eventType, void *message, long * ) override; +#else + bool nativeEventFilter( const QByteArray &eventType, void *message, qintptr *result ) override; +#endif signals: @@ -70,10 +76,12 @@ class NATIVE_EXPORT QgsWinNative : public QgsNative QWindow *mWindow = nullptr; Capabilities mCapabilities = NativeFilePropertiesDialog | NativeOpenTerminalAtPath; bool mWinToastInitialized = false; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QWinTaskbarButton *mTaskButton = nullptr; QWinTaskbarProgress *mTaskProgress = nullptr; +#endif QgsWinNativeEventFilter *mNativeEventFilter = nullptr; }; -#endif // QGSMACNATIVE_H +#endif // QGSWINNATIVE_H diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index eb8585c112e3..946af31a1ded 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -270,8 +270,8 @@ QString QgsGrass::pathSeparator() #include QString QgsGrass::shortPath( const QString &path ) { - TCHAR buf[MAX_PATH]; - int len = GetShortPathName( path.toUtf8().constData(), buf, MAX_PATH ); + char buf[MAX_PATH]; + int len = GetShortPathNameA( path.toUtf8().constData(), buf, MAX_PATH ); if ( len == 0 || len > MAX_PATH ) { diff --git a/src/server/qgis_mapserver.cpp b/src/server/qgis_mapserver.cpp index 38d9fe5dcb7c..1ed9042085e0 100644 --- a/src/server/qgis_mapserver.cpp +++ b/src/server/qgis_mapserver.cpp @@ -177,7 +177,7 @@ class TcpServerWorker: public QObject }; // This will delete the connection - QTcpSocket::connect( clientConnection, &QAbstractSocket::disconnected, clientConnection, connectionDeleter, Qt::QueuedConnection ); + QObject::connect( clientConnection, &QAbstractSocket::disconnected, clientConnection, connectionDeleter, Qt::QueuedConnection ); #if 0 // Debugging output clientConnection->connect( clientConnection, &QAbstractSocket::errorOccurred, clientConnection, [ = ]( QAbstractSocket::SocketError socketError ) @@ -187,7 +187,7 @@ class TcpServerWorker: public QObject #endif // Incoming connection parser - QTcpSocket::connect( clientConnection, &QIODevice::readyRead, context, [ = ] { + QObject::connect( clientConnection, &QIODevice::readyRead, context, [ = ] { // Read all incoming data while ( clientConnection->bytesAvailable() > 0 ) diff --git a/tests/code_layout/CMakeLists.txt b/tests/code_layout/CMakeLists.txt index 35f5fa28c479..ec46beccc63a 100644 --- a/tests/code_layout/CMakeLists.txt +++ b/tests/code_layout/CMakeLists.txt @@ -1,6 +1,6 @@ # TESTSRC is relative to ${CMAKE_SOURCE_DIR} macro (add_qgis_test_script TESTNAME TESTSRC) - add_test(${TESTNAME} ${CMAKE_SOURCE_DIR}/${TESTSRC}) + add_test(NAME ${TESTNAME} COMMAND sh ${CMAKE_SOURCE_DIR}/${TESTSRC}) set_tests_properties(${TESTNAME} PROPERTIES FIXTURES_REQUIRED SOURCETREE) endmacro()