mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-09-17 19:47:58 -05:00
modifying all the files to match the app
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
# SPDX-FileCopyrightText: 2017 Citra Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
add_executable(yuzu-room
|
||||
add_executable(suyu-room
|
||||
precompiled_headers.h
|
||||
yuzu_room.cpp
|
||||
yuzu_room.rc
|
||||
suyu_room.cpp
|
||||
suyu_room.rc
|
||||
)
|
||||
|
||||
target_link_libraries(yuzu-room PRIVATE common network)
|
||||
target_link_libraries(suyu-room PRIVATE common network)
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
target_compile_definitions(yuzu-room PRIVATE -DENABLE_WEB_SERVICE)
|
||||
target_link_libraries(yuzu-room PRIVATE web_service)
|
||||
target_compile_definitions(suyu-room PRIVATE -DENABLE_WEB_SERVICE)
|
||||
target_link_libraries(suyu-room PRIVATE web_service)
|
||||
endif()
|
||||
|
||||
target_link_libraries(yuzu-room PRIVATE mbedtls mbedcrypto)
|
||||
target_link_libraries(suyu-room PRIVATE mbedtls mbedcrypto)
|
||||
if (MSVC)
|
||||
target_link_libraries(yuzu-room PRIVATE getopt)
|
||||
target_link_libraries(suyu-room PRIVATE getopt)
|
||||
endif()
|
||||
target_link_libraries(yuzu-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
target_link_libraries(suyu-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(TARGETS yuzu-room)
|
||||
install(TARGETS suyu-room)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(yuzu-room PRIVATE precompiled_headers.h)
|
||||
if (suyu_USE_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(suyu-room PRIVATE precompiled_headers.h)
|
||||
endif()
|
||||
|
||||
create_target_directory_groups(yuzu-room)
|
||||
create_target_directory_groups(suyu-room)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2022 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
@@ -57,22 +57,22 @@ static void PrintHelp(const char* argv0) {
|
||||
"--preferred-game-id The preferred game-id for this room\n"
|
||||
"--username The username used for announce\n"
|
||||
"--token The token used for announce\n"
|
||||
"--web-api-url yuzu Web API url\n"
|
||||
"--web-api-url suyu Web API url\n"
|
||||
"--ban-list-file The file for storing the room ban list\n"
|
||||
"--log-file The file for storing the room log\n"
|
||||
"--enable-yuzu-mods Allow yuzu Community Moderators to moderate on your room\n"
|
||||
"--enable-suyu-mods Allow suyu Community Moderators to moderate on your room\n"
|
||||
"-h, --help Display this help and exit\n"
|
||||
"-v, --version Output version information and exit\n",
|
||||
argv0);
|
||||
}
|
||||
|
||||
static void PrintVersion() {
|
||||
LOG_INFO(Network, "yuzu dedicated room {} {} Libnetwork: {}", Common::g_scm_branch,
|
||||
LOG_INFO(Network, "suyu dedicated room {} {} Libnetwork: {}", Common::g_scm_branch,
|
||||
Common::g_scm_desc, Network::network_version);
|
||||
}
|
||||
|
||||
/// The magic text at the beginning of a yuzu-room ban list file.
|
||||
static constexpr char BanListMagic[] = "YuzuRoom-BanList-1";
|
||||
/// The magic text at the beginning of a suyu-room ban list file.
|
||||
static constexpr char BanListMagic[] = "suyuRoom-BanList-1";
|
||||
|
||||
static constexpr char token_delimiter{':'};
|
||||
|
||||
@@ -195,12 +195,12 @@ int main(int argc, char** argv) {
|
||||
std::string token;
|
||||
std::string web_api_url;
|
||||
std::string ban_list_file;
|
||||
std::string log_file = "yuzu-room.log";
|
||||
std::string log_file = "suyu-room.log";
|
||||
std::string bind_address;
|
||||
u64 preferred_game_id = 0;
|
||||
u32 port = Network::DefaultRoomPort;
|
||||
u32 max_members = 16;
|
||||
bool enable_yuzu_mods = false;
|
||||
bool enable_suyu_mods = false;
|
||||
|
||||
static struct option long_options[] = {
|
||||
{"room-name", required_argument, 0, 'n'},
|
||||
@@ -216,7 +216,7 @@ int main(int argc, char** argv) {
|
||||
{"web-api-url", required_argument, 0, 'a'},
|
||||
{"ban-list-file", required_argument, 0, 'b'},
|
||||
{"log-file", required_argument, 0, 'l'},
|
||||
{"enable-yuzu-mods", no_argument, 0, 'e'},
|
||||
{"enable-suyu-mods", no_argument, 0, 'e'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'v'},
|
||||
{0, 0, 0, 0},
|
||||
@@ -269,7 +269,7 @@ int main(int argc, char** argv) {
|
||||
log_file.assign(optarg);
|
||||
break;
|
||||
case 'e':
|
||||
enable_yuzu_mods = true;
|
||||
enable_suyu_mods = true;
|
||||
break;
|
||||
case 'h':
|
||||
PrintHelp(argv[0]);
|
||||
@@ -328,19 +328,19 @@ int main(int argc, char** argv) {
|
||||
LOG_INFO(Network, "Hosting a public room");
|
||||
Settings::values.web_api_url = web_api_url;
|
||||
PadToken(token);
|
||||
Settings::values.yuzu_username = UsernameFromDisplayToken(token);
|
||||
username = Settings::values.yuzu_username.GetValue();
|
||||
Settings::values.yuzu_token = TokenFromDisplayToken(token);
|
||||
Settings::values.suyu_username = UsernameFromDisplayToken(token);
|
||||
username = Settings::values.suyu_username.GetValue();
|
||||
Settings::values.suyu_token = TokenFromDisplayToken(token);
|
||||
} else {
|
||||
LOG_INFO(Network, "Hosting a public room");
|
||||
Settings::values.web_api_url = web_api_url;
|
||||
Settings::values.yuzu_username = username;
|
||||
Settings::values.yuzu_token = token;
|
||||
Settings::values.suyu_username = username;
|
||||
Settings::values.suyu_token = token;
|
||||
}
|
||||
}
|
||||
if (!announce && enable_yuzu_mods) {
|
||||
enable_yuzu_mods = false;
|
||||
LOG_INFO(Network, "Can not enable yuzu Moderators for private rooms");
|
||||
if (!announce && enable_suyu_mods) {
|
||||
enable_suyu_mods = false;
|
||||
LOG_INFO(Network, "Can not enable suyu Moderators for private rooms");
|
||||
}
|
||||
|
||||
// Load the ban list
|
||||
@@ -356,7 +356,7 @@ int main(int argc, char** argv) {
|
||||
std::make_unique<WebService::VerifyUserJWT>(Settings::values.web_api_url.GetValue());
|
||||
#else
|
||||
LOG_INFO(Network,
|
||||
"yuzu Web Services is not available with this build: validation is disabled.");
|
||||
"suyu Web Services is not available with this build: validation is disabled.");
|
||||
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
|
||||
#endif
|
||||
} else {
|
||||
@@ -370,7 +370,7 @@ int main(int argc, char** argv) {
|
||||
.id = preferred_game_id};
|
||||
if (!room->Create(room_name, room_description, bind_address, static_cast<u16>(port),
|
||||
password, max_members, username, preferred_game_info,
|
||||
std::move(verify_backend), ban_list, enable_yuzu_mods)) {
|
||||
std::move(verify_backend), ban_list, enable_suyu_mods)) {
|
||||
LOG_INFO(Network, "Failed to create room: ");
|
||||
return -1;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
YUZU_ICON ICON "../../dist/yuzu.ico"
|
||||
suyu_ICON ICON "../../dist/suyu.ico"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,4 +17,4 @@ YUZU_ICON ICON "../../dist/yuzu.ico"
|
||||
// RT_MANIFEST
|
||||
//
|
||||
|
||||
0 RT_MANIFEST "../../dist/yuzu.manifest"
|
||||
0 RT_MANIFEST "../../dist/suyu.manifest"
|
||||
|
Reference in New Issue
Block a user