-
Notifications
You must be signed in to change notification settings - Fork 122
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
39 changed files
with
2,633 additions
and
829 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 |
---|---|---|
|
@@ -33,21 +33,21 @@ jobs: | |
Rename-Item ./dependencies/windows/glew-2.2.0 glew | ||
- name: Download SDL2 | ||
run: | | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.28.3-VC.zip" -OutFile "SDL2.zip" | ||
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ | ||
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 | ||
Rename-Item ./dependencies/windows/SDL2-2.28.3 SDL2 | ||
- name: Run vcpkg | ||
run: | | ||
vcpkg install libogg:x86-windows-static libvorbis:x86-windows-static libtheora:x86-windows-static | ||
vcpkg integrate install | ||
- name: Build RSDKv3 | ||
run: | | ||
msbuild RSDKv3.sln /p:Configuration=Release /p:Platform=x86 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions.props" | ||
msbuild RSDKv3.sln -target:RSDKv3-ogl /p:Configuration=Release /p:Platform=x86 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions.props" | ||
- name: Move artifacts | ||
run: | | ||
mkdir artifacts | ||
move ./build/Win32/Release/*.dll ./artifacts | ||
move ./build/Win32/Release/*.exe ./artifacts | ||
move ./build/Win32/Release/OGL/*.dll ./artifacts | ||
move ./build/Win32/Release/OGL/*.exe ./artifacts | ||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -80,21 +80,21 @@ jobs: | |
Rename-Item ./dependencies/windows/glew-2.2.0 glew | ||
- name: Download SDL2 | ||
run: | | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.28.3-VC.zip" -OutFile "SDL2.zip" | ||
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ | ||
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 | ||
Rename-Item ./dependencies/windows/SDL2-2.28.3 SDL2 | ||
- name: Run vcpkg | ||
run: | | ||
vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static libtheora:x64-windows-static | ||
vcpkg integrate install | ||
- name: Build RSDKv3 | ||
run: | | ||
msbuild RSDKv3.sln /p:Configuration=Release /p:Platform=x64 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions_x64.props" | ||
msbuild RSDKv3.sln -target:RSDKv3-ogl /p:Configuration=Release /p:Platform=x64 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions_x64.props" | ||
- name: Move artifacts | ||
run: | | ||
mkdir artifacts | ||
move ./build/x64/Release/*.dll ./artifacts | ||
move ./build/x64/Release/*.exe ./artifacts | ||
move ./build/x64/Release/OGL/*.dll ./artifacts | ||
move ./build/x64/Release/OGL/*.exe ./artifacts | ||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -106,7 +106,7 @@ jobs: | |
- name: Checkout repository Android | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
submodules: recursive | ||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
- name: Download libogg, libvorbis, and libtheora for easier includes | ||
|
@@ -127,9 +127,9 @@ jobs: | |
Rename-Item ./dependencies/android/glew-2.2.0 glew | ||
- name: Download SDL2 | ||
run: | | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-2.0.16.zip" -OutFile "SDL2.zip" | ||
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/android/ | ||
Rename-Item ./dependencies/android/SDL2-2.0.16 SDL | ||
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-2.28.3.zip" -OutFile "SDL2.zip" | ||
Expand-Archive -Path SDL2.zip -DestinationPath ./android/app/jni/ | ||
Rename-Item ./android/app/jni/SDL2-2.28.3 SDL | ||
- name: Move & Copy stuff | ||
run: | | ||
Copy-Item -Path ./dependencies/all/theoraplay -Destination ./dependencies/android/app/jni/src/dependencies/android/ | ||
|
@@ -144,15 +144,15 @@ jobs: | |
- name: Build RSDKv3 Android | ||
working-directory: ./android | ||
run: | | ||
./gradlew.bat assembleDebug --no-daemon -PABIFILTERS="armeabi-v7a;arm64-v8a" | ||
./gradlew.bat assembleDebug --no-daemon -PABIFILTERS="armeabi-v7a;arm64-v8a" -PRETRO_DISABLE_PLUS | ||
- name: Upload artifact Android | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: v3-android | ||
path: ./android/app/build/outputs/apk | ||
v3-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -163,7 +163,8 @@ jobs: | |
sudo apt-get install libtheora-dev libogg-dev libvorbis-dev libsdl2-dev libglew-dev | ||
ls ./dependencies/all | ||
- name: Build RSDKv3 | ||
run: make | ||
run: | | ||
make RETRO_DISABLE_PLUS=1 | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
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,188 @@ | ||
cmake_minimum_required(VERSION 3.7) | ||
|
||
project(RetroEngine) | ||
|
||
set(DECOMP_VERSION 1.3.1) | ||
|
||
option(RETRO_FORCE_CASE_INSENSITIVE "Forces case insensivity." OFF) | ||
option(RETRO_MOD_LOADER "Enables or disables the mod loader." ON) | ||
option(RETRO_USE_HW_RENDER "Enables usage of Hardware Render as an option." ON) | ||
option(RETRO_DISABLE_PLUS "Disables Plus. Should be set on for any public releases." OFF) | ||
option(RETRO_ORIGINAL_CODE "Removes any change that differs from the original code, a playable game can't be built this way." OFF) | ||
|
||
set(RETRO_SDL_VERSION 2 CACHE STRING "select between SDL2 and SDL1, defaults to SDL2") | ||
|
||
if(RETRO_ORIGINAL_CODE) | ||
set(RETRO_MOD_LOADER OFF) | ||
endif() | ||
|
||
set(RETRO_NAME "RSDKv3") | ||
|
||
set(RETRO_OUTPUT_NAME ${RETRO_NAME} CACHE STRING "The exported name of the executable.") | ||
|
||
set(RETRO_FILES | ||
dependencies/all/tinyxml2/tinyxml2.cpp | ||
dependencies/all/theoraplay/theoraplay.c | ||
RSDKv3/Animation.cpp | ||
RSDKv3/Audio.cpp | ||
RSDKv3/Collision.cpp | ||
RSDKv3/Debug.cpp | ||
RSDKv3/Drawing.cpp | ||
RSDKv3/Ini.cpp | ||
RSDKv3/Input.cpp | ||
RSDKv3/fcaseopen.c | ||
RSDKv3/main.cpp | ||
RSDKv3/Math.cpp | ||
RSDKv3/ModAPI.cpp | ||
RSDKv3/Object.cpp | ||
RSDKv3/Palette.cpp | ||
RSDKv3/Player.cpp | ||
RSDKv3/Reader.cpp | ||
RSDKv3/RetroEngine.cpp | ||
RSDKv3/Scene.cpp | ||
RSDKv3/Scene3D.cpp | ||
RSDKv3/Script.cpp | ||
RSDKv3/Sprite.cpp | ||
RSDKv3/String.cpp | ||
RSDKv3/Text.cpp | ||
RSDKv3/Userdata.cpp | ||
RSDKv3/Video.cpp | ||
) | ||
|
||
if(NOT PLATFORM) | ||
if(WIN32) # THIS ASSUMES VCPKG OR SOURCES !!!!!!! | ||
set(PLATFORM "Windows" CACHE STRING "The platform to compile for.") | ||
elseif(ANDROID) | ||
set(PLATFORM "Android" CACHE STRING "The platform to compile for.") | ||
else() | ||
set(PLATFORM ${CMAKE_SYSTEM_NAME} CACHE STRING "The platform to compile for.") | ||
endif() | ||
endif() | ||
|
||
include(platforms/${PLATFORM}.cmake) | ||
|
||
set_target_properties(RetroEngine PROPERTIES OUTPUT_NAME ${RETRO_OUTPUT_NAME}) | ||
|
||
if(COMPILE_OGG) | ||
set(OGG_DIR dependencies/${DEP_PATH}/libogg) | ||
add_library( | ||
libogg | ||
STATIC | ||
${OGG_DIR}/src/bitwise.c | ||
${OGG_DIR}/src/framing.c | ||
) | ||
|
||
target_compile_options(libogg PRIVATE ${OGG_FLAGS}) | ||
|
||
target_include_directories(libogg PRIVATE ${OGG_DIR}/include) | ||
target_include_directories(RetroEngine PRIVATE ${OGG_DIR}/include) | ||
target_link_libraries(RetroEngine libogg) | ||
endif() | ||
|
||
if(COMPILE_VORBIS) | ||
set(VORBIS_DIR dependencies/${DEP_PATH}/libvorbis) | ||
set(OGG_DIR dependencies/${DEP_PATH}/libogg) | ||
add_library(libvorbis STATIC | ||
${VORBIS_DIR}/lib/analysis.c | ||
${VORBIS_DIR}/lib/barkmel.c | ||
${VORBIS_DIR}/lib/bitrate.c | ||
${VORBIS_DIR}/lib/block.c | ||
${VORBIS_DIR}/lib/codebook.c | ||
${VORBIS_DIR}/lib/envelope.c | ||
${VORBIS_DIR}/lib/floor0.c | ||
${VORBIS_DIR}/lib/floor1.c | ||
${VORBIS_DIR}/lib/info.c | ||
${VORBIS_DIR}/lib/lookup.c | ||
${VORBIS_DIR}/lib/lpc.c | ||
${VORBIS_DIR}/lib/lsp.c | ||
${VORBIS_DIR}/lib/mapping0.c | ||
${VORBIS_DIR}/lib/mdct.c | ||
${VORBIS_DIR}/lib/psy.c | ||
${VORBIS_DIR}/lib/registry.c | ||
${VORBIS_DIR}/lib/res0.c | ||
${VORBIS_DIR}/lib/sharedbook.c | ||
${VORBIS_DIR}/lib/smallft.c | ||
${VORBIS_DIR}/lib/synthesis.c | ||
${VORBIS_DIR}/lib/tone.c | ||
${VORBIS_DIR}/lib/vorbisenc.c | ||
${VORBIS_DIR}/lib/vorbisfile.c | ||
${VORBIS_DIR}/lib/window.c | ||
) | ||
|
||
target_compile_options(libvorbis PRIVATE ${VORBIS_FLAGS}) | ||
|
||
target_include_directories(libvorbis | ||
PRIVATE | ||
${VORBIS_DIR}/include | ||
${VORBIS_DIR}/lib | ||
${OGG_DIR}/include | ||
) | ||
target_include_directories(RetroEngine PRIVATE ${VORBIS_DIR}/include) | ||
target_link_libraries(RetroEngine libvorbis libogg) | ||
endif() | ||
|
||
if(COMPILE_THEORA) | ||
set(THEORA_DIR dependencies/${DEP_PATH}/libtheora) | ||
|
||
add_library(libtheora STATIC | ||
${THEORA_DIR}/lib/analyze.c | ||
${THEORA_DIR}/lib/apiwrapper.c | ||
${THEORA_DIR}/lib/bitpack.c | ||
${THEORA_DIR}/lib/cpu.c | ||
${THEORA_DIR}/lib/decapiwrapper.c | ||
${THEORA_DIR}/lib/decinfo.c | ||
${THEORA_DIR}/lib/decode.c | ||
${THEORA_DIR}/lib/dequant.c | ||
${THEORA_DIR}/lib/encapiwrapper.c | ||
${THEORA_DIR}/lib/encfrag.c | ||
${THEORA_DIR}/lib/encinfo.c | ||
${THEORA_DIR}/lib/encode.c | ||
${THEORA_DIR}/lib/encoder_disabled.c | ||
${THEORA_DIR}/lib/enquant.c | ||
${THEORA_DIR}/lib/fdct.c | ||
${THEORA_DIR}/lib/fragment.c | ||
${THEORA_DIR}/lib/huffdec.c | ||
${THEORA_DIR}/lib/huffenc.c | ||
${THEORA_DIR}/lib/idct.c | ||
${THEORA_DIR}/lib/info.c | ||
${THEORA_DIR}/lib/internal.c | ||
${THEORA_DIR}/lib/mathops.c | ||
${THEORA_DIR}/lib/mcenc.c | ||
${THEORA_DIR}/lib/quant.c | ||
${THEORA_DIR}/lib/rate.c | ||
${THEORA_DIR}/lib/state.c | ||
${THEORA_DIR}/lib/tokenize.c | ||
) | ||
|
||
target_compile_options(libtheora PRIVATE ${THEORA_FLAGS}) | ||
|
||
target_include_directories(libtheora PRIVATE ${THEORA_DIR}/include ${OGG_DIR}/include) | ||
target_include_directories(RetroEngine PRIVATE ${THEORA_DIR}/include) | ||
target_link_libraries(RetroEngine libtheora) | ||
endif() | ||
|
||
target_include_directories(RetroEngine PRIVATE | ||
RSDKv3/ | ||
dependencies/all/theoraplay/ | ||
dependencies/all/tinyxml2/ | ||
) | ||
|
||
if(DEFINED DEP_PATH) | ||
target_include_directories(RetroEngine PRIVATE | ||
dependencies/${DEP_PATH}/ | ||
) | ||
endif() | ||
|
||
|
||
target_compile_definitions(RetroEngine PRIVATE | ||
RETRO_USE_MOD_LOADER=$<BOOL:${RETRO_MOD_LOADER}> | ||
RETRO_USING_OPENGL=$<BOOL:${RETRO_USE_HW_RENDER}> | ||
RETRO_USE_SDL${RETRO_SDL_VERSION}=1 | ||
FORCE_CASE_INSENSITIVE=$<BOOL:${RETRO_FORCE_CASE_INSENSITIVE}> | ||
RETRO_USE_ORIGINAL_CODE=$<BOOL:${RETRO_ORIGINAL_CODE}> | ||
|
||
RSDK_AUTOBUILD=$<BOOL:${RETRO_DISABLE_PLUS}> | ||
|
||
RETRO_DEV_EXTRA="${PLATFORM} - ${CMAKE_CXX_COMPILER_ID}" | ||
DECOMP_VERSION="${DECOMP_VERSION}" | ||
) |
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
Oops, something went wrong.