Skip to content

Commit adfea10

Browse files
committed
Exported symbols for using as mods, bump lus and generated .tcc folder
1 parent b6a4ff8 commit adfea10

91 files changed

Lines changed: 1576 additions & 1736 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ add_subdirectory(libultraship ${CMAKE_CURRENT_SOURCE_DIR}/libultraship)
325325
add_dependencies(${PROJECT_NAME} libultraship)
326326
target_link_libraries(${PROJECT_NAME} PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,libultraship>")
327327
set_target_properties(${PROJECT_NAME} PROPERTIES ENABLE_EXPORTS TRUE)
328+
set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
328329

329330
if(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
330331
get_property(IOS_TOOLCHAIN_FILE GLOBAL PROPERTY IOS_TOOLCHAIN_FILE)
@@ -613,6 +614,30 @@ add_custom_command(
613614
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/assets/" "$<TARGET_FILE_DIR:Ghostship>/assets/"
614615
)
615616

617+
if (MSVC)
618+
add_custom_command(
619+
TARGET ${PROJECT_NAME} POST_BUILD
620+
COMMENT "Packaging all generated .lib files into Ghostship.sdk..."
621+
COMMAND cmd /c "lib.exe /NOLOGO /OUT:\"$<TARGET_FILE_DIR:Ghostship>/Ghostship.sdk\" \"$<TARGET_FILE_DIR:Ghostship>/*.lib\""
622+
)
623+
add_custom_command(
624+
TARGET ${PROJECT_NAME} POST_BUILD
625+
COMMENT "Copying libtcc headers and libs..."
626+
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:Ghostship>/.tcc/lib/"
627+
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:Ghostship>/.tcc/include/"
628+
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/_deps/tinycc-src/include/" "$<TARGET_FILE_DIR:Ghostship>/.tcc/include/"
629+
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/_deps/tinycc-src/win32/include/" "$<TARGET_FILE_DIR:Ghostship>/.tcc/include/"
630+
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/_deps/tinycc-src/win32/lib/libtcc1.a" "$<TARGET_FILE_DIR:Ghostship>/.tcc/lib/"
631+
VERBATIM
632+
)
633+
add_custom_command(
634+
TARGET ${PROJECT_NAME} POST_BUILD
635+
COMMENT "Generating .def file..."
636+
COMMAND "${CMAKE_BINARY_DIR}/_deps/tinycc-src/win32/tcc.exe" -impdef "$<TARGET_FILE:Ghostship>" -o "$<TARGET_FILE_DIR:Ghostship>/.tcc/lib/Ghostship.def"
637+
VERBATIM
638+
)
639+
endif()
640+
616641
if(NOT CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
617642
include(ExternalProject)
618643
ExternalProject_Add(TorchExternal

include/assets/levels/bbh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bbh/geo.h"
44

5-
extern const LevelScript level_bbh_entry[];
5+
extern_s const LevelScript level_bbh_entry[];
66

77
static const ALIGN_ASSET(2) char bbh_seg7_texture_07000000[] = "__OTR__levels/bbh/0";
88

include/assets/levels/bitdw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bitdw/geo.h"
44

5-
extern const LevelScript level_bitdw_entry[];
5+
extern_s const LevelScript level_bitdw_entry[];
66

77
static const ALIGN_ASSET(2) char bitdw_seg7_texture_07000000[] = "__OTR__levels/bitdw/0";
88

include/assets/levels/bitfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bitfs/geo.h"
44

5-
extern const LevelScript level_bitfs_entry[];
5+
extern_s const LevelScript level_bitfs_entry[];
66

77
static const ALIGN_ASSET(2) char bitfs_seg7_texture_07000000[] = "__OTR__levels/bitfs/0";
88

include/assets/levels/bits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bits/geo.h"
44

5-
extern const LevelScript level_bits_entry[];
5+
extern_s const LevelScript level_bits_entry[];
66

77
static const ALIGN_ASSET(2) char bits_seg7_texture_07000000[] = "__OTR__levels/bits/0";
88

include/assets/levels/bob.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bob/geo.h"
44

5-
extern const LevelScript level_bob_entry[];
5+
extern_s const LevelScript level_bob_entry[];
66

77
static const ALIGN_ASSET(2) char bob_seg7_texture_07000000[] = "__OTR__levels/bob/0";
88

include/assets/levels/bowser_1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bowser_1/geo.h"
44

5-
extern const LevelScript level_bowser_1_entry[];
5+
extern_s const LevelScript level_bowser_1_entry[];
66

77
static const ALIGN_ASSET(2) char bowser_1_seg7_texture_07000000[] = "__OTR__levels/bowser_1/0";
88

include/assets/levels/bowser_2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bowser_2/geo.h"
44

5-
extern const LevelScript level_bowser_2_entry[];
5+
extern_s const LevelScript level_bowser_2_entry[];
66

77
static const ALIGN_ASSET(2) char bowser_2_seg7_texture_07000000[] = "__OTR__levels/bowser_2/0";
88

include/assets/levels/bowser_3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "bowser_3/geo.h"
44

5-
extern const LevelScript level_bowser_3_entry[];
5+
extern_s const LevelScript level_bowser_3_entry[];
66

77
static const ALIGN_ASSET(2) char bowser_3_seg7_texture_07000000[] = "__OTR__levels/bowser_3/0";
88

include/assets/levels/castle_courtyard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "castle_courtyard/geo.h"
44

5-
extern const LevelScript level_castle_courtyard_entry[];
5+
extern_s const LevelScript level_castle_courtyard_entry[];
66

77
static const ALIGN_ASSET(2) char castle_courtyard_seg7_vertex_07000000[] = "__OTR__levels/castle_courtyard/castle_courtyard_seg7_vertex_07000000";
88

0 commit comments

Comments
 (0)