build:rm CLIENT_BINARY_NAME define

This commit is contained in:
sithlord48
2024-10-28 21:53:38 -04:00
committed by Nick Bolton
parent e52ce58541
commit 2213f3f746
9 changed files with 16 additions and 21 deletions

View File

@ -96,7 +96,7 @@ macro(post_config_all)
add_dependencies(
run_post_build
deskflow
${CLIENT_BINARY_NAME}
deskflow-client
deskflow-server
${DAEMON_BINARY_NAME})
endif()

View File

@ -73,10 +73,6 @@ endmacro()
macro(configure_bin_names)
set(CLIENT_BINARY_NAME
"deskflow-client"
CACHE STRING "Filename of the client binary")
set(CORE_BINARY_NAME
"deskflow-core"
CACHE STRING "Filename of the core binary")
@ -86,12 +82,10 @@ macro(configure_bin_names)
CACHE STRING "Filename of the daemon binary")
message(VERBOSE "Client binary: ${CLIENT_BINARY_NAME}")
message(VERBOSE "Core binary: ${CORE_BINARY_NAME}")
message(VERBOSE "Daemon binary: ${DAEMON_BINARY_NAME}")
add_definitions(-DCLIENT_BINARY_NAME="${CLIENT_BINARY_NAME}")
add_definitions(-DCORE_BINARY_NAME="${CORE_BINARY_NAME}")
add_definitions(-DDAEMON_BINARY_NAME="${DAEMON_BINARY_NAME}")

View File

@ -23,7 +23,7 @@
<?define OpenSslDllDir="@OPENSSL_ROOT_DIR@/bin"?>
<?define GuiBin="deskflow.exe"?>
<?define ServerBin="deskflow-server.exe"?>
<?define ClientBin="@CLIENT_BINARY_NAME@.exe"?>
<?define ClientBin="deskflow-client.exe"?>
<?define CoreBin="@CORE_BINARY_NAME@.exe"?>
<?define DaemonBin="@DAEMON_BINARY_NAME@.exe"?>
</Include>

View File

@ -30,7 +30,7 @@ void showHelp()
{
std::cout << "Usage: " CORE_BINARY_NAME " <server | client> [...options]" << std::endl;
std::cout << "server - start as a server ( deskflow-server)" << std::endl;
std::cout << "client - start as a client (" << CLIENT_BINARY_NAME << ")" << std::endl;
std::cout << "client - start as a client ( deslflow-client)" << std::endl;
std::cout << "use " CORE_BINARY_NAME " <server|client> --help for more information." << std::endl;
}

View File

@ -15,14 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(client_source_name "deskflowc")
set(target ${CLIENT_BINARY_NAME})
set(target deskflow-client)
if(WIN32)
set(PLATFORM_SOURCES
${client_source_name}.exe.manifest
${client_source_name}.ico
${client_source_name}.rc
deskflowc.exe.manifest
deskflowc.ico
deskflowc.rc
MSWindowsClientTaskBarReceiver.cpp
MSWindowsClientTaskBarReceiver.h
resource.h
@ -44,7 +43,7 @@ elseif(UNIX)
)
endif()
add_executable(${target} ${PLATFORM_SOURCES} "${client_source_name}.cpp")
add_executable(${target} ${PLATFORM_SOURCES} deskflowc.cpp)
target_link_libraries(
${target}

View File

@ -168,7 +168,7 @@ const char *ClientApp::daemonName() const
#if SYSAPI_WIN32
return "Deskflow Client";
#elif SYSAPI_UNIX
return CLIENT_BINARY_NAME;
return "deskflow-client";
#endif
}

View File

@ -35,10 +35,8 @@ const int kWizardVersion = 8;
static const char *const kLogLevelNames[] = {"INFO", "DEBUG", "DEBUG1", "DEBUG2"};
#if defined(Q_OS_WIN)
const char AppConfig::m_CoreClientName[] = CLIENT_BINARY_NAME ".exe";
const char AppConfig::m_LogDir[] = "log/";
#else
const char AppConfig::m_CoreClientName[] = CLIENT_BINARY_NAME;
const char AppConfig::m_LogDir[] = "/var/log/";
#endif
@ -476,7 +474,11 @@ QString AppConfig::coreServerName() const
QString AppConfig::coreClientName() const
{
return m_CoreClientName;
#ifdef Q_OS_WIN
return s_winExeTemplate.arg(s_CoreClientName);
#else
return s_CoreClientName;
#endif
}
ElevateMode AppConfig::elevateMode() const

View File

@ -294,7 +294,7 @@ private:
inline static const auto s_winExeTemplate = QStringLiteral("%1.exe");
#endif
inline static const auto s_CoreServerName = QStringLiteral("deskflow-server");
static const char m_CoreClientName[];
inline static const auto s_CoreClientName = QStringLiteral("deskflow-client");
static const char m_LogDir[];
/// @brief Contains the string values of the settings names that will be saved

View File

@ -570,7 +570,7 @@ void MSWindowsWatchdog::shutdownExistingProcesses()
// make sure we're not checking the system process
if (entry.th32ProcessID != 0) {
if (_stricmp(entry.szExeFile, CLIENT_BINARY_NAME ".exe") == 0 ||
if (_stricmp(entry.szExeFile, "deskflow-client.exe") == 0 ||
_stricmp(entry.szExeFile, "deskflow-server.exe") == 0 ||
_stricmp(entry.szExeFile, CORE_BINARY_NAME ".exe") == 0) {