Skip to content

Commit 050053a

Browse files
committed
feat(upstream): merge PrismLauncher 10.0.1
Signed-off-by: so5iso4ka <[email protected]>
2 parents b3e7e74 + 3e5990f commit 050053a

File tree

17 files changed

+391
-263
lines changed

17 files changed

+391
-263
lines changed

.github/actions/package/linux/action.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ runs:
5252
- name: Package AppImage
5353
shell: bash
5454
env:
55-
VERSION: ${{ inputs.version }}
55+
VERSION: ${{ github.ref_type == 'tag' && github.ref_name || inputs.version }}
5656
BUILD_DIR: build
5757
INSTALL_APPIMAGE_DIR: install-appdir
5858

@@ -84,10 +84,16 @@ runs:
8484
mv "$INSTALL_APPIMAGE_DIR"/{sharun,AppRun}
8585
ls -la "$INSTALL_APPIMAGE_DIR"
8686
87+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
88+
APPIMAGE_DEST="FreesmLauncher-Linux-$APPIMAGE_ARCH.AppImage"
89+
else
90+
APPIMAGE_DEST="FreesmLauncher-Linux-$VERSION-${{ inputs.build-type }}-$APPIMAGE_ARCH.AppImage"
91+
fi
92+
8793
mkappimage \
8894
--updateinformation "gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|FreesmLauncher-Linux-$APPIMAGE_ARCH.AppImage.zsync" \
8995
"$INSTALL_APPIMAGE_DIR" \
90-
"FreesmLauncher-Linux-$VERSION-${{ inputs.build-type }}-$APPIMAGE_ARCH.AppImage"
96+
"$APPIMAGE_DEST"
9197
9298
- name: Package portable tarball
9399
shell: bash
@@ -108,7 +114,7 @@ runs:
108114
# FIXME(@getchoo): gamemode doesn't seem to be very portable with DBus. Find a way to make it work!
109115
find "$INSTALL_PORTABLE_DIR" -name '*gamemode*' -exec rm {} +
110116
111-
for l in $(find ${{ env.INSTALL_PORTABLE_DIR }} -type f); do l=${l#$(pwd)/}; l=${l#${{ env.INSTALL_PORTABLE_DIR }}/}; l=${l#./}; echo $l; done > ${{ env.INSTALL_PORTABLE_DIR }}/manifest.txt
117+
for l in $(find ${{ env.INSTALL_PORTABLE_DIR }} -type f -o -type l); do l=${l#$(pwd)/}; l=${l#${{ env.INSTALL_PORTABLE_DIR }}/}; l=${l#./}; echo $l; done > ${{ env.INSTALL_PORTABLE_DIR }}/manifest.txt
112118
cd ${{ env.INSTALL_PORTABLE_DIR }}
113119
tar -czf ../FreesmLauncher-portable.tar.gz *
114120
@@ -122,10 +128,10 @@ runs:
122128
uses: actions/upload-artifact@v6
123129
with:
124130
name: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage
125-
path: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage
131+
path: FreesmLauncher-${{ runner.os }}-*${{ env.APPIMAGE_ARCH }}.AppImage
126132

127133
- name: Upload AppImage Zsync
128134
uses: actions/upload-artifact@v6
129135
with:
130136
name: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage.zsync
131-
path: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage.zsync
137+
path: FreesmLauncher-${{ runner.os }}-*${{ env.APPIMAGE_ARCH }}.AppImage.zsync

.github/actions/setup-dependencies/macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ runs:
4444
- name: Setup vcpkg environment
4545
shell: bash
4646
run: |
47-
echo "CMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_ENV"
47+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> "$GITHUB_ENV"

.github/actions/setup-dependencies/windows/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ runs:
5757
if: ${{ inputs.msystem == '' }}
5858
shell: bash
5959
run: |
60-
echo "CMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_ENV"
60+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> "$GITHUB_ENV"
6161
6262
- name: Setup MSYS2 (MinGW)
6363
if: ${{ inputs.msystem != '' }}

CMakeLists.txt

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
cmake_minimum_required(VERSION 3.22) # minimum version required by Qt
22

33
project(Launcher LANGUAGES C CXX)
4-
if (APPLE)
4+
if(APPLE)
55
enable_language(OBJC OBJCXX)
6-
endif ()
6+
endif()
77

88
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
99
if(IS_IN_SOURCE_BUILD)
@@ -99,7 +99,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}"
9999

100100
# Export compile commands for debug builds if we can (useful in LSPs like clangd)
101101
# https://cmake.org/cmake/help/v3.31/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
102-
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR MATCHES "^Ninja")
102+
if(CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR MATCHES "^Ninja")
103103
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
104104
endif()
105105

@@ -294,7 +294,7 @@ set(Launcher_BUILD_TIMESTAMP "${TODAY}")
294294
################################ 3rd Party Libs ################################
295295

296296
# Find the required Qt parts
297-
if (Launcher_QT_VERSION_MAJOR EQUAL 6)
297+
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
298298
set(QT_VERSION_MAJOR 6)
299299
find_package(Qt6 REQUIRED COMPONENTS Core CoreTools Widgets Concurrent Network Test Xml NetworkAuth OpenGL)
300300
find_package(Qt6 COMPONENTS DBus)
@@ -303,42 +303,42 @@ else()
303303
message(FATAL_ERROR "Qt version ${Launcher_QT_VERSION_MAJOR} is not supported")
304304
endif()
305305

306-
if (Launcher_QT_VERSION_MAJOR EQUAL 6)
306+
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
307307
set(QT_PLUGINS_DIR ${QT${QT_VERSION_MAJOR}_INSTALL_PREFIX}/${QT${QT_VERSION_MAJOR}_INSTALL_PLUGINS})
308308
set(QT_LIBS_DIR ${QT${QT_VERSION_MAJOR}_INSTALL_PREFIX}/${QT${QT_VERSION_MAJOR}_INSTALL_LIBS})
309309
set(QT_LIBEXECS_DIR ${QT${QT_VERSION_MAJOR}_INSTALL_PREFIX}/${QT${QT_VERSION_MAJOR}_INSTALL_LIBEXECS})
310310
endif()
311311

312312
find_package(cmark REQUIRED)
313313

314-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
314+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
315315
find_package(PkgConfig REQUIRED)
316316
pkg_check_modules(gamemode REQUIRED IMPORTED_TARGET gamemode)
317317
endif()
318318

319319
# Find libqrencode
320320
## NOTE(@getchoo): Never use pkg-config with MSVC since the vcpkg port makes our install bundle fail to find the dll
321-
if (MSVC)
321+
if(MSVC)
322322
find_path(LIBQRENCODE_INCLUDE_DIR qrencode.h REQUIRED)
323323
find_library(LIBQRENCODE_LIBRARY_RELEASE qrencode REQUIRED)
324324
find_library(LIBQRENCODE_LIBRARY_DEBUG qrencoded)
325325
set(LIBQRENCODE_LIBRARIES optimized ${LIBQRENCODE_LIBRARY_RELEASE} debug ${LIBQRENCODE_LIBRARY_DEBUG})
326-
else ()
326+
else()
327327
find_package(PkgConfig REQUIRED)
328328
pkg_check_modules(libqrencode REQUIRED IMPORTED_TARGET libqrencode)
329-
endif ()
329+
endif()
330330

331331
# Find libarchive through CMake packages, mainly for vcpkg
332332
find_package(LibArchive)
333333
# CMake packages aren't available in most distributions of libarchive, so fallback to pkg-config
334-
if (NOT LibArchive_FOUND)
334+
if(NOT LibArchive_FOUND)
335335
find_package(PkgConfig REQUIRED)
336336
pkg_check_modules(libarchive REQUIRED IMPORTED_TARGET libarchive)
337-
endif ()
337+
endif()
338338

339339
find_package(tomlplusplus 3.2.0)
340340
# fallback to pkgconfig, important especially as many distros package toml++ built with meson
341-
if (NOT tomlplusplus_FOUND)
341+
if(NOT tomlplusplus_FOUND)
342342
find_package(PkgConfig REQUIRED)
343343
pkg_check_modules(tomlplusplus REQUIRED IMPORTED_TARGET tomlplusplus>=3.2.0)
344344
endif()
@@ -399,49 +399,49 @@ if(UNIX AND APPLE)
399399
install(FILES ${Launcher_Branding_ICNS} DESTINATION ${RESOURCES_DEST_DIR} RENAME ${Launcher_Name}.icns)
400400

401401
find_program(ACTOOL_EXE actool DOC "Path to the apple asset catalog compiler")
402-
if (ACTOOL_EXE)
402+
if(ACTOOL_EXE)
403403
execute_process(
404-
COMMAND xcodebuild -version
405-
OUTPUT_VARIABLE XCODE_VERSION_OUTPUT
406-
OUTPUT_STRIP_TRAILING_WHITESPACE
404+
COMMAND xcodebuild -version
405+
OUTPUT_VARIABLE XCODE_VERSION_OUTPUT
406+
OUTPUT_STRIP_TRAILING_WHITESPACE
407407
)
408408

409409
string(REGEX MATCH "Xcode ([0-9]+\.[0-9]+)" XCODE_VERSION_MATCH "${XCODE_VERSION_OUTPUT}")
410-
if (XCODE_VERSION_MATCH)
410+
if(XCODE_VERSION_MATCH)
411411
set(XCODE_VERSION ${CMAKE_MATCH_1})
412-
else ()
412+
else()
413413
set(XCODE_VERSION 0.0)
414-
endif ()
414+
endif()
415415

416-
if (XCODE_VERSION VERSION_GREATER_EQUAL 26.0)
416+
if(XCODE_VERSION VERSION_GREATER_EQUAL 26.0)
417417
set(ASSETS_OUT_DIR "${CMAKE_BINARY_DIR}/program_info")
418418
set(GENERATED_ASSETS_CAR "${ASSETS_OUT_DIR}/Assets.car")
419419
set(ICON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_Branding_MAC_ICON}")
420420

421421
add_custom_command(
422-
OUTPUT "${GENERATED_ASSETS_CAR}"
423-
COMMAND ${ACTOOL_EXE} "${ICON_SOURCE}"
424-
--compile "${ASSETS_OUT_DIR}"
425-
--output-partial-info-plist /dev/null
426-
--app-icon PrismLauncher
427-
--enable-on-demand-resources NO
428-
--target-device mac
429-
--minimum-deployment-target ${CMAKE_OSX_DEPLOYMENT_TARGET}
430-
--platform macosx
431-
DEPENDS "${ICON_SOURCE}"
432-
COMMENT "Compiling asset catalog (${ICON_SOURCE})"
433-
VERBATIM
422+
OUTPUT "${GENERATED_ASSETS_CAR}"
423+
COMMAND ${ACTOOL_EXE} "${ICON_SOURCE}"
424+
--compile "${ASSETS_OUT_DIR}"
425+
--output-partial-info-plist /dev/null
426+
--app-icon PrismLauncher
427+
--enable-on-demand-resources NO
428+
--target-device mac
429+
--minimum-deployment-target ${CMAKE_OSX_DEPLOYMENT_TARGET}
430+
--platform macosx
431+
DEPENDS "${ICON_SOURCE}"
432+
COMMENT "Compiling asset catalog (${ICON_SOURCE})"
433+
VERBATIM
434434
)
435435
add_custom_target(compile_assets ALL DEPENDS "${GENERATED_ASSETS_CAR}")
436436
install(FILES "${GENERATED_ASSETS_CAR}" DESTINATION "${RESOURCES_DEST_DIR}")
437-
else ()
437+
else()
438438
message(WARNING "Xcode ${XCODE_VERSION} is too old. Minimum required version is 26.0. Not compiling liquid glass icons.")
439-
endif ()
439+
endif()
440440

441-
else ()
441+
else()
442442
message(WARNING "actool not found. Cannot compile macOS app icons.\n"
443-
"Install Xcode command line tools: 'xcode-select --install'")
444-
endif ()
443+
"Install Xcode command line tools: 'xcode-select --install'")
444+
endif()
445445

446446

447447
elseif(UNIX)

0 commit comments

Comments
 (0)