Skip to content

Commit

Permalink
SDL WAyland
Browse files Browse the repository at this point in the history
  • Loading branch information
jhayar0719 committed Sep 27, 2024
0 parents commit abfd7c6
Show file tree
Hide file tree
Showing 6,358 changed files with 723,444 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
124 changes: 124 additions & 0 deletions .ci_scripts/build_appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#!/bin/bash

########################################################################
# Package the binaries built in CI as an AppImage
# By Simon Peter 2016
# For more information, see http://appimage.org/
########################################################################


if [ $ARCH = '64' ]; then
export ARCH='x86_64';
elif [ $ARCH = '32' ]; then
export ARCH='i386';
fi

APP=SuperTux
LOWERAPP=supertux2

GIT_REV=$(git rev-parse --short HEAD)
echo $GIT_REV

RELEASE_VERSION=$(git describe --tags)

make install DESTDIR=$HOME/$APP/$APP.AppDir

cd $HOME/$APP/

wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
#Remove line that should not be in functions.sh
sed -i -r 's/set -x//' functions.sh
#Silence wget
sed -i 's/wget/wget -q/' functions.sh
. ./functions.sh

cd $APP.AppDir

########################################################################
# Copy desktop and icon file to AppDir for AppRun to pick them up
########################################################################

get_apprun
get_desktop

# SVG icons are not supported by get_icon, copy it over manually.
cp ./usr/share/icons/hicolor/scalable/apps/$LOWERAPP.svg . || true
ls -lh $LOWERAPP.svg || true

########################################################################
# Copy in the dependencies that cannot be assumed to be available
# on all target systems
########################################################################

copy_deps

if [ -d "./usr/lib/x86_64-linux-gnu/gstreamer-1.0/" ] ; then
mv -v ./usr/lib/x86_64-linux-gnu/gstreamer-1.0/* ./usr/lib/x86_64-linux-gnu/
rm -vr ./usr/lib/x86_64-linux-gnu/gstreamer-1.0
fi

if [ -d "./usr/lib/x86_64-linux-gnu/pulseaudio/" ] ; then
mv -v ./usr/lib/x86_64-linux-gnu/pulseaudio/* ./usr/lib/x86_64-linux-gnu/
rm -vr ./usr/lib/x86_64-linux-gnu/pulseaudio
fi

########################################################################
# Delete stuff that should not go into the AppImage
########################################################################

# Delete dangerous libraries; see
# https://github.com/probonopd/AppImages/blob/master/excludelist
#delete_blacklisted # We'll need to specify our own blacklist, see below.

# Fix the function ourselves for now
# Delete blacklisted files
delete_blacklisted_patched()
{
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')
echo $BLACKLISTED_FILES
for FILE in $BLACKLISTED_FILES ; do
FOUND=$(find . -xtype f -name "${FILE}" 2>/dev/null)
if [ ! -z "$FOUND" ] ; then
echo "Deleting blacklisted ${FOUND}"
rm -f "${FOUND}"
fi
done

# Do not bundle developer stuff
rm -rf usr/include || true
rm -rf usr/lib/cmake || true
rm -rf usr/lib/pkgconfig || true
find . -name '*.la' | xargs -i rm {}
}

delete_blacklisted_patched

########################################################################
# desktopintegration asks the user on first run to install a menu item
########################################################################

get_desktopintegration $LOWERAPP

########################################################################
# Determine the version of the app; also include needed glibc version
########################################################################

VERSION=${RELEASE_VERSION}
export VERSION

########################################################################
# Patch away absolute paths
########################################################################

patch_usr

########################################################################
# AppDir complete
# Now packaging it as an AppImage
########################################################################

cd .. # Go out of AppImage

mkdir -p ../out/
generate_type2_appimage

23 changes: 23 additions & 0 deletions .ci_scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

shopt -s nullglob

for file in upload/SuperTux*; do
file_base=$(basename $file)
echo "Uploading $file_base";
url="https://supertux-ci-downloads.s3-us-west-2.amazonaws.com/${PREFIX}/$file_base"
size=$(($(wc -c < "$file")))
if [ $IS_WINDOWS = true ] ; then
shasum=$(powershell -command "Get-FileHash \"$file\" -Algorithm SHA256 | Select-Object -ExpandProperty Hash")
else
shasum=$(shasum -a 256 "$file" | cut -d " " -f 1)
fi
echo "Checksum: $shasum";
echo "Branch: $BRANCH_NAME";
curl --data "apikey=$DOWNLOAD_APIKEY" \
--data "url=$url" \
--data "size=$size" \
--data "branch=$BRANCH_NAME" \
--data "shasum=$shasum" \
-L -s https://download.supertux.org/submit.php
done
28 changes: 28 additions & 0 deletions .ci_scripts/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

shopt -s nullglob

if ([ "$OS_NAME" = "macos-10.15" ] || [ "$OS_NAME" = "macos-12" ]) && [ "$PACKAGE" = "ON" ]; then
sudo chmod -R +w /usr/local/Cellar
cpack -G Bundle;
fi

# make only one source package
if [ "$SOURCE" = "ON" ]; then
cpack --config CPackSourceConfig.cmake -G TGZ;
fi

if ([ "$OS_NAME" = "ubuntu-20.04" ] || [ "$OS_NAME" = "ubuntu-18.04" ]) && [ "$PACKAGE" = "ON" ]; then
../.ci_scripts/build_appimage.sh
# extract built appimages for uploading
mv ~/out/* .

# CI expects all artifacts to start with "SuperTux-", AppImage generates "SuperTux_v2-...."
for filename in SuperTux_2-*.AppImage; do
[ -f "$filename" ] || continue
mv "$filename" "${filename//_2/}"
done
fi

mkdir upload
mv SuperTux* upload/
6 changes: 6 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,portability-*,performance-*,bugprone-*,misc-*,-misc-unused-parameters'
WarningsAsErrors: '*,-bugprone-parent-virtual-call,-clang-analyzer-optin.cplusplus.VirtualCall'
HeaderFilterRegex: 'src/.*hpp'
AnalyzeTemporaryDtors: true
...
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# STL files are supertux level files, thus do not treat as binary
*.stl text=auto diff=astextplain
*.sprite text=auto
*.stf text=auto
*.stwm text=auto
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These are supported funding model platforms
custom: https://paypal.me/supertux?locale.x=en_US
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug Report
description: File a report for unexpected behavior in SuperTux.
title: "[Bug]: "
labels: ["type:bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: supertux-version
attributes:
label: SuperTux Version
description: The version of SuperTux, shown at the bottom-left corner on the title screen.
placeholder: ex. v0.6.3-1236-g7451121dd
validations:
required: true
- type: input
id: system-info
attributes:
label: System Information
description: Details about your operating system (such as Linux distribution or Windows version) and CPU architecture (ex. 64-bit or 32-bit).
placeholder: ex. Windows 11 64-bit
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: Describe the behavior you expected in detail.
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual Behavior
description: Instead, what actually happened?
placeholder: Describe the actual behavior in detail.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps To Reproduce Actual Behavior
description: A clear and concise description of how the actual behavior was achieved, since starting up the game.
placeholder: |
Describe the steps leading to the actual behavior, preferably with a numerated list.
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional Information
description: Include any additional information regarding the bug.
placeholder: You can also leave this empty.
validations:
required: false
- type: checkboxes
id: guidelines
attributes:
label: Guidelines For Reporting Issues
description: "Before submitting this issue, make sure you have done the following:"
options:
- label: I have read <https://github.com/SuperTux/supertux/blob/master/CONTRIBUTING.md#bug-reports>.
required: true
- label: I have verified this isn't an issue that's already been reported.
required: true
- 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.
required: true
- label: I have verified this issue is **not** about wrong translations (use Transifex for those), or anything unsupported (e.g. third-party add-ons).
required: true
- label: In this report, I have only included details about **one** (1) bug.
required: true
- 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.
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Create a Discussion
url: https://github.com/SuperTux/supertux/discussions/new/choose
about: If you're looking for something else, create a Discussion, assuming this hasn't been reported there before.
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/crash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Crash Report
description: File a report for a crash in SuperTux.
title: "[Crash]: "
labels: ["type:crash"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this crash report!
- type: input
id: supertux-version
attributes:
label: SuperTux Version
description: The version of SuperTux, shown at the bottom-left corner on the title screen.
placeholder: ex. v0.6.3-1236-g7451121dd
validations:
required: true
- type: input
id: system-info
attributes:
label: System Information
description: Details about your operating system (such as Linux distribution or Windows version) and CPU architecture (ex. 64-bit or 32-bit).
placeholder: ex. Windows 11 64-bit
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps To Reproduce Crash
description: A clear and concise description of how the crash was achieved, since starting up the game.
placeholder: |
Describe the steps, leading to the crash, preferably with a numerated list.
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: debug-stacktrace
attributes:
label: Debugging Information (Stacktrace)
description: Include a stacktrace, leading to the crash. This can be obtained via a debugging utility.
placeholder: |
Paste the full stacktrace here.
You can leave this empty, in case a stacktrace can't be obtained (for example, if the game freezes).
render: shell
validations:
required: false
- type: textarea
id: additional-info
attributes:
label: Additional Information
description: Include any additional information, regarding the crash.
placeholder: You can also leave this empty.
validations:
required: false
- type: checkboxes
id: guidelines
attributes:
label: Guidelines For Reporting Issues
description: "Before submitting this issue, make sure you have done the following:"
options:
- label: I have read <https://github.com/SuperTux/supertux/blob/master/CONTRIBUTING.md#bug-reports>.
required: true
- label: I have verified this isn't an issue that's already been reported.
required: true
- 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.
required: true
- label: I have verified this issue is **not** about wrong translations (use Transifex for those), or anything unsupported (e.g. third-party add-ons).
required: true
- label: In this report, I have only included details about **one** (1) crash.
required: true
- 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.
required: true
Loading

0 comments on commit abfd7c6

Please sign in to comment.