mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-06-11 05:08:59 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f9f83941d |
@@ -160,9 +160,6 @@ jobs:
|
|||||||
build-flatpak:
|
build-flatpak:
|
||||||
name: Build Flatpak
|
name: Build Flatpak
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
preset: ["Flatpak-Debug", "Flatpak-Release"]
|
|
||||||
env:
|
env:
|
||||||
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
|
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
|
||||||
|
|
||||||
@@ -188,7 +185,7 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: /tmp/ccache
|
path: /tmp/ccache
|
||||||
key: ccache-${{ runner.os }}-${{ matrix.preset }}
|
key: ccache-${{ runner.os }}
|
||||||
|
|
||||||
- name: Prepare Project
|
- name: Prepare Project
|
||||||
run: cp ./private/* ./UnleashedRecompLib/private
|
run: cp ./private/* ./UnleashedRecompLib/private
|
||||||
@@ -201,13 +198,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
|
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
|
||||||
export CCACHE_DIR=/tmp/ccache
|
export CCACHE_DIR=/tmp/ccache
|
||||||
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}-${{ matrix.preset }}.json
|
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json
|
||||||
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: UnleashedRecomp-${{ matrix.preset }}
|
name: UnleashedRecomp-Flatpak
|
||||||
path: ./${{ env.FLATPAK_ID }}.flatpak
|
path: ./${{ env.FLATPAK_ID }}.flatpak
|
||||||
build-macos:
|
build-macos:
|
||||||
name: Build macOS
|
name: Build macOS
|
||||||
|
|||||||
@@ -351,6 +351,8 @@ if (UNLEASHED_RECOMP_FLATPAK)
|
|||||||
"GAME_INSTALL_DIRECTORY=\"/var/data\""
|
"GAME_INSTALL_DIRECTORY=\"/var/data\""
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(UnleashedRecomp PRIVATE $<$<CONFIG:Debug>:UNLEASHED_RECOMP_DEBUG=1>)
|
||||||
|
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
|
|
||||||
|
|||||||
@@ -3145,7 +3145,7 @@ static GuestTexture* CreateTexture(uint32_t width, uint32_t height, uint32_t dep
|
|||||||
|
|
||||||
g_textureDescriptorSet->setTexture(texture->descriptorIndex, texture->texture, RenderTextureLayout::SHADER_READ, texture->textureView.get());
|
g_textureDescriptorSet->setTexture(texture->descriptorIndex, texture->texture, RenderTextureLayout::SHADER_READ, texture->textureView.get());
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
texture->texture->setName(fmt::format("Texture {:X}", g_memory.MapVirtual(texture)));
|
texture->texture->setName(fmt::format("Texture {:X}", g_memory.MapVirtual(texture)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -3162,7 +3162,7 @@ static GuestBuffer* CreateVertexBuffer(uint32_t length)
|
|||||||
auto buffer = g_userHeap.AllocPhysical<GuestBuffer>(ResourceType::VertexBuffer);
|
auto buffer = g_userHeap.AllocPhysical<GuestBuffer>(ResourceType::VertexBuffer);
|
||||||
buffer->buffer = g_device->createBuffer(RenderBufferDesc::VertexBuffer(length, GetBufferHeapType(), RenderBufferFlag::INDEX));
|
buffer->buffer = g_device->createBuffer(RenderBufferDesc::VertexBuffer(length, GetBufferHeapType(), RenderBufferFlag::INDEX));
|
||||||
buffer->dataSize = length;
|
buffer->dataSize = length;
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
buffer->buffer->setName(fmt::format("Vertex Buffer {:X}", g_memory.MapVirtual(buffer)));
|
buffer->buffer->setName(fmt::format("Vertex Buffer {:X}", g_memory.MapVirtual(buffer)));
|
||||||
#endif
|
#endif
|
||||||
return buffer;
|
return buffer;
|
||||||
@@ -3175,7 +3175,7 @@ static GuestBuffer* CreateIndexBuffer(uint32_t length, uint32_t, uint32_t format
|
|||||||
buffer->dataSize = length;
|
buffer->dataSize = length;
|
||||||
buffer->format = ConvertFormat(format);
|
buffer->format = ConvertFormat(format);
|
||||||
buffer->guestFormat = format;
|
buffer->guestFormat = format;
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
buffer->buffer->setName(fmt::format("Index Buffer {:X}", g_memory.MapVirtual(buffer)));
|
buffer->buffer->setName(fmt::format("Index Buffer {:X}", g_memory.MapVirtual(buffer)));
|
||||||
#endif
|
#endif
|
||||||
return buffer;
|
return buffer;
|
||||||
@@ -3213,7 +3213,7 @@ static GuestSurface* CreateSurface(uint32_t width, uint32_t height, uint32_t for
|
|||||||
surface->descriptorIndex = g_textureDescriptorAllocator.allocate();
|
surface->descriptorIndex = g_textureDescriptorAllocator.allocate();
|
||||||
g_textureDescriptorSet->setTexture(surface->descriptorIndex, surface->textureHolder.get(), RenderTextureLayout::SHADER_READ, surface->textureView.get());
|
g_textureDescriptorSet->setTexture(surface->descriptorIndex, surface->textureHolder.get(), RenderTextureLayout::SHADER_READ, surface->textureView.get());
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
surface->texture->setName(fmt::format("{} {:X}", desc.flags & RenderTextureFlag::RENDER_TARGET ? "Render Target" : "Depth Stencil", g_memory.MapVirtual(surface)));
|
surface->texture->setName(fmt::format("{} {:X}", desc.flags & RenderTextureFlag::RENDER_TARGET ? "Render Target" : "Depth Stencil", g_memory.MapVirtual(surface)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -5857,7 +5857,7 @@ static void MakePictureData(GuestPictureData* pictureData, uint8_t* data, uint32
|
|||||||
|
|
||||||
if (LoadTexture(texture, data, dataSize, {}))
|
if (LoadTexture(texture, data, dataSize, {}))
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
texture.texture->setName(reinterpret_cast<char*>(g_memory.Translate(pictureData->name + 2)));
|
texture.texture->setName(reinterpret_cast<char*>(g_memory.Translate(pictureData->name + 2)));
|
||||||
#endif
|
#endif
|
||||||
XXH64_hash_t hash = XXH3_64bits(data, dataSize);
|
XXH64_hash_t hash = XXH3_64bits(data, dataSize);
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ uint32_t XamShowMessageBoxUI(uint32_t dwUserIndex, be<uint16_t>* wszTitle, be<ui
|
|||||||
{
|
{
|
||||||
*pResult = cButtons ? cButtons - 1 : 0;
|
*pResult = cButtons ? cButtons - 1 : 0;
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
assert("XamShowMessageBoxUI encountered!" && false);
|
assert("XamShowMessageBoxUI encountered!" && false);
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
// This code is Win32-only as it'll most likely crash, misbehave or
|
// This code is Win32-only as it'll most likely crash, misbehave or
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#define LOG_WARNING(str) LOG_IMPL(Warning, __func__, str)
|
#define LOG_WARNING(str) LOG_IMPL(Warning, __func__, str)
|
||||||
#define LOG_ERROR(str) LOG_IMPL(Error, __func__, str)
|
#define LOG_ERROR(str) LOG_IMPL(Error, __func__, str)
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
#define LOG_UTILITY(str) LOG_IMPL(Utility, __func__, str)
|
#define LOG_UTILITY(str) LOG_IMPL(Utility, __func__, str)
|
||||||
#else
|
#else
|
||||||
#define LOG_UTILITY(str)
|
#define LOG_UTILITY(str)
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
#define LOGF_WARNING(str, ...) LOGF_IMPL(Warning, __func__, str, __VA_ARGS__)
|
#define LOGF_WARNING(str, ...) LOGF_IMPL(Warning, __func__, str, __VA_ARGS__)
|
||||||
#define LOGF_ERROR(str, ...) LOGF_IMPL(Error, __func__, str, __VA_ARGS__)
|
#define LOGF_ERROR(str, ...) LOGF_IMPL(Error, __func__, str, __VA_ARGS__)
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
#define LOGF_UTILITY(str, ...) LOGF_IMPL(Utility, __func__, str, __VA_ARGS__)
|
#define LOGF_UTILITY(str, ...) LOGF_IMPL(Utility, __func__, str, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define LOGF_UTILITY(str, ...)
|
#define LOGF_UTILITY(str, ...)
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define LOGN_WARNING(str) LOG_IMPL(Warning, "*", str)
|
#define LOGN_WARNING(str) LOG_IMPL(Warning, "*", str)
|
||||||
#define LOGN_ERROR(str) LOG_IMPL(Error, "*", str)
|
#define LOGN_ERROR(str) LOG_IMPL(Error, "*", str)
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
#define LOGN_UTILITY(str) LOG_IMPL(Utility, "*", str)
|
#define LOGN_UTILITY(str) LOG_IMPL(Utility, "*", str)
|
||||||
#else
|
#else
|
||||||
#define LOGN_UTILITY(str)
|
#define LOGN_UTILITY(str)
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
#define LOGFN_WARNING(str, ...) LOGF_IMPL(Warning, "*", str, __VA_ARGS__)
|
#define LOGFN_WARNING(str, ...) LOGF_IMPL(Warning, "*", str, __VA_ARGS__)
|
||||||
#define LOGFN_ERROR(str, ...) LOGF_IMPL(Error, "*", str, __VA_ARGS__)
|
#define LOGFN_ERROR(str, ...) LOGF_IMPL(Error, "*", str, __VA_ARGS__)
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
#define LOGFN_UTILITY(str, ...) LOGF_IMPL(Utility, "*", str, __VA_ARGS__)
|
#define LOGFN_UTILITY(str, ...) LOGF_IMPL(Utility, "*", str, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define LOGFN_UTILITY(str, ...)
|
#define LOGFN_UTILITY(str, ...)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#define UNLEASHED_RECOMP_VERSION_BIN @WIN32_VERSION_BINARY@
|
#define UNLEASHED_RECOMP_VERSION_BIN @WIN32_VERSION_BINARY@
|
||||||
#define UNLEASHED_RECOMP_VERSION_STR "@WIN32_VERSION_STRING@"
|
#define UNLEASHED_RECOMP_VERSION_STR "@WIN32_VERSION_STRING@"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef UNLEASHED_RECOMP_DEBUG
|
||||||
#define UNLEASHED_RECOMP_FILE_FLAGS VS_FF_DEBUG
|
#define UNLEASHED_RECOMP_FILE_FLAGS VS_FF_DEBUG
|
||||||
#else
|
#else
|
||||||
#define UNLEASHED_RECOMP_FILE_FLAGS 0
|
#define UNLEASHED_RECOMP_FILE_FLAGS 0
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ void Config::Load()
|
|||||||
{
|
{
|
||||||
def->ReadValue(toml);
|
def->ReadValue(toml);
|
||||||
|
|
||||||
#if _DEBUG
|
#if UNLEASHED_RECOMP_DEBUG
|
||||||
LOGFN_UTILITY("{} (0x{:X})", def->GetDefinition().c_str(), (intptr_t)def->GetValue());
|
LOGFN_UTILITY("{} (0x{:X})", def->GetDefinition().c_str(), (intptr_t)def->GetValue());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "io.github.hedge_dev.unleashedrecomp",
|
|
||||||
"runtime": "org.freedesktop.Platform",
|
|
||||||
"runtime-version": "24.08",
|
|
||||||
"sdk": "org.freedesktop.Sdk",
|
|
||||||
"sdk-extensions" : [ "org.freedesktop.Sdk.Extension.llvm18" ],
|
|
||||||
"finish-args": [
|
|
||||||
"--share=network",
|
|
||||||
"--socket=wayland",
|
|
||||||
"--socket=fallback-x11",
|
|
||||||
"--socket=pulseaudio",
|
|
||||||
"--device=all",
|
|
||||||
"--filesystem=host",
|
|
||||||
"--filesystem=/media",
|
|
||||||
"--filesystem=/run/media",
|
|
||||||
"--filesystem=/mnt"
|
|
||||||
],
|
|
||||||
"modules": [
|
|
||||||
{
|
|
||||||
"name": "UnleashedRecomp",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"cmake --preset linux-debug -DUNLEASHED_RECOMP_FLATPAK=ON -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache",
|
|
||||||
"cmake --build out/build/linux-debug --target UnleashedRecomp",
|
|
||||||
"mkdir -p /app/bin",
|
|
||||||
"cp out/build/linux-debug/UnleashedRecomp/UnleashedRecomp /app/bin/UnleashedRecomp",
|
|
||||||
"install -Dm644 UnleashedRecompResources/images/game_icon.png /app/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png",
|
|
||||||
"install -Dm644 flatpak/io.github.hedge_dev.unleashedrecomp.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml",
|
|
||||||
"install -Dm644 flatpak/io.github.hedge_dev.unleashedrecomp.desktop /app/share/applications/${FLATPAK_ID}.desktop"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "dir",
|
|
||||||
"path": "../"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"build-options": {
|
|
||||||
"no-debuginfo": true,
|
|
||||||
"strip": false,
|
|
||||||
"append-path": "/usr/lib/sdk/llvm18/bin",
|
|
||||||
"prepend-ld-library-path": "/usr/lib/sdk/llvm18/lib",
|
|
||||||
"build-args": [
|
|
||||||
"--share=network"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user