Skip to content

Commit

Permalink
Fusion of resinstaller premake/CMake/mk with Maxr's ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Feb 28, 2024
1 parent 63847ea commit 3782076
Show file tree
Hide file tree
Showing 30 changed files with 98 additions and 956 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: install SDL2
run: brew install sdl2 sdl2_mixer sdl2_net
- name: install dependencies
run: brew install sdl2 sdl2_mixer sdl2_net libogg libvorbis

- name: cmake --version
run: cmake --version
Expand All @@ -32,6 +32,6 @@ jobs:
run: |
mkdir build && cd build
cmake ..
make maxr_dedicatedserver maxr maxr_tests -j4
make maxr_dedicatedserver maxr maxr_tests resinstaller -j4
./maxr_tests
6 changes: 3 additions & 3 deletions .github/workflows/premake5-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ jobs:
7z e -o"data/CrashRpt" CrashRpt_v.1.4.3_r1645.7z "lang_files/*.ini"
- name: run premake5
run: ./premake5.exe vs2022 --to=solution/vs2022/maxr --crashRpt_root=CrashRpt_v.1.4.3_r1645
run: ./premake5.exe vs2022 --to=solution/vs2022 --crashRpt_root=CrashRpt_v.1.4.3_r1645

- name: build
run: |
cd solution/vs2022/maxr
cd solution/vs2022
nuget install packages.config -OutputDirectory packages
msbuild.exe /property:Configuration=Release Maxr.sln
- name: run tests
run: |
cd solution/vs2022/maxr/bin/Release
cd solution/vs2022/bin/Release
./maxr_tests.exe
- name: upload maxr
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,14 @@ jobs:
- name: run premake5
run: |
./premake5.exe vs2022 --to=../solution/vs2022/resinstaller --file=resinstaller/premake5.lua
./premake5.exe vs2022 --to=solution/vs2022/maxr --crashRpt_root=CrashRpt_v.1.4.3_r1645
./premake5.exe vs2022 --to=solution/vs2022 --crashRpt_root=CrashRpt_v.1.4.3_r1645
- name: build
run: |
cd solution/vs2022/resinstaller
nuget install packages.config -OutputDirectory packages
cd ../maxr
cd solution/vs2022
nuget install packages.config -OutputDirectory packages
msbuild.exe /property:Configuration=Release Maxr.sln
- name: copy resinstaller
run: cp solution/vs2022/resinstaller/bin/Release/resinstaller.exe data/

- name: Create nsis installer
uses: joncloud/[email protected]
with:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/resinstaller-macos.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/resinstaller-premake5-macos.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/resinstaller-premake5-ubuntu.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/resinstaller-premake5-windows.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/resinstaller-ubuntu.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: apt-get update
run: sudo apt-get update

- name: install SDL2
run: | # libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-net-2.0-0
sudo apt-get install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev
- name: install dependencies
run: |
sudo apt-get install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev libogg-dev libvorbis-dev libvorbisenc2 libvorbisidec-dev
- name: cmake --version
run: cmake --version
Expand All @@ -36,6 +36,6 @@ jobs:
run: |
mkdir build && cd build
cmake ..
make maxr_dedicatedserver maxr maxr_tests -j4
make maxr_dedicatedserver maxr maxr_tests resinstaller -j4
./maxr_tests
32 changes: 31 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

cmake_minimum_required(VERSION 3.1)

project(maxr)
Expand All @@ -14,6 +13,11 @@ include_directories(src/lib)
# === Global defines
# ============================================

if(RESINSTALLER_VERSION)
MESSAGE (STATUS " Resinstaller version: ${RESINSTALLER_VERSION}")
add_definitions( "-DVERSION=\"${RESINSTALLER_VERSION}\"")
endif()

if(PACKAGE_VERSION)
add_definitions( "-DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"")
endif()
Expand Down Expand Up @@ -104,6 +108,16 @@ endmacro()
GroupSources(src)
# source_group(TREE . FILES maxr_SRCS)

add_executable(resinstaller
resinstaller/src/converter.cpp
resinstaller/src/file.cpp
resinstaller/src/ogg_encode.cpp
resinstaller/src/pcx.cpp
resinstaller/src/resinstaller.cpp
resinstaller/src/3rd/SDL_flic/SDL_flic.c
resinstaller/src/wave.cpp
)

add_library(maxr_lib ${maxr_LIB_SRCS})

add_executable(maxr_dedicatedserver ${maxr_dedicatedserver_SRCS} ${RESOURCE_FILE})
Expand Down Expand Up @@ -150,6 +164,8 @@ target_include_directories(mve_player PUBLIC ${SDL2_INCLUDE_DIR})
target_link_libraries(mve_player PUBLIC ${SDL2_LIBRARY})
target_include_directories(SDL_flic PUBLIC ${SDL2_INCLUDE_DIR})
target_link_libraries(SDL_flic PUBLIC ${SDL2_LIBRARY})
target_include_directories(resinstaller PUBLIC ${SDL2_INCLUDE_DIR})
target_link_libraries(resinstaller ${SDL2_LIBRARY})

# ---------------------------------------
# SDL2_mixer
Expand All @@ -165,6 +181,20 @@ find_package(SDL2_net REQUIRED)
target_include_directories(maxr_lib PUBLIC ${SDL2_NET_INCLUDE_DIR})
target_link_libraries(maxr_lib PUBLIC ${SDL2_NET_LIBRARY})

# ---------------------------------------
# OggVorbis

find_package(OggVorbis REQUIRED)

target_include_directories(resinstaller PUBLIC ${OGG_INCLUDE_DIR})
target_include_directories(resinstaller PUBLIC ${VORBIS_INCLUDE_DIR})
target_link_libraries(resinstaller ${OGG_LIBRARY})
target_link_libraries(resinstaller ${VORBIS_LIBRARY})
if(WIN32)
else()
target_link_libraries(resinstaller ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
endif()

# ---------------------------------------
# add crash reporting library
if(CRASH_RPT_INCLUDE_DIR)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3782076

Please sign in to comment.