mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-27 18:37:09 +01:00
A mod the merge could not use was left out silently. The game started without it, three minutes into a loading screen, and only ReSkate.log said which one. Merging before launch - PLAY runs the merge the game would have run behind its splash, on the launcher's worker, with the step and progress on the STATUS tile (Phase::merging). The launcher links dingosdk_mods for it, which costs about 600 KB of exe. - When every mod merges, the launch goes ahead and the game's own load_catalog finds the patch already built, so the splash is shorter rather than the work being done twice. - When mods were left out, the launch stops at Phase::mods_broken and a dialog names each one and its first problem, with three ways on: switch them off and play (which writes mods.json, so the next launch does not rediscover it the hard way), open the mod manager, or play anyway. - Mods built for another game version do not block. They already have their own notice and message box, and blocking on them would stop play after every Steam update. - The launcher resolves -dataPath out of the extra-arguments setting, so it merges against the root the game will read. One SDK identity for both binaries - Two places recorded "which ReSkate did this" as the module the code was running in, which is ReSkate.dll in the game and ReSkateLauncher.exe in the launcher now that both merge. merge_fingerprint hashes it, so the game matched no stamp the launcher wrote and merged everything a second time; sdk_identity keys the exclusions file, so each would have called the other's exclusions stale. - Both now name ReSkate.dll beside the running executable. Skate.exe and ReSkateLauncher.exe sit beside it and launch.cpp enforces that, so the two agree, and unlike the data root it does not move under -dataPath. The value is unchanged from what the runtime computed before, so nothing re-merges on upgrade. Naming the mod - In game, a mod left out of the merge altogether said nothing on screen: only a mod that merged partially did, which is the lesser failure. Both are named now. - The MOD MANAGER tile says which mod did not load, in the detail line's colour rather than a pill, clipped so a long name cannot run under the tile's artwork. - MY MODS carries a line naming them above the list, and NOT LOADED and OUTDATED are badges on the row instead of words at the front of its summary. MY MODS reaches Thunderstore parity - Rows carry the package's icon, the same one the store shows, through a shared mod_icon(); a mod that never came from Thunderstore keeps the placeholder. - An update is a button on the row, not a badge you had to open the mod to act on, and every row has Uninstall. Rows grew to fit, and "Remove" is "Uninstall" throughout. - No pill for a mod that is up to date: the absence of an update button says it, and eight green pills said nothing eight times. Fixes - The install panel was drawn on the Mods page's own draw list after its children, and ImGui renders a child after its parent, so it was painted behind the mod rows along with its Cancel button: installs ran with no sign of it. It is its own window over the page now. - pump_icons, which uploads decoded icons, only ran on the store page, so MY MODS showed placeholders until a visit to GET MODS uploaded them for it. The page does it for both lists. - The merge dialog's closing advice overlapped its buttons.
121 lines
8.5 KiB
CMake
121 lines
8.5 KiB
CMake
add_executable(dingosdk_launcher WIN32 Launcher/main.cpp Launcher/launch.cpp
|
|
Launcher/gui.cpp Launcher/gui_launcher.cpp Launcher/gui_renderer.cpp Launcher/gui_home.cpp
|
|
Launcher/gui_settings.cpp Launcher/gui_sign_in.cpp Launcher/gui_mods.cpp Launcher/gui_mods_browse.cpp
|
|
Launcher/updater.cpp Launcher/mod_manager.cpp Launcher/thunderstore.cpp Launcher/problem.h)
|
|
target_link_libraries(dingosdk_launcher PRIVATE dingosdk_logging dingosdk_content_cache_install dingosdk_world_layer_scan dingosdk_launcher_support dingosdk_initfs
|
|
dingosdk_mod_list dingosdk_mods dingosdk_json dingosdk_miniz dingosdk_imgui winhttp shell32 dwmapi windowscodecs ole32)
|
|
set_target_properties(dingosdk_launcher PROPERTIES OUTPUT_NAME "ReSkateLauncher")
|
|
dingosdk_version_info(dingosdk_launcher "ReSkate launcher" "ReSkateLauncher.exe" VFT_APP)
|
|
|
|
option(DINGOSDK_BUILD_LAUNCHER_TESTS "Build launcher mod manager regression tests" OFF)
|
|
if(DINGOSDK_BUILD_LAUNCHER_TESTS)
|
|
enable_testing()
|
|
add_executable(dingosdk_mod_manager_tests Launcher/Test/mod_manager_tests.cpp Launcher/mod_manager.cpp)
|
|
target_link_libraries(dingosdk_mod_manager_tests PRIVATE dingosdk_mod_list dingosdk_launcher_support dingosdk_miniz shell32)
|
|
add_test(NAME launcher_mod_manager COMMAND dingosdk_mod_manager_tests)
|
|
add_executable(dingosdk_thunderstore_tests Launcher/Test/thunderstore_tests.cpp Launcher/thunderstore.cpp)
|
|
target_link_libraries(dingosdk_thunderstore_tests PRIVATE dingosdk_json dingosdk_miniz)
|
|
target_include_directories(dingosdk_thunderstore_tests PRIVATE "${PROJECT_SOURCE_DIR}")
|
|
add_test(NAME launcher_thunderstore COMMAND dingosdk_thunderstore_tests)
|
|
add_executable(dingosdk_content_catalogs_tests Engine/Vfs/Test/content_catalogs_tests.cpp)
|
|
target_link_libraries(dingosdk_content_catalogs_tests PRIVATE dingosdk_content_cache)
|
|
add_test(NAME content_catalogs COMMAND dingosdk_content_catalogs_tests)
|
|
add_executable(dingosdk_content_cache_install_tests Engine/Vfs/Test/content_cache_install_tests.cpp)
|
|
target_link_libraries(dingosdk_content_cache_install_tests PRIVATE dingosdk_content_cache_install)
|
|
add_test(NAME content_cache_install COMMAND dingosdk_content_cache_install_tests)
|
|
add_executable(dingosdk_item_thumbnails_tests Engine/Vfs/Test/item_thumbnails_tests.cpp)
|
|
target_link_libraries(dingosdk_item_thumbnails_tests PRIVATE dingosdk_game_archives)
|
|
add_test(NAME item_thumbnails COMMAND dingosdk_item_thumbnails_tests "${DINGOSDK_TEST_GAME_ROOT}")
|
|
add_executable(dingosdk_world_layer_scan_tests Engine/Vfs/Test/world_layer_scan_tests.cpp)
|
|
target_link_libraries(dingosdk_world_layer_scan_tests PRIVATE dingosdk_world_layer_scan)
|
|
add_test(NAME world_layer_scan COMMAND dingosdk_world_layer_scan_tests "${DINGOSDK_TEST_GAME_ROOT}")
|
|
add_executable(dingosdk_mod_merge_grid_tests Engine/Vfs/Test/mod_merge_grid_tests.cpp)
|
|
target_link_libraries(dingosdk_mod_merge_grid_tests PRIVATE dingosdk_mods)
|
|
add_test(NAME mod_merge_grid COMMAND dingosdk_mod_merge_grid_tests "${DINGOSDK_TEST_GAME_ROOT}")
|
|
add_executable(dingosdk_mod_build_stamp_tests Engine/Vfs/Test/mod_build_stamp_tests.cpp)
|
|
target_link_libraries(dingosdk_mod_build_stamp_tests PRIVATE dingosdk_mods)
|
|
target_include_directories(dingosdk_mod_build_stamp_tests PRIVATE "${PROJECT_SOURCE_DIR}")
|
|
add_test(NAME mod_build_stamp COMMAND dingosdk_mod_build_stamp_tests)
|
|
add_executable(dingosdk_bundle_ref_table_tests Engine/Vfs/Test/bundle_ref_table_tests.cpp)
|
|
target_link_libraries(dingosdk_bundle_ref_table_tests PRIVATE dingosdk_mods)
|
|
add_test(NAME bundle_ref_table COMMAND dingosdk_bundle_ref_table_tests)
|
|
add_executable(dingosdk_mod_scoring_tests Engine/Vfs/Test/mod_scoring_tests.cpp)
|
|
target_link_libraries(dingosdk_mod_scoring_tests PRIVATE dingosdk_mods)
|
|
add_test(NAME mod_scoring COMMAND dingosdk_mod_scoring_tests "${DINGOSDK_TEST_GAME_ROOT}")
|
|
endif()
|
|
|
|
# Launcher fonts (OFL / Apache, licences beside them) and the background photo,
|
|
# embedded when present. A ReSkateLauncher.background.jpg beside the exe
|
|
# overrides the photo at runtime.
|
|
set(launcher_fonts "${PROJECT_SOURCE_DIR}/External/fonts")
|
|
set(launcher_resources
|
|
"FONT_HEADING RCDATA \"${launcher_fonts}/Montserrat-ExtraBold.ttf\"\n"
|
|
"FONT_BODY RCDATA \"${launcher_fonts}/Montserrat-SemiBold.ttf\"\n"
|
|
"FONT_BRUSH RCDATA \"${launcher_fonts}/PermanentMarker-Regular.ttf\"\n")
|
|
set(launcher_background "${PROJECT_SOURCE_DIR}/assets/launcher/background.jpg")
|
|
if(EXISTS "${launcher_background}")
|
|
list(APPEND launcher_resources "LAUNCHER_BACKGROUND RCDATA \"${launcher_background}\"\n")
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${launcher_background}")
|
|
endif()
|
|
# Tile icons: the skate tool on MODS, the wheel on SETTINGS.
|
|
foreach(tile_icon mods settings)
|
|
set(tile_icon_path "${PROJECT_SOURCE_DIR}/assets/launcher/icon_${tile_icon}.png")
|
|
if(EXISTS "${tile_icon_path}")
|
|
string(TOUPPER "${tile_icon}" tile_icon_name)
|
|
list(APPEND launcher_resources "LAUNCHER_ICON_${tile_icon_name} RCDATA \"${tile_icon_path}\"\n")
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${tile_icon_path}")
|
|
endif()
|
|
endforeach()
|
|
# Icon resource 1: the exe's icon in Explorer and the window's icon.
|
|
set(launcher_icon "${PROJECT_SOURCE_DIR}/assets/launcher/icon.ico")
|
|
if(EXISTS "${launcher_icon}")
|
|
list(PREPEND launcher_resources "1 ICON \"${launcher_icon}\"\n")
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${launcher_icon}")
|
|
endif()
|
|
string(CONCAT launcher_resources ${launcher_resources})
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/generated/launcher_resources.rc" "${launcher_resources}")
|
|
target_sources(dingosdk_launcher PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated/launcher_resources.rc")
|
|
|
|
# Off for local builds so a deployed development DLL is never replaced by a release.
|
|
option(DINGOSDK_LAUNCHER_AUTO_UPDATE "Let the launcher replace itself and ReSkate.dll from the launcher config" OFF)
|
|
|
|
# Updates come from the public GitHub releases of DINGOSDK_RELEASE_REPO: the launcher and
|
|
# server read launcher.json (game depot/manifest and the pinned downloads) from the latest
|
|
# release. No credentials are built in. Build folders configured before releases moved
|
|
# still cache the old private repo, which no public build can read.
|
|
if(DINGOSDK_RELEASE_REPO STREQUAL "Dingo-Shenanigans/DingoSDK")
|
|
unset(DINGOSDK_RELEASE_REPO CACHE)
|
|
endif()
|
|
set(DINGOSDK_RELEASE_REPO "Dingo-Shenanigans/ReSkate" CACHE STRING "Public GitHub owner/repo whose releases update the launcher")
|
|
set(launcher_release_repo "${DINGOSDK_RELEASE_REPO}")
|
|
if(NOT launcher_release_repo MATCHES "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$")
|
|
message(FATAL_ERROR "DINGOSDK_RELEASE_REPO must be owner/repo")
|
|
endif()
|
|
if(DINGOSDK_LAUNCHER_AUTO_UPDATE)
|
|
set(launcher_binary_updates true)
|
|
else()
|
|
set(launcher_binary_updates false)
|
|
endif()
|
|
configure_file(cmake/templates/launcher_update_config.h.in generated/launcher_update_config.h @ONLY)
|
|
|
|
# ReSkateEmotePacker: a folder of pictures and GIFs -> the chat emote pack (emotes.json +
|
|
# emotes.png) that ReSkate.dll bakes in from assets/emotes.
|
|
add_executable(dingosdk_emote_packer EmotePacker/main.cpp)
|
|
target_link_libraries(dingosdk_emote_packer PRIVATE dingosdk_json windowscodecs ole32)
|
|
set_target_properties(dingosdk_emote_packer PROPERTIES OUTPUT_NAME "ReSkateEmotePacker")
|
|
|
|
# ReSkate dedicated server: a headless session host. It runs from its own folder
|
|
# next to steam_api64.dll and the Steam client files; no game install needed.
|
|
add_executable(dingosdk_server Server/main.cpp Server/server_host.cpp Server/server_party.cpp
|
|
Extension/Multiplayer/Session/party_book.cpp Server/server_config.cpp Server/steam_server.cpp
|
|
Server/server_update.cpp Launcher/updater.cpp
|
|
Extension/Multiplayer/Steam/steam_transport.cpp Extension/Multiplayer/Net/protocol.cpp
|
|
Extension/Multiplayer/Net/delta_codec.cpp Extension/Multiplayer/Net/wire_codec.cpp
|
|
Extension/Multiplayer/Remote/playback_buffers.cpp Extension/Multiplayer/Session/password.cpp
|
|
Server/server_activity.cpp Server/server_votes.cpp Extension/Throwdowns/throwdown_wire.cpp)
|
|
target_include_directories(dingosdk_server SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/External/steam_networking")
|
|
target_link_libraries(dingosdk_server PRIVATE dingosdk_launcher_support dingosdk_world_layer_scan dingosdk_json
|
|
dingosdk_lz4 dingosdk_zstd dingosdk_logging dingosdk_miniz dingosdk_word_filter winhttp bcrypt winmm)
|
|
set_target_properties(dingosdk_server PROPERTIES OUTPUT_NAME "ReSkateServer")
|
|
dingosdk_version_info(dingosdk_server "ReSkate dedicated server" "ReSkateServer.exe" VFT_APP)
|