build: rm CORE_BINARY_NAME define

This commit is contained in:
sithlord48 2024-10-28 22:16:05 -04:00 committed by Nick Bolton
parent 2213f3f746
commit 45a61310a4
6 changed files with 5 additions and 11 deletions

View file

@ -73,20 +73,14 @@ endmacro()
macro(configure_bin_names) macro(configure_bin_names)
set(CORE_BINARY_NAME
"deskflow-core"
CACHE STRING "Filename of the core binary")
set(DAEMON_BINARY_NAME set(DAEMON_BINARY_NAME
"deskflow-daemon" "deskflow-daemon"
CACHE STRING "Filename of the daemon binary") CACHE STRING "Filename of the daemon binary")
message(VERBOSE "Core binary: ${CORE_BINARY_NAME}")
message(VERBOSE "Daemon binary: ${DAEMON_BINARY_NAME}") message(VERBOSE "Daemon binary: ${DAEMON_BINARY_NAME}")
add_definitions(-DCORE_BINARY_NAME="${CORE_BINARY_NAME}")
add_definitions(-DDAEMON_BINARY_NAME="${DAEMON_BINARY_NAME}") add_definitions(-DDAEMON_BINARY_NAME="${DAEMON_BINARY_NAME}")
endmacro() endmacro()

View file

@ -24,6 +24,6 @@
<?define GuiBin="deskflow.exe"?> <?define GuiBin="deskflow.exe"?>
<?define ServerBin="deskflow-server.exe"?> <?define ServerBin="deskflow-server.exe"?>
<?define ClientBin="deskflow-client.exe"?> <?define ClientBin="deskflow-client.exe"?>
<?define CoreBin="@CORE_BINARY_NAME@.exe"?> <?define CoreBin="deskflow-core.exe"?>
<?define DaemonBin="@DAEMON_BINARY_NAME@.exe"?> <?define DaemonBin="@DAEMON_BINARY_NAME@.exe"?>
</Include> </Include>

View file

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(target ${CORE_BINARY_NAME}) set(target deskflow-core)
add_executable(${target} "${target}.cpp") add_executable(${target} "${target}.cpp")
if(WIN32) if(WIN32)

View file

@ -31,7 +31,7 @@ void showHelp()
std::cout << "Usage: " CORE_BINARY_NAME " <server | client> [...options]" << std::endl; std::cout << "Usage: " CORE_BINARY_NAME " <server | client> [...options]" << std::endl;
std::cout << "server - start as a server ( deskflow-server)" << std::endl; std::cout << "server - start as a server ( deskflow-server)" << std::endl;
std::cout << "client - start as a client ( deslflow-client)" << 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; std::cout << "use deskflow-core <server|client> --help for more information." << std::endl;
} }
bool isServer(int argc, char **argv) bool isServer(int argc, char **argv)

View file

@ -79,7 +79,7 @@ bool isServerCommandLine(const std::vector<String> &cmd)
if (cmd.size() > 1) { if (cmd.size() > 1) {
isServer = (cmd[0].find("deskflow-server") != String::npos) || isServer = (cmd[0].find("deskflow-server") != String::npos) ||
(cmd[0].find(CORE_BINARY_NAME) != String::npos && cmd[1] == "server"); (cmd[0].find("deskflow-core") != String::npos && cmd[1] == "server");
} }
return isServer; return isServer;

View file

@ -572,7 +572,7 @@ void MSWindowsWatchdog::shutdownExistingProcesses()
if (_stricmp(entry.szExeFile, "deskflow-client.exe") == 0 || if (_stricmp(entry.szExeFile, "deskflow-client.exe") == 0 ||
_stricmp(entry.szExeFile, "deskflow-server.exe") == 0 || _stricmp(entry.szExeFile, "deskflow-server.exe") == 0 ||
_stricmp(entry.szExeFile, CORE_BINARY_NAME ".exe") == 0) { _stricmp(entry.szExeFile, "deskflow-core.exe") == 0) {
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID); HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID);
shutdownProcess(handle, entry.th32ProcessID, 10); shutdownProcess(handle, entry.th32ProcessID, 10);