Update workflows

This commit is contained in:
Dima353
2026-07-19 22:59:02 +03:00
parent e6b4fca52d
commit 0c1a0c3137
6 changed files with 75 additions and 54 deletions
+13 -11
View File
@@ -9,7 +9,7 @@ env:
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN64.zip"
jobs:
build:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
platform: [win-amd64-librw_d3d9-oal, win-amd64-librw_gl3_glfw-oal]
@@ -17,15 +17,15 @@ jobs:
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
- if: contains(matrix.platform, 'librw_gl3_glfw')
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: ${{env.GLFW_URL}}
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
- if: contains(matrix.platform, 'librw_gl3_glfw')
name: Unpack archives
run: |
7z x ${{env.GLFW_FILE}}
@@ -38,19 +38,21 @@ jobs:
# - name: Pack artifacts
# run: |
# 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
- name: Move binaries to gamefiles
- name: Stage gamefiles (vanilla resources) + binaries
run: |
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
New-Item -ItemType Directory -Path ./dist -Force
Copy-Item -Path ./gamefiles/vanilla/* -Destination ./dist/ -Recurse -Force
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./dist/
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./dist/
- name: Move dynamic dependencies to gamefiles
run: |
mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
mv ./vendor/openal-soft/dist/Win64/OpenAL32.dll ./gamefiles/
mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./dist/
mv ./vendor/openal-soft/dist/Win64/OpenAL32.dll ./dist/
- name: Upload artifact to actions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
path: ./gamefiles/*
path: ./dist/*
# - name: Upload artifact to Bintray
# uses: hpcsc/upload-bintray-docker-action@v1
# with:
+13 -11
View File
@@ -9,7 +9,7 @@ env:
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs:
build:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
platform: [win-x86-librw_d3d9-mss, win-x86-librw_gl3_glfw-mss, win-x86-librw_d3d9-oal, win-x86-librw_gl3_glfw-oal]
@@ -17,15 +17,15 @@ jobs:
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
- if: contains(matrix.platform, 'librw_gl3_glfw')
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: ${{env.GLFW_URL}}
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
- if: contains(matrix.platform, 'librw_gl3_glfw')
name: Unpack archives
run: |
7z x ${{env.GLFW_FILE}}
@@ -38,20 +38,22 @@ jobs:
# - name: Pack artifacts
# run: |
# 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
- name: Move binaries to gamefiles
- name: Stage gamefiles (vanilla resources) + binaries
run: |
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
New-Item -ItemType Directory -Path ./dist -Force
Copy-Item -Path ./gamefiles/vanilla/* -Destination ./dist/ -Recurse -Force
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./dist/
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./dist/
- if: contains(matrix.platform, 'oal')
name: Move dynamic dependencies to gamefiles
run: |
mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/
mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/
mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./dist/
mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./dist/
- name: Upload artifact to actions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
path: ./gamefiles/*
path: ./dist/*
# - name: Upload artifact to Bintray
# uses: hpcsc/upload-bintray-docker-action@v1
# with:
+15 -6
View File
@@ -34,8 +34,14 @@ option(${PROJECT}_WITH_OPUS "Build ${EXECUTABLE} with opus support" OFF)
option(${PROJECT}_WITH_LIBSNDFILE "Build ${EXECUTABLE} with libsndfile (instead of internal decoder)" OFF)
# Revisited Trilogy variant. ON = RT (10thAE resources + mods), OFF = vanilla.
# RT exists only on the Nintendo Switch build; every other platform is vanilla,
# so the option is not offered there and the vanilla resources are always used.
# Passes NO_RT to the compiler when off so config.h can disable the RT define.
option(${PROJECT}_RT "Build the Revisited Trilogy (10thAE) variant; OFF = vanilla" ON)
if(NINTENDO_SWITCH)
option(${PROJECT}_RT "Build the Revisited Trilogy (10thAE) variant; OFF = vanilla" ON)
else()
set(${PROJECT}_RT OFF)
endif()
if(NOT ${PROJECT}_RT)
add_compile_definitions(NO_RT)
endif()
@@ -105,11 +111,14 @@ if(${PROJECT}_INSTALL)
endif()
endif()
# Distinguish the two resource variants so both archives can live side by side
if(${PROJECT}_RT)
set(variant "-10thae")
else()
set(variant "-vanilla")
# Distinguish the two Switch resource variants so both archives can live side by side.
# Other platforms only ever build vanilla, so they keep their original package name.
if(NINTENDO_SWITCH)
if(${PROJECT}_RT)
set(variant "-10thae")
else()
set(variant "-vanilla")
endif()
endif()
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${platform}${audio}${os}${compiler}${variant}")
+16 -15
View File
@@ -215,6 +215,22 @@ enum Config {
#define NO_CDCHECK // skip audio CD check
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
// Revisited Trilogy modifications (HUD/menu/controller cosmetics, custom fonts).
// Enabled by default on Switch; the REVC_RT CMake option passes NO_RT to turn it off.
// Every other platform builds vanilla. Platform necessities (audio/loading tweaks)
// are gated on __SWITCH__ separately, so a vanilla NX build still keeps those.
// Kept above VANILLA_DEFINES so the tunables below exist in every configuration.
#if defined(__SWITCH__) && !defined(NO_RT)
#define RT
#endif
// RT tunables, centralized so shared code stays readable. RT off = upstream values.
#ifdef RT
#define RT_RADAR_SCALE 1.3f // enlarge the minimap by 30%
#else
#define RT_RADAR_SCALE 1.0f
#endif
#ifdef VANILLA_DEFINES
#if !defined(_WIN32) || defined(__LP64__) || defined(_WIN64)
#error Vanilla can only be built for win-x86
@@ -285,21 +301,6 @@ enum Config {
#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
// Revisited Trilogy modifications (HUD/menu/controller cosmetics, custom fonts).
// Enabled by default on Switch; comment out to build a clean "vanilla NX".
// Platform necessities (audio/loading tweaks) are gated on __SWITCH__ separately,
// so a vanilla NX build (RT off) still keeps those.
#if defined(__SWITCH__) && !defined(NO_RT)
#define RT
#endif
// RT tunables, centralized so shared code stays readable. RT off = upstream values.
#ifdef RT
#define RT_RADAR_SCALE 1.3f // enlarge the minimap by 30%
#else
#define RT_RADAR_SCALE 1.0f
#endif
//#define NO_MOVIES // compile-time: when defined, intro videos are skipped entirely
#define EXTENDED_OFFSCREEN_DESPAWN_RANGE // Use onscreen despawn range for offscreen peds and vehicles to avoid them despawning in the distance when you look
+7 -1
View File
@@ -2,7 +2,13 @@
// of FFmpeg).
// Nintendo Switch / GLFW movie player. Ported from the SDL2 build; only the
// windowing-system glue differs (GLFW proc address / buffer swap / timer).
#if defined RW_GL3 && !defined LIBRW_SDL2
//
// Switch-only on purpose: Windows D3D9 builds play the intro through the win.cpp
// skeleton (DirectShow), and the other GLFW targets never played it at all - the
// MPEG states there have always just fallen through. Everyone else gets the stub
// at the bottom of this file, which keeps glfw.cpp's intro state machine linkable
// without dragging pl_mpeg and OpenAL into those builds.
#if defined __SWITCH__ && defined RW_GL3 && !defined LIBRW_SDL2 && defined AUDIO_OAL
#include "common.h"
+11 -10
View File
@@ -1868,6 +1868,17 @@ windowIconifyCB(GLFWwindow* window, int iconified) {
/*
*****************************************************************************
*/
// True if the player pressed a button to skip an intro movie. Uses the menu
// confirm button so it follows the selected controller type (Nintendo layout:
// A/east; PlayStation/Xbox: Cross/south), plus Start or Enter on a keyboard.
// Defined for every platform - the intro state machine below is not #ifdef'd.
static bool SkipMovieButtonJustDown()
{
return CPad::GetPad(0)->GetMenuConfirmJustDown()
|| CPad::GetPad(0)->GetStartJustDown()
|| CPad::GetPad(0)->GetEnterJustDown();
}
#ifdef _WIN32
int PASCAL
WinMain(HINSTANCE instance,
@@ -1891,16 +1902,6 @@ WinMain(HINSTANCE instance,
#endif
#else
// True if the player pressed a button to skip an intro movie. Uses the menu
// confirm button so it follows the selected controller type (Nintendo layout:
// A/east; PlayStation/Xbox: Cross/south), plus Start or Enter on a keyboard.
static bool SkipMovieButtonJustDown()
{
return CPad::GetPad(0)->GetMenuConfirmJustDown()
|| CPad::GetPad(0)->GetStartJustDown()
|| CPad::GetPad(0)->GetEnterJustDown();
}
int
main(int argc, char *argv[])
{