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)
56
56
string (TIMESTAMP RTTR_VERSION "%Y%m%d" )
57
57
endif ()
58
58
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
+
59
66
if (checkSubmodules )
60
67
include (CheckGitSubmodules )
61
68
check_git_submodules ()
@@ -393,7 +400,7 @@ if(WIN32)
393
400
endif ()
394
401
395
402
# stable build?
396
- if (${RTTR_VERSION} MATCHES "([0-9]+)\. ([0-9]+)\. ([0-9]+)" )
403
+ if (${RTTR_VERSION} MATCHES "^ ([0-9]+)\\ .([0-9]+)\\ .([0-9]+)$ " )
397
404
set (CPACK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1} " )
398
405
set (CPACK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2} " )
399
406
set (CPACK_PACKAGE_VERSION_PATCH "${CMAKE_MATCH_3} " )
Original file line number Diff line number Diff line change 2
2
#
3
3
# SPDX-License-Identifier: GPL-2.0-or-later
4
4
5
+ include (ConfigureExecutable )
6
+
5
7
# Start script
6
8
if (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} " )
8
11
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 )
11
13
12
14
install (CODE "
13
15
set(ENV{CMAKE_INSTALL_PREFIX} \$ {CMAKE_INSTALL_PREFIX})
@@ -52,7 +54,8 @@ elseif(APPLE)
52
54
)
53
55
endif ()
54
56
elseif (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} " )
56
59
# copy miniupnpc
57
60
get_filename_component (MINIUPNPC_DIR ${MINIUPNPC_LIBRARY} DIRECTORY )
58
61
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
8
8
GOTO START
9
9
10
10
:UPDATE
11
- RTTR\s25update.exe --dir %CD%
11
+ RTTR\s 25update.exe --dir %CD% @STABLE_PARAM@
12
12
13
13
:START
14
14
s25client.exe
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if [ $noupdate -eq 0 ] ; then
41
41
echo " checking for an update ..."
42
42
cp $DIR /../libexec/s25rttr/s25update /tmp/s25update.$$
43
43
chmod 0755 /tmp/s25update.$$
44
- /tmp/s25update.$$ --verbose --dir " $DIR /../"
44
+ /tmp/s25update.$$ --verbose --dir " $DIR /../" @STABLE_PARAM@
45
45
if [ -z " $( diff -q /tmp/s25update.$$ $DIR /../libexec/s25rttr/s25update) " ] ; then
46
46
PARAM=noupdate
47
47
fi
You can’t perform that action at this time.
0 commit comments