forked from Kenix3/libultraship
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,127 changed files
with
3,394 additions
and
509,098 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libsdl2-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool ninja-build nlohmann-json3-dev libtinyxml2-dev libspdlog-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sdl2 libpng glew ninja libzip nlohmann-json tinyxml2 spdlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,17 @@ jobs: | |
build-macos: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
brew install sdl2 libpng glew ninja libzip | ||
- uses: actions/checkout@v2 | ||
brew install $(cat .github/workflows/brew-deps.txt) | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
uses: hendrikmuhs/[email protected].11 | ||
with: | ||
key: ${{ runner.os }}-ccache | ||
key: ${{ runner.os }}-mac-ccache-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-mac-ccache-${{ github.ref }} | ||
${{ runner.os }}-mac-ccache- | ||
- name: Build libultraship | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
|
@@ -28,18 +31,45 @@ jobs: | |
name: soh-mac | ||
path: build-cmake/src/*.a | ||
if-no-files-found: error | ||
build-ios: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache build folder | ||
uses: actions/cache@v4 | ||
with: | ||
save-always: true | ||
key: ${{ runner.os }}-ios-build-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-ios-build-${{ github.ref }} | ||
${{ runner.os }}-ios-build- | ||
path: | | ||
build-cmake | ||
- name: Build libultraship | ||
run: | | ||
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 -DCMAKE_BUILD_TYPE:STRING=Release | ||
cmake --build build-cmake --config Release --parallel 10 | ||
- name: Upload build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: soh-ios | ||
path: build-cmake/src/*/*.a | ||
if-no-files-found: error | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libsdl2-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool ninja-build | ||
- uses: actions/checkout@v2 | ||
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
uses: hendrikmuhs/[email protected].11 | ||
with: | ||
key: ${{ runner.os }}-ccache | ||
key: ${{ matrix.os }}-ccache-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ matrix.os }}-ccache-${{ github.ref }} | ||
${{ matrix.os }}-ccache- | ||
- name: Install latest SDL | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
|
@@ -49,6 +79,17 @@ jobs: | |
./configure | ||
make -j 10 | ||
sudo make install | ||
- name: Install latest tinyxml2 | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz | ||
tar -xzf 10.0.0.tar.gz | ||
cd tinyxml2-10.0.0 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
sudo make install | ||
- name: Build libultraship | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
|
@@ -72,20 +113,35 @@ jobs: | |
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue | ||
- uses: actions/checkout@v2 | ||
- name: ccache | ||
uses: dcvz/ccache-action@27b9f33213c0079872f064f6b6ba0233dfa16ba2 | ||
uses: hendrikmuhs/ccache-action@v1.2.11 | ||
with: | ||
key: ${{ runner.os }}-ccache | ||
variant: sccache | ||
key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-ccache-${{ github.ref }} | ||
${{ runner.os }}-ccache- | ||
- name: Cache build folder | ||
uses: actions/cache@v4 | ||
with: | ||
save-always: true | ||
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ github.ref }} | ||
${{ runner.os }}-build- | ||
path: | | ||
build-cmake | ||
D:/a/vcpkg | ||
- name: Setup MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Build libultraship | ||
env: | ||
VCPKG_ROOT: D:/a/vcpkg | ||
run: | | ||
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" | ||
cmake --no-warn-unused-cli -S. -Bbuild-cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DUSE_AUTO_VCPKG=ON -DCMAKE_VS_PLATFORM_NAME=x64 | ||
cmake --no-warn-unused-cli -S. -Bbuild-cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DUSE_AUTO_VCPKG=ON -DCMAKE_VS_PLATFORM_NAME=x64 | ||
cmake --build build-cmake --config Release --parallel 10 | ||
- name: Upload build | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: soh-windows | ||
path: build-cmake/src/**/*.lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ jobs: | |
tidy-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libsdl2-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool ninja-build clang-tidy clang-format-12 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) clang-tidy clang-format-12 | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
|
@@ -31,6 +31,17 @@ jobs: | |
./configure | ||
make -j 10 | ||
sudo make install | ||
- name: Install latest tinyxml2 | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz | ||
tar -xzf 10.0.0.tar.gz | ||
cd tinyxml2-10.0.0 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
sudo make install | ||
- name: Prepare compile_commands.json | ||
run: | | ||
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
set(CVAR_VSYNC_ENABLED "gVsyncEnabled" CACHE STRING "") | ||
set(CVAR_Z_FIGHTING_MODE "gZFightingMode" CACHE STRING "") | ||
set(CVAR_NEW_FILE_DROPPED "gNewFileDropped" CACHE STRING "") | ||
set(CVAR_DROPPED_FILE "gDroppedFile" CACHE STRING "") | ||
set(CVAR_INTERNAL_RESOLUTION "gInternalResolution" CACHE STRING "") | ||
set(CVAR_MSAA_VALUE "gMSAAValue" CACHE STRING "") | ||
set(CVAR_SDL_WINDOWED_FULLSCREEN "gSdlWindowedFullscreen" CACHE STRING "") | ||
set(CVAR_TEXTURE_FILTER "gTextureFilter" CACHE STRING "") | ||
set(CVAR_IMGUI_CONTROLLER_NAV "gControlNav" CACHE STRING "") | ||
set(CVAR_CONSOLE_WINDOW_OPEN "gConsoleEnabled" CACHE STRING "") | ||
set(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN "gControllerConfigurationEnabled" CACHE STRING "") | ||
set(CVAR_CONTROLLER_DISCONNECTED_WINDOW_OPEN "gControllerDisconnectedWindowEnabled" CACHE STRING "") | ||
set(CVAR_CONTROLLER_REORDERING_WINDOW_OPEN "gControllerReorderingWindowEnabled" CACHE STRING "") | ||
set(CVAR_GFX_DEBUGGER_WINDOW_OPEN "gGfxDebuggerEnabled" CACHE STRING "") | ||
set(CVAR_STATS_WINDOW_OPEN "gStatsEnabled" CACHE STRING "") | ||
set(CVAR_ENABLE_MULTI_VIEWPORTS "gEnableMultiViewports" CACHE STRING "") | ||
set(CVAR_LOW_RES_MODE "gLowResMode" CACHE STRING "") | ||
set(CVAR_SIMULATED_INPUT_LAG "gSimulatedInputLag" CACHE STRING "") | ||
set(CVAR_ALT_ASSETS "gAltAssets" CACHE STRING "") | ||
set(CVAR_GAME_OVERLAY_FONT "gOverlayFont" CACHE STRING "") | ||
set(CVAR_MENU_BAR_OPEN "gOpenMenuBar" CACHE STRING "") | ||
set(CVAR_PREFIX_CONTROLLERS "gControllers" CACHE STRING "") | ||
set(CVAR_PREFIX_ADVANCED_RESOLUTION "gAdvancedResolution" CACHE STRING "") | ||
add_compile_definitions( | ||
CVAR_VSYNC_ENABLED="${CVAR_VSYNC_ENABLED}" | ||
CVAR_Z_FIGHTING_MODE="${CVAR_Z_FIGHTING_MODE}" | ||
CVAR_NEW_FILE_DROPPED="${CVAR_NEW_FILE_DROPPED}" | ||
CVAR_DROPPED_FILE="${CVAR_DROPPED_FILE}" | ||
CVAR_INTERNAL_RESOLUTION="${CVAR_INTERNAL_RESOLUTION}" | ||
CVAR_MSAA_VALUE="${CVAR_MSAA_VALUE}" | ||
CVAR_SDL_WINDOWED_FULLSCREEN="${CVAR_SDL_WINDOWED_FULLSCREEN}" | ||
CVAR_TEXTURE_FILTER="${CVAR_TEXTURE_FILTER}" | ||
CVAR_IMGUI_CONTROLLER_NAV="${CVAR_IMGUI_CONTROLLER_NAV}" | ||
CVAR_CONSOLE_WINDOW_OPEN="${CVAR_CONSOLE_WINDOW_OPEN}" | ||
CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN="${CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN}" | ||
CVAR_CONTROLLER_DISCONNECTED_WINDOW_OPEN="${CVAR_CONTROLLER_DISCONNECTED_WINDOW_OPEN}" | ||
CVAR_CONTROLLER_REORDERING_WINDOW_OPEN="${CVAR_CONTROLLER_REORDERING_WINDOW_OPEN}" | ||
CVAR_GFX_DEBUGGER_WINDOW_OPEN="${CVAR_GFX_DEBUGGER_WINDOW_OPEN}" | ||
CVAR_STATS_WINDOW_OPEN="${CVAR_STATS_WINDOW_OPEN}" | ||
CVAR_ENABLE_MULTI_VIEWPORTS="${CVAR_ENABLE_MULTI_VIEWPORTS}" | ||
CVAR_LOW_RES_MODE="${CVAR_LOW_RES_MODE}" | ||
CVAR_SIMULATED_INPUT_LAG="${CVAR_SIMULATED_INPUT_LAG}" | ||
CVAR_ALT_ASSETS="${CVAR_ALT_ASSETS}" | ||
CVAR_GAME_OVERLAY_FONT="${CVAR_GAME_OVERLAY_FONT}" | ||
CVAR_MENU_BAR_OPEN="${CVAR_MENU_BAR_OPEN}" | ||
CVAR_PREFIX_CONTROLLERS="${CVAR_PREFIX_CONTROLLERS}" | ||
CVAR_PREFIX_ADVANCED_RESOLUTION="${CVAR_PREFIX_ADVANCED_RESOLUTION}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
find_package(SDL2 QUIET) | ||
if (NOT ${SDL2_FOUND}) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
SDL2 | ||
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git | ||
GIT_TAG release-2.28.1 | ||
) | ||
message("SDL2 not found. Downloading now...") | ||
FetchContent_MakeAvailable(SDL2) | ||
message("SDL2 downloaded to " ${FETCHCONTENT_BASE_DIR}/sdl2-src) | ||
endif() | ||
|
||
target_link_libraries(ImGui PUBLIC SDL2::SDL2) |
Oops, something went wrong.