-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lutraconsulting/win
fix build on win
- Loading branch information
Showing
7 changed files
with
109 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
image: Visual Studio 2017 | ||
|
||
install: | ||
- call .\\win\\distribute.cmd | ||
- call choco install winflexbison3 | ||
# - call .\\win\\distribute.cmd | ||
|
||
build: off | ||
|
||
# Do not build feature branch with open Pull Requests | ||
skip_branch_with_pr: false | ||
|
||
artifacts: | ||
- path: input-sdk-win-x86_64.zip | ||
name: input-sdk-win-x86_64 | ||
#artifacts: | ||
# - path: input-sdk-win-x86_64.zip | ||
# name: input-sdk-win-x86_64 | ||
|
||
deploy: | ||
- provider: GitHub | ||
description: 'input-sdk windows release' | ||
auth_token: | ||
secure: gqLWRiVUFKd+MsoevoouKEHG0tpvM9zhhSnCpzj9lRg4vcGq+ssWIG2m7kCbgLAC | ||
artifact: input-sdk-win-x86_64 | ||
draft: false | ||
prerelease: false | ||
on: | ||
branch: master | ||
APPVEYOR_REPO_TAG: true | ||
#deploy: | ||
# - provider: GitHub | ||
# description: 'input-sdk windows release' | ||
# auth_token: | ||
# secure: gqLWRiVUFKd+MsoevoouKEHG0tpvM9zhhSnCpzj9lRg4vcGq+ssWIG2m7kCbgLAC | ||
# artifact: input-sdk-win-x86_64 | ||
# draft: false | ||
# prerelease: false | ||
# on: | ||
# branch: master | ||
# APPVEYOR_REPO_TAG: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,56 @@ | ||
@echo on | ||
|
||
set ROOT_DIR=C:\input-sdk\x86_64 | ||
set RESULT_FILE=C:\projects\input-sdk\input-sdk-win-x86_64.zip | ||
mkdir %ROOT_DIR% | ||
set OLD_PATH=%PATH% | ||
set ROOT_DIR=C:\projects\input-sdk\x86_64 | ||
set PY36=C:\Python36-x64 | ||
set STAGE_PATH=%ROOT_DIR%\stage | ||
set BUILD_PATH=%ROOT_DIR%\build | ||
mkdir %STAGE_PATH% | ||
mkdir %BUILD_PATH% | ||
|
||
echo "install flex-bison" | ||
choco install winflexbison3 | ||
|
||
echo "download osgeo" | ||
call %~dp0\recipes\osgeo\recipe.bat | ||
|
||
echo "build geodiff" | ||
call %~dp0\recipes\geodiff\recipe.bat | ||
|
||
IF EXIST "C:\input-sdk\x86_64\stage\lib\geodiff.dll" ( | ||
echo "geodiff is OK" | ||
) ELSE ( | ||
echo "missing geodiff.dll, exiting" | ||
exit /B 1 | ||
) | ||
|
||
echo "build qgis" | ||
call %~dp0\recipes\qgis\recipe.bat | ||
set REPO_PATH=%ROOT_DIR%\repo | ||
set DOWNLOAD_PATH=%ROOT_DIR%\download | ||
set RESULT_FILE=%ROOT_DIR%\input-sdk-win-x86_64.zip | ||
set OSGEO4W_ROOT=%REPO_PATH%\OSGeo4W64 | ||
|
||
if not exist %ROOT_DIR% mkdir %ROOT_DIR% | ||
if not exist %BUILD_PATH% mkdir %BUILD_PATH% | ||
if not exist %REPO_PATH% mkdir %REPO_PATH% | ||
if not exist %DOWNLOAD_PATH% mkdir %DOWNLOAD_PATH% | ||
if not exist %OSGEO4W_ROOT% call %~dp0\recipes\osgeo\recipe.bat | ||
if not exist %STAGE_PATH% robocopy %OSGEO4W_ROOT% %STAGE_PATH% /E /NFL /NDL | ||
|
||
if not "%PROGRAMFILES(X86)%"=="" set PF86=%PROGRAMFILES(X86)% | ||
if "%PF86%"=="" set PF86=%PROGRAMFILES% | ||
if "%PF86%"=="" (echo PROGRAMFILES not set & goto error) | ||
set VS140COMNTOOLS=%PF86%\Microsoft Visual Studio 14.0\Common7\Tools\ | ||
call "%PF86%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | ||
path %path%;%PF86%\Microsoft Visual Studio 14.0\VC\bin | ||
path %path%;%CMAKE% | ||
path %path%;%STAGE_PATH%\apps\Qt5\bin;%PATH% | ||
path %path%;%PY36%;%PATH% | ||
set PYTHONPATH="%PY36%\DLLs;%PY36%\Lib;%PY36%\Lib\site-packages" | ||
set Qt5_DIR=%STAGE_PATH%\apps\qt5\lib\cmake\Qt5 | ||
set LIB=%STAGE_PATH%\apps\Qt5\lib;%STAGE_PATH%\lib | ||
set LIB=%LIB%;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64\ | ||
set INCLUDE=%STAGE_PATH%\apps\Qt5\include;%STAGE_PATH%\include | ||
|
||
IF NOT EXIST "%STAGE_PATH%\lib\geodiff.dll" call %~dp0\recipes\geodiff\recipe.bat | ||
IF NOT EXIST "%STAGE_PATH%\lib\geodiff.dll" goto error | ||
|
||
IF NOT EXIST "%STAGE_PATH%\qml\QgsQuick\qgis_quick_plugin.dll" call %~dp0\recipes\qgis\recipe.bat | ||
IF NOT EXIST "%STAGE_PATH%\qml\QgsQuick\qgis_quick_plugin.dll" goto error | ||
|
||
IF NOT EXIST %RESULT_FILE% 7z a %RESULT_FILE% %STAGE_PATH%\* | ||
dir %RESULT_FILE% | ||
|
||
IF EXIST "C:\input-sdk\x86_64\stage\lib\qgis_core.dll" ( | ||
echo "qgis is OK" | ||
) ELSE ( | ||
echo "missing qgis dlls, exiting" | ||
exit /B 1 | ||
) | ||
set PATH=%OLD_PATH% | ||
cd %~dp0 | ||
echo "all done!" | ||
goto end | ||
|
||
dir %STAGE_PATH% | ||
7z a %RESULT_FILE% %STAGE_PATH%\* | ||
dir %RESULT_FILE% | ||
:error | ||
echo ENV ERROR %ERRORLEVEL%: %DATE% %TIME% | ||
path %OLD_PATH% | ||
cd %~dp0 | ||
echo "error!" | ||
exit /b 1 | ||
|
||
ECHO "done" | ||
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
@echo on | ||
|
||
set VERSION_geodiff=0.7.5 | ||
set VERSION_geodiff=0.7.6 | ||
set URL_geodiff=https://github.com/lutraconsulting/geodiff/archive/%VERSION_geodiff%.tar.gz | ||
set BUILD_geodiff=%BUILD_PATH%\geodiff | ||
mkdir %BUILD_geodiff% | ||
cd %BUILD_geodiff% | ||
|
||
curl -fsSL --connect-timeout 60 -o geodiff.tar.gz %URL_geodiff% | ||
dir | ||
set REPO_geodiff=%REPO_PATH%\geodiff | ||
if not exist %BUILD_geodiff% mkdir %BUILD_geodiff% | ||
|
||
7z x "geodiff.tar.gz" -so | 7z x -aoa -si -ttar -o"src" | ||
cd src\geodiff-%VERSION_geodiff% | ||
dir | ||
IF NOT EXIST %REPO_geodiff% ( | ||
cd %DOWNLOAD_PATH% | ||
curl -fsSL --connect-timeout 60 -o geodiff.tar.gz %URL_geodiff% | ||
|
||
mkdir %BUILD_geodiff%\build | ||
cd %BUILD_geodiff%\build | ||
7z x "geodiff.tar.gz" -so | 7z x -aoa -si -ttar -o"src" | ||
move src\geodiff-%VERSION_geodiff% %REPO_geodiff% | ||
) | ||
|
||
cmake -G "Visual Studio 15 2017 Win64" ^ | ||
cd %BUILD_geodiff% | ||
cmake -G %CMAKE_GENERATOR% ^ | ||
-DCMAKE_INSTALL_PREFIX:PATH=%STAGE_PATH% ^ | ||
-DENABLE_TESTS=OFF ^ | ||
-DBUILD_TOOLS=OFF ^ | ||
-DBUILD_STATIC_LIBS=OFF ^ | ||
%BUILD_geodiff%\src\geodiff-%VERSION_geodiff%\geodiff | ||
%REPO_geodiff%\geodiff | ||
|
||
cmake --build . --config Release --target install --parallel %NUMBER_OF_PROCESSORS% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters