Initial commit
This commit is contained in:
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: "https://www.scummvm.org/donate-with-paypal"
|
||||
34
.github/pull_request_template.md
vendored
Normal file
34
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
<!---
|
||||
Thank you for contributing to ScummVM. Please read the following carefully before submitting your Pull Request.
|
||||
|
||||
Make sure your individual commits follow the guidelines found in the ScummVM Wiki: https://wiki.scummvm.org/index.php?title=Commit_Guidelines. If they're not please edit them before submitting the Pull Request.
|
||||
|
||||
Proper documentation must also be included for common code and changes impacting user facing elements.
|
||||
|
||||
Commits and Pull Requests should use the following template:
|
||||
|
||||
```
|
||||
SUBSYSTEM: Short (50 chars or less) summary of changes
|
||||
|
||||
More detailed explanatory text, if necessary. Wrap it to about 72
|
||||
characters or so. In some contexts, the first line is treated as the
|
||||
subject of an email and the rest of the text as the body. The blank
|
||||
line separating the summary from the body is critical (unless you omit
|
||||
the body entirely); tools like rebase can get confused if you run the
|
||||
two together.
|
||||
|
||||
Write your commit message in the present tense: "Fix bug" and not "Fixed
|
||||
bug." This convention matches up with commit messages generated by
|
||||
commands like git merge and git revert.
|
||||
|
||||
Further paragraphs come after blank lines.
|
||||
|
||||
- Bullet points are okay, too
|
||||
|
||||
- Typically a hyphen or asterisk is used for the bullet, preceded by a
|
||||
single space, with blank lines in between, but conventions vary here
|
||||
|
||||
- Use a hanging indent
|
||||
```
|
||||
--->
|
||||
146
.github/vcpkg-ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch
vendored
Normal file
146
.github/vcpkg-ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
From ed3b6e4bca1fe5211e3d7ca06bbbf9b161c8bc19 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Janiszewski <janisozaur@gmail.com>
|
||||
Date: Sat, 2 Nov 2019 14:50:53 -0700
|
||||
Subject: [PATCH] Add naive MSVC support to sources
|
||||
|
||||
---
|
||||
libmpeg2/convert/rgb.c | 2 +-
|
||||
libmpeg2/cpu_accel.c | 4 ++--
|
||||
libmpeg2/cpu_state.c | 4 ++--
|
||||
libmpeg2/idct.c | 2 +-
|
||||
libmpeg2/motion_comp.c | 2 +-
|
||||
libvo/video_out_dx.c | 6 +++---
|
||||
vc++/config.h | 2 ++
|
||||
7 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/libmpeg2/convert/rgb.c b/libmpeg2/convert/rgb.c
|
||||
index 8863b0b..db6f4e3 100644
|
||||
--- a/libmpeg2/convert/rgb.c
|
||||
+++ b/libmpeg2/convert/rgb.c
|
||||
@@ -499,7 +499,7 @@ static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp,
|
||||
int convert420 = 0;
|
||||
int rgb_stride_min = ((bpp + 7) >> 3) * seq->width;
|
||||
|
||||
-#ifdef ARCH_X86
|
||||
+#if !defined(_MSC_VER) && defined(ARCH_X86)
|
||||
if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) {
|
||||
convert420 = 0;
|
||||
copy = mpeg2convert_rgb_mmxext (order, bpp, seq);
|
||||
diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c
|
||||
index 9b24610..a922df1 100644
|
||||
--- a/libmpeg2/cpu_accel.c
|
||||
+++ b/libmpeg2/cpu_accel.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "attributes.h"
|
||||
#include "mpeg2_internal.h"
|
||||
|
||||
-#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
+#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
|
||||
static inline uint32_t arch_accel (uint32_t accel)
|
||||
{
|
||||
if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT))
|
||||
@@ -253,7 +253,7 @@ static inline uint32_t arch_accel (uint32_t accel)
|
||||
|
||||
uint32_t mpeg2_detect_accel (uint32_t accel)
|
||||
{
|
||||
-#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
|
||||
+#if !defined(_MSC_VER) && (defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC))
|
||||
accel = arch_accel (accel);
|
||||
#endif
|
||||
return accel;
|
||||
diff --git a/libmpeg2/cpu_state.c b/libmpeg2/cpu_state.c
|
||||
index 2f2f64a..f4966c1 100644
|
||||
--- a/libmpeg2/cpu_state.c
|
||||
+++ b/libmpeg2/cpu_state.c
|
||||
@@ -36,7 +36,7 @@
|
||||
void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
|
||||
void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
|
||||
|
||||
-#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
+#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
|
||||
static void state_restore_mmx (cpu_state_t * state)
|
||||
{
|
||||
emms ();
|
||||
@@ -115,7 +115,7 @@ static void state_restore_altivec (cpu_state_t * state)
|
||||
|
||||
void mpeg2_cpu_state_init (uint32_t accel)
|
||||
{
|
||||
-#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
+#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
|
||||
if (accel & MPEG2_ACCEL_X86_MMX) {
|
||||
mpeg2_cpu_state_restore = state_restore_mmx;
|
||||
}
|
||||
diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c
|
||||
index 81c57e0..a057bf7 100644
|
||||
--- a/libmpeg2/idct.c
|
||||
+++ b/libmpeg2/idct.c
|
||||
@@ -235,7 +235,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block,
|
||||
|
||||
void mpeg2_idct_init (uint32_t accel)
|
||||
{
|
||||
-#ifdef ARCH_X86
|
||||
+#if !defined(_MSC_VER) && defined(ARCH_X86)
|
||||
if (accel & MPEG2_ACCEL_X86_SSE2) {
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_sse2;
|
||||
mpeg2_idct_add = mpeg2_idct_add_sse2;
|
||||
diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c
|
||||
index 7aed113..b00a32d 100644
|
||||
--- a/libmpeg2/motion_comp.c
|
||||
+++ b/libmpeg2/motion_comp.c
|
||||
@@ -33,7 +33,7 @@ mpeg2_mc_t mpeg2_mc;
|
||||
|
||||
void mpeg2_mc_init (uint32_t accel)
|
||||
{
|
||||
-#ifdef ARCH_X86
|
||||
+#if !defined(_MSC_VER) && defined(ARCH_X86)
|
||||
if (accel & MPEG2_ACCEL_X86_MMXEXT)
|
||||
mpeg2_mc = mpeg2_mc_mmxext;
|
||||
else if (accel & MPEG2_ACCEL_X86_3DNOW)
|
||||
diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c
|
||||
index 36de68a..0797cdc 100644
|
||||
--- a/libvo/video_out_dx.c
|
||||
+++ b/libvo/video_out_dx.c
|
||||
@@ -82,7 +82,7 @@ static void update_overlay (dx_instance_t * instance)
|
||||
dwFlags, &ddofx);
|
||||
}
|
||||
|
||||
-static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
|
||||
+static LRESULT FAR PASCAL event_procedure (HWND hwnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT rect_window;
|
||||
@@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
|
||||
switch (message) {
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
- instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
|
||||
+ instance = (dx_instance_t *) GetWindowLongPtr (hwnd, GWLP_USERDATA);
|
||||
|
||||
/* update the window position and size */
|
||||
point_window.x = 0;
|
||||
@@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance)
|
||||
/* store a directx_instance pointer into the window local storage
|
||||
* (for later use in event_handler).
|
||||
* We need to use SetWindowLongPtr when it is available in mingw */
|
||||
- SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
|
||||
+ SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG_PTR) instance);
|
||||
|
||||
ShowWindow (instance->window, SW_SHOW);
|
||||
|
||||
diff --git a/vc++/config.h b/vc++/config.h
|
||||
index 93719f0..a03cce6 100644
|
||||
--- a/vc++/config.h
|
||||
+++ b/vc++/config.h
|
||||
@@ -16,7 +16,9 @@
|
||||
/* #undef ARCH_SPARC */
|
||||
|
||||
/* x86 architecture */
|
||||
+#if defined(_M_AMD64) || defined(_M_IX86)
|
||||
#define ARCH_X86
|
||||
+#endif
|
||||
|
||||
/* maximum supported data alignment */
|
||||
/* #undef ATTRIBUTE_ALIGNED_MAX */
|
||||
--
|
||||
2.25.0
|
||||
|
||||
108
.github/vcpkg-ports/libmpeg2/CMakeLists.txt
vendored
Normal file
108
.github/vcpkg-ports/libmpeg2/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(libmpeg2)
|
||||
|
||||
option(TOOLS "Build libmpeg2 tools" OFF)
|
||||
|
||||
set(MPEG2_SOURCE_FILES
|
||||
libmpeg2/alloc.c
|
||||
libmpeg2/cpu_accel.c
|
||||
libmpeg2/cpu_state.c
|
||||
libmpeg2/decode.c
|
||||
libmpeg2/header.c
|
||||
libmpeg2/idct.c
|
||||
libmpeg2/idct_alpha.c
|
||||
libmpeg2/idct_altivec.c
|
||||
#libmpeg2/idct_mmx.c
|
||||
libmpeg2/motion_comp.c
|
||||
libmpeg2/motion_comp_alpha.c
|
||||
libmpeg2/motion_comp_altivec.c
|
||||
libmpeg2/motion_comp_arm.c
|
||||
#libmpeg2/motion_comp_mmx.c
|
||||
libmpeg2/motion_comp_vis.c
|
||||
libmpeg2/slice.c
|
||||
)
|
||||
set(VO_SOURCE_FILES
|
||||
libvo/video_out.c
|
||||
libvo/video_out_dx.c
|
||||
libvo/video_out_null.c
|
||||
libvo/video_out_pgm.c
|
||||
libvo/video_out_sdl.c
|
||||
libvo/video_out_x11.c
|
||||
)
|
||||
set(MPEG2_CONVERT_SOURCES
|
||||
libmpeg2/convert/rgb.c
|
||||
#libmpeg2/convert/rgb_mmx.c
|
||||
libmpeg2/convert/rgb_vis.c
|
||||
libmpeg2/convert/uyvy.c
|
||||
)
|
||||
set(GETOPT_FILES
|
||||
src/getopt.c
|
||||
)
|
||||
set(HEADERS
|
||||
include/mpeg2.h
|
||||
include/mpeg2convert.h
|
||||
)
|
||||
|
||||
add_library(mpeg2 ${MPEG2_SOURCE_FILES})
|
||||
add_library(mpeg2convert ${MPEG2_CONVERT_SOURCES})
|
||||
add_library(getopt STATIC ${GETOPT_FILES})
|
||||
add_library(vo STATIC ${VO_SOURCE_FILES})
|
||||
|
||||
target_include_directories(mpeg2convert PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
target_include_directories(getopt PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
target_include_directories(vo PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
target_include_directories(mpeg2 PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
target_include_directories(mpeg2 INTERFACE
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
|
||||
target_compile_definitions(getopt PUBLIC HAVE_CONFIG_H)
|
||||
target_link_libraries(vo mpeg2convert)
|
||||
|
||||
if (TOOLS)
|
||||
add_executable(mpeg2dec src/mpeg2dec.c src/dump_state.c src/gettimeofday.c)
|
||||
add_executable(extract_mpeg2 src/extract_mpeg2.c)
|
||||
add_executable(corrupt_mpeg2 src/corrupt_mpeg2.c)
|
||||
|
||||
target_compile_definitions(extract_mpeg2 PUBLIC HAVE_CONFIG_H)
|
||||
target_compile_definitions(corrupt_mpeg2 PUBLIC HAVE_CONFIG_H)
|
||||
|
||||
target_link_libraries(mpeg2dec PRIVATE getopt vo mpeg2convert mpeg2 gdi32)
|
||||
target_link_libraries(extract_mpeg2 PRIVATE getopt)
|
||||
target_link_libraries(corrupt_mpeg2 PRIVATE getopt)
|
||||
|
||||
target_include_directories(mpeg2dec PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
)
|
||||
target_include_directories(extract_mpeg2 PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
)
|
||||
target_include_directories(corrupt_mpeg2 PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vc++"
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
)
|
||||
endif (TOOLS)
|
||||
|
||||
install(TARGETS mpeg2
|
||||
EXPORT libmpeg2
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION "include/mpeg2dec")
|
||||
31
.github/vcpkg-ports/libmpeg2/portfile.cmake
vendored
Normal file
31
.github/vcpkg-ports/libmpeg2/portfile.cmake
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
# There is archived version of releases available at https://github.com/janisozaur/libmpeg2
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL https://code.videolan.org/videolan/libmpeg2.git
|
||||
REF 946bf4b518aacc224f845e73708f99e394744499 # Use a pinned commit hash
|
||||
PATCHES
|
||||
0001-Add-naive-MSVC-support-to-sources.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools TOOLS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
# # Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
19
.github/vcpkg-ports/libmpeg2/vcpkg.json
vendored
Normal file
19
.github/vcpkg-ports/libmpeg2/vcpkg.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "libmpeg2",
|
||||
"version": "0.5.1",
|
||||
"port-version": 3,
|
||||
"description": "a free MPEG-2 video stream decoder",
|
||||
"homepage": "http://libmpeg2.sourceforge.net/",
|
||||
"supports": "!(linux | osx | uwp)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools provided with libmpeg2"
|
||||
}
|
||||
}
|
||||
}
|
||||
259
.github/workflows/ci.yml
vendored
Normal file
259
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
# schedule:
|
||||
# - cron: '0 0-23/4 * * *'
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
emscripten:
|
||||
name: Emscripten
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: emscripten
|
||||
configFlags: --enable-gif --enable-jpeg --enable-ogg --enable-png --enable-vorbis --enable-zlib --enable-freetype2
|
||||
- name: emscripten (extra libs)
|
||||
configFlags: --enable-gif --enable-jpeg --enable-ogg --enable-png --enable-vorbis --enable-zlib --enable-freetype2 --enable-a52 --enable-faad --enable-fluidlite --enable-fribidi --enable-mad --enable-mpcdec --enable-mpeg2 --enable-mpeg2 --enable-mikmod --enable-retrowave --enable-theoradec --enable-vpx
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build cache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ matrix.platform }}
|
||||
max-size: 1G
|
||||
create-symlink: true
|
||||
- name: Restore libs cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: ${{ matrix.configFlags }}
|
||||
path: |
|
||||
dists/emscripten/libs/
|
||||
- name: Call configure
|
||||
run: |
|
||||
CXX='ccache emcc' dists/emscripten/build.sh configure --enable-all-engines ${{ matrix.configFlags }}
|
||||
- name: Save libs cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ matrix.configFlags }}
|
||||
path: |
|
||||
dists/emscripten/libs/
|
||||
- name: Build scummvm
|
||||
run: |
|
||||
dists/emscripten/build.sh make
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: win32
|
||||
triplet: x86-windows
|
||||
arch: x86
|
||||
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
|
||||
useNasm: 'true'
|
||||
- platform: x64
|
||||
arch: x64
|
||||
triplet: x64-windows
|
||||
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
|
||||
- platform: arm64
|
||||
arch: arm64
|
||||
triplet: arm64-windows
|
||||
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
|
||||
env:
|
||||
CONFIGURATION: Debug
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VCPKG_FEATURE_FLAGS: dependencygraph
|
||||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
|
||||
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
|
||||
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
|
||||
VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/.github/vcpkg-ports
|
||||
GIT_VCPKG_COMMIT: ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0
|
||||
permissions:
|
||||
contents: write # For dependencygraph
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup nasm
|
||||
uses: ilammy/setup-nasm@v1
|
||||
if: matrix.useNasm == 'true'
|
||||
- name: Install vcpkg
|
||||
uses: lukka/run-vcpkg@v11
|
||||
id: runvcpkg
|
||||
with:
|
||||
vcpkgGitCommitId: ${{ env.GIT_VCPKG_COMMIT }}
|
||||
- name: Integrate vcpkg
|
||||
run: |
|
||||
${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/vcpkg integrate install
|
||||
- name: Restore vcpkg cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/vcpkg_cache
|
||||
key: vcpkg-${{ env.GIT_VCPKG_COMMIT }}-${{ matrix.triplet }}-${{ hashFiles('vcpkg.json', 'vcpkg_installed/compiler-file-hash-cache.json', 'vcpkg_installed/status') }}
|
||||
restore-keys: vcpkg-${{ env.GIT_VCPKG_COMMIT }}-${{ matrix.triplet }}-
|
||||
- name: Build create_project
|
||||
run: |
|
||||
cd devtools/create_project/cmake
|
||||
cmake .
|
||||
cmake --build . -j 2
|
||||
ls
|
||||
cd ../../../
|
||||
- name: Call create_project
|
||||
run: |
|
||||
mkdir build-scummvm
|
||||
cd build-scummvm
|
||||
../devtools/create_project/cmake/Debug/create_project.exe .. --msvc --vcpkg --enable-all-engines ${{ matrix.configFlags }}
|
||||
ls
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Install vcpkg packages
|
||||
run: |
|
||||
vcpkg install
|
||||
- name: Save vcpkg cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/vcpkg_cache
|
||||
key: vcpkg-${{ env.GIT_VCPKG_COMMIT }}-${{ matrix.triplet }}-${{ hashFiles('vcpkg.json', 'vcpkg_installed/compiler-file-hash-cache.json', 'vcpkg_installed/status') }}
|
||||
- name: Build scummvm
|
||||
run: |
|
||||
cd build-scummvm
|
||||
ls
|
||||
msbuild scummvm.sln /m /p:VcpkgEnableManifest=true /p:BuildInParallel=true /p:Configuration=${{ env.CONFIGURATION }} /p:PreferredToolArchitecture=x64 /p:Platform=${{ matrix.platform }} /v:minimal
|
||||
- name: Upload scummvm
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.buildArtifacts == 'true'
|
||||
with:
|
||||
name: scummvm-${{ matrix.arch }}
|
||||
path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.exe
|
||||
- name: Upload scummvm libs
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.buildArtifacts == 'true'
|
||||
with:
|
||||
name: libs-${{ matrix.arch }}
|
||||
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.dll
|
||||
- name: Upload scummvm symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.buildArtifacts == 'true' && env.CONFIGURATION == 'Debug'
|
||||
with:
|
||||
name: symbols-${{ matrix.arch }}
|
||||
path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.pdb
|
||||
- name: Upload scummvm libs symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.buildArtifacts == 'true' && env.CONFIGURATION == 'Debug'
|
||||
with:
|
||||
name: lib-symbols-${{ matrix.arch }}
|
||||
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.pdb
|
||||
xcode:
|
||||
name: Xcode
|
||||
runs-on: macos-15-intel
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: macosx
|
||||
buildFlags: -scheme ScummVM-macOS -destination 'platform=macOS,arch=x86_64'
|
||||
configFlags: --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
|
||||
brewPackages: a52dec faad2 flac fluid-synth freetype fribidi giflib jpeg mad libmikmod libmpeg2 libogg libpng libvorbis libvpx sdl2 sdl2_net theora
|
||||
- platform: ios7
|
||||
buildFlags: -scheme ScummVM-iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO
|
||||
configFlags: --ios --use-xcframework --enable-faad --enable-gif --enable-mikmod --enable-vpx --enable-mpc --enable-a52 --disable-taskbar --disable-tts
|
||||
packagesUrl: https://downloads.scummvm.org/frs/build/scummvm-ios7-libs-v4.zip
|
||||
defaults:
|
||||
run:
|
||||
# Must be explicit for proper pipefail support
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install packages
|
||||
if: ${{ matrix.brewPackages }}
|
||||
run: brew install ${{ matrix.brewPackages }}
|
||||
- name: Download libraries
|
||||
if: ${{ matrix.packagesUrl }}
|
||||
run: |
|
||||
curl -L -o libs.zip ${{ matrix.packagesUrl }}
|
||||
unzip libs.zip
|
||||
ls
|
||||
- name: Build create_project
|
||||
run: |
|
||||
cd devtools/create_project/xcode
|
||||
xcodebuild
|
||||
ls
|
||||
cd ../../../
|
||||
- name: Call create_project
|
||||
run: |
|
||||
./devtools/create_project/xcode/build/Release/create_project . --xcode --enable-all-engines ${{ matrix.configFlags }}
|
||||
ls
|
||||
- name: Build cache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ matrix.platform }}
|
||||
max-size: 1G
|
||||
create-symlink: true
|
||||
- name: Build scummvm
|
||||
run: |
|
||||
xcodebuild CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ build -project scummvm.xcodeproj ${{ matrix.buildFlags }} | awk '$1 !~ /^(export|cd|clang++)/'
|
||||
ls
|
||||
ubuntu:
|
||||
name: Ubuntu
|
||||
runs-on: ${{ matrix.platform }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: ubuntu-latest
|
||||
sdlConfig: sdl2-config
|
||||
cxx: ccache g++
|
||||
aptPackages: 'liba52-dev libcurl4-openssl-dev libfaad-dev libflac-dev libfluidsynth-dev libfreetype6-dev libfribidi-dev libgif-dev libgtk-3-dev libjpeg-turbo8-dev libmad0-dev libmikmod-dev libmpeg2-4-dev libogg-dev libpng-dev libsdl2-dev libsdl2-net-dev libsndio-dev libspeechd-dev libtheora-dev libunity-dev libvorbis-dev libvpx-dev zlib1g-dev'
|
||||
configFlags: --enable-discord --with-discord-prefix=/usr/local
|
||||
- platform: ubuntu-22.04
|
||||
sdlConfig: sdl-config
|
||||
cxx: ccache g++-4.8
|
||||
aptPackages: 'g++-4.8 liba52-dev libcurl4-openssl-dev libfaad-dev libflac-dev libfluidsynth-dev libfreetype6-dev libfribidi-dev libgif-dev libgtk-3-dev libjpeg-turbo8-dev libmad0-dev libmikmod-dev libmpeg2-4-dev libogg-dev libpng-dev libsdl-net1.2-dev libsdl1.2-dev libsndio-dev libspeechd-dev libtheora-dev libunity-dev libvorbis-dev libvpx-dev zlib1g-dev'
|
||||
configFlags: --enable-discord --with-discord-prefix=/usr/local
|
||||
env:
|
||||
SDL_CONFIG: ${{ matrix.sdlConfig }}
|
||||
defaults:
|
||||
run:
|
||||
# Must be explicit for proper pipefail support
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Add Ubuntu Xenial package sources
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 40976EAF437D05B5
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 3B4FE6ACC0B21F32
|
||||
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ xenial main'
|
||||
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ xenial universe'
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ${{ matrix.aptPackages }}
|
||||
- name: Download and install Discord RPC libraries
|
||||
run: |
|
||||
curl -L -o discord-rpc-linux.zip https://github.com/discord/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip
|
||||
echo 'dac1f5dc6bedaeab1cc3c2c7fd4261e00838c81619c3ee325f3723c3d55ee03a discord-rpc-linux.zip' | sha256sum --check && unzip discord-rpc-linux.zip
|
||||
sudo cp -v -pR discord-rpc/linux-dynamic/include/*.* /usr/local/include/
|
||||
sudo cp -v -pR discord-rpc/linux-dynamic/lib/*.* /usr/local/lib/
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ matrix.platform }}
|
||||
max-size: 1G
|
||||
- name: Call configure
|
||||
run: |
|
||||
CXX='${{ matrix.cxx }}' ./configure --enable-all-engines ${{ matrix.configFlags }}
|
||||
- name: Build scummvm
|
||||
run: |
|
||||
make -j2
|
||||
- name: Build tests
|
||||
run: |
|
||||
make test
|
||||
- name: Build devtools
|
||||
run: |
|
||||
make devtools
|
||||
Reference in New Issue
Block a user