mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
Fix: Generate windows installer only for stable releases
This commit is contained in:
parent
f51e66f697
commit
3d76677594
@ -90,6 +90,8 @@ jobs:
|
|||||||
BuildArch: $(BuildArch)
|
BuildArch: $(BuildArch)
|
||||||
VcpkgTargetTriplet: $(VcpkgTargetTriplet)
|
VcpkgTargetTriplet: $(VcpkgTargetTriplet)
|
||||||
BuildConfiguration: 'RelWithDebInfo'
|
BuildConfiguration: 'RelWithDebInfo'
|
||||||
|
${{ if eq(parameters.IsStableRelease, true) }}:
|
||||||
|
OptionUseNSIS: "YES"
|
||||||
- task: VSBuild@1
|
- task: VSBuild@1
|
||||||
displayName: 'Create bundles'
|
displayName: 'Create bundles'
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -2,12 +2,13 @@ parameters:
|
|||||||
BuildArch: ''
|
BuildArch: ''
|
||||||
VcpkgTargetTriplet: ''
|
VcpkgTargetTriplet: ''
|
||||||
BuildConfiguration: ''
|
BuildConfiguration: ''
|
||||||
|
OptionUseNSIS: 'NO'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: 'Configure'
|
displayName: 'Configure'
|
||||||
inputs:
|
inputs:
|
||||||
cmakeArgs: '.. -G "Visual Studio 15 2017" -A ${{ parameters.BuildArch }} -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="${{ parameters.VcpkgTargetTriplet }}"'
|
cmakeArgs: '.. -G "Visual Studio 15 2017" -A ${{ parameters.BuildArch }} -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="${{ parameters.VcpkgTargetTriplet }}" -DOPTION_USE_NSIS="${{ parameters.OptionUseNSIS }}"'
|
||||||
- task: VSBuild@1
|
- task: VSBuild@1
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -86,8 +86,11 @@ if (APPLE)
|
|||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macosx")
|
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macosx")
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
set(CPACK_GENERATOR "ZIP;NSIS")
|
set(CPACK_GENERATOR "ZIP")
|
||||||
include(PackageNSIS)
|
if (OPTION_USE_NSIS)
|
||||||
|
list(APPEND CPACK_GENERATOR "NSIS")
|
||||||
|
include(PackageNSIS)
|
||||||
|
endif (OPTION_USE_NSIS)
|
||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
|
@ -50,6 +50,7 @@ function(set_options)
|
|||||||
option(OPTION_INSTALL_FHS "Install with Filesstem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
option(OPTION_INSTALL_FHS "Install with Filesstem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
||||||
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" YES)
|
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" YES)
|
||||||
option(OPTION_USE_THREADS "Use threads" YES)
|
option(OPTION_USE_THREADS "Use threads" YES)
|
||||||
|
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" NO)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Show the values of the generic options.
|
# Show the values of the generic options.
|
||||||
@ -61,6 +62,7 @@ function(show_options)
|
|||||||
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
||||||
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
||||||
message(STATUS "Option Use threads - ${OPTION_USE_THREADS}")
|
message(STATUS "Option Use threads - ${OPTION_USE_THREADS}")
|
||||||
|
message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Add the definitions for the options that are selected.
|
# Add the definitions for the options that are selected.
|
||||||
|
Loading…
Reference in New Issue
Block a user