Skip to content

Commit 07e7c21

Browse files
feat(upstream): bump to 10.0.2 (#145)
2 parents ed38774 + 7a5414f commit 07e7c21

File tree

667 files changed

+27826
-13544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

667 files changed

+27826
-13544
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ AllowShortIfStatementsOnASingleLine: false
55
ColumnLimit: 140
66
---
77
Language: Cpp
8+
AccessModifierOffset: -1
89
AlignConsecutiveMacros: None
910
AlignConsecutiveAssignments: None
1011
BraceWrapping:

.clang-tidy

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ Checks:
77
# ^ Without unused-parameters the readability-identifier-naming check doesn't cause any warnings.
88

99
CheckOptions:
10-
- { key: readability-identifier-naming.ClassCase, value: PascalCase }
11-
- { key: readability-identifier-naming.EnumCase, value: PascalCase }
12-
- { key: readability-identifier-naming.FunctionCase, value: camelCase }
13-
- { key: readability-identifier-naming.GlobalVariableCase, value: camelCase }
14-
- { key: readability-identifier-naming.GlobalFunctionCase, value: camelCase }
15-
- { key: readability-identifier-naming.GlobalConstantCase, value: SCREAMING_SNAKE_CASE }
16-
- { key: readability-identifier-naming.MacroDefinitionCase, value: SCREAMING_SNAKE_CASE }
17-
- { key: readability-identifier-naming.ClassMemberCase, value: camelCase }
18-
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ }
19-
- { key: readability-identifier-naming.ProtectedMemberPrefix, value: m_ }
20-
- { key: readability-identifier-naming.PrivateStaticMemberPrefix, value: s_ }
10+
- { key: readability-identifier-naming.ClassCase, value: PascalCase }
11+
- { key: readability-identifier-naming.EnumCase, value: PascalCase }
12+
- { key: readability-identifier-naming.FunctionCase, value: camelCase }
13+
- { key: readability-identifier-naming.GlobalVariableCase, value: camelCase }
14+
- { key: readability-identifier-naming.GlobalFunctionCase, value: camelCase }
15+
- { key: readability-identifier-naming.GlobalConstantCase, value: SCREAMING_SNAKE_CASE }
16+
- { key: readability-identifier-naming.MacroDefinitionCase, value: SCREAMING_SNAKE_CASE }
17+
- { key: readability-identifier-naming.ClassMemberCase, value: camelCase }
18+
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ }
19+
- { key: readability-identifier-naming.ProtectedMemberPrefix, value: m_ }
20+
- { key: readability-identifier-naming.PrivateStaticMemberPrefix, value: s_ }
2121
- { key: readability-identifier-naming.ProtectedStaticMemberPrefix, value: s_ }
22-
- { key: readability-identifier-naming.PublicStaticConstantCase, value: SCREAMING_SNAKE_CASE }
23-
- { key: readability-identifier-naming.EnumConstantCase, value: SCREAMING_SNAKE_CASE }
22+
- { key: readability-identifier-naming.PublicStaticConstantCase, value: SCREAMING_SNAKE_CASE }
23+
- { key: readability-identifier-naming.EnumConstantCase, value: PascalCase }

.editorconfig

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# EditorConfig specs and documentation: https://EditorConfig.org
2-
3-
# top-most EditorConfig file
4-
root = true
5-
6-
# C++ Code Style settings
7-
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
8-
cpp_generate_documentation_comments = doxygen_slash_star
1+
# EditorConfig specs and documentation: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
charset = utf-8
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.{yml,nix}]
15+
indent_size = 2
16+
17+
# C++ Code Style settings
18+
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
19+
cpp_generate_documentation_comments = doxygen_slash_star
20+
21+
[CMakeLists.txt]
22+
ij_continuation_indent_size = 4

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9
55

66
# (nix) alejandra -> nixfmt
77
4c81d8c53d09196426568c4a31a4e752ed05397a
8+
9+
# reformat codebase
10+
1d468ac35ad88d8c77cc83f25e3704d9bd7df01b
11+
12+
# format a part of codebase
13+
5c8481a118c8fefbfe901001d7828eaf6866eac4
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Package for Linux
2+
description: Create Linux packages for Freesm Launcher
3+
4+
inputs:
5+
version:
6+
description: Launcher version
7+
required: true
8+
build-type:
9+
description: Type for the build
10+
required: true
11+
default: Debug
12+
artifact-name:
13+
description: Name of the uploaded artifact
14+
required: true
15+
default: Linux
16+
qt-version:
17+
description: Version of Qt to use
18+
required: true
19+
gpg-private-key:
20+
description: Private key for AppImage signing
21+
required: false
22+
gpg-private-key-id:
23+
description: ID for the gpg-private-key, to select the signing key
24+
required: false
25+
26+
runs:
27+
using: composite
28+
29+
steps:
30+
- name: Setup build variables
31+
shell: bash
32+
run: |
33+
# Fixup architecture naming for AppImages
34+
dpkg_arch="$(dpkg-architecture -q DEB_HOST_ARCH_CPU)"
35+
case "$dpkg_arch" in
36+
"amd64")
37+
APPIMAGE_ARCH="x86_64"
38+
;;
39+
"arm64")
40+
APPIMAGE_ARCH="aarch64"
41+
;;
42+
*)
43+
echo "# 🚨 The Debian architecture \"$deb_arch\" is not recognized!" >> "$GITHUB_STEP_SUMMARY"
44+
exit 1
45+
;;
46+
esac
47+
echo "APPIMAGE_ARCH=$APPIMAGE_ARCH" >> "$GITHUB_ENV"
48+
49+
# Used for the file paths of libraries
50+
echo "DEB_HOST_MULTIARCH=$(dpkg-architecture -q DEB_HOST_MULTIARCH)" >> "$GITHUB_ENV"
51+
52+
- name: Package AppImage
53+
shell: bash
54+
env:
55+
VERSION: ${{ github.ref_type == 'tag' && github.ref_name || inputs.version }}
56+
BUILD_DIR: build
57+
INSTALL_APPIMAGE_DIR: install-appdir
58+
59+
GPG_PRIVATE_KEY: ${{ inputs.gpg-private-key }}
60+
run: |
61+
cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}
62+
63+
if [ '${{ inputs.gpg-private-key-id }}' != '' ]; then
64+
echo "$GPG_PRIVATE_KEY" > privkey.asc
65+
gpg --import privkey.asc
66+
gpg --export --armor 9C7A2C9B62603299 > pubkey.asc
67+
else
68+
echo ":warning: Skipped code signing for Linux AppImage, as gpg key was not present." >> $GITHUB_STEP_SUMMARY
69+
fi
70+
71+
sharun lib4bin \
72+
--hard-links \
73+
--with-hooks \
74+
--dst-dir "$INSTALL_APPIMAGE_DIR" \
75+
"$INSTALL_APPIMAGE_DIR"/bin/* "$QT_PLUGIN_PATH"/*/*.so
76+
77+
cp ~/bin/AppImageUpdate.AppImage "$INSTALL_APPIMAGE_DIR"/bin/
78+
# FIXME(@getchoo): gamemode doesn't seem to be very portable with DBus. Find a way to make it work!
79+
find "$INSTALL_APPIMAGE_DIR" -name '*gamemode*' -exec rm {} +
80+
81+
ln -s org.freesmTeam.freesmlauncher.metainfo.xml "$INSTALL_APPIMAGE_DIR"/share/metainfo/org.freesmTeam.freesmlauncher.appdata.xml
82+
ln -s share/applications/org.freesmTeam.freesmlauncher.desktop "$INSTALL_APPIMAGE_DIR"
83+
ln -s share/icons/hicolor/256x256/apps/org.freesmTeam.freesmlauncher.png "$INSTALL_APPIMAGE_DIR"
84+
mv "$INSTALL_APPIMAGE_DIR"/{sharun,AppRun}
85+
ls -la "$INSTALL_APPIMAGE_DIR"
86+
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+
93+
mkappimage \
94+
--updateinformation "gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|FreesmLauncher-Linux-$APPIMAGE_ARCH.AppImage.zsync" \
95+
"$INSTALL_APPIMAGE_DIR" \
96+
"$APPIMAGE_DEST"
97+
98+
- name: Package portable tarball
99+
shell: bash
100+
env:
101+
BUILD_DIR: build
102+
103+
INSTALL_PORTABLE_DIR: install-portable
104+
run: |
105+
cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_PORTABLE_DIR }}
106+
cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
107+
108+
sharun lib4bin \
109+
--with-hooks \
110+
--hard-links \
111+
--dst-dir "$INSTALL_PORTABLE_DIR" \
112+
"$INSTALL_PORTABLE_DIR"/bin/* "$QT_PLUGIN_PATH"/*/*.so
113+
114+
# FIXME(@getchoo): gamemode doesn't seem to be very portable with DBus. Find a way to make it work!
115+
find "$INSTALL_PORTABLE_DIR" -name '*gamemode*' -exec rm {} +
116+
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
118+
cd ${{ env.INSTALL_PORTABLE_DIR }}
119+
tar -czf ../FreesmLauncher-portable.tar.gz *
120+
121+
- name: Upload binary tarball
122+
uses: actions/upload-artifact@v6
123+
with:
124+
name: FreesmLauncher-${{ inputs.artifact-name }}-Qt6-Portable-${{ inputs.version }}-${{ inputs.build-type }}
125+
path: FreesmLauncher-portable.tar.gz
126+
127+
- name: Upload AppImage
128+
uses: actions/upload-artifact@v6
129+
with:
130+
name: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage
131+
path: FreesmLauncher-${{ runner.os }}-*${{ env.APPIMAGE_ARCH }}.AppImage
132+
133+
- name: Upload AppImage Zsync
134+
uses: actions/upload-artifact@v6
135+
with:
136+
name: FreesmLauncher-${{ runner.os }}-${{ inputs.version }}-${{ inputs.build-type }}-${{ env.APPIMAGE_ARCH }}.AppImage.zsync
137+
path: FreesmLauncher-${{ runner.os }}-*${{ env.APPIMAGE_ARCH }}.AppImage.zsync
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Package for macOS
2+
description: Create a macOS package for Freesm Launcher
3+
4+
inputs:
5+
version:
6+
description: Launcher version
7+
required: true
8+
build-type:
9+
description: Type for the build
10+
required: true
11+
default: Debug
12+
artifact-name:
13+
description: Name of the uploaded artifact
14+
required: true
15+
default: macOS
16+
apple-codesign-cert:
17+
description: Certificate for signing macOS builds
18+
required: false
19+
apple-codesign-password:
20+
description: Password for signing macOS builds
21+
required: false
22+
apple-codesign-id:
23+
description: Certificate ID for signing macOS builds
24+
required: false
25+
apple-notarize-apple-id:
26+
description: Apple ID used for notarizing macOS builds
27+
required: false
28+
apple-notarize-team-id:
29+
description: Team ID used for notarizing macOS builds
30+
required: false
31+
apple-notarize-password:
32+
description: Password used for notarizing macOS builds
33+
required: false
34+
sparkle-ed25519-key:
35+
description: Private key for signing Sparkle updates
36+
required: false
37+
38+
runs:
39+
using: composite
40+
41+
steps:
42+
- name: Fetch codesign certificate
43+
shell: bash
44+
run: |
45+
echo '${{ inputs.apple-codesign-cert }}' | base64 --decode > codesign.p12
46+
if [ -n '${{ inputs.apple-codesign-id }}' ]; then
47+
security create-keychain -p '${{ inputs.apple-codesign-password }}' build.keychain
48+
security default-keychain -s build.keychain
49+
security unlock-keychain -p '${{ inputs.apple-codesign-password }}' build.keychain
50+
security import codesign.p12 -k build.keychain -P '${{ inputs.apple-codesign-password }}' -T /usr/bin/codesign
51+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k '${{ inputs.apple-codesign-password }}' build.keychain
52+
else
53+
echo ":warning: Using ad-hoc code signing for macOS, as certificate was not present." >> $GITHUB_STEP_SUMMARY
54+
fi
55+
56+
- name: Package
57+
shell: bash
58+
env:
59+
BUILD_DIR: build
60+
INSTALL_DIR: install
61+
run: |
62+
cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }}
63+
64+
cd ${{ env.INSTALL_DIR }}
65+
chmod +x "FreesmLauncher.app/Contents/MacOS/freesmlauncher"
66+
67+
if [ -n '${{ inputs.apple-codesign-id }}' ]; then
68+
APPLE_CODESIGN_ID='${{ inputs.apple-codesign-id }}'
69+
ENTITLEMENTS_FILE='../program_info/App.entitlements'
70+
else
71+
APPLE_CODESIGN_ID='-'
72+
ENTITLEMENTS_FILE='../program_info/AdhocSignedApp.entitlements'
73+
fi
74+
75+
sudo codesign --sign "$APPLE_CODESIGN_ID" --deep --force --entitlements "$ENTITLEMENTS_FILE" --options runtime "FreesmLauncher.app/Contents/MacOS/freesmlauncher"
76+
mv "FreesmLauncher.app" "Freesm Launcher.app"
77+
78+
- name: Notarize
79+
shell: bash
80+
env:
81+
INSTALL_DIR: install
82+
run: |
83+
cd ${{ env.INSTALL_DIR }}
84+
85+
if [ -n '${{ inputs.apple-notarize-password }}' ]; then
86+
ditto -c -k --sequesterRsrc --keepParent "Freesm Launcher.app" ../FreesmLauncher.zip
87+
xcrun notarytool submit ../FreesmLauncher.zip \
88+
--wait --progress \
89+
--apple-id '${{ inputs.apple-notarize-apple-id }}' \
90+
--team-id '${{ inputs.apple-notarize-team-id }}' \
91+
--password '${{ inputs.apple-notarize-password }}'
92+
93+
xcrun stapler staple "Freesm Launcher.app"
94+
else
95+
echo ":warning: Skipping notarization as credentials are not present." >> $GITHUB_STEP_SUMMARY
96+
fi
97+
ditto -c -k --sequesterRsrc --keepParent "Freesm Launcher.app" ../FreesmLauncher.zip
98+
99+
- name: Make Sparkle signature
100+
shell: bash
101+
run: |
102+
if [ '${{ inputs.sparkle-ed25519-key }}' != '' ]; then
103+
echo '${{ inputs.sparkle-ed25519-key }}' > ed25519-priv.pem
104+
signature=$(/opt/homebrew/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/FreesmLauncher.zip -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
105+
rm ed25519-priv.pem
106+
cat >> $GITHUB_STEP_SUMMARY << EOF
107+
### Artifact Information :information_source:
108+
- :memo: Sparkle Signature (ed25519): \`$signature\`
109+
EOF
110+
else
111+
cat >> $GITHUB_STEP_SUMMARY << EOF
112+
### Artifact Information :information_source:
113+
- :warning: Sparkle Signature (ed25519): No private key available (likely a pull request or fork)
114+
EOF
115+
fi
116+
117+
- name: Upload binary tarball
118+
uses: actions/upload-artifact@v6
119+
with:
120+
name: FreesmLauncher-${{ inputs.artifact-name }}-${{ inputs.version }}-${{ inputs.build-type }}
121+
path: FreesmLauncher.zip

0 commit comments

Comments
 (0)