Compare commits

..

4 commits

Author SHA1 Message Date
Syping
a404a29188 libragephoto 0.7.1 release
- RagePhoto.c: fix memory corruption bug at ragephoto_setphotodesc
2025-10-26 23:26:51 +01:00
Syping
bb52ffb84b GitHub Actions: support macOS in .NET build 2025-10-24 22:07:59 +02:00
Syping
176fae0f03 libragephoto: update .NET version to 0.7.0.1 2025-10-24 22:01:36 +02:00
Syping
4d01b1f804 GitHub Actions: update workflows and add Linux arm64 support for .NET 2025-10-24 21:05:30 +02:00
10 changed files with 120 additions and 45 deletions

View file

@ -2,15 +2,15 @@ name: .NET
on: push
jobs:
Linux_Native:
runs-on: ubuntu-latest
Linux_amd64:
runs-on: ubuntu-24.04
container:
image: almalinux:8
env:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install packages
run: dnf install -y cmake gcc gcc-c++
- name: Configure CMake
@ -20,11 +20,69 @@ jobs:
- name: Install
run: cmake --install "build" --config ${{env.BUILD_TYPE}} --prefix "install/"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: AlmaLinux amd64
path: ${{github.workspace}}/install/
Windows_Native:
Linux_arm64:
runs-on: ubuntu-24.04-arm
container:
image: almalinux:8
env:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v5
- name: Install packages
run: dnf install -y cmake gcc gcc-c++
- name: Configure CMake
run: cmake -B "build" -DRAGEPHOTO_C_LIBRARY=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build "build" --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install "build" --config ${{env.BUILD_TYPE}} --prefix "install/"
- name: Upload
uses: actions/upload-artifact@v5
with:
name: AlmaLinux arm64
path: ${{github.workspace}}/install/
macOS_amd64:
runs-on: macos-15-intel
env:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v5
- name: Configure CMake
run: cmake -B "${{github.workspace}}/build" -DRAGEPHOTO_C_LIBRARY=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja
- name: Build
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/"
- name: Upload
uses: actions/upload-artifact@v5
with:
name: macOS amd64
path: ${{github.workspace}}/install/
macOS_arm64:
runs-on: macos-15
env:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v5
- name: Configure CMake
run: cmake -B "${{github.workspace}}/build" -DRAGEPHOTO_C_LIBRARY=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja
- name: Build
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/"
- name: Upload
uses: actions/upload-artifact@v5
with:
name: macOS arm64
path: ${{github.workspace}}/install/
Windows:
runs-on: windows-latest
env:
BUILD_TYPE: Release
@ -36,7 +94,7 @@ jobs:
- amd64_arm64
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
@ -48,12 +106,12 @@ jobs:
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Windows MSVC ${{matrix.arch}}
path: ${{github.workspace}}/install/
Release:
needs: [Linux_Native, Windows_Native]
needs: [Linux_amd64, Linux_arm64, macOS_amd64, macOS_arm64, Windows]
runs-on: windows-latest
defaults:
run:
@ -62,47 +120,68 @@ jobs:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Download Linux amd64 Assets
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: AlmaLinux amd64
path: assets/linux-x64
- name: Download Linux arm64 Assets
uses: actions/download-artifact@v6
with:
name: AlmaLinux arm64
path: assets/linux-arm64
- name: Download macOS amd64 Assets
uses: actions/download-artifact@v6
with:
name: macOS amd64
path: assets/osx-x64
- name: Download macOS arm64 Assets
uses: actions/download-artifact@v6
with:
name: macOS arm64
path: assets/osx-arm64
- name: Download Windows MSVC amd64 Assets
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: Windows MSVC amd64
path: assets/win-x64
- name: Download Windows MSVC amd64_x86 Assets
uses: actions/download-artifact@v4
with:
name: Windows MSVC amd64_x86
path: assets/win-x86
- name: Download Windows MSVC amd64_arm64 Assets
uses: actions/download-artifact@v4
- name: Download Windows MSVC arm64 Assets
uses: actions/download-artifact@v6
with:
name: Windows MSVC amd64_arm64
path: assets/win-arm64
- name: Download Windows MSVC x86 Assets
uses: actions/download-artifact@v6
with:
name: Windows MSVC amd64_x86
path: assets/win-x86
- name: Copy Assets
run: |
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\linux-arm64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\linux-x64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\osx-arm64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\osx-x64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-arm64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-x64\native"
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-x86\native"
cp "${{github.workspace}}\assets\linux-arm64\lib64\libragephoto.so" "${{github.workspace}}\src\dotnet\runtimes\linux-arm64\native\libragephoto.so"
cp "${{github.workspace}}\assets\linux-x64\lib64\libragephoto.so" "${{github.workspace}}\src\dotnet\runtimes\linux-x64\native\libragephoto.so"
cp "${{github.workspace}}\assets\osx-arm64\lib\libragephoto.dylib" "${{github.workspace}}\src\dotnet\runtimes\osx-arm64\native\libragephoto.dylib"
cp "${{github.workspace}}\assets\osx-x64\lib\libragephoto.dylib" "${{github.workspace}}\src\dotnet\runtimes\osx-x64\native\libragephoto.dylib"
cp "${{github.workspace}}\assets\win-arm64\bin\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-arm64\native\libragephoto.dll"
cp "${{github.workspace}}\assets\win-x64\bin\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-x64\native\libragephoto.dll"
cp "${{github.workspace}}\assets\win-x86\bin\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-x86\native\libragephoto.dll"
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Build RagePhoto.Core
run: msbuild "${{github.workspace}}\src\dotnet\RagePhoto.Core.csproj" /t:restore /t:pack /p:Configuration=${{env.BUILD_TYPE}}
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: NuGet Package
path: ${{github.workspace}}\src\dotnet\bin\${{env.BUILD_TYPE}}\RagePhoto.Core.*.nupkg

View file

@ -8,7 +8,7 @@ jobs:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install packages
run: |
sudo apt-get update -qq
@ -20,8 +20,7 @@ jobs:
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/usr/local"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Ubuntu
path: |
${{github.workspace}}/install/
path: ${{github.workspace}}/install/

View file

@ -13,7 +13,7 @@ jobs:
- 17
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install packages
run: |
sudo apt-get update -qq
@ -25,8 +25,7 @@ jobs:
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/usr/local"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Ubuntu C++${{matrix.cxxstd}}
path: |
${{github.workspace}}/install/
path: ${{github.workspace}}/install/

View file

@ -8,7 +8,7 @@ jobs:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
@ -22,7 +22,7 @@ jobs:
- name: Build
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: WebAssembly
path: |

View file

@ -8,7 +8,7 @@ jobs:
BUILD_TYPE: Release
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
@ -22,7 +22,7 @@ jobs:
- name: Build
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: WebAssembly
path: |

View file

@ -14,7 +14,7 @@ jobs:
- amd64_arm64
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
@ -26,8 +26,7 @@ jobs:
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Windows MSVC ${{matrix.arch}}
path: |
${{github.workspace}}/install/
path: ${{github.workspace}}/install/

View file

@ -17,7 +17,7 @@ jobs:
- 17
steps:
- name: Cloning
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
@ -29,8 +29,7 @@ jobs:
- name: Install
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install"
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Windows MSVC C++${{matrix.cxxstd}} ${{matrix.arch}}
path: |
${{github.workspace}}/install/
path: ${{github.workspace}}/install/

View file

@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 3.16)
cmake_policy(VERSION 3.16...3.28)
project(ragephoto VERSION 0.7.0 LANGUAGES C CXX)
project(ragephoto VERSION 0.7.1 LANGUAGES C CXX)
include(GNUInstallDirs)
# RagePhoto CMake includes

View file

@ -1207,7 +1207,7 @@ void ragephoto_setphotodesc(ragephoto_t instance_t, const char *description, uin
}
if (bufferSize != 0) {
instance->data->descBuffer = bufferSize;
ragephoto_setbufferoffsets(instance->data);
ragephotodata_setbufferoffsets(instance->data);
}
instance->data->error = RAGEPHOTO_ERROR_NOERROR; // 255
}

View file

@ -4,9 +4,9 @@
<TargetFrameworks>netstandard2.1;net47</TargetFrameworks>
<AssemblyName>RagePhoto.Core</AssemblyName>
<RootNamespace>RagePhoto</RootNamespace>
<Version>0.7.0</Version>
<AssemblyVersion>0.7.0</AssemblyVersion>
<FileVersion>0.7.0</FileVersion>
<Version>0.7.1</Version>
<AssemblyVersion>0.7.1</AssemblyVersion>
<FileVersion>0.7.1</FileVersion>
<Authors>Syping</Authors>
<Copyright>Copyright © 2025 Syping</Copyright>
<Description>Open Source RAGE Photo Parser for GTA V and RDR 2</Description>