File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,13 @@ if(NOT RTTR_VERSION)
5656 string (TIMESTAMP RTTR_VERSION "%Y%m%d" )
5757endif ()
5858
59+ # stable build? then set rttr.bat/rttr.sh parameter
60+ set (STABLE_PARAM)
61+ if (${RTTR_VERSION} MATCHES "^([0-9]+)\\ .([0-9]+)\\ .([0-9]+)$" )
62+ message (STATUS "Creating a stable version ${RTTR_VERSION} " )
63+ set (STABLE_PARAM "--stable" )
64+ endif ()
65+
5966if (checkSubmodules)
6067 include (CheckGitSubmodules)
6168 check_git_submodules()
@@ -393,7 +400,7 @@ if(WIN32)
393400endif ()
394401
395402# stable build?
396- if (${RTTR_VERSION} MATCHES "([0-9]+)\. ([0-9]+)\. ([0-9]+)" )
403+ if (${RTTR_VERSION} MATCHES "^ ([0-9]+)\\ .([0-9]+)\\ .([0-9]+)$ " )
397404 set (CPACK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1} " )
398405 set (CPACK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2} " )
399406 set (CPACK_PACKAGE_VERSION_PATCH "${CMAKE_MATCH_3} " )
Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: GPL-2.0-or-later
44
5+ include (ConfigureExecutable)
6+
57# Start script
68if (WIN32 )
7- install (PROGRAMS "bin/rttr.bat" DESTINATION "${RTTR_BINDIR} " )
9+ configure_executable("bin/rttr.bat.cmake" ${CMAKE_CURRENT_BINARY_DIR} rttr.bat)
10+ install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR} /rttr.bat" DESTINATION "${RTTR_BINDIR} " )
811 if (PLATFORM_ARCH)
9- include (ConfigureExecutable)
10- configure_executable("bundleWinFiles.sh.cmake" . bundleWinFiles.sh)
12+ configure_executable("bundleWinFiles.sh.cmake" ${CMAKE_CURRENT_BINARY_DIR} bundleWinFiles.sh)
1113
1214 install (CODE "
1315 set(ENV{CMAKE_INSTALL_PREFIX} \$ {CMAKE_INSTALL_PREFIX})
@@ -52,7 +54,8 @@ elseif(APPLE)
5254 )
5355 endif ()
5456elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CYGWIN )
55- install (PROGRAMS "bin/rttr.sh" DESTINATION "${RTTR_BINDIR} " )
57+ configure_executable("bin/rttr.sh.cmake" ${CMAKE_CURRENT_BINARY_DIR} rttr.sh)
58+ install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR} /rttr.sh" DESTINATION "${RTTR_BINDIR} " )
5659 # copy miniupnpc
5760 get_filename_component (MINIUPNPC_DIR ${MINIUPNPC_LIBRARY} DIRECTORY )
5861 find_library (MINIUPNPC_BIN NAMES miniupnpc.so libminiupnpc.so HINTS ${MINIUPNPC_DIR} )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ IF EXIST RTTR\s25update.exe GOTO UPDATE
88GOTO START
99
1010:UPDATE
11- RTTR\s25update.exe --dir %CD%
11+ RTTR\s25update.exe --dir %CD% @STABLE_PARAM@
1212
1313:START
1414s25client.exe
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if [ $noupdate -eq 0 ] ; then
4141 echo " checking for an update ..."
4242 cp $DIR /../libexec/s25rttr/s25update /tmp/s25update.$$
4343 chmod 0755 /tmp/s25update.$$
44- /tmp/s25update.$$ --verbose --dir " $DIR /../"
44+ /tmp/s25update.$$ --verbose --dir " $DIR /../" @STABLE_PARAM@
4545 if [ -z " $( diff -q /tmp/s25update.$$ $DIR /../libexec/s25rttr/s25update) " ] ; then
4646 PARAM=noupdate
4747 fi
You can’t perform that action at this time.
0 commit comments