mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 22:29:53 +00:00
eb703ee96e
Motivated by - https://github.com/open-goal/opengoal-vscode/pull/358 This addresses the following: - Fixes #2939 spam edge-case - Stop picking a different nREPL port based on the game mode by default, this causes friction for tools in the average usecase (having a REPL open for a single game, and wanting to connect to it). `goalc` spins up fine even if the port is already bound to. - For people that need/want this behaviour, adding per-game configuration to the `repl-config.json` is on my todo list. - Allows `goalc` to permit redefining symbols, including functions. This is defaulted to off via the `repl-config.json` but it allows you to for example, change the definition of a function without having to restart and rebuild the entire game. ![Screenshot 2024-06-02 124558](https://github.com/open-goal/jak-project/assets/13153231/28f81f6e-b7b8-4172-9787-f96e4ab1305b) - Updates the welcome message to include a bunch of useful metadata up-front. Cleaned up all the startup logs that appear when starting goalc, many of whom's information is now included in the welcome message. - Before: ![image](https://github.com/open-goal/jak-project/assets/13153231/814c2374-4808-408e-9ed6-67114902a1d9) - After: ![Screenshot 2024-06-01 235954](https://github.com/open-goal/jak-project/assets/13153231/f3f459fb-2cbb-46ba-a90f-318243d4b3b3)
103 lines
3.3 KiB
CMake
103 lines
3.3 KiB
CMake
function(write_revision_h)
|
|
find_package(Git)
|
|
set(GIT_SHORT_SHA "")
|
|
set(GIT_TAG "")
|
|
if(NOT GIT_FOUND)
|
|
MESSAGE(STATUS "write_revision_h(): git was not found")
|
|
endif()
|
|
MESSAGE(STATUS "write_revision_h(): ${CMAKE_SOURCE_DIR}")
|
|
if (GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
|
|
MESSAGE(STATUS "Git found, using it to get revision info")
|
|
EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
|
OUTPUT_VARIABLE GIT_SHORT_SHA
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} tag --points-at HEAD
|
|
OUTPUT_VARIABLE GIT_TAG
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
ERROR_QUIET)
|
|
endif()
|
|
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/versions/revision.h "#define BUILT_TAG \"${GIT_TAG}\"\n#define BUILT_SHA \"${GIT_SHORT_SHA}\"\n")
|
|
endfunction()
|
|
|
|
write_revision_h()
|
|
|
|
add_library(common
|
|
audio/audio_formats.cpp
|
|
cross_os_debug/xdbg.cpp
|
|
cross_sockets/XSocket.cpp
|
|
cross_sockets/XSocketClient.cpp
|
|
cross_sockets/XSocketServer.cpp
|
|
custom_data/pack_helpers.cpp
|
|
custom_data/TFrag3Data.cpp
|
|
dma/dma_copy.cpp
|
|
dma/dma.cpp
|
|
dma/gs.cpp
|
|
formatter/formatter_tree.cpp
|
|
formatter/formatter.cpp
|
|
formatter/formatter_tree.cpp
|
|
formatter/rules/formatting_rules.cpp
|
|
formatter/rules/rule_config.cpp
|
|
global_profiler/GlobalProfiler.cpp
|
|
goos/Interpreter.cpp
|
|
goos/Object.cpp
|
|
goos/ParseHelpers.cpp
|
|
goos/PrettyPrinter.cpp
|
|
goos/PrettyPrinter2.cpp
|
|
goos/Printer.cpp
|
|
goos/Reader.cpp
|
|
goos/TextDB.cpp
|
|
log/log.cpp
|
|
math/geometry.cpp
|
|
repl/config.cpp
|
|
repl/nrepl/ReplClient.cpp
|
|
repl/nrepl/ReplServer.cpp
|
|
repl/repl_wrapper.cpp
|
|
serialization/subtitles/subtitles_v1.cpp
|
|
serialization/subtitles/subtitles_v2.cpp
|
|
serialization/subtitles/subtitles.cpp
|
|
serialization/text/text_ser.cpp
|
|
sqlite/sqlite.cpp
|
|
texture/texture_slots.cpp
|
|
type_system/defenum.cpp
|
|
type_system/deftype.cpp
|
|
type_system/state.cpp
|
|
type_system/Type.cpp
|
|
type_system/TypeFieldLookup.cpp
|
|
type_system/TypeSpec.cpp
|
|
type_system/TypeSystem.cpp
|
|
util/Assert.cpp
|
|
util/ast_util.cpp
|
|
util/BitUtils.cpp
|
|
util/compress.cpp
|
|
util/crc32.cpp
|
|
util/dgo_util.cpp
|
|
util/DgoReader.cpp
|
|
util/DgoWriter.cpp
|
|
util/dialogs.cpp
|
|
util/diff.cpp
|
|
util/FileUtil.cpp
|
|
util/FontUtils.cpp
|
|
util/FrameLimiter.cpp
|
|
util/json_util.cpp
|
|
util/os.cpp
|
|
util/print_float.cpp
|
|
util/read_iso_file.cpp
|
|
util/SimpleThreadGroup.cpp
|
|
util/string_util.cpp
|
|
util/term_util.cpp
|
|
util/Timer.cpp
|
|
util/unicode_util.cpp
|
|
util/gltf_util.cpp
|
|
versions/versions.cpp
|
|
)
|
|
|
|
target_link_libraries(common fmt lzokay replxx libzstd_static tree-sitter sqlite3 libtinyfiledialogs tiny_gltf)
|
|
|
|
if(WIN32)
|
|
target_link_libraries(common wsock32 ws2_32 windowsapp)
|
|
elseif(APPLE)
|
|
# don't need anything special
|
|
else()
|
|
target_link_libraries(common stdc++fs)
|
|
endif()
|