From 42b8125071605ef758424057fa31723d372b7fc6 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Mon, 28 Mar 2016 17:13:37 -0400 Subject: [PATCH] change binary names to make retail release --- CMakeLists.txt | 40 +++++++++++++++++++++------------------ src/launcher/launcher.cpp | 10 +++++----- src/network/stand_gui.cpp | 12 ++++++------ 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9bf16a..6adc19a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,6 +73,16 @@ else() add_definitions(/wd4996) # deprecated functions: fopen, fileno, ... endif() +set(BIN_SUFFIX "") + +if(NOT FS1) + set(BIN_SUFFIX "2") +endif() + +if(DEMO) + set(BIN_SUFFIX "${BIN_SUFFIX}demo") +endif() + # ############################################################################## @@ -111,19 +121,7 @@ CreateSourceGroups(${code_SOURCE} ${platform_SOURCE}) # the game itself # -if(FS1) - if(DEMO) - set(FS_BINARY freespace_demo) - else() - set(FS_BINARY freespace) - endif() -else() - if(DEMO) - set(FS_BINARY freespace2_demo) - else() - set(FS_BINARY freespace2) - endif() -endif() +set(FS_BINARY "fs${BIN_SUFFIX}") add_executable(${FS_BINARY} WIN32 @@ -143,15 +141,17 @@ target_link_libraries( ${PLATFORM_LIBRARIES} ) +if(FS1) + set_target_properties(${FS_BINARY} PROPERTIES PROJECT_LABEL "Freespace") +else() + set_target_properties(${FS_BINARY} PROPERTIES PROJECT_LABEL "Freespace2") +endif() + # # launcher # -if(FS1) - set(LAUNCHER_BINARY fslaunch) -else() - set(LAUNCHER_BINARY fs2launch) -endif() +set(LAUNCHER_BINARY "freespace${BIN_SUFFIX}") add_executable(${LAUNCHER_BINARY} WIN32 @@ -170,6 +170,8 @@ target_link_libraries( ${PLATFORM_LIBRARIES} ) +set_target_properties(${LAUNCHER_BINARY} PROPERTIES PROJECT_LABEL "Launcher") + # wxWidgets appears to need c++11 for one or more headers if(NOT WIN32) set_target_properties(${LAUNCHER_BINARY} PROPERTIES COMPILE_FLAGS -std=c++11) @@ -201,6 +203,8 @@ target_link_libraries( ${PLATFORM_LIBRARIES} ) +set_target_properties(${STANDALONE_BINARY} PROPERTIES PROJECT_LABEL "Standalone") + # wxWidgets appears to need c++11 for one or more headers if(NOT WIN32) set_target_properties(${STANDALONE_BINARY} PROPERTIES COMPILE_FLAGS -std=c++11) diff --git a/src/launcher/launcher.cpp b/src/launcher/launcher.cpp index 7a97c96..bbf6ede 100644 --- a/src/launcher/launcher.cpp +++ b/src/launcher/launcher.cpp @@ -325,14 +325,14 @@ void Launcher::OnPlay( wxCommandEvent& WXUNUSED(event) ) { wxString epath = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath(true); + epath.Append( wxT("fs") ); + #ifndef MAKE_FS1 - epath.Append( wxT("freespace2") ); -#else - epath.Append( wxT("freespace") ); + epath.Append( wxT("2") ); #endif -#ifdef FS2_DEMO - epath.Append( wxT("_demo") ); +#if defined(FS1_DEMO) || defined(FS2_DEMO) + epath.Append( wxT("demo") ); #endif #ifdef _WIN32 diff --git a/src/network/stand_gui.cpp b/src/network/stand_gui.cpp index 6d1cf03..b283c91 100644 --- a/src/network/stand_gui.cpp +++ b/src/network/stand_gui.cpp @@ -1102,14 +1102,14 @@ bool Standalone::startFreeSpace(int argc, wxCmdLineArgsArray &argv) wxString epath = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath(true); bool cmd_port = false; -#ifdef MAKE_FS1 - epath.Append( wxT("freespace") ); -#else - epath.Append( wxT("freespace2") ); + epath.Append( wxT("fs") ); + +#ifndef MAKE_FS1 + epath.Append( wxT("2") ); #endif -#ifdef FS2_DEMO - epath.Append( wxT("_demo") ); +#if defined(FS1_DEMO) || defined(FS2_DEMO) + epath.Append( wxT("demo") ); #endif #ifdef _WIN32 -- 2.39.2