mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-29 04:02:56 +01:00
Frame Studio now builds for Windows (x64, x86, ARM64), Linux (x64, x86, ARM64)
and macOS (Apple Silicon, Intel):
- studio/platform.h with Win32 and POSIX implementations (dialogs through
tinyfiledialogs on Linux/macOS), a GLFW window beside the Win32 one, and a
platform-neutral frame pacer
- MoltenVK support in the renderer (portability enumeration) and bundled in
the macOS app
- 32-bit builds: large-address-aware, LZMA packing within a 32-bit address space
- unaligned file reads in the loaders go through loadUnaligned (no UB)
- scripts/build-studio.sh, studio/build_windows.bat [x64|x86|arm64],
cmake/llvm-mingw.cmake, and a GitHub Actions workflow building every target
Frame Home installs without Studio: frame/install-frame-home.{sh,ps1} and
"Install Frame Home.bat" (packaged as FrameHome-installer.zip).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.4 KiB
CMake
71 lines
2.4 KiB
CMake
if(__opus_version)
|
|
return()
|
|
endif()
|
|
set(__opus_version INCLUDED)
|
|
|
|
function(get_package_version PACKAGE_VERSION PROJECT_VERSION)
|
|
|
|
find_package(Git)
|
|
if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
|
|
execute_process(COMMAND ${GIT_EXECUTABLE}
|
|
--git-dir=${CMAKE_CURRENT_LIST_DIR}/.git describe
|
|
--tags --match "v*" OUTPUT_VARIABLE OPUS_PACKAGE_VERSION)
|
|
if(OPUS_PACKAGE_VERSION)
|
|
string(STRIP ${OPUS_PACKAGE_VERSION}, OPUS_PACKAGE_VERSION)
|
|
string(REPLACE \n
|
|
""
|
|
OPUS_PACKAGE_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
string(REPLACE ,
|
|
""
|
|
OPUS_PACKAGE_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
|
|
string(SUBSTRING ${OPUS_PACKAGE_VERSION}
|
|
1
|
|
-1
|
|
OPUS_PACKAGE_VERSION)
|
|
message(STATUS "Opus package version from git repo: ${OPUS_PACKAGE_VERSION}")
|
|
endif()
|
|
|
|
elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/package_version"
|
|
AND NOT OPUS_PACKAGE_VERSION)
|
|
# Not a git repo, lets' try to parse it from package_version file if exists
|
|
file(STRINGS package_version OPUS_PACKAGE_VERSION
|
|
LIMIT_COUNT 1
|
|
REGEX "PACKAGE_VERSION=")
|
|
string(REPLACE "PACKAGE_VERSION="
|
|
""
|
|
OPUS_PACKAGE_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
string(REPLACE "\""
|
|
""
|
|
OPUS_PACKAGE_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
# In case we have a unknown dist here we just replace it with 0
|
|
string(REPLACE "unknown"
|
|
"0"
|
|
OPUS_PACKAGE_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
message(STATUS "Opus package version from package_version file: ${OPUS_PACKAGE_VERSION}")
|
|
endif()
|
|
|
|
if(OPUS_PACKAGE_VERSION)
|
|
string(REGEX
|
|
REPLACE "^([0-9]+.[0-9]+\\.?([0-9]+)?).*"
|
|
"\\1"
|
|
OPUS_PROJECT_VERSION
|
|
${OPUS_PACKAGE_VERSION})
|
|
else()
|
|
# fail to parse version from git and package version
|
|
message(WARNING "Could not get package version.")
|
|
set(OPUS_PACKAGE_VERSION 0)
|
|
set(OPUS_PROJECT_VERSION 0)
|
|
endif()
|
|
|
|
message(STATUS "Opus project version: ${OPUS_PROJECT_VERSION}")
|
|
|
|
set(PACKAGE_VERSION ${OPUS_PACKAGE_VERSION} PARENT_SCOPE)
|
|
set(PROJECT_VERSION ${OPUS_PROJECT_VERSION} PARENT_SCOPE)
|
|
endfunction()
|