From 45888f9b6ddc2d95f0a4c2d29d3de7697833670b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 22 Sep 2015 21:23:15 +0200 Subject: [PATCH] AppVeyor: Added 64-bit MSVC 2013 builds These are without Python support for now. --- appveyor.yml | 17 +- dist/win/build-daily.bat | 2 +- dist/win/build_installer.bat | 89 ------- dist/win/dist.qbs | 11 +- dist/win/{tiled.nsi => tiled-mingw.nsi} | 0 dist/win/tiled-vs2013.nsi | 318 ++++++++++++++++++++++++ 6 files changed, 336 insertions(+), 101 deletions(-) delete mode 100644 dist/win/build_installer.bat rename dist/win/{tiled.nsi => tiled-mingw.nsi} (100%) create mode 100644 dist/win/tiled-vs2013.nsi diff --git a/appveyor.yml b/appveyor.yml index c9e634e7e6..c3b214f84b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,11 @@ clone_depth: 200 environment: - QTDIR: C:\Qt\5.5\mingw492_32 - MINGW: C:\Qt\Tools\mingw492_32 + global: + MINGW: C:\Qt\Tools\mingw492_32 + matrix: + - QTDIR: C:\Qt\5.5\mingw492_32 + - QTDIR: C:\Qt\5.5\msvc2013_64 configuration: Release @@ -18,11 +21,11 @@ build_script: - if not defined APPVEYOR_REPO_TAG_NAME set VERSION=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2% - if not defined APPVEYOR_REPO_TAG_NAME set BUILD_INFO_VERSION=%COMMITNOW% - if not defined APPVEYOR_REPO_TAG_NAME echo Building Tiled daily %VERSION%... (from %COMMITNOW%) - - qbs setup-toolchains --type mingw %MINGW%\bin\g++.exe mingw - - qbs config profiles.mingw.cpp.archiverPath ar.exe - - qbs config profiles.mingw.cpp.nmPath nm.exe - - qbs config profiles.mingw.cpp.objcopyPath objcopy.exe - - qbs config profiles.mingw.cpp.stripPath strip.exe + - qbs setup-toolchains --detect + - qbs config profiles.i686-w64-mingw32.cpp.archiverPath ar.exe + - qbs config profiles.i686-w64-mingw32.cpp.nmPath nm.exe + - qbs config profiles.i686-w64-mingw32.cpp.objcopyPath objcopy.exe + - qbs config profiles.i686-w64-mingw32.cpp.stripPath strip.exe - qbs setup-qt %QTDIR%\bin\qmake.exe qt - qbs config defaultProfile qt - qbs install --all-products --install-root install-root release diff --git a/dist/win/build-daily.bat b/dist/win/build-daily.bat index 98a0427d46..533977360f 100644 --- a/dist/win/build-daily.bat +++ b/dist/win/build-daily.bat @@ -47,7 +47,7 @@ popd echo Building Installer... pushd %TILED_SOURCE_DIR%\dist\win -makensis.exe tiled.nsi +makensis.exe tiled-vs2013.nsi echo Uploading installer... %SCP% -B tiled-%VERSION%-win32-setup.exe %DESTINATION% diff --git a/dist/win/build_installer.bat b/dist/win/build_installer.bat deleted file mode 100644 index c848ab3daa..0000000000 --- a/dist/win/build_installer.bat +++ /dev/null @@ -1,89 +0,0 @@ -@echo off - -setlocal EnableDelayedExpansion - -:: Check for MinGW -if not defined MINGW ( - :get_mingw_path - call :get_path MinGW MINGW -) - -call :check_path "!MINGW!" mingw32-make.exe MinGW MAKE -if not defined MAKE ( - call :check_path "!MINGW!" make.exe MinGW MAKE - if not defined MAKE ( - echo Failed to detect MinGW - goto get_mingw_path - ) -) - -:: Check for Qt -if not defined QTDIR ( - :get_qt_path - call :get_path Qt QTDIR -) - -:: Check for the Tiled build directory -if not defined TILED_BUILD_DIR ( - call :get_path "the Tiled build" TILED_BUILD_DIR -) - -call :check_path "!QTDIR!" qmake.exe Qt QMAKE -if not defined QMAKE ( - echo Failed to detect Qt - goto get_qt_path -) - -:check_arch -if not defined ARCH ( - set /P ARCH="Please either enter Architecture (32 or 64) or press enter for default (32)": - if not defined ARCH ( - set ARCH=32 - echo Set to default: 32 - ) -) - -if not defined VERSION ( - if exist ..\..\build\VERSION_FILE ( - echo "file exists" - set /P VERSION=<..\..\VERSION_FILE - ) - - if not defined VERSION ( - :get_version_number - set /P VERSION=Please enter the version number to be used: - if not defined VERSION ( - echo You didn't enter a valid version number - goto get_version_number - ) - ) -) - -:: Starting the compilation process -echo "BUILDING INSTALLER" -makensis.exe tiled.nsi - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function section starts below here -::-------------------------------------------------------- -:get_path -setlocal -set /P EXE_PATH=Please enter path to %~1: -if not exist "%EXE_PATH%" ( - echo The directory you entered does not exist! - goto get_path -) else ( - endlocal - set "%~2=%EXE_PATH%" -) -goto:eof - -:check_path -if exist %~1\bin\%~2 ( - echo Successfully detected %~3! - set "%~4=%~2" -) else ( set "%~4=" ) -goto:eof diff --git a/dist/win/dist.qbs b/dist/win/dist.qbs index 2caa3f5065..bd6a065d81 100644 --- a/dist/win/dist.qbs +++ b/dist/win/dist.qbs @@ -3,7 +3,7 @@ import qbs.FileInfo NSISSetup { builtByDefault: false - condition: qbs.toolchain.contains("mingw") + condition: qbs.toolchain.contains("mingw") || qbs.toolchain.contains("msvc") Depends { productTypes: ["application", "dynamiclibrary"] } type: base.concat(["installable"]) @@ -29,7 +29,10 @@ NSISSetup { "BUILD_DIR=" + qbs.installRoot ] - files: [ - "*" - ] + files: { + if (qbs.toolchain.contains("mingw")) + return ["tiled-mingw.nsi"] + else + return ["tiled-vs2013.nsi"] + } } diff --git a/dist/win/tiled.nsi b/dist/win/tiled-mingw.nsi similarity index 100% rename from dist/win/tiled.nsi rename to dist/win/tiled-mingw.nsi diff --git a/dist/win/tiled-vs2013.nsi b/dist/win/tiled-vs2013.nsi new file mode 100644 index 0000000000..84356c7b65 --- /dev/null +++ b/dist/win/tiled-vs2013.nsi @@ -0,0 +1,318 @@ +; NSIS installer script for Tiled +; --------------- Headers -------------- +!include "MUI2.nsh" +!include "FileAssociation.nsh" + +; --------------- General -------------- +CRCCheck force +XPStyle on +SetCompressor /FINAL /SOLID lzma + +!ifndef QT_DIR +!define QT_DIR $%QTDIR% ; Qt Installation directory +!endif + +!ifndef V +!define V $%VERSION% ; Program version +!endif + +!ifndef ARCH +!define ARCH $%ARCH% ; Architecture 32 or 64 +!endif + +!define P "Tiled" ; Program name +!define P_NORM "tiled" ; Program name (normalized) + +!ifndef ROOT_DIR +!define ROOT_DIR "..\.." ; Program root directory +!endif + +!ifndef BUILD_DIR +!define BUILD_DIR $%TILED_BUILD_DIR% ; Build dir +!endif + +!define ADD_REMOVE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tiled" +!define PRODUCT_REG_KEY "Tiled Map Editor" + +!if ARCH == 32 +!define SYSTEM_DIR "C:\windows\system32" +InstallDir "$PROGRAMFILES\${P}" ; Default 32-bit installation directory +!else +!define SYSTEM_DIR "C:\windows\SysWOW64" +InstallDir "$PROGRAMFILES64\${P}" ; Default 64-bit installation directory +!endif + +Name "${P}" ; Name displayed on installer +OutFile "${P_NORM}-${V}-win${ARCH}-setup.exe" ; Resulting installer filename +BrandingText /TRIMLEFT "${P_NORM}-${V}" +RequestExecutionLevel admin + +; ----------- Icon and Bitmap --------- +;!define MUI_ICON install.ico ; TODO: find suitable icon +;!define MUI_UNICON uninstall.ico ; TODO: find suitable icon +!define MUI_HEADERIMAGE + !define MUI_HEADERIMAGE_BITMAP headerimage.bmp + !define MUI_HEADERIMAGE_UNBITMAP headerimage.bmp +!define MUI_HEADER_TRANSPARENT_TEXT + +; ------------------------------------- +!define MUI_ABORTWARNING + +;------------- Language Selection Dialog Settings -------------- +!define MUI_LANGDLL_REGISTRY_ROOT "HKCU" +!define MUI_LANGDLL_REGISTRY_KEY "Software\${P}\${V}" +!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + +;-------------- Install Pages ------------- +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE ${ROOT_DIR}\dist\win\gpl-2.0.rtf +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + ; These indented statements modify settings for MUI_PAGE_FINISH + !define MUI_FINISHPAGE_NOAUTOCLOSE + !define MUI_FINISHPAGE_RUN "$INSTDIR\${P_NORM}.exe" + !define MUI_FINISHPAGE_RUN_CHECKED + !define MUI_FINISHPAGE_RUN_TEXT "Launch ${P}" + !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED + !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" +!insertmacro MUI_PAGE_FINISH + +;-------------- Uninstall Pages ------------- +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + ; These indented statements modify settings for MUI_UNPAGE_FINISH + !define MUI_UNFINISHPAGE_NOAUTOCLOSE +!insertmacro MUI_UNPAGE_FINISH + +;--------------- Languages --------------- +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "French" +!insertmacro MUI_LANGUAGE "German" +!insertmacro MUI_LANGUAGE "Spanish" +!insertmacro MUI_LANGUAGE "SpanishInternational" +!insertmacro MUI_LANGUAGE "SimpChinese" +!insertmacro MUI_LANGUAGE "TradChinese" +!insertmacro MUI_LANGUAGE "Japanese" +!insertmacro MUI_LANGUAGE "Korean" +!insertmacro MUI_LANGUAGE "Italian" +!insertmacro MUI_LANGUAGE "Dutch" +!insertmacro MUI_LANGUAGE "Danish" +!insertmacro MUI_LANGUAGE "Swedish" +!insertmacro MUI_LANGUAGE "Norwegian" +!insertmacro MUI_LANGUAGE "NorwegianNynorsk" +!insertmacro MUI_LANGUAGE "Finnish" +!insertmacro MUI_LANGUAGE "Greek" +!insertmacro MUI_LANGUAGE "Russian" +!insertmacro MUI_LANGUAGE "Portuguese" +!insertmacro MUI_LANGUAGE "PortugueseBR" +!insertmacro MUI_LANGUAGE "Polish" +!insertmacro MUI_LANGUAGE "Ukrainian" +!insertmacro MUI_LANGUAGE "Czech" +!insertmacro MUI_LANGUAGE "Slovak" +!insertmacro MUI_LANGUAGE "Croatian" +!insertmacro MUI_LANGUAGE "Bulgarian" +!insertmacro MUI_LANGUAGE "Hungarian" +!insertmacro MUI_LANGUAGE "Thai" +!insertmacro MUI_LANGUAGE "Romanian" +!insertmacro MUI_LANGUAGE "Latvian" +!insertmacro MUI_LANGUAGE "Macedonian" +!insertmacro MUI_LANGUAGE "Estonian" +!insertmacro MUI_LANGUAGE "Turkish" +!insertmacro MUI_LANGUAGE "Lithuanian" +!insertmacro MUI_LANGUAGE "Slovenian" +!insertmacro MUI_LANGUAGE "Serbian" +!insertmacro MUI_LANGUAGE "SerbianLatin" +!insertmacro MUI_LANGUAGE "Arabic" +!insertmacro MUI_LANGUAGE "Farsi" +!insertmacro MUI_LANGUAGE "Hebrew" +!insertmacro MUI_LANGUAGE "Indonesian" +!insertmacro MUI_LANGUAGE "Mongolian" +!insertmacro MUI_LANGUAGE "Luxembourgish" +!insertmacro MUI_LANGUAGE "Albanian" +!insertmacro MUI_LANGUAGE "Breton" +!insertmacro MUI_LANGUAGE "Belarusian" +!insertmacro MUI_LANGUAGE "Icelandic" +!insertmacro MUI_LANGUAGE "Malay" +!insertmacro MUI_LANGUAGE "Bosnian" +!insertmacro MUI_LANGUAGE "Kurdish" +!insertmacro MUI_LANGUAGE "Irish" +!insertmacro MUI_LANGUAGE "Uzbek" +!insertmacro MUI_LANGUAGE "Galician" +!insertmacro MUI_LANGUAGE "Afrikaans" +!insertmacro MUI_LANGUAGE "Catalan" +!insertmacro MUI_LANGUAGE "Esperanto" + +; ------------- Reserve Files --------------------- +!insertmacro MUI_RESERVEFILE_LANGDLL + +; ------------- Installer Functions --------------- +Function .onInit + !insertmacro MUI_LANGDLL_DISPLAY +FunctionEnd + +Function checkAlreadyInstalled + ; check for already installed instance + ClearErrors + ReadRegStr $R0 HKLM "SOFTWARE\${PRODUCT_REG_KEY}" "Version" + StrCmp $R0 "" 0 +2 + Return + MessageBox MB_YESNO|MB_ICONQUESTION "${P} version $R0 seems \ + to be installed on your system.$\nWould you like to \ + uninstall that version first?" IDYES UnInstall + Return + UnInstall: + ClearErrors + ReadRegStr $R0 HKLM "${ADD_REMOVE}" "UninstallString" + DetailPrint "Uninstalling previously installed version" + ExecWait '$R0 _?=$INSTDIR' + IfErrors OnError 0 + Return + OnError: + MessageBox MB_OK|MB_ICONSTOP "Error while uninstalling \ + previously installed version. Please uninstall it manually \ + and start the installer again." + Quit +FunctionEnd + +;-------------- Uninstaller Functions ------------- +Function un.onInit + !insertmacro MUI_UNGETLANGUAGE +FunctionEnd + +;-------------- Installer ------------------------- +Section "" ; No components page, name is not important +Call checkAlreadyInstalled + +SetOutPath $INSTDIR ; Set output path to the installation directory. +WriteUninstaller $INSTDIR\uninstall.exe ; Location of the uninstaller + +File /oname=COPYING.txt ${ROOT_DIR}\COPYING +File /oname=AUTHORS.txt ${ROOT_DIR}\AUTHORS +File /oname=README.txt ${ROOT_DIR}\README.md +File /oname=NEWS.txt ${ROOT_DIR}\NEWS +File /oname=LICENSE.APACHE.txt ${ROOT_DIR}\LICENSE.APACHE +File /oname=LICENSE.BSD.txt ${ROOT_DIR}\LICENSE.BSD +File /oname=LICENSE.GPL.txt ${ROOT_DIR}\LICENSE.GPL +File ${BUILD_DIR}\${P_NORM}.dll +File ${BUILD_DIR}\${P_NORM}.exe +File ${BUILD_DIR}\tmxviewer.exe +File ${BUILD_DIR}\tmxrasterizer.exe +File ${BUILD_DIR}\automappingconverter.exe +File ${QT_DIR}\bin\Qt5Core.dll +File ${QT_DIR}\bin\Qt5Gui.dll +File ${QT_DIR}\bin\Qt5Widgets.dll +File ${QT_DIR}\bin\Qt5OpenGL.dll +File ${QT_DIR}\bin\icuin54.dll +File ${QT_DIR}\bin\icuuc54.dll +File ${QT_DIR}\bin\icudt54.dll +File ${SYSTEM_DIR}\MSVCP120.DLL +File ${SYSTEM_DIR}\MSVCR120.DLL +File ${ROOT_DIR}\src\tiled\images\tiled-icon.ico +File ${ROOT_DIR}\dist\win\qt.conf + +SetOutPath $INSTDIR\plugins\platforms +File ${QT_DIR}\plugins\platforms\qwindows.dll + +SetOutPath $INSTDIR\plugins\imageformats +File ${QT_DIR}\plugins\imageformats\qgif.dll +File ${QT_DIR}\plugins\imageformats\qjpeg.dll +File ${QT_DIR}\plugins\imageformats\qtiff.dll + +SetOutPath $INSTDIR\plugins\tiled +File /r ${BUILD_DIR}\plugins\tiled\*.dll + +SetOutPath $INSTDIR\translations +File ${BUILD_DIR}\translations\*.qm +File ${QT_DIR}\translations\qt_cs.qm +File ${QT_DIR}\translations\qt_de.qm +File ${QT_DIR}\translations\qt_es.qm +File ${QT_DIR}\translations\qt_fr.qm +File ${QT_DIR}\translations\qt_he.qm +File ${QT_DIR}\translations\qt_ja.qm +File ${QT_DIR}\translations\qt_pt.qm +File ${QT_DIR}\translations\qt_ru.qm +File ${QT_DIR}\translations\qt_zh_CN.qm +File ${QT_DIR}\translations\qt_zh_TW.qm + +SetOutPath $INSTDIR\examples +File /r ${ROOT_DIR}\examples\*.* + +SetOutPath $INSTDIR\docs +File /r ${ROOT_DIR}\docs\map.* + +SetOutPath $INSTDIR\util +File /r /x .gitignore /x README /x README.txt ${ROOT_DIR}\util\*.* + +; Shortcuts +CreateDirectory "$SMPROGRAMS\${P}" +CreateShortCut "$SMPROGRAMS\${P}\${P}.lnk" "$INSTDIR\${P_NORM}.exe" +CreateShortCut "$SMPROGRAMS\${P}\uninstall.lnk" "$INSTDIR\uninstall.exe" + +; File associations +${RegisterExtension} "$INSTDIR\${P_NORM}.exe" ".tmx" "Tiled.tmx" + +; Add version number to Registry +WriteRegStr HKLM "Software\${PRODUCT_REG_KEY}" "Version" "${V}" + +; Add uninstall information to "Add/Remove Programs" +WriteRegStr HKLM ${ADD_REMOVE} "DisplayName" "Tiled - Tiled Map Editor" +WriteRegStr HKLM ${ADD_REMOVE} "DisplayIcon" "$INSTDIR\${P_NORM}-icon.ico" +WriteRegStr HKLM ${ADD_REMOVE} "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" +WriteRegStr HKLM ${ADD_REMOVE} "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" +WriteRegStr HKLM ${ADD_REMOVE} "Version" "${V}" +SectionEnd +;------------ Uninstaller ------------- +Section "uninstall" +Delete $INSTDIR\COPYING.txt +Delete $INSTDIR\AUTHORS.txt +Delete $INSTDIR\README.txt +Delete $INSTDIR\NEWS.txt +Delete $INSTDIR\LICENSE.APACHE.txt +Delete $INSTDIR\LICENSE.BSD.txt +Delete $INSTDIR\LICENSE.GPL.txt +Delete $INSTDIR\tiled.dll +Delete $INSTDIR\tiled.exe +Delete $INSTDIR\tmxviewer.exe +Delete $INSTDIR\tmxrasterizer.exe +Delete $INSTDIR\automappingconverter.exe +Delete $INSTDIR\Qt5Core.dll +Delete $INSTDIR\Qt5Gui.dll +Delete $INSTDIR\Qt5Widgets.dll +Delete $INSTDIR\Qt5OpenGL.dll +Delete $INSTDIR\libEGL.dll +Delete $INSTDIR\libGLESv2.dll +Delete $INSTDIR\icuin54.dll +Delete $INSTDIR\icuuc54.dll +Delete $INSTDIR\icudt54.dll +Delete $INSTDIR\MSVCP120.DLL +Delete $INSTDIR\MSVCR120.DLL +Delete $INSTDIR\tiled-icon.ico +Delete $INSTDIR\qt.conf +Delete $INSTDIR\uninstall.exe + +RMDir /r $INSTDIR\plugins\platforms +RMDir /r $INSTDIR\plugins\imageformats +RMDir /r $INSTDIR\plugins\tiled +RMDir $INSTDIR\plugins +RMDir /r $INSTDIR\translations +RMDir /r $INSTDIR\examples +RMDir /r $INSTDIR\docs +RMDir /r $INSTDIR\util + +RMDir $INSTDIR + +; Removing shortcuts +Delete "$SMPROGRAMS\${P}\${P}.lnk" +Delete "$SMPROGRAMS\${P}\uninstall.lnk" +RMDir "$SMPROGRAMS\${P}" + +; Removing file associations +${UnRegisterExtension} ".tmx" "Tiled.tmx" + +; Remove Procut Registry Entries +DeleteRegKey HKLM "Software\${PRODUCT_REG_KEY}" + +; Remove entry from "Add/Remove Programs" +DeleteRegKey HKLM ${ADD_REMOVE} +SectionEnd