Skip to content

Commit a8edd8d

Browse files
committed
fix: downgrade ubuntu version from latest to 22.04
If the AppImage is built with a too recent version of the glibc, it will not run on an older system. For more details, see https://docs.appimage.org/introduction/concepts.html#build-on-old-systems-run-on-newer-systems
0 parents  commit a8edd8d

File tree

6,295 files changed

+666153
-0
lines changed

Some content is hidden

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

6,295 files changed

+666153
-0
lines changed

.ci_scripts/build_appimage.sh

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/bin/bash
2+
3+
########################################################################
4+
# Package the binaries built in CI as an AppImage
5+
# By Simon Peter 2016
6+
# For more information, see http://appimage.org/
7+
########################################################################
8+
9+
10+
if [ $ARCH = '64' ]; then
11+
export ARCH='x86_64';
12+
elif [ $ARCH = '32' ]; then
13+
export ARCH='i386';
14+
fi
15+
16+
APP=SuperTux
17+
LOWERAPP=supertux2
18+
19+
GIT_REV=$(git rev-parse --short HEAD)
20+
echo $GIT_REV
21+
22+
RELEASE_VERSION=$(git describe --tags)
23+
24+
make install DESTDIR=$HOME/$APP/$APP.AppDir
25+
26+
cd $HOME/$APP/
27+
28+
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
29+
#Remove line that should not be in functions.sh
30+
sed -i -r 's/set -x//' functions.sh
31+
#Silence wget
32+
sed -i 's/wget/wget -q/' functions.sh
33+
. ./functions.sh
34+
35+
cd $APP.AppDir
36+
37+
########################################################################
38+
# Copy desktop and icon file to AppDir for AppRun to pick them up
39+
########################################################################
40+
41+
get_apprun
42+
get_desktop
43+
44+
# SVG icons are not supported by get_icon, copy it over manually.
45+
cp ./usr/share/icons/hicolor/scalable/apps/$LOWERAPP.svg . || true
46+
ls -lh $LOWERAPP.svg || true
47+
48+
########################################################################
49+
# Copy in the dependencies that cannot be assumed to be available
50+
# on all target systems
51+
########################################################################
52+
53+
copy_deps
54+
55+
if [ -d "./usr/lib/x86_64-linux-gnu/gstreamer-1.0/" ] ; then
56+
mv -v ./usr/lib/x86_64-linux-gnu/gstreamer-1.0/* ./usr/lib/x86_64-linux-gnu/
57+
rm -vr ./usr/lib/x86_64-linux-gnu/gstreamer-1.0
58+
fi
59+
60+
if [ -d "./usr/lib/x86_64-linux-gnu/pulseaudio/" ] ; then
61+
mv -v ./usr/lib/x86_64-linux-gnu/pulseaudio/* ./usr/lib/x86_64-linux-gnu/
62+
rm -vr ./usr/lib/x86_64-linux-gnu/pulseaudio
63+
fi
64+
65+
########################################################################
66+
# Delete stuff that should not go into the AppImage
67+
########################################################################
68+
69+
# Delete dangerous libraries; see
70+
# https://github.com/probonopd/AppImages/blob/master/excludelist
71+
#delete_blacklisted # We'll need to specify our own blacklist, see below.
72+
73+
# Fix the function ourselves for now
74+
# Delete blacklisted files
75+
delete_blacklisted_patched()
76+
{
77+
BLACKLISTED_FILES=$( cat_file_from_url https://github.com/probonopd/AppImages/raw/master/excludelist | sed '/^\s*$/d' | sed '/^#.*$/d' | sed '/libkrb5.so.26/d' | sed '/libkrb5.so.3/d' | sed '/libhcrypto.so.4/d' | sed '/libhx509.so.5/d' | sed '/libroken.so.18/d' | sed '/libwind.so.0/d')
78+
echo $BLACKLISTED_FILES
79+
for FILE in $BLACKLISTED_FILES ; do
80+
FOUND=$(find . -xtype f -name "${FILE}" 2>/dev/null)
81+
if [ ! -z "$FOUND" ] ; then
82+
echo "Deleting blacklisted ${FOUND}"
83+
rm -f "${FOUND}"
84+
fi
85+
done
86+
87+
# Do not bundle developer stuff
88+
rm -rf usr/include || true
89+
rm -rf usr/lib/cmake || true
90+
rm -rf usr/lib/pkgconfig || true
91+
find . -name '*.la' | xargs -i rm {}
92+
}
93+
94+
delete_blacklisted_patched
95+
96+
########################################################################
97+
# desktopintegration asks the user on first run to install a menu item
98+
########################################################################
99+
100+
get_desktopintegration $LOWERAPP
101+
102+
########################################################################
103+
# Determine the version of the app; also include needed glibc version
104+
########################################################################
105+
106+
VERSION=${RELEASE_VERSION}
107+
export VERSION
108+
109+
########################################################################
110+
# Patch away absolute paths
111+
########################################################################
112+
113+
patch_usr
114+
115+
########################################################################
116+
# AppDir complete
117+
# Now packaging it as an AppImage
118+
########################################################################
119+
120+
cd .. # Go out of AppImage
121+
122+
mkdir -p ../out/
123+
generate_type2_appimage
124+

.ci_scripts/deploy.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
shopt -s nullglob
4+
5+
for file in upload/SuperTux*; do
6+
file_base=$(basename $file)
7+
echo "Uploading $file_base";
8+
export URL="${PREFIX}/$file_base"
9+
export SIZE=$(($(wc -c < "$file")))
10+
if [ $IS_WINDOWS = true ] ; then
11+
export SHASUM=$(powershell -command "Get-FileHash \"$file\" -Algorithm SHA256 | Select-Object -ExpandProperty Hash")
12+
else
13+
export SHASUM=$(shasum -a 256 "$file" | cut -d " " -f 1)
14+
fi
15+
echo "Checksum: $SHASUM";
16+
echo "Branch: $BRANCH_NAME";
17+
jq -n '{"url": ("/" + env["URL"]), "shasum": env["SHASUM"], "size": env["SIZE"] | tonumber, "branch": env["BRANCH_NAME"] }' | \
18+
curl -X POST \
19+
-H "x-api-key: $DOWNLOAD_APIKEY" \
20+
-H "Content-Type: application/json" \
21+
--data-binary @- \
22+
-s https://download.supertux.org/api/download
23+
done

.ci_scripts/package.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
shopt -s nullglob
4+
5+
if ([ "$OS_NAME" = "macos-10.15" ] || [ "$OS_NAME" = "macos-13" ]) && [ "$PACKAGE" = "ON" ]; then
6+
sudo chmod -R +w /usr/local/Cellar
7+
# Workaround resource busy bug on github on MacOS 13
8+
# https://github.com/actions/runner-images/issues/7522
9+
i=0
10+
until
11+
cpack -G Bundle;
12+
do
13+
if [ $i -eq 10 ]; then exit 1; fi
14+
i=$((i+1))
15+
sleep 1
16+
done
17+
fi
18+
19+
# make only one source package
20+
if [ "$SOURCE" = "ON" ]; then
21+
cpack --config CPackSourceConfig.cmake -G TGZ;
22+
fi
23+
24+
if ([[ "$OS_NAME" == "ubuntu"* ]]) && [ "$PACKAGE" = "ON" ]; then
25+
../.ci_scripts/build_appimage.sh
26+
# extract built appimages for uploading
27+
mv ~/out/* .
28+
29+
# CI expects all artifacts to start with "SuperTux-", AppImage generates "SuperTux_v2-...."
30+
for filename in SuperTux_2-*.AppImage; do
31+
[ -f "$filename" ] || continue
32+
mv "$filename" "${filename//_2/}"
33+
done
34+
fi
35+
36+
mkdir upload
37+
mv SuperTux* upload/

.clang-tidy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
Checks: 'clang-diagnostic-*,clang-analyzer-*,portability-*,performance-*,bugprone-*,misc-*,-misc-unused-parameters'
3+
WarningsAsErrors: '*,-bugprone-parent-virtual-call,-clang-analyzer-optin.cplusplus.VirtualCall'
4+
HeaderFilterRegex: 'src/.*hpp'
5+
AnalyzeTemporaryDtors: true
6+
...

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 80
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# STL files are supertux level files, thus do not treat as binary
2+
*.stl text=auto diff=astextplain
3+
*.sprite text=auto
4+
*.stf text=auto
5+
*.stwm text=auto

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platforms
2+
custom: https://paypal.me/supertux?locale.x=en_US

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Bug Report
2+
description: File a report for unexpected behavior in SuperTux.
3+
title: "[Bug]: "
4+
labels: ["type:bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: input
11+
id: supertux-version
12+
attributes:
13+
label: SuperTux Version
14+
description: The version of SuperTux, shown at the bottom-left corner on the title screen.
15+
placeholder: ex. v0.6.3-1236-g7451121dd
16+
validations:
17+
required: true
18+
- type: input
19+
id: system-info
20+
attributes:
21+
label: System Information
22+
description: Details about your operating system (such as Linux distribution or Windows version) and CPU architecture (ex. 64-bit or 32-bit).
23+
placeholder: ex. Windows 11 64-bit
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: expected-behavior
28+
attributes:
29+
label: Expected Behavior
30+
description: What did you expect to happen?
31+
placeholder: Describe the behavior you expected in detail.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: actual-behavior
36+
attributes:
37+
label: Actual Behavior
38+
description: Instead, what actually happened?
39+
placeholder: Describe the actual behavior in detail.
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: steps-to-reproduce
44+
attributes:
45+
label: Steps To Reproduce Actual Behavior
46+
description: A clear and concise description of how the actual behavior was achieved, since starting up the game.
47+
placeholder: |
48+
Describe the steps leading to the actual behavior, preferably with a numerated list.
49+
50+
1. ...
51+
2. ...
52+
3. ...
53+
validations:
54+
required: true
55+
- type: textarea
56+
id: additional-info
57+
attributes:
58+
label: Additional Information
59+
description: Include any additional information regarding the bug.
60+
placeholder: You can also leave this empty.
61+
validations:
62+
required: false
63+
- type: checkboxes
64+
id: guidelines
65+
attributes:
66+
label: Guidelines For Reporting Issues
67+
description: "Before submitting this issue, make sure you have done the following:"
68+
options:
69+
- label: I have read <https://github.com/SuperTux/supertux/blob/master/CONTRIBUTING.md#bug-reports>.
70+
required: true
71+
- label: I have verified this isn't an issue that's already been reported.
72+
required: true
73+
- label: I have verified this isn't a [discussion](https://github.com/SuperTux/supertux/discussions), or an issue about a crash or a feature request, but rather an actual bug ─ that is, the game did something not intended.
74+
required: true
75+
- label: I have verified this issue is **not** about wrong translations (use Transifex for those), or anything unsupported (e.g. third-party add-ons).
76+
required: true
77+
- label: In this report, I have only included details about **one** (1) bug.
78+
required: true
79+
- label: If I make a mistake while submitting this report, I agree to use the "Edit" feature to correct it, instead of closing this issue and opening a new one.
80+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Create a Discussion
4+
url: https://github.com/SuperTux/supertux/discussions/new/choose
5+
about: If you're looking for something else, create a Discussion, assuming this hasn't been reported there before.

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Crash Report
2+
description: File a report for a crash in SuperTux.
3+
title: "[Crash]: "
4+
labels: ["type:crash"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this crash report!
10+
- type: input
11+
id: supertux-version
12+
attributes:
13+
label: SuperTux Version
14+
description: The version of SuperTux, shown at the bottom-left corner on the title screen.
15+
placeholder: ex. v0.6.3-1236-g7451121dd
16+
validations:
17+
required: true
18+
- type: input
19+
id: system-info
20+
attributes:
21+
label: System Information
22+
description: Details about your operating system (such as Linux distribution or Windows version) and CPU architecture (ex. 64-bit or 32-bit).
23+
placeholder: ex. Windows 11 64-bit
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: steps-to-reproduce
28+
attributes:
29+
label: Steps To Reproduce Crash
30+
description: A clear and concise description of how the crash was achieved, since starting up the game.
31+
placeholder: |
32+
Describe the steps, leading to the crash, preferably with a numerated list.
33+
34+
1. ...
35+
2. ...
36+
3. ...
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: debug-stacktrace
41+
attributes:
42+
label: Debugging Information (Stacktrace)
43+
description: Include a stacktrace, leading to the crash. This can be obtained via a debugging utility.
44+
placeholder: |
45+
Paste the full stacktrace here.
46+
47+
You can leave this empty, in case a stacktrace can't be obtained (for example, if the game freezes).
48+
render: shell
49+
validations:
50+
required: false
51+
- type: textarea
52+
id: additional-info
53+
attributes:
54+
label: Additional Information
55+
description: Include any additional information, regarding the crash.
56+
placeholder: You can also leave this empty.
57+
validations:
58+
required: false
59+
- type: checkboxes
60+
id: guidelines
61+
attributes:
62+
label: Guidelines For Reporting Issues
63+
description: "Before submitting this issue, make sure you have done the following:"
64+
options:
65+
- label: I have read <https://github.com/SuperTux/supertux/blob/master/CONTRIBUTING.md#bug-reports>.
66+
required: true
67+
- label: I have verified this isn't an issue that's already been reported.
68+
required: true
69+
- label: I have verified this isn't a [discussion](https://github.com/SuperTux/supertux/discussions), or an issue about unintended behavior or a feature request, but rather an actual crash ─ that is, the game closed unexpectedly.
70+
required: true
71+
- label: I have verified this issue is **not** about wrong translations (use Transifex for those), or anything unsupported (e.g. third-party add-ons).
72+
required: true
73+
- label: In this report, I have only included details about **one** (1) crash.
74+
required: true
75+
- label: If I make a mistake while submitting this report, I agree to use the "Edit" feature to correct it, instead of closing this issue and opening a new one.
76+
required: true

0 commit comments

Comments
 (0)