44 Commits

Author SHA1 Message Date
hikerstk
8f824a503b Removed unnecessary demo mode in ProfileWorld (r11218 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@11219 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-09 23:20:45 +00:00
hikerstk
1c811e4bde Enabled demo mode from all every menu (r11202 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@11215 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-08 07:10:31 +00:00
hikerstk
95af35e4b4 Fixed default for number of laps in demo mode (r11204 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@11205 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-08 00:40:09 +00:00
hikerstk
a728878ba7 Added demo mode from trunk to 0.7.3.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@11201 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-07 23:55:46 +00:00
hikerstk
1ccbad409b Applied r10221 to 0.7.3, to prepare for a minor bugfix release (probably
windows only).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10237 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-22 04:33:23 +00:00
hikerstk
5f5d9e0a41 Fixed installing using cmake: SUPERTUXKART_DATADIR was not defined (see
r10211/10212 on trunk).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10213 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-14 23:54:27 +00:00
hikerstk
ac1eddfef5 Don't install font-tool files.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10209 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-14 23:00:01 +00:00
hikerstk
030e265986 Fixed missing cmake files in source distribution (r10207 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10208 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-14 22:29:49 +00:00
hikerstk
5e018e4b1a Fixed version numbers in credits.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10199 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-14 04:15:25 +00:00
hikerstk
075753f519 Also install license.txt files (not only License.txt).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10198 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-14 00:15:43 +00:00
auria
070684672c Remove canyon from credits
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10195 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:58:21 +00:00
auria
0ab24ddc05 Update credits
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10194 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:56:09 +00:00
auria
e556822a2c Add minigolf to changelog
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10193 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:55:26 +00:00
hikerstk
d23abc2937 Updated Asian fonts.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10189 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:31:24 +00:00
auria
1c438c0f59 remove translations less than 50% complete
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10188 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:22:34 +00:00
auria
7a4aa8a312 merge translations from LP
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10187 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:19:35 +00:00
auria
780d7c05c7 Update version in CMake
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10185 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 23:11:21 +00:00
hikerstk
94f842d705 Updated version number.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10184 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 22:58:54 +00:00
hikerstk
0680acda44 Fixed ball squashing, see r10180 on trunk.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10183 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 22:53:39 +00:00
hikerstk
3b74312129 Fixed rubber ball bouncing too high when it misses its
target (#496).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10181 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 22:46:09 +00:00
hikerstk
99f1958ff0 Adjusted sideways distance.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10177 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 22:14:24 +00:00
auria
4a5df90d37 Reduce konqi texture that was uselessly huge and giving a hard time to some gpus/drivers
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10174 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-13 16:08:50 +00:00
auria
d165104ee8 Add 2 missing textures and apply build fixes for osx
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10171 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 18:34:46 +00:00
auria
0f09655333 Merge r10114 into branch (update challenges and GPs to use minigolf instead of canyon)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10170 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 17:59:33 +00:00
auria
bff721cceb Add minigolf to 0.7.3
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10169 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 17:53:58 +00:00
auria
f0b1179226 Fixed a few skin images that were not powers of 2 in size
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10166 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 17:22:47 +00:00
auria
2982df5069 Fixed a few skin images that were not powers of 2 in size
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10164 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 17:21:00 +00:00
auria
8e41de33db Fixed a few skin images that were not powers of 2 in size
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10162 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-12 17:15:59 +00:00
hikerstk
aa3bd6d00e Fix #494 (thunderbird disappearing if game is paused while countdown is shown), see r10153 on trunk.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10154 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-10 00:30:10 +00:00
hikerstk
504e31b388 Fixed freebsd compilation, see r10134/r10138 on trunk.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10146 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-08 22:20:49 +00:00
auria
870a90a048 Dynamically update list of tabs in arenas screen, to better handle when addons arenas are first installed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10143 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-08 02:12:43 +00:00
auria
224b3c4a07 Show GP progress even if something is unlocked
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10137 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-08 01:50:42 +00:00
auria
49a6c9263f Fixed brake, a binary control, being actived if value > 0 with no deadzone
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10132 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-08 01:08:56 +00:00
hikerstk
53727d0729 Applied Stephen's r10128 to 0.7.3 branch.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10129 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-08 00:45:15 +00:00
auria
2d1bb2abb7 Update traffic lights by Fraang
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10116 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-07 00:30:53 +00:00
auria
86214eb8a8 Improve thunderbird texture by Fraang (branch)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10107 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-05 20:27:00 +00:00
hikerstk
30e355789f Fixed r473: leak when cancelling a download request.
This is not only a leak, but actually meant that downloads
were not cancelled at all, so they would still finish (in
the background), and other downloads would be delayed.
This fixes this issue (r10098 on trunk).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10099 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-03 02:23:05 +00:00
auria
5497882282 Fix zipper in mathclass
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10097 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 23:56:02 +00:00
hikerstk
d2338a0947 Applied compilation fix for freebsd (r10089 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10090 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 03:51:52 +00:00
hikerstk
e9bcc12dba Updated donations ... again.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10087 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 00:19:43 +00:00
hikerstk
9ab8fd09a7 Updated donations.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10086 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 00:16:02 +00:00
hikerstk
426c1492b9 Updated version numbers.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10085 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 00:12:12 +00:00
auria
101677c3a1 Set version in CMake
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10084 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 00:08:42 +00:00
hikerstk
61175c1a1c Created branch for 0.7.3.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/0.7.3@10083 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-02 00:03:59 +00:00
4665 changed files with 235805 additions and 1411275 deletions

View File

@@ -1,53 +0,0 @@
<!--
*** Please fill in the fields below. Remove any placeholders that are unused/not applicable.
-->
## Description
<!-- Provide a description of your issue.
For any suggestions, please address them on the forum: https://forum.freegamedev.net/viewforum.php?f=16 -->
## Steps to reproduce
<!-- List any required steps to reproduce the issue here -->
## Configuration
<!-- Please specify the version of STK you are using. The version can be found in the "About" screen. -->
STK release version:
<!-- Please specify where you downloaded STK -->
STK Source (PPA, distribution package, official binary, etc.):
System:
Graphics card:
CPU:
Gamepads/keyboards models if related to the issue:
## Additional information
<!--
Please provide stdout.log, it is located in:
* %appdata%\supertuxkart\config-0.10 (Windows)
* ~/Library/Application Support/supertuxkart/config-0.10 (mac)
* $XDG_CONFIG_HOME/supertuxkart/config-0.10 or ~/.config/supertuxkart/config-0.10 (Linux and other unix based systems)
-->
stdout.log:
```
```
<!-- If your issue is related to the input config (gamepads, keyboards), please provide your file input.xml located in the same directory as stdout.log. -->
input.xml:
```xml
```
<!-- If an error message was shown, please paste the complete error message, or a screenshot of it. -->
Error message:
```
```

View File

@@ -1,11 +0,0 @@
## Agreement
```
By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.
This includes your previous contribution(s) under the same name of contributor.
Keep the above statement in the pull request comment for agreement.
```

View File

@@ -1,187 +0,0 @@
name: apple
on:
push:
branches:
- master
tags:
- '*'
pull_request: {}
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: true
matrix:
platform: [iPhoneOS, MacOSX]
arch: [arm64, x86_64]
exclude:
- platform: iPhoneOS
arch: x86_64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- id: sysroot
uses: ASzc/change-string-case-action@v1
with:
string: ${{ matrix.platform }}
- name: Download cctools
run: |
cd /opt
wget https://github.com/supertuxkart/dependencies/releases/download/cctools/cctools-14.1.tar.xz
tar xf cctools-14.1.tar.xz
rm cctools-14.1.tar.xz
- name: Restore timestamps
run: |
wget https://github.com/MestreLion/git-tools/archive/refs/heads/main.zip
unzip main.zip
python git-tools-main/git-restore-mtime
- name: List build cache restore keys
run: |
# Look for the last 9 build caches (GitHub supports max 10 including current one)
for number in 1 2 3 4 5 6 7 8 9
do
id=$((${{ github.run_number }} - number))
echo "cache_$number=apple-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.platform }}-$id" >> $GITHUB_ENV
done
- name: Handle build cache
uses: actions/cache@v2
with:
path: |
build
key: apple-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.platform }}-${{ github.run_number }}
restore-keys: |
${{ env.cache_1 }}
${{ env.cache_2 }}
${{ env.cache_3 }}
${{ env.cache_4 }}
${{ env.cache_5 }}
${{ env.cache_6 }}
${{ env.cache_7 }}
${{ env.cache_8 }}
${{ env.cache_9 }}
- name: Download dependencies
run: |
wget https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-${{ steps.sysroot.outputs.lowercase }}.tar.xz
tar xf dependencies-${{ steps.sysroot.outputs.lowercase }}.tar.xz
- name: Configure clang runtime name
run: |
if [ ${{ matrix.platform }} = "MacOSX" ]; then
echo "rt=osx" >> $GITHUB_ENV
elif [ ${{ matrix.platform }} = "iPhoneOS" ]; then
echo "rt=ios" >> $GITHUB_ENV
elif [ ${{ matrix.platform }} = "AppleTVOS" ]; then
echo "rt=tvos" >> $GITHUB_ENV
elif [ ${{ matrix.platform }} = "iPhoneSimulator" ]; then
echo "rt=iossim" >> $GITHUB_ENV
elif [ ${{ matrix.platform }} = "AppleTVSimulator" ]; then
echo "rt=tvossim" >> $GITHUB_ENV
fi
- name: Configure bulid
run: |
mkdir -p build
cd build
cmake .. -DCCTOOLS_PREFIX=/opt/cctools -DCCTOOLS_ARCH=${{ matrix.arch }} -DCCTOOLS_PLATFORM=${{ matrix.platform }} \
-DRT=/opt/cctools/darwin/libclang_rt.${{ env.rt }}.a -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cctools.cmake -DCHECK_ASSETS=OFF
- name: Build
run: |
cd build
make -j4
mv bin ../${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }}
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: ${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }}
path: ${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }}
packaging:
name: Packaging STK
needs: build
runs-on: macos-latest
steps:
- name: Configure packaging name for git master branch
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "release_tag=git`date +%Y%m%d`" >> $GITHUB_ENV
echo "release_name=preview" >> $GITHUB_ENV
- name: Configure packaging name for tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV
echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV
- name: Configure packaging name for non-releasing branch
if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }}
run: |
echo "release_tag=" >> $GITHUB_ENV
echo "release_name=" >> $GITHUB_ENV
- name: Check for prerelease
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'rc') || contains(github.ref, 'beta') }}
run: |
echo "release_pre=true" >> $GITHUB_ENV
- name: Check for non-prerelease
if: ${{ github.ref != 'refs/heads/master' && !contains(github.ref, 'rc') && !contains(github.ref, 'beta') }}
run: |
echo "release_pre=false" >> $GITHUB_ENV
- name: Show packaging name
run : |
echo "${{ env.release_tag }}"
echo "${{ env.release_name }}"
echo "${{ env.release_pre }}"
- name: Download binaries
uses: actions/download-artifact@v2
- name: Mask developer name
run: |
echo "::add-mask::${{ secrets.MAC_DEVELOPER_NAME }}"
- name: Import certificates
if: ${{ env.release_tag != '' }}
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MAC_DEVELOPER_ID_P12_FILE }}
p12-password: ${{ secrets.MAC_DEVELOPER_ID_P12_PASSWORD }}
- name: Run dylibbundler and sign STK
if: ${{ env.release_tag != '' }}
env:
developer_id: "Developer ID Application: ${{ secrets.MAC_DEVELOPER_NAME }} (${{ secrets.MAC_DEVELOPER_TEAM }})"
run: |
wget https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-macosx.tar.xz
tar xf dependencies-macosx.tar.xz
HOMEBREW_NO_AUTO_UPDATE=1 brew install dylibbundler
lipo -create ./macosx-x86_64/supertuxkart.app/Contents/MacOS/supertuxkart ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -output ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart
chmod 755 ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart
dylibbundler -od -b -x ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -d ./macosx-arm64/supertuxkart.app/Contents/libs/ -p @executable_path/../libs/ -s dependencies-macosx/lib -ns
# We use SDL_Vulkan_LoadLibrary for 10.9 compatibility, so otool -L supertuxkart has no libMoltenVK.dylib
cp ./dependencies-macosx/lib/libMoltenVK.dylib ./macosx-arm64/supertuxkart.app/Contents/libs/
cd ./macosx-arm64/supertuxkart.app/Contents/Resources/data
wget https://github.com/supertuxkart/stk-assets-mobile/releases/download/git/stk-assets-full.zip
unzip stk-assets-full.zip
rm stk-assets-full.zip
cd ../../../../..
mv ./macosx-arm64/supertuxkart.app SuperTuxKart.app
codesign --force --sign "$developer_id" SuperTuxKart.app/Contents/libs/*.dylib
codesign --force --options=runtime --deep --sign "$developer_id" SuperTuxKart.app
- name: "Notarize release build"
if: ${{ env.release_tag != '' && github.ref != 'refs/heads/master' }}
run: |
ditto -c -k --sequesterRsrc --keepParent SuperTuxKart.app tmp.zip
xcrun notarytool submit tmp.zip --apple-id ${{ secrets.STK_NOTARIZATION_USERNAME }} \
--password ${{ secrets.STK_NOTARIZATION_PASSWORD }} \
--team-id ${{ secrets.MAC_DEVELOPER_TEAM }} --wait
xcrun stapler staple SuperTuxKart.app
- name: Archive
if: ${{ env.release_tag != '' }}
run: |
ditto -c -k --sequesterRsrc --keepParent SuperTuxKart.app SuperTuxKart-${{ env.release_tag }}-mac.zip
- name: Create release
if: ${{ env.release_tag != '' }}
uses: ncipollo/release-action@v1.8.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "SuperTuxKart*.zip"
tag: ${{ env.release_name }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
allowUpdates: true
prerelease: ${{ env.release_pre }}

View File

@@ -1,169 +0,0 @@
# Copyright (C) 2020-2021 Jacob Burroughs <maths22@gmail.com>
# 2020-2021 A. Semphris <semphris@protonmail.com>
#
# Released under the Creative Commons Zero (CC0) license, available at:
# Legal code: https://creativecommons.org/publicdomain/zero/1.0/legalcode
# Information: https://creativecommons.org/share-your-work/public-domain/cc0/
# Note: Parts of this code were taken from the SuperTux project.
# ~ Semphris (responsible for transfering and adapting the file)
name: linux
on:
push:
branches:
- master
tags:
- '*'
pull_request: {}
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
compiler: [gcc, clang]
build_type: [Debug, Release]
server_only: [ON, OFF]
exclude:
- os: macos-latest
compiler: gcc
- os: macos-latest
build_type: Debug
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: true
- name: Configure packaging name for git master branch
if: ${{ matrix.build_type == 'Release' && matrix.server_only == 'OFF' &&
github.ref == 'refs/heads/master' }}
run: |
echo "release_tag=git`date +%Y%m%d`" >> $GITHUB_ENV
echo "release_name=preview" >> $GITHUB_ENV
- name: Configure packaging name for tag
if: ${{ matrix.build_type == 'Release' && matrix.server_only == 'OFF' &&
startsWith(github.ref, 'refs/tags/') }}
run: |
echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV
echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV
- name: Configure packaging name for non-releasing branch
if: ${{ matrix.build_type != 'Release' || matrix.server_only != 'OFF' ||
!(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) ||
github.repository_owner != 'supertuxkart' }}
run: |
echo "release_tag=" >> $GITHUB_ENV
echo "release_name=" >> $GITHUB_ENV
- name: Check for prerelease
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'rc') || contains(github.ref, 'beta') }}
run: |
echo "release_pre=true" >> $GITHUB_ENV
- name: Check for non-prerelease
if: ${{ github.ref != 'refs/heads/master' && !contains(github.ref, 'rc') && !contains(github.ref, 'beta') }}
run: |
echo "release_pre=false" >> $GITHUB_ENV
- name: Show packaging name
run : |
echo "${{ env.release_tag }}"
echo "${{ env.release_name }}"
echo "${{ env.release_pre }}"
- name: Install linux dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt install -y build-essential cmake libbluetooth-dev libcurl4-gnutls-dev \
libfreetype6-dev libharfbuzz-dev libjpeg-dev libogg-dev libopenal-dev \
libpng-dev libsdl2-dev libvorbis-dev pkg-config zlib1g-dev clang
- name: Install dylibbundler for packaging osx binary
if: ${{ env.release_tag != '' && matrix.os == 'macos-latest' && matrix.build_type == 'Release' && matrix.server_only == 'OFF' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install dylibbundler
- name: Install macos dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: |
# Something funky happens with freetype if mono is left
sudo mv /Library/Frameworks/Mono.framework /Library/Frameworks/Mono.framework-disabled
wget https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-mac.tar.xz
# Remove any existing installation to avoid conflict with bundled dependencies
rm -rf /usr/local/include/*
rm -rf /usr/local/opt/openssl@1.1/include
rm -rf /usr/local/opt/freetype
rm -rf /usr/local/opt/harfbuzz
tar xf dependencies-mac.tar.xz -C /usr/local
rm dependencies-mac.tar.xz
- name: Set compiler (gcc)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.compiler == 'gcc' }}
run: |
echo "CXX=g++" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
- name: Set compiler (clang)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang' }}
run: |
echo "CXX=clang++" >> $GITHUB_ENV
echo "CC=clang" >> $GITHUB_ENV
- name: Set compiler (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
# This ensures for now we use clang11
# Clang12 runs into a bunch of fun with `include location '/usr/local/include' is unsafe for cross-compilation`
# that we don't care about for now
echo "CXX=clang++" >> $GITHUB_ENV
echo "CC=clang" >> $GITHUB_ENV
- name: Configure bulid (linux)
if: ${{ matrix.os != 'macos-latest' }}
env:
BUILD_TYPE: ${{ matrix.build_type }}
SERVER_ONLY: ${{ matrix.server_only }}
run: |
cmake --version
$CXX --version
mkdir "build"
cd "build"
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off -DNO_SHADERC=on;
- name: Configure bulid (macos)
if: ${{ matrix.os == 'macos-latest' }}
env:
BUILD_TYPE: ${{ matrix.build_type }}
SERVER_ONLY: ${{ matrix.server_only }}
run: |
cmake --version
$CXX --version
mkdir "build"
cd "build"
CFLAGS="-mmacosx-version-min=10.9" CXXFLAGS="-mmacosx-version-min=10.9" LINKFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" /usr/local/opt/cmake/bin/cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off;
- name: Build and install
working-directory: build
run: |
make -j3 VERBOSE=1
make install DESTDIR="/tmp/stk" VERBOSE=1
- name: Packaging (macos)
if: ${{ env.release_tag != '' && matrix.os == 'macos-latest' && matrix.build_type == 'Release' && matrix.server_only == 'OFF' }}
working-directory: build
run: |
/usr/local/opt/dylibbundler/bin/dylibbundler -od -b -x ./bin/SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./bin/SuperTuxKart.app/Contents/libs/ -p @executable_path/../libs/
wget https://github.com/supertuxkart/stk-assets-mobile/releases/download/git/stk-assets-full.zip
unzip stk-assets-full.zip -d ../data
rm stk-assets-full.zip
cd bin
# Fix the name on case insensitive filesystem
mv supertuxkart.app stk.app
mv stk.app SuperTuxKart.app
zip -r ../SuperTuxKart-${{ env.release_tag }}-mac.zip .
- name: Create Release (macos)
if: ${{ env.release_tag != '' && matrix.os == 'macos-latest' && matrix.build_type == 'Release' && matrix.server_only == 'OFF' }}
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "build/SuperTuxKart-${{ env.release_tag }}-mac.zip"
tag: ${{ env.release_name }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
allowUpdates: true
prerelease: ${{ env.release_pre }}

View File

@@ -1,113 +0,0 @@
name: switch
on:
push:
branches:
- master
- feature/gh-actions-switch-cache
tags:
- '*'
pull_request: {}
workflow_dispatch:
jobs:
build_switch:
name: Build Switch
runs-on: ubuntu-latest
container:
image: 'devkitpro/devkita64'
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# We need 0 so we get all commits for mtime!
fetch-depth: 0
path: "./stk-code"
- name: Grab assets
run: |
wget -q https://github.com/supertuxkart/stk-assets-mobile/releases/download/git/stk-assets-full.zip
unzip -q stk-assets-full.zip -d stk-assets
rm stk-assets-full.zip
- name: Restore modified date
run: |
cd stk-code
git restore-mtime .
cd ..
# Env setup!
- name: Configure packaging name for git master branch
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "release_tag=git`date +%Y%m%d`" >> $GITHUB_ENV
echo "release_name=preview" >> $GITHUB_ENV
- name: Configure packaging name for tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV
echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV
- name: Configure packaging name for non-releasing branch
if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }}
run: |
echo "release_tag=" >> $GITHUB_ENV
echo "release_name=" >> $GITHUB_ENV
- name: Check for prerelease
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'rc') || contains(github.ref, 'beta') }}
run: |
echo "release_pre=true" >> $GITHUB_ENV
- name: Check for non-prerelease
if: ${{ github.ref != 'refs/heads/master' && !contains(github.ref, 'rc') && !contains(github.ref, 'beta') }}
run: |
echo "release_pre=false" >> $GITHUB_ENV
- name: Show packaging name
run : |
echo "${{ env.release_tag }}"
echo "${{ env.release_name }}"
echo "${{ env.release_pre }}"
- name: List build cache restore keys
shell : bash
run: |
# Look for the last 9 build caches (GitHub supports max 10 including current one)
for number in 1 2 3 4 5 6 7 8 9
do
id=$((${{ github.run_number }} - number))
echo "cache_$number=switch-${{ github.ref }}-$id" >> $GITHUB_ENV
done
- name: Handle build cache
uses: actions/cache@v2
with:
# This is unnecessarily verbose and might break, but again ! seems broken
# See: https://github.com/Mstrodl/stk-code/runs/2333673736?check_suite_focus=true#step:16:34
path: |
stk-code/cmake_build/CMakeFiles
stk-code/cmake_build/Makefile
stk-code/cmake_build/lib
stk-code/cmake_build/bin/supertuxkart
stk-code/cmake_build/*.cmake
stk-code/cmake_build/*.txt
# Make sure PRs can't overwrite!
key: switch-${{ github.ref }}-${{ github.run_number }}
restore-keys: |
${{ env.cache_1 }}
${{ env.cache_2 }}
${{ env.cache_3 }}
${{ env.cache_4 }}
${{ env.cache_5 }}
${{ env.cache_6 }}
${{ env.cache_7 }}
${{ env.cache_8 }}
${{ env.cache_9 }}
- name: Run build script
run: |
cd stk-code/switch
PROJECT_VERSION="${{ env.release_tag }}" ./make.sh
- name: Create release
uses: ncipollo/release-action@v1.8.8
if: ${{ env.release_tag != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "stk-code/cmake_build/bin/SuperTuxKart-${{ env.release_tag }}-switch.zip"
tag: ${{ env.release_name }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
allowUpdates: true
prerelease: ${{ env.release_pre }}

View File

@@ -1,300 +0,0 @@
name: windows
on:
push:
branches:
- master
tags:
- '*'
pull_request: {}
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: true
matrix:
arch: [i686, x86_64, armv7, aarch64]
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: false
- name: Set up environment for windows-latest
shell : bash
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "wget=C:\msys64\usr\bin\wget.exe" >> $GITHUB_ENV
echo "unzip=unzip" >> $GITHUB_ENV
if [ ${{ matrix.arch }} = "i686" ]; then
echo "cmake_arch=Win32" >> $GITHUB_ENV
elif [ ${{ matrix.arch }} = "x86_64" ]; then
echo "cmake_arch=x64" >> $GITHUB_ENV
elif [ ${{ matrix.arch }} = "armv7" ]; then
echo "cmake_arch=ARM" >> $GITHUB_ENV
else
echo "cmake_arch=ARM64" >> $GITHUB_ENV
fi
- name: Set up environment for ubuntu-latest
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
echo "wget=wget" >> $GITHUB_ENV
echo "unzip=unzip" >> $GITHUB_ENV
- name: Restore timestamps
run: |
${{ env.wget }} https://github.com/MestreLion/git-tools/archive/refs/heads/main.zip
${{ env.unzip }} main.zip
python git-tools-main/git-restore-mtime
- name: List build cache restore keys
shell : bash
run: |
# Look for the last 9 build caches (GitHub supports max 10 including current one)
for number in 1 2 3 4 5 6 7 8 9
do
id=$((${{ github.run_number }} - number))
echo "cache_$number=windows-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.os }}-$id" >> $GITHUB_ENV
done
- name: Handle build cache
uses: actions/cache@v2
with:
path: |
build
key: windows-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.os }}-${{ github.run_number }}
restore-keys: |
${{ env.cache_1 }}
${{ env.cache_2 }}
${{ env.cache_3 }}
${{ env.cache_4 }}
${{ env.cache_5 }}
${{ env.cache_6 }}
${{ env.cache_7 }}
${{ env.cache_8 }}
${{ env.cache_9 }}
- name: Download dependencies
run: |
${{ env.wget }} https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-win-${{ matrix.arch }}.zip
${{ env.unzip }} dependencies-win-${{ matrix.arch }}.zip
- name: Install MinGW for i686 or x86_64
if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'i686' || matrix.arch == 'x86_64' ) }}
run: |
cd /
sudo mkdir -p /data/mxe/usr
cd /data/mxe/usr
# It's compiled from https://github.com/mxe/mxe
sudo wget https://github.com/supertuxkart/dependencies/releases/download/preview/mxe_static_mingw.zip
sudo unzip mxe_static_mingw.zip
sudo rm mxe_static_mingw.zip
# For libfl.so.2
sudo apt install -y libfl-dev
- name: Install MinGW for armv7 or aarch64
if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'armv7' || matrix.arch == 'aarch64' ) }}
run: |
cd /
sudo wget https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz
sudo tar xf llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz
sudo mv llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64 llvm-mingw
- name: Set up MinGW Toolchain for i686
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'i686' }}
run: |
echo "SET(CMAKE_SYSTEM_NAME Windows)" > toolchain.cmake
echo "SET(CMAKE_C_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-gcc)" >> toolchain.cmake
echo "SET(CMAKE_CXX_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-g++)" >> toolchain.cmake
echo "SET(CMAKE_RC_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-windres)" >> toolchain.cmake
echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-i686 /data/mxe/usr/i686-w64-mingw32.static.posix.dw2/ /data/mxe/usr/lib/gcc/i686-w64-mingw32.static.posix.dw2/5.5.0/)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake
- name: Set up MinGW Toolchain for x86_64
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' }}
run: |
echo "SET(CMAKE_SYSTEM_NAME Windows)" > toolchain.cmake
echo "SET(CMAKE_C_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-gcc)" >> toolchain.cmake
echo "SET(CMAKE_CXX_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-g++)" >> toolchain.cmake
echo "SET(CMAKE_RC_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-windres)" >> toolchain.cmake
echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-x86_64 /data/mxe/usr/x86_64-w64-mingw32.static.posix.seh/ /data/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.posix.seh/5.5.0/)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake
# Manually specify CMAKE_SYSTEM_PROCESSOR, it can only be set together with -DDCMAKE_SYSTEM_NAME
- name: Configure bulid for MSVC
if: ${{ matrix.os == 'windows-latest' }}
run: |
mkdir -Force build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -A ${{ env.cmake_arch }} -DCHECK_ASSETS=OFF
- name: Configure bulid for MinGW (i686 or x86_64)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch != 'armv7' && matrix.arch != 'aarch64' }}
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON
- name: Configure bulid for MinGW (armv7 or aarch64)
if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'armv7' || matrix.arch == 'aarch64' ) }}
run: |
mkdir -p build
cd build
cmake .. -DLLVM_ARCH=${{ matrix.arch }} -DLLVM_PREFIX=/llvm-mingw -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON
- name: Build for MSVC
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
run: |
cmake --build . --config Debug
- name: Build for MinGW
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: build
run: |
make -j4
cd ..
mv COPYING tools
- name: Upload binaries of MinGW
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch }}
path: build/bin/*
- name: Upload stk-code/data
# We only need to upload stk-code/data once
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'i686'}}
uses: actions/upload-artifact@v2
with:
name: data
path: data
- name: Upload stk-code/tools
# We only need to upload stk-code/tools once
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'i686'}}
uses: actions/upload-artifact@v2
with:
name: tools
path: tools
- name: Remove built binaries for less cache size
shell : bash
run: |
rm -rf build/Debug
rm -rf build/bin
packaging:
name: Packaging STK
needs: build
runs-on: windows-latest
steps:
- name: Configure packaging name for git master branch
shell : bash
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "release_tag=git`date +%Y%m%d`" >> $GITHUB_ENV
echo "release_name=preview" >> $GITHUB_ENV
- name: Configure packaging name for tag
shell : bash
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV
echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV
- name: Configure packaging name for non-releasing branch
shell : bash
if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }}
run: |
echo "release_tag=" >> $GITHUB_ENV
echo "release_name=" >> $GITHUB_ENV
- name: Check for prerelease
shell : bash
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'rc') || contains(github.ref, 'beta') }}
run: |
echo "release_pre=true" >> $GITHUB_ENV
- name: Check for non-prerelease
shell : bash
if: ${{ github.ref != 'refs/heads/master' && !contains(github.ref, 'rc') && !contains(github.ref, 'beta') }}
run: |
echo "release_pre=false" >> $GITHUB_ENV
- name: Show packaging name
shell : bash
run : |
echo "${{ env.release_tag }}"
echo "${{ env.release_name }}"
echo "${{ env.release_pre }}"
- name: Download MinGW binaries and data
uses: actions/download-artifact@v2
- name: Generate .pdb files
if: ${{ env.release_tag != '' }}
run: |
C:\msys64\usr\bin\wget.exe https://github.com/rainers/cv2pdb/releases/download/v0.50/cv2pdb-0.50.zip
unzip cv2pdb-0.50.zip
cd i686
..\cv2pdb.exe supertuxkart.exe
cd ..
cd x86_64
..\cv2pdb.exe supertuxkart.exe
- name: Downloading stk-assets
if: ${{ env.release_tag != '' }}
run: |
C:\msys64\usr\bin\wget.exe https://github.com/supertuxkart/stk-assets-mobile/releases/download/git/stk-assets-full.zip
mkdir stk-assets
cd stk-assets
unzip ..\stk-assets-full.zip
- name: Move folders
shell : bash
if: ${{ env.release_tag != '' }}
run: |
mkdir SuperTuxKart-${{ env.release_tag }}-win
mv stk-assets SuperTuxKart-${{ env.release_tag }}-win
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code
mv data SuperTuxKart-${{ env.release_tag }}-win/stk-code
mv tools/run_game.bat SuperTuxKart-${{ env.release_tag }}-win
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-i686
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-x86_64
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64
mv i686 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-i686/bin
mv x86_64 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-x86_64/bin
mv armv7 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7/bin
mv aarch64 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64/bin
# libwinpthread-1.dll is useless because we statically link
rm -f SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7/bin/libwinpthread-1.dll
rm -f SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64/bin/libwinpthread-1.dll
- name: Start packaging STK
if: ${{ env.release_tag != '' }}
run: |
Compress-Archive -LiteralPath SuperTuxKart-${{ env.release_tag }}-win -DestinationPath SuperTuxKart-${{ env.release_tag }}-win.zip
- name: Configure NSIS script
shell : bash
if: ${{ env.release_tag != '' && startsWith(github.ref, 'refs/tags/') }}
run: |
mv tools SuperTuxKart-${{ env.release_tag }}-win/stk-code
cd SuperTuxKart-${{ env.release_tag }}-win/stk-code/tools/windows_installer
for arch in i686 x86_64 aarch64
do
cp supertuxkart-github-actions.nsi $arch.nsi
sed -i "s/define APPNAMEANDVERSION \"\"/define APPNAMEANDVERSION \"SuperTuxKart ${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/define ARCH \"\"/define ARCH \"$arch\"/g" $arch.nsi
sed -i "s/define VERSION \"\"/define VERSION \"${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/OutFile \"\"/OutFile \"SuperTuxKart-${{ env.release_tag }}-installer-$arch.exe\"/g" $arch.nsi
for filename in $(ls ../../build-$arch/bin)
do
file="\\\\$filename"
sed -i "288a\ DELETE /REBOOTOK \"\$INSTDIR$file\"" $arch.nsi
done
# Print result
#cat $arch.nsi
done
mv ../COPYING ../..
- name: Run makensis.exe
if: ${{ env.release_tag != '' && startsWith(github.ref, 'refs/tags/') }}
run: |
cd SuperTuxKart-${{ env.release_tag }}-win\stk-code\tools\windows_installer
C:\msys64\usr\bin\wget.exe https://nsis.sourceforge.io/mediawiki/images/6/6c/Shelllink.zip
unzip Shelllink.zip
Move-Item Unicode\Plugins\ShellLink.dll .
& "C:\Program Files (x86)\NSIS\makensis.exe" i686.nsi
& "C:\Program Files (x86)\NSIS\makensis.exe" x86_64.nsi
& "C:\Program Files (x86)\NSIS\makensis.exe" aarch64.nsi
- name: Create release
uses: ncipollo/release-action@v1.8.8
if: ${{ env.release_tag != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "SuperTuxKart-*.zip, SuperTuxKart-${{ env.release_tag }}-win/stk-code/tools/windows_installer/*.exe"
tag: ${{ env.release_name }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
allowUpdates: true
prerelease: ${{ env.release_pre }}

95
.gitignore vendored
View File

@@ -1,95 +0,0 @@
bld*/
build*/
cmake_build*/
xcode_build*/
dependencies*/
CMakeFiles/
stk-editor/
.vscode/
tags.*
# clangd
.cache/
compile_commands.json
.config/
supertuxkart-64
make*.bat
__pycache__
data/editor
data/karts
data/library
data/models
data/music
data/sfx
data/textures
data/tracks
data/wip-tracks
data/.svn
# Ignore doxygen output
src/html
*.o
*.d
*.a
*.patch
*.diff
*.obj
*.orig
*.rej
*.log
*.lib
*.tlog
*.pdb
*.dll
*.exe
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*~
*.swp
# Ignore QtCreator project file
CMakeLists.txt.user
packets_log.txt
history.dat
README.dependencies
xx
android/android-ndk*
android/android-sdk*
android/assets
android/bin
android/build
android/deps-*
android/libs
android/obj
android/res
android/.gradle
android/.cxx
android/src/main/java/HID*
android/src/main/java/SDL*
android-*
*.apk
*.keystore
lib/curl
lib/freetype
lib/ifaddrs
lib/libogg
lib/libvorbis
lib/libpng
lib/libjpeg
lib/zlib
lib/openal
lib/openssl
lib/harfbuzz
lib/sdl2
lib/mbedtls
lib/astc-encoder
lib/shaderc
.DS_Store

1
AUTHORS Normal file
View File

@@ -0,0 +1 @@
See the file data/CREDITS .

View File

@@ -1,9 +0,0 @@
brew "cmake"
brew "libogg"
brew "libvorbis"
brew "openal-soft"
brew "freetype"
brew "curl"
brew "harfbuzz"
brew "libjpeg"
brew "sdl2"

View File

@@ -1,785 +0,0 @@
# Changelog
This file documents notable changes to SuperTuxKart across versions since its inception.
It should be kept in mind that some versions have a less complete changelog than others, and that this changelog does not list the details of the many small bugfixes and improvements which together make a significant part of the progress between releases.
For similar reasons, and because some features are vastly more complex than others, attributions of main changes should not be taken as a shortcut for overall contribution.
## SuperTuxKart 1.5 (TBD, still unfinished)
### Networking
* Improve track-voting logic when no majority is achieved, by kimden
### General
* Make the game's window resizable in all the screens, by CodingJellyfish (previously, most UI screens did not support resizing)
* New benchmark mode, by Alayan:
- Can be run with a few clicks, allowing to easily test the performance of various settings or to compare different systems
- Robust performance metrics that better reflect the impact of varying frametimes than Average FPS and 1% Lows.
* Fix incorrect unlock information in Story Mode after a Grand Prix, by CodingJellyfish
* Make the progression of audio levels geometrical and increase default steps, allowing to set lower audio levels and better accuracy for low audio levels (especially useful for headphone users), by Alayan
* Fix drive-on sound from materials being played when the game is paused, by Alayan
* Fix a crash trying to read replays when the random starting position setting is enabled, by Alayan
* Handle track names with spaces in the replay reader, by Alayan
* Various tweaks, bugfixes and code-quality improvements
### Graphics
* Improve the accuracy of the framerate limiter, by Benau
* Add more maximum framerate options to the built-in framerate limiter, by Benau (this does not affect physics, which run at 120FPs independetly of graphical FPS)
* Add some graphical effects for legacy video drivers, by Benau
* Ensure fragment shaders use high precision, to avoid rendering issues with some drivers, by zmike
* Fix a related precision issue causing black artifacts with GL_ES, by CodingJellyfish
* Fix other shader issues that could produce black artifacts in specific situations, by CodingJellyfish
* Various improvements to the automatic computations of Level of Detail (LoD) distances, by Alayan
* Improve draw call performance in some situations, by CodingJellyfish
* Enable new higher LoD and shadows settings, by Alayan
* Integrate LoD (Geometry Detail) settings in the graphics presets, by Alayan
* Prefer displaying a lower quality LoD model over switching to a higher quality one when too close, by Alayan
### User Interface
* Add a new Display tab in the Settings, by Alayan
* Allow to rate addons with a keyboard or a controller, and notify when trying to rate an addon while not logged in, by CodingJellyfish
* Fix an issue that prevented to go up with a scrollbar using a trackpad, by CodingJellyfish
* Improve the typing bars, especially for the coal theme, by Alayan
* Greatly improve UI layout for 'tall' resolutions (greater height than width), by CodingJellyfish
* Improve font scaling, by CodingJellyfish
* Various enhancements, by Qwertychouskie and others
### Mobile
* Don't keep the rescue button active after it stops being touched, when the finger keeps touching the screen (e. g. to handle the steering wheel), by S0nter
## SuperTuxKart 1.4 (31. October 2022)
### General
* Lap trial mode, by mrkubax10
* Fix parachute powerup, by heuchi
* Fix gyroscope on walldriving surface, by Benau
* Enable ARMv7 build for Windows, by Benau
* Restore macOS <= 10.14 support, by Benau
* Avoid triggering other goal lines when the goal is already scored, by kimden
### Graphics
* Items and stars animation, by Semphris
* LOD optimization, by Benau
* Implement HiDPI support in SDL2 properly, by Benau
* Beta Vulkan renderer, by Benau
* Make sky particle always fall vertically, by Benau
### Tracks and modeling
* Updated Konqi, by ZAQraven99
* New Godette kart, by ZAQraven99
* Updated Battle Island and Cave X, by Typhon306
* Fix broken invisible wall in Antediluvian Abyss, by Benau
* New textures in Shifting Sands, by KartOym
* Balanced starting positions in all official soccer fields, by Crystal
### Networking
* Add track searching to network track screen, by Benau
* Make limit of players in game configurable, by Waldlaubsaengernest
* Allow using real addon karts (same hitbox and kart type as in local game), by Benau
### User Interface
* Add left side ghost replay difficulties, by ldoyenard
## SuperTuxKart 1.3 (28. September 2021)
### Networking
* Server bookmarks, by Benau
* Background download of addon packs, by Benau
### Graphics
* Introduce render resolution scaling for the modern renderer, by QwertyChouskie and Deve. For users with limited GPU power, this allows to get significant performance (FPS) gains at the cost of image quality. It can also allow additional graphics effects at the same performance. This is especially useful for users with high-resolution and high-DPI screens. The scaling only affects the 3D scene, the UI remains crisp at full-resolution.
* Simplification through removal of unused deprecated graphical effects, by Samuncle
* Many updates to texture-related code, by Benau
* Auto-compute Level of Detail distances for 3D models set to use LOD depending on track complexity, by Samuncle. The geometry level parameter allows partial control over the drawing distances.
* Improved screen space reflection, by QwertyChouskie
### General
* Switch port, by Mary
* Gamepad force feedback support, by Mary
* Highscore screen, by RQWorldblender
* Grand Prix highscores, by mrkubax10
* Updates to the bundled tinygettext library, by Benau
* Enable custom skidding sounds for karts, by Benau
* Greatly sped up loading of tracks with many checklines through optimization, by heuchi
* And many bugfixes and enhancements too small or specific to be detailed
### User Interface
* Display the skin-appropriate iconset without having to restart, by Benau
* Fix some issues with the options menu when used during a pause, by Benau
* Add a confirmation dialog before closing the game through the "go back" key/button, by Benau
* In the result screen, display the race position with a number with 10 karts or more, by mrkubax10
* In the result screen, display the challenge result and the requirements met or failed, by CodingJellyFish
* Many small menu and dialogs improvements, by RQWorldblender and others
* Usability and functionality improvements to the debug menu, by RQWorldblender
* Clickable URLs in text, by Benau
* Add a rainbow background to the color picker, making it more intuitive, by riso
#### In-race UI
* Add visual and sound feedback when a timed challenge or timed game is about to end, by mrkubax10 and Alayan
### Mobile
* Fix a precision issue that caused artefacted shadows, by icecream95 and Benau
#### iOS
* Use MojoAL instead of OpenAL, which iOS currently has issues with, by Benau
### Tracks and modeling
* Alien Signal, by Samuncle
* Ancient Colosseum Labyrinth, by Typhon306
* Improved Las Dunas Soccer, by Benau
* Add lap line extensions to Hacienda, Old Mine, Ravenbridge Mansion and Shifting Sands, by Benau
* New Pepper kart, by ZAQraven99
* Improved Adiumy, Emule, GNU and Sara karts, by ZAQraven99
## SuperTuxKart 1.2 (27. August 2020)
### Networking
* Add support for IPv6 LAN servers, by Benau
* Auto-detect client IPv4 and IPv6 support, by Benau
* Improved server creation speed and performance, by Benau
* Allow to use any addon karts online, on servers with live join enabled, by Benau. The kart has Tux's hitbox.
* Prevent undefined behaviour on battle/soccer servers with an excessive player limit, by Benau
* Use an improved rating formula for ranked play, by Alayan
### General
* Use SDL2 for window creation, allowing better gamepad support, by Benau
* Replace Fribidi by SheeBidi for RTL support, and remove the dependency to libraqm, by Benau
* Add support for in-race messages in scripting, by CodedOre
* Improved tutorial with free-flow racing (no more text interrupts), by CodedOre
* Haiku support, by AlwaysLivid
* Make the game's window resizable in-game, by Benau
* Download addon icons on-demand to speed-up the addons list loading, by Benau
* Allow theming of icons, by QwertyChouskie
* Many many bugfixes and enhancements
### Mobile
* Many minor bugfixes and compatibility enhancements
#### Android
* Use the android app bundle, allowing all tracks to be included, by Benau
* Use the native progress indicator during game data extraction, by Benau
* Add a launch splash screen, by Benau
#### iOS
* Allow server creation in-game by using only one process for client and server, by Benau
### User Interface
* Introduce element padding for skins, by QwertyChouskie
* New Cartoon skin, by LCP (art) and QwertyChouskie (code)
* Allow to rename control configurations, by GuillaumeBft
* Unthrottled keyboard navigations in menus, by Benau
* Show mobile players as such in server lobbies, using an emoji icon, by riso
* Always show the race end times in ms, by Fouks
* SVG icons support, by riso
* New tips for soccer mode
#### In-race UI
* Introduce camera settings in the options screen, by luffah
* More spectator cameras in online spectating, by luffah
* Add a minimap indicator for basketballs, by Alayan
* Add team chat for team games, by Benau
* Show the kart orientation on the soccer minimap, by riso
* Show a message once a goal is made in soccer, by riso
### Tracks and modeling
#### Karts
* New version of Kiki, by Typhon306 and ZAQraven99
* Improved karts, by Crystal
* Pidgin, Puffy
* Improved beastie animation, by D_ft Kid
## SuperTuxKart 1.1 (4. January 2020)
### Networking
* Add support for IPv6 clients and servers, by Benau
* Add AI support to local networking servers, by Benau. This AI is not as strong as the normal AI due to networking lag, but should offer enough challenge for a majority of players.
* Add support for AI bots for the server host, by Benau
* Improved handling of collisions, by Benau
* Improved support for playing addons on servers, by Benau
* Support using an IPV4 domain name to connect to a server, by Benau
* Add packet loss data to the server databases, by Benau
* New management features for server hosts, by Benau
* IP / online ID ban tables
* Server statistics
* Make the auto-end finish time more lenient, so it doesn't tank ranking score because of another player, by Alayan
* Add a player reporting function, by Benau
* Fix a bug that allowed to exceed a server's player limit if two players connected at the same time, by Benau
* Add lobby commands, by Benau
### Race gameplay and physics
* Random spawn point in local battle mode, by Aleman778
* Add an option to show everyone's items with the left characters icons, by Fouks
* Allow to choose the number of AI per team in soccer, by risostk
* In CTF mode, fix a bug that prevented scoring a point when the team's flag was in its immunity state, by Alayan
* Fix a bug that could result in the finish time being shown as 0:00:00, by Alayan
* Fix a bug that made AIs, in multiplayer and low difficulty, rubber-band towards the wrong player, by Alayan. Each player now correctly has its AIs, helping a weaker player to not be condemned to the last position.
### General
* Screen space reflection graphical effect, by samuncle
* Support unicode file paths, by Benau
* Complex text layout support, by Benau
* Add emoji support, by Benau
* Avoid "this program is not responding" warnings in Windows and Mac, by Benau
* Add a Story Mode timer, by Alayan
* Make text billboards size consistent accross resolutions, by Benau
* Don't trigger road sounds when the kart is flying, by Benau
* Remove an incorrect function call that could significantly hurt performance for Mac, by Benau
* Fix a nasty bug that made several sound effects to be played at a low volume after a crash, by Alayan
* Some code clean-up, by Alayan
* Addon skin support and skin-specified font by Benau
* Structure for allowing icon themes by Benau
* Add support for custom per-kart engine sounds, by Benau
* Fix an incorrect outdated driver warning for recent AMD cards on Windows, by Alayan
* Scripting enhancements, by deveee
* Add a continue button to cutscenes (mostly useful for touchscreen devices), by deveee
* Request the use of the performance GPU on Optimus systems, by deveee
* Fixed plural forms for translations in several languages, by deveee
* Close STK if Wayland crashes, by mstoeckl
* Support nested directories for addons, by Benau
* Scripting preprocessing for STK version, by Benau
* Updated Wiiuse library to 0.15.5
* Various tweaks and bugfixes, including crash fixes
### Mobile
* Add a screen allowing to download official assets that can't be included in the release package because of size limits, by Benau
* The tutorial text is now tailored for touchscreen usage, instead of the main keyboard text, by Benau
* Enhanced acceleration handle, by Benau
* Allow changing the touchscreen controller type in race paused dialog, by deveee
* Allow for optional auto-acceleration, by deveee
#### Android
* Various bugfixes by deveee, dos1
* Screen keyboard handling improvements, by deveee and Benau
* Allow copying text from the edit box, by Benau
* STK for Android now targets the version 29 of the API (Android 10.0), up from 26 (Android 8.0)
#### iOS
* Add iOS support, by Benau
* The Android code has been widely put to use for iOS
* Several changes or fixes to ensure proper behavior (input, screen-scaling, and more)
### User Interface
* Show tips for players when loading and after race ends, by CodingJellyfish
* Better scaling of many many UI elements to large resolutions, by CodingJellyfish and others
* Show country flags for servers and players in online multiplayer, by Benau
* Add a new option to change font size on the fly, by Benau and deveee
* Add icons for the available options in the race result screens, by CodingJellyfish
* Make the highscore list scrollable, by deveee
* Display all the relevant info in the challenge dialog in Story Mode, by Alayan
* New challenge selection interface, by CodingJellyfish
* Show the number of ranking points won or lost after a ranked race, by Benau
* Separate blurring visual effects from the main graphics presets, by Alayan
* Fix incorrect text resizing in the help menu, by Benau
* Make the custom random GP option more prominent in the track selection screen, by CodingJellyfish
* Improvements to the scrollbars, by QwertyChouskie
* Allow sorting lists with the keyboard, by Benau
* Allow tooltip drawing outside of menus, by deveee
* Prevent some font scaling blur caused by non-integer offsets, by Benau
* Add a (configurable) limit to chat message frequency, by GuillaumeBft and Benau
* Allow to explicitly set the flip direction of tabs, by CodingJellyfish
* Allow to download addons from the server lobby interface, by Benau
* Allow to filter installed and non-installed addons in the addons screen, by Alayan
* Many minor tweaks and bugfixes
#### In-race UI
* Scale down the lap time indicator next to the kart icons when there are many karts, by riso
* Limit how long chat and in-race messages can be, by Benau and Alayan
* Add an option to disable in-race messages only, by Alayan
### Tracks and modeling
#### Tracks
* A handful of minor graphical fixes and enhancements
* Fixed checklines that could be missed too easily in XR591 and the Old Mine.
#### Arenas
* Pumpkin Park, by samuncle
## SuperTuxKart 1.0 (20. April 2019)
### Networking
* Networking support for normal race, time trial, free for all, capture the flag and soccer by Benau and hiker :
* Access to a global server list, possibility to also create a LAN server
* Track voting system to allow players to decide where the race will be
* Communication between server and clients to exchange inputs and general game data
* A lot of work on rewind code to make sure server and client are well synchronized
* Chat lobby for general server information and discussion among players between races
* Support for handicap, which can be changed before each game
* Spectating option for players having entered a server while a race or game is underway by Benau
* Option to join live an active game in FFA, CTF and soccer by Benau
* Global rankings by Benau (communication with main server) and Alayan (ranking formula)
### Race gameplay and physics
* New game mode Capture the Flag by Benau (online multiplayer only)
* New game mode Free for All by Benau
* Free for All available in offline mode with AI, by Mrxx99
* Revised kart characteristics for better balance between light, medium and heavy karts by Alayan
* Better random item distribution for various numbers of karts by Alayan and hiker
* Fix position interpolation causing some incorrect lapline validation by Auria
* Fix kart being uncontrollable and hovering when landing on some downward slopes by hiker
* Mitigate a physics issue which could send a kart flying on collisions by hiker
* Make kart turn radius based on kart class instead of kart model length (which made Adiumy unplayable and caused AI issues) by Alayan
* Revisited slipstreaming with boost easier to obtain, especially in curves, but not as strong as in 0.9.3 when the zipper boost was incorrectly activated, by Alayan
* Minor gameplay improvements (level 1 skid boost doesn't interrupt level 2 boost, fairer rubber-banding in low difficulties, boosted AI for some karts for more challenge in GPs, small balance change of GP points, more useful and consistent handicap option...)
* Start boost/penalty moved to the set phase for smoother networking
* Terrain slowdown works again as intended on several tracks where it was missing
### AI
* Improved powerup and nitro handling in AI by Alayan
### General
* Option to disable light scattering (for improved FPS), used in graphics level 3, by Partmedia
* Unlockable SuperTux challenges in Story Mode by Alayan
* Improvements to ghost replays (more data saved, live time difference, replay comparison, egg hunt replays) by Alayan
* Kart color customization by Benau
* Multithreading contention fixes by Benau
* Local multiplayer improvements by Ben Krajancic
* Major revamp of the achievement system to make adding new achievements much easier and flexible, also fixing some related bugs by Alayan
* Store up to 5 highscores for a track/difficulty/mode/kart number combination, instead of 3
* Smooth turning for non-keyboard inputs for improved consistency between input mode by deveee
* Updated standard replays by Alayan
* Visual improvements (new skidding particles, better rescue, bubblegum flashing before ending)
* Audio improvements (crash sound depending on speed/direction, no crash sound on rescue walls, sound cue in nitro challenges)
* Fix STK incorrectly connecting to the server when the internet option is disabled by Auria
* Updated WiiUse library
* Many bugfixes
### Android
* Gyroscope support by Pelya
* Numerous improvements to input on Android, including screen keyboard, keyboard, gamepads, by deveee
* Android TV support
* Improved UI and font scaling by deveee
* More compact APK thanks to png optimization, allows to have several tracks more than the 0.9.3 APK, by deveee and Alayan
* Wayland support and many other smaller improvements and fixes
### User Interface
* New networking user interface by Benau and hiker
* New coal skin by Alayan
* Support for collapsing widgets in UI by Mrxx99
* Multidirectional keyboard navigation in menus by Alayan
* Alternating background darkness in lists to enhance readability by Benau
* Support text breaks into multiple line in lists, e.g. in the addons menu, by Alayan
* Improved help menu with lateral tabs and a lot more information by Alayan
* Improved option menu with lateral tabs and a separate language tab by Alayan
* Many improvements to the ghost replay selection list (give access to egg hunt replays, kart icon shown in the list, replay's game version shown, hide player number column by default) and dialog (allow replay comparison, show track picture, show information about the selected replays) by Alayan
* Control configurations can be disabled without being deleted by Alayan
* Other significant enhancements (detailed progress of multi-goal achievements, reset password button, clearer checkbox status, milliseconds displayed in time-trials and egg hunts, nitro efficiency in the kart selection screen, better track info screen, better warnings when trying to do an online action with internet access disabled, hour support for GP time, default resolutions can't be used in fullscreen if unsupported by the monitor...)
* Many bugfixes and small enhancements mostly by deveee and Alayan
#### In-race UI
* New speedometer and nitro gauge, by Alayan
* Bigger minimap and new display options, by Alayan
* More legible text with outlines and for some bigger font, by Alayan
### Tracks and modeling
#### Tracks
* Black Forest by Sven Andreas Belting (replacing Green Valley)
* Ravenbridge Mansion by samuncle (replacing Black Hill Mansion)
* Unwanted shortcuts and exploits found by several players and fixed mostly by Auria in many tracks :
* Antediluvian Abyss, Around the Lighthouse, Fort Magma, Grand Paradisio Island, Hacienda, Minigolf, Nessie's Pond, Northern Resort, The Old Mine, Oliver's Math Class, Shifting Sands, STK Enterprise, XR591
* Smoothness issues causing collisions and kart slowdown fixed by Auria :
* Nessie's Pond, Old Mine, Shifting Sands, Volcano Island, XR591
* Item (boxes, nitro, bananas) positions improvement by Alayan and theThomasPat :
* Around the Lighthouse, Black Forest, Candela City, Hacienda, Minigolf, Northern Resort, Oliver's Math Class, STK Enterprise, The Old Mine, Volcano Island, Zen Garden
#### Arenas
* Las Dunas Soccer, by samuncle
* Candela City arena by Benau, based on samuncle's track
#### Karts
* New version of Beastie by Jymis
* New version of Kiki by Benau
## SuperTuxKart 0.9.3 (28. October 2017)
* Reduced RAM and VRAM usage, reducing load times by Auria and Benau
* New mesh format optimized for space and hardware skinning
* Code refactoring of both render pipeline by Benau and Elderme
* Physics improvements and various physics bugfixes by hiker
* Kart GFX improvements (exhaust and headlight)
* In-game screen recording powered by libopenglrecorder
* High quality mipmap generation by Stragus
* New smoother camera by Auria
* New grand prix win scene
* Gamepad configuration bugfixes
* 3 Strikes Battles : added spare tire karts
* Visual representation of the start line in all tracks
* Various improvements (starting boost effect, wall driving fixes, parachutes, GP points, help page for bananas, cannon fixes, colorization shader)
### Tracks and modeling
#### Karts
* Kiki by Benau
* New versions of Wilber and Hexley by Jymis
* New version of Konqi by Benau
#### Tracks
* All tracks drivable in reverse, with arrows pointing in the correct direction
* Candela City by samuncle (replace Shiny Suburbs)
* Cornfield Crossing by samuncle (replace Bovine Barnyard)
* New battle track Las Dunas Arena by samuncle
## SuperTuxKart 0.9.2 (1. July 2016)
* Ghost replay races by Benau
* Battle mode AI by Benau
* Soccer mode AI by Benau
* TTF font rendering by Benau
* New ruby and forest skins by Benau
* Kart properties refactor by Flakebi
* Scripting work under the hood
* Work on the track editor by mhp
* Tweak to challenges
* New farm track song by 0zone0ne and Krobonil
* Bugfixes
### Tracks and modeling
#### Tracks
* Antediluvian Abysses by samuncle (replace Subsea)
* Volcano Island by Ponzino
* New icy soccer field by samuncle and Benau
## SuperTuxKart 0.9.1 (17. October 2015)
* Many bug fixes
* Started to use scripting in tracks
* Significant audio performance improvements
* Tweak to challenges
### Tracks and modeling
#### Tracks
* Better support for driving tracks in reverse
* Smaller tweaks and improvements to several tracks including
* Math class
* XR591
* Fort Magma
* Gran Paradiso Island
* Subsea
## SupertTuxKart 0.9 (24. April 2015)
* Fully shader-based rendering engine
* Online login which allows to:
* connect with friends and see when they are playing
* vote for addons
* collect online achievements
* Grand Prix editor, including creation of random GPs
* Different kart physics
### Tracks and modeling
#### Karts
* New karts Amanda and Gavroche by XGhost
* New and improved Tux, Adiumy, Sara the Wizard and the Racer, Xue
#### Tracks
* Cocoa Temple by samuncle (replace Amazonian Journey)
* Gran Paradiso Island by samuncle (replace The Island)
* Graphical improvements to many other tracks
## SuperTuxKart 0.8.1 (26. November 2013)
* New Soccer mode
* New Egg Hunt mode
* Added Tutorial
* Added new Supertux difficulty
* New bubblegum shield weapon
* New Speedometer and nitro meter
* Add ability to filter addons
* Add ability to save and resume Grand Prix
* Improve skid marks and nitro effects
* Wiimote support
### Tracks and modeling
#### Karts
* New karts Xue and Sara
* Updated Beastie kart
#### Tracks
* STK Enterprise by Rubberduck (replace Star Track)
* Gameplay and graphical updates to several tracks :
* The Old Mine
* Lighthouse
* Zen Garden
#### Miscellaneous
* Updated nitro models
## SuperTuxKart 0.8 (11. December 2012)
* Story mode and new challenge set
* Improved AI
* Skidding and better collision physics
* Reverse mode
* Updated menus
* New music
### Tracks and modeling
#### Tracks
* Green Valley by Wolfs (replace Tux Tollway)
* Blackhill Mansion by samuncle (replace Crescent Crossing)
* Gameplay and graphical updates to several tracks :
* XR591
* Fort Magma
* Jungle
* Sand
## SuperTuxKart 0.7.3 (2. November 2011)
* New graphical effects
* New weapons 'Swatter' and 'Rubber Ball'
* 3 Strikes Battles now displays lives as spare tires
* Improved bubble gum
* See progression during Grand Prix
* Improve physics for tall karts (e.g. Adiumy)
* Lots of bug fixes
* Improved kart control at high speeds
* Better placement of rescued karts
* Transition track-making to blender 2.5/2.6
### Tracks and modeling
#### Karts
* New Suzanne kart
#### Tracks
* Zen Garden by samuncle (replace Secret Garden)
* New Subsea
* New Island battle arena
#### Miscellaneous
* Added Thunderbird as race referee
## SuperTuxKart 0.7.2 (15. July 2011)
* Added in-game addon manager
* Fixed major memory leaks
* Show when you get a highscore
* Improve gamepad configuration under Windows (add ability to tell gamepads apart)
* Various other tweaks done and glitches fixed
### Tracks and modeling
#### Karts
* New Beastie kart.
#### Tracks
* Improved Snow Peak by samuncle
* Improved Star Track UFO by Rudy
## SuperTuxKart 0.7.1b (21. April 2011)
* Fix circular dependency in challenges
* Updated translations
## SuperTuxKart 0.7.1 (15. April 2011)
* Particle (smoke, splash, fire) and weather effects
* Added internet news
* Support for live language switch
* Added optional minimal race UI
* Temporary invincibility after being hit
* Added support for full-screen anti-aliasing
* Clearer multiplayer setup
* Renamed many tracks to nicer names
* Basic level-of-detail (LOD) support
* Debug features for track makers
* Update to bullet 2.77
* Replace more sounds to be DFSG-compliant
* Fixed character names that contain non-ASCII characters
* Full RTL (right to left) support
* Various other tweaks done and glitches fixed
### Tracks and modeling
#### Karts
* New Beagle kart by wolterh
#### Tracks
* New Fort Magma by samuncle
* New Shiny Suburbs by Horace
## SuperTuxKart 0.7 (December 2010)
Too many to list them all. Main points:
* Irrlicht:
- Ported from plib to irrlicht
- Added animations to karts and some tracks
* GUI
- Completely new designed GUI
* Other improvements
- Allowed alternative ways/shortcuts in tracks
- New item 'switch'
### Tracks and modeling
#### Tracks
- Farm
- Hacienda by samuncle (replace Beach)
- Scotland by Canis Lupus
- Secret Garden
## SuperTuxKart 0.6.2a (October 2009)
* Bugfix: STK would crash while trying to save the config file
on Windows Vista.
## SuperTuxKart 0.6.2 (July 2009)
* Bugfix: Game could crash in rare circumstances.
* Bugfix: Restarting a GP (with the in-race menu ESC) would not subtract already allocated points.
* Bugfix: A race could be finished with an invalid shortcut.
* Bugfix: Playing a challenge after a splitscreen game would play the challenge in split screen.
* Bugfix: Items explode over void.
* Bugfix: Grass in castle arena slowed down the kart.
* Bugfix: GP result showed kart identifier instead of name.
* Improvement: there is now 1 1 sec. wait period for the race result screen, avoiding the problem that someone presses space/enter at the end of a race, immediately quitting the menu before it can be read.
## SuperTuxKart 0.6.1a (February 2009)
* Bugfix: battle mode would not display track groups.
## SuperTuxKart 0.6.1 (February 2009)
* New music for Snow Mountain.
* Fixed bug in track selection screen that could cause a crash when track groups were used.
* Fixed crash in character selection that could happen if an old user config file existed.
* Fixed incorrect rescues in Fort Magma.
* Improved track selection screen to not display empty track groups.
* A plunger in the face is now removed when restarting.
* Added slow-down for karts driving backwards.
* Somewhat reduced 'shaking' of AI driven karts.
### Tracks and modeling
#### Karts
- New Puffy kart
#### Tracks
- New Cave battle map
## SuperTuxKart 0.6 (January 2009)
* New improved physics and kart handling
* Added sharp turns and nitro speed boost (replacing wheelies and jump)
* Totally rewrote powerups (plunger, bowling ball, cake, bubblegum) and new look for bananas
* New game mode : 3-Strikes Battle
* Major improvements to AI
* Improved user interface
* Karts now have a visible suspension effect
* Fully positional audio with OpenAL
* New music and sound effects (including engine, braking and skidding sounds)
* Better support for mods and add-ons (kart and track groups)
* New/updated translations (ga fi de nl sl fr it es ro sv)
* Allowed 'Grand Prix's of Time Trial, Follow the Leader, or any other mode
* Challenges are now specified and config files, and are thus easy to create by users
* Improved build system to better detect missing dependencies
* Improved shortcut-detection
* Initial work towards networking (disabled and hidden by default)
* Bug fixes and code refactor/cleanup/documentation
- Fixed 'joystick locks' (kart would turn even if the joystick is in neutral),
thanks to Samjam for the patch.
### Tracks and modeling
#### Karts
* Improved Wilber
* Eviltux
* Hexley
* Some old karts have been removed
#### Tracks
* Skyline
* Snow Mountain
* Race track
* Old Mine
* XR591
* Improved track :
* Star track
## SuperTuxKart 0.5 (May 2008)
* Complete Challenges to unlock game modes, new tracks and a skidding preview
* New Follow the Leader game mode
* New Grand Prix
* Improved User Interface
* Improved game pad/joystick handling
* German, French, Dutch, Spanish, Italian and Swedish translations
* Additional music
* Many Bugfixes including:
- a memory leak fix (Charlie Head)
- an AI crash fix (Chris Morris)
### Tracks and modeling
#### Tracks
* SnowTux Peak
* Amazonian Journey
* City
* Canyon
* BSODs Battlements renamed to Fort Magma
* Improved Crescent Crossing, Fort Magma, and Star Track
## SuperTuxKart 0.4 (February 2008)
* New physics handling using the bullet physics engine
* Improved AI
* New GUI handling, including resolution switching GUI
* Improved input handling
* Jump and look-back feature
* Additional music and main theme
### Tracks and modeling
#### Karts
* New kart: wilber
#### Tracks
* Improved 'Shifting Sands' and 'Lighthouse'
## SuperTuxKart 0.3 (May 2007)
* Highscore lists
* Shortcut detection
* Improved AI
* Fullscreen support
* New track: the island
* New penalty: bomb
* MacOSX support
* OpenAL and ogg-vorbis support
* Two new Grand Prixs
* Improved user interface:
- New racing interface
- Better track map
- Player kart dots in the track map are bigger than AI dots
- Track selection screen has topview pictures
- Added "Setup new race" option when a track is finished
- Added "Restart race" option when a track is finished
- The keyboard can skip vertical spaces between buttons
- Better control configuration
- Better in-game help
- Added .desktop file for menus and icon
* Bugfixes:
- Fixed bug in ssg_help::MinMax, which could cause a significant performance loss.
- Fixed bug that allowed the joystick to erase the main menu
- Fixed bug that allowed the joystick to "play the game while paused"
- Fixed screen_manager assert failure bug
- Fixed sound_manager assert failure bug
- Fixed keyboard keys unable to work on the first key press bug
- And others
## SuperTuxKart 0.2 (22. Sep 2006)
* Significant performance improvement by using display lists
* Improved AI
* Support for different grand prixs
* Too many bug fixes to list them all, but the important ones:
* Work around for 'karts fall through track' compiler bug
* Fixed rescue mode
* Two new collectables: parachute and anvil
* Track screen shots in the track select screen
* Keyboard handling allows gradual turning
* Improved physics (still work in progress)
* All hard-coded properties like maximum velocity have
been replaced by dynamically computed data dependent
on kart parameters, allowing for karts having different
characteristics.
* Added help and about screens, added credits to track designer
* Items were added to all tracks
## SuperTuxKart 0.1 (04. May 2006) (not officially released)
* Significant speedup by using a new HOT and collision algorithm --> all tracks are now playable
* Removed all SDL dependencies, only plib is needed
* Single and multi-window menu can be used
* Code structure changes
* Some bug fixes and small improvements
* Added profile option to support automatic profiling
## SuperTuxKart 0.0.0 (22. Dec 2004)
* new tracks
* new characters and karts
* new user-interface
* some additional effects (skid-marks, smoke)
##TuxKart v0.4.0 (March 19th 2004)
* Changes for compatibility with PLIB 1.8.0 and later.
* Removed some features that were only there to support
truly ancient graphics cards like 3Dfx Voodoo-1/2.
##TuxKart v0.3.0 (??)
* Converted to use the new PLIB/PW library and thus
avoid the need to link to GLUT.
##TuxKart v0.2.0 (Sept 3rd 2002)
* Changes for compatibility with PLIB 1.6.0 and later.
##TuxKart v0.0.5 (??)
* Changes for compatibility with PLIB 1.4.0 and later.
##TuxKart v0.0.4 (??)
* Changes to suit rassin-frassin-Windoze-junk.
* Steady-cam camera - courtesy of cowtan@ysbl.york.ac.uk
* Changes for compatibility with PLIB 1.3.1 and later.
* Added new music courtesy of Matt Thomas.
##TuxKart v0.0.3 (July 4th 2000)
* Fixed bug in Keyboard driver when no
joystick driver is installed.
* More CygWin fixes.
* Started new feature to allow you to be
rescued from lava, etc.
##TuxKart v0.0.2 (July 2nd 2000)
* Added ability to add new tracks without
recompiling.
* Can now drive using keyboard only - no joystick
required.
* Should compile and run under Windoze using CygWin.
##TuxKart v0.0.1 (July 1st 2000)
* Fixed a couple of files missing in initial
Distro.
##TuxKart v0.0.0 (June 29th 2000)
* First CVS release.
##TuxKart (unnumbered) (April 13th 2000)
* First hack.

1
CHANGES Normal file
View File

@@ -0,0 +1 @@
See the ChangeLog file.

File diff suppressed because it is too large Load Diff

167
COPYING
View File

@@ -1,21 +1,20 @@
The SuperTuxKart code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
The SuperTuxKart data files (textures, models, sounds, music, etc.) are released under a mixture of licenses including, but not limited to, the following:
The SuperTuxKart code is released under GNU GPL (see full text below).
SuperTuxKart data files (textures, models, sounds, music, etc.) are released under various licenses, see 'license.txt' files
through the various data subdirectories. Data files are released under a mixture of the following licenses :
GNU General Public License (GNU GPL)
Creative Commons Attribution (CC-BY)
Creative Commons Attribution-ShareAlike (CC-BY-SA)
Gnu GPL 2.0 and 3.0+
Creative-Commons-BY(-SA) 3.0
Creative-Commons-Sampling+ 1.0
SoundSnap license
Public Domain
See the 'licenses.txt' files throughout the various data subdirectories for the licenses of each file.
_____________________________________________________________________
________________________________________________________________________________
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
@@ -49,7 +48,7 @@ TERMS AND CONDITIONS
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
"The Program!" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
@@ -99,162 +98,124 @@ You may charge any price or no price for each copy that you convey, and you may
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
* a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
* b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
* c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
* d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
* a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
* b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
* c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
* d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
* e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
* a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
* b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
* c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
* d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
* e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
* f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying"
means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.

289
ChangeLog Normal file
View File

@@ -0,0 +1,289 @@
SuperTuxKart 0.7.3
~~~~~~~~~~~~~~~~~~
* New Zen Garden, Minigolf and Subsea tracks
* New Island battle arena
* New Suzanne kart
* New graphical effects
* New weapons 'Swatter' and 'Rubber Ball'
* Added Thunderbird as race referee
* 3 Strikes Battles now displays lives as spare tires
* Improved bubble gum
* See progression during Grand Prix
* Improve physics for tall karts (e.g. Adiumy)
* Lots of bug fixes
* Improved kart control at high speeds
* Better placement of rescued karts
* Transition track-making to blender 2.5/2.6
SuperTuxKart 0.7.2
~~~~~~~~~~~~~~~~~~
* Added in-game addon manager
* Fixed major memory leaks
* New Snow Peak track by Samuncle
* Improved star track UFO by Rudy
* New Beastie kart.
* Show when you get a highscore
* Improve gamepad configuration under Windows (add ability to tell gamepads apart)
* Various other tweaks done and glitches fixed
SuperTuxkart 0.7.1b
~~~~~~~~~~~~~~~~~~~
* Fix circular dependency in challenges
* Updated translations
SuperTuxKart 0.7.1
~~~~~~~~~~~~~~~~~~
* Particle (smoke, splash, fire) and weather effects
* New Fort Magma by Samuncle, new Shiny Suburbs track by Horace
* New Beagle kart by wolterh
* Added internet news
* Support for live language switch
* Added optional minimal race UI
* Temporary invincibility after being hit
* Added support for full-screen anti-aliasing
* Clearer multiplayer setup
* Renamed many tracks to nicer names
* Basic level-of-detail (LOD) support
* Debug features for track makers
* Update to bullet 2.77
* Replace more sounds to be DFSG-compliant
* Fixed character names that contain non-ASCII characters
* Full RTL (right to left) support
* Various other tweaks done and glitches fixed
SuperTuxKart 0.7 (December 2010)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Too many to list them all. Main points:
* Irrlicht:
- Ported from plib to irrlicht
- Added animations to karts and some tracks
* GUI
- Completely new designed GUI
* Other improvements
- Allowed alternative ways/shortcuts in tracks
- New item 'switch'
* New art:
- New tracks farm, hacienda, scotland, secret garden
SuperTuxKart 0.6.2a (October 2009)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Bugfix: STK would crash while trying to save the config file
on Windows Vista.
SuperTuxKart 0.6.2 (July 2009)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Bugfix: Game could crash in rare circumstances.
* Bugfix: Restarting a GP (with the in-race menu ESC) would
not subtract already allocated points.
* Bugfix: A race could be finished with an invalid shortcut.
* Bugfix: Playing a challenge after a splitscreen game would
play the challenge in split screen.
* Bugfix: Items explode over void.
* Bugfix: Grass in castle arena slowed down the kart.
* Bugfix: GP result showed kart identifier instead of name.
* Improvement: there is now 1 1 sec. wait period for the race
result screen, avoiding the problem that someone
presses space/enter at the end of a race, immediately
quitting the menu before it can be read.
SuperTuxKart 0.6.1a (February 2009)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Bugfix: battle mode would not display track groups.
SuperTuxKart 0.6.1 (February 2009)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Added new kart ("Puffy"), new battle map ("Cave"), and new music
for Snow Mountain.
* Fixed bug in track selection screen that could cause a crash
when track groups were used.
* Fixed crash in character selection that could happen if an
old user config file existed.
* Fixed incorrect rescues in Fort Magma.
* Improved track selection screen to not display empty track
groups.
* A plunger in the face is now removed when restarting.
* Added slow-down for karts driving backwards.
* Somewhat reduced 'shaking' of AI driven karts.
SuperTuxKart 0.6 (January 2009)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* New improved physics and kart handling
* Added sharp turns and nitro speed boost (replacing wheelies and jump)
* Totally rewrote powerups (plunger, bowling ball, cake, bubblegum) and new look for bananas
* New and improved tracks : skyline, snow mountain, race track, space track, old mine, XR591
* New game mode : 3-Strikes Battle
* Major improvements to AI
* New/improved karts (and removed some old ones) : wilber, eviltux, hexley
* Improved user interface
* Karts now have a visible suspension effect
* Fully positional audio with OpenAL
* New music and sound effects (including engine, braking and skidding sounds)
* Better support for mods and add-ons (kart and track groups)
* New/updated translations (ga fi de nl sl fr it es ro sv)
* Allowed 'Grand Prix's of Time Trial, Follow the Leader, or any other mode
* Challenges are now specified and config files, and are thus easy to create by users
* Improved build system to better detect missing dependencies
* Improved shortcut-detection
* Initial work towards networking (disabled and hidden by default)
* Bug fixes and code refactor/cleanup/documentation
- Fixed 'joystick locks' (kart would turn even if the joystick is in neutral),
thanks to Samjam for the patch.
SuperTuxKart 0.5 (May 2008)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Six new tracks and one improved track: Fort Magma, SnowTux Peak, Amazonian Journey, City,
Canyon, Crescent Crossing and StarTrack
* Complete Challenges to unlock game modes, new tracks and a skidding preview
* New Follow the Leader game mode
* New Grand Prix
* Improved User Interface
* Improved game pad/joystick handling
* German, French, Dutch, Spanish, Italian and Swedish translations
* Additional music
* Many Bugfixes including:
a memory leak fix (Charlie Head)
an AI crash fix (Chris Morris)
SuperTuxKart 0.4 (February 2008)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* New physics handling using the bullet physics engine
* New kart: wilber
* Improved 'Shifting Sands' and 'Lighthouse' tracks
* Improved AI
* New GUI handling, including resolution switching GUI
* Improved input handling
* Jump and look-back featue
* Additional music and main theme
SuperTuxKart 0.3 (May 2007)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Highscore lists
* Shortcut detection
* Improved AI
* Fullscreen support
* New track: the island
* New penalty: bomb
* MacOSX support
* OpenAL and ogg-vorbis support
* Two new Grand Prixs
* Improved user interface:
- New racing interface
- Better track map
- Player kart dots in the track map are bigger than AI dots
- Track selection screen has topview pictures
- Added "Setup new race" option when a track is finished
- Added "Restart race" option when a track is finished
- The keyboard can skip vertical spaces between buttons
- Better control configuration
- Better in-game help
- Added .desktop file for menus and icon
* Bugfixes:
- Fixed bug in ssg_help::MinMax, which could cause a significant performance loss.
- Fixed bug that allowed the joystick to erase the main menu
- Fixed bug that allowed the joystick to "play the game while paused"
- Fixed screen_manager assert failure bug
- Fixed sound_manager assert failure bug
- Fixed keyboard keys unable to work on the first key press bug
- And others
SuperTuxKart 0.2 (22. Sep 2006)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Significant performance improvement by using display lists
* Improved AI
* Support for different grand prixs
* Too many bug fixes to list them all, but the important ones:
* Work around for 'karts fall through track' compiler bug
* Fixed rescue mode
* Two new collectables: parachute and anvil
* Track screen shots in the track select screen
* Keyboard handling allows gradual turning
* Improved physics (still work in progress)
* All hard-coded properties like maximum velocity have
been replaced by dynamically computed data dependent
on kart parameters, allowing for karts having different
characteristics.
* Added help and about screens, added credits to track designer
* Items were added to all tracks
SuperTuxKart 0.1 (04. May 2006) (not officially released)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Significant speedup by using a new HOT and collision algorithm
--> all tracks are now playable
* Removed all SDL dependencies, only plib is needed
* Single and multi-window menu can be used
* Code structure changes
* Some bug fixes and small improvements
* Added profile option to support automatic profiling
SuperTuxKart 0.0.0 (22. Dec 2004)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* new tracks
* new characters and karts
* new user-interface
* some additional effects (skid-marks, smoke)
TuxKart v0.4.0 (March 19th 2004)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Changes for compatibility with PLIB 1.8.0 and later.
* Removed some features that were only there to support
truly ancient graphics cards like 3Dfx Voodoo-1/2.
TuxKart v0.3.0 (??)
~~~~~~~~~~~~~~~~~~~
* Converted to use the new PLIB/PW library and thus
avoid the need to link to GLUT.
TuxKart v0.2.0 (Sept 3rd 2002)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Changes for compatibility with PLIB 1.6.0 and later.
TuxKart v0.0.5 (??)
~~~~~~~~~~~~~~~~~~~
* Changes for compatibility with PLIB 1.4.0 and later.
TuxKart v0.0.4 (??)
~~~~~~~~~~~~~~~~~~~
* Changes to suit rassin-frassin-Windoze-junk.
* Steady-cam camera - courtesy of cowtan@ysbl.york.ac.uk
* Changes for compatibility with PLIB 1.3.1 and later.
* Added new music courtesy of Matt Thomas.
TuxKart v0.0.3 (July 4th 2000)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fixed bug in Keyboard driver when no
joystick driver is installed.
* More CygWin fixes.
* Started new feature to allow you to be
rescued from lava, etc.
TuxKart v0.0.2 (July 2nd 2000)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Added ability to add new tracks without
recompiling.
* Can now drive using keyboard only - no joystick
required.
* Should compile and run under Windoze using CygWin.
TuxKart v0.0.1 (July 1st 2000)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fixed a couple of files missing in initial
Distro.
TuxKart v0.0.0 (June 29th 2000)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* First CVS release.
TuxKart (unnumbered) (April 13th 2000)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* First hack.
# EOF #

50
INSTALL Normal file
View File

@@ -0,0 +1,50 @@
SUPERTUXKART INSTALLATION INSTRUCTIONS
======================================
General
-------
First, make sure that you have the following packages installed:
* OpenGL (or Mesa 3.0 or later)
* Irrlicht 1.8 or later
* OpenAL
Unpack the files from the tarball like this:
tar xzf supertuxkart-*.tar.gz
cd supertuxkart-*
where '*' is the version of SuperTuxkart you downloaded - eg 0.2.0. Then:
./configure
make
To test the compilation, supertuxkart can be run from the build
directory by ./src/supertuxkart (./src/supertuxkart.exe on windows).
To install the file, as root execute:
make install
The default install location is /usr/local, i.e. the data files will
be written to /usr/local/share/games/supertuxkart, the executable
will be copied to /usr/local/bin. To change the default installation
location, use the "--prefix" option of configure, e.g. --prefix=/usr
See the --help output of configure for further options.
Building STK on Linux
---------------------
See http://supertuxkart.sourceforge.net/Build_STK_on_Linux
Building STK on OS X
--------------------
See http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX
Building STK on Windows
-----------------------
See http://supertuxkart.sourceforge.net/How_to_build_the_Windows_version

View File

@@ -1,261 +0,0 @@
# Building from source
In order to build SuperTuxKart from source, you'll need both the code and the assets (See <https://supertuxkart.net/Source_control> for more information):
```bash
git clone https://github.com/supertuxkart/stk-code stk-code
svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets
```
## Building SuperTuxKart on Linux
### Dependencies
To build SuperTuxKart from source, you'll need to install the following packages:
* OpenAL (recommended: openal-soft-devel)
* Ogg (libogg-dev)
* Vorbis (libvorbis-dev)
* Freetype (libfreetype6-dev)
* Harfbuzz (libharfbuzz-dev)
* libcurl (libcurl-devel)
* libbluetooth (bluez-devel)
* openssl (openssl-dev)
* libpng (libpng-devel)
* zlib (zlib-devel)
* jpeg (libjpeg-turbo-devel)
* SDL2 (libsdl2-devel)
Fedora command:
```bash
sudo dnf install @development-tools angelscript-devel \
bluez-libs-devel cmake desktop-file-utils SDL2-devel \
freealut-devel freetype-devel \
gcc-c++ git-core libcurl-devel libjpeg-turbo-devel \
libpng-devel libsquish-devel libtool libvorbis-devel \
openal-soft-devel openssl-devel libcurl-devel harfbuzz-devel \
libogg-devel openssl-devel pkgconf \
wiiuse-devel zlib-devel
```
Mageia 6 command:
```bash
su -c 'urpmi gcc-c++ cmake openssl-devel libcurl-devel freetype-devel harfbuzz-devel \
libjpeg-turbo-devel libogg-devel openal-soft-devel SDL2-devel \
libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion \
libbluez-devel libfreetype6-devel
```
openSUSE command:
```bash
sudo zypper install gcc-c++ cmake openssl-devel libcurl-devel libSDL2-devel \
freetype-devel harfbuzz-devel libogg-devel openal-soft-devel libpng-devel \
libvorbis-devel pkgconf zlib-devel enet-devel \
libjpeg-devel bluez-devel freetype2-devel
```
Debian-based Distributions command:
```bash
sudo apt-get install build-essential cmake libbluetooth-dev libsdl2-dev \
libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev \
libjpeg-dev libogg-dev libopenal-dev libpng-dev \
libssl-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev
```
Solus command:
```bash
sudo eopkg it cmake openal-soft-devel libogg-devel libvorbis-devel freetype2-devel \
harfbuzz-devel curl-devel bluez-devel openssl-devel libpng-devel zlib-devel \
libjpeg-turbo-devel sdl2-devel enet-devel libjpeg-turbo-devel bluez-devel curl-devel
```
### In-game recorder
To build the in-game recorder for STK, you have to install
libopenglrecorder from your distribution, or compile it yourself from [here](https://github.com/Benau/libopenglrecorder).
Compilation instruction is explained there. If you don't need this feature, pass `-DBUILD_RECORDER=off` to cmake.
### Shaderc for Vulkan support
You need to compile [Shaderc](https://github.com/google/shaderc) for vulkan support in SuperTuxKart if you are not building for Windows or macOS. If you don't need this feature, pass `-DNO_SHADERC=on` to cmake.
### Compiling
To compile SuperTuxKart, run the following commands inside `stk-code` directory
```bash
# go into the stk-code directory
cd stk-code
# create and enter the cmake_build directory
mkdir cmake_build
cd cmake_build
# run cmake to generate the makefile
cmake ..
# compile
make -j$(nproc)
```
STK can then be run from the build directory with `bin/supertuxkart`
#### Keeping your build up to date
To recompile the latest code without redownloading the entire source, first run the ```svn up``` command inside the 'stk-assets' directory, then run the following commands inside the 'stk-code' directory:
```bash
git pull
cd cmake_build
cmake ..
make -j$(nproc)
```
##### Build Speed Optimization
"-j$(nproc)" is an example, for a faster build, use "-jx" instead, where "x" is the amount of CPU threads you have, minus one.
### Further options
To create a debug version of STK, run:
```bash
cmake .. -DCMAKE_BUILD_TYPE=Debug
```
You can install your build system-wide:
```bash
sudo make install
```
The default install location is `/usr/local`, i.e. the data files will
be written to `/usr/local/share/games/supertuxkart`, the executable
will be copied to `/usr/local/bin`. To change the default installation
location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.:
`cmake .. -DCMAKE_INSTALL_PREFIX=/opt/stk`
## Building SuperTuxKart on Windows
To Build SuperTuxKart on Windows follow these instructions:
1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/). The free Visual Studio Community edition works fine. Remember to select "Desktop development with C++" in the installer.
2. If you want the stable version, download the SuperTuxKart source package from the latest stable version [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) and unpack it.
3. If you want the development version, you will need a Git client and a SVN client. More information can be found here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control).
Open your file browser and find somewhere you want to put the development version of SuperTuxKart. For example in C:\Users\<Your Username> as the Git and SVN clients will have write permissions there, and you should create its own directory, for example SuperTuxKart-dev. Enter that directory, and create a directory inside called stk-assets, and enter it. If you installed TortoiseSVN, right-click, select TortoiseSVN -> Checkout... and paste the corresponding URL found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). While it is downloading the game assets, go back to your file browser and one level up. Right-click again somewhere empty and select "Git clone..." and paste the corresponding link found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control).
*Note: Both `stk-code` and `stk-assets` **must** be in the same directory, otherwise the build will likely fail!*
4. If you got the stable version, download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies Releases](https://github.com/supertuxkart/dependencies/releases), find the stk-code version there and download the `dependencies(arch).zip` as needed and unpack the archive into the `stk-code` directory.
5. If you got the development version go to SuperTuxKart-dev in your file browser, then visit [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64, `armv7` for ARM and `aarch64` for ARM64.
6. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point 'Where to build the binaries' to a new directory called `build` or `bld` inside the stk-code directory.
7. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. CMake will then ask you about your version of Visual Studio.
Confirm your selection; *Please look at the table below to avoid confusion between version numbers and releases of Visual Studio*; CMake will begin creating the required files for the build in the directory. If you want to do a 64-bit build, select the version of Visual Studio you installed with "Win64" appended. Press 'Generate' button.
8. Navigate to your build directory and open the `SuperTuxKart.sln` file; Visual Studio will now load the solution.
9. In the 'Solution Explorer', right click on the `supertuxkart` project and select "Set as StartUp project".
10. Open the 'Build' menu and select 'Build Solution'; or, press the default keyboard shortcut: `CTRL + SHIFT + B` to build the solution.
*Note: To avoid confusion between releases and versions, refer to this table:*
Visual Studio Release | Version
----------------------|------------
Visual Studio 2019| 16
Visual Studio 2017| 15
Visual Studio 2015| 14
Visual Studio 2013| 13
## Building SuperTuxKart on Windows (from PowerShell/Command line)
1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/), the free Visual Studio Community edition works fine.
2. Download a source package from either [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory, `stk-assets` is not needed if you download the full source tarball `(SuperTuxKart-version-src.tar.xz)`.
3. Download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64, `armv7` for ARM and `aarch64` for ARM64.
4. Download CMake from here: [CMake - download page](https://cmake.org/download/); and install it. Navigate to the `stk-code` directory; and create an directory called "build":
```cmd
mkdir build
cd build
```
5. Once inside the build directory; run CMake to start the compilation process:
```cmd
cmake ..
```
6. Now that CMake finished configuring and creating the necessary files for the build, run the build command in the same directory:
```cmd
msbuild.exe SuperTuxKart.sln
```
SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe`
## Building SuperTuxKart on Windows using LLVM MinGW
1. Get the LLVM Mingw archive [here](https://github.com/mstorsjo/llvm-mingw/releases/latest), get the `*-msvcrt-i686.zip or` `*-msvcrt-x86_64.zip` depending on whether you have an Intel / AMD 32 or 64-bit Windows. If you are using ARM64 Windows get the `*-msvcrt-i686.zip` should be fine (untested). After downloading extract it as `C:\llvm-mingw` so `C:\llvm-mingw` contains `bin`, `include`, `lib`, etc.
2. Get Ninja [here](https://github.com/ninja-build/ninja/releases/latest), download the `ninja-win.zip` and extract the `ninja.exe` from the archive to `C:\llvm-mingw`. If you are not using Intel / AMD 64-bit Windows use [this link](https://packages.msys2.org/package/mingw-w64-i686-ninja) and extract `mingw32\bin\ninja.exe` inside the `tar.zst`.
3. Download a source package from either [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory, `stk-assets` is not needed if you download the full source tarball `(SuperTuxKart-version-src.tar.xz)`. Also make sure they lie within the C drive.
4. Download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you compile for Intel / AMD 32-bit, `x86_64` for Intel / AMD 64-bit, `armv7` for ARM 32-bit and `aarch64` for ARM 64-bit version of Windows.
6. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point 'Where to build the binaries' to a new directory called `build` inside the stk-code directory.
7. Press the `Add Entry` button and add the values below:
* Name: `LLVM_ARCH` Type: `STRING` Value: `i686`, `x86_64`, `armv7` or `aarch64`
* Name: `LLVM_PREFIX` Type: `STRING` Value: `C:/llvm-mingw`
* Name: `CMAKE_MAKE_PROGRAM` Type: `STRING` Value: `C:/llvm-mingw/ninja.exe`
* Name: `USE_WIIUSE` Type: `BOOL` Value: `Empty (unchecked)`
8. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. Choose `Ninja` from `Specify the generator for this project`, choose `Specify toolchain file for cross-compiling` then press `Next`. Specify the toolchain file which is located in `stk-code\cmake\Toolchain-llvm-mingw.cmake` and press `Finish`. If no error appears then press 'Generate'
9. Once inside the build directory using command line `cmd.exe` or PowerShell:
```cmd
C:\llvm-mingw\ninja.exe
```
SuperTuxKart can now be run as `bin\supertuxkart.exe`.
## Building SuperTuxKart on macOS
### Getting Started
Install the developer tools, either from the OS X Install DVD or from Apple's website.
Download `dependencies-macosx.tar.xz` from `Assets` section [here](https://github.com/supertuxkart/dependencies/releases) and extract it inside stk-code directory, use `preview` version for git stk-code.
Build STK
```bash
cd /path/to/stk-code
mkdir cmake_build
cd cmake_build
cmake .. -DCMAKE_FIND_ROOT_PATH=$(pwd)/../dependencies-macosx -DUSE_CRYPTO_OPENSSL=FALSE
make
```
Add ` -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9` for 10.9 compatibility.
#### (Optional) packaging for distribution
By default, the executable that is produced is not ready for distribution. Install <https://github.com/auriamg/macdylibbundler> and run:
```bash
dylibbundler -od -b -x ./bin/SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./bin/SuperTuxKart.app/Contents/libs/ -p @executable_path/../libs/ -s ../dependencies-macosx/lib
```
Add `-ns` to disable ad-hoc codesigning
Afterwards, copy the contents of `stk-assets` into `/SuperTuxKart.app/Contents/Resources/data`.

10
Makefile.am Normal file
View File

@@ -0,0 +1,10 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = $(BULLETTREE) $(ENETTREE) src doc data tools
pkgdatadir=$(datadir)/doc/$(PACKAGE)
dist_pkgdata_DATA=AUTHORS ChangeLog COPYING README
EXTRA_DIST=autogen.sh m4 CMakeLists.txt
# NEWS only contains "see changelog"
# CHANGES only contains "see NEW"

View File

@@ -1,366 +0,0 @@
# Online networking games for STK
## Hosting server
First of all, you can compile STK with `-DSERVER_ONLY=ON` which will produce a GUI-less STK binary optimized for size and memory usage, useful for situation like in VPS.
The dependencies for RHEL/CentOS 7 are installed with:
```bash
yum install wget; cd /tmp; wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm; rpm -Uvh epel-release*rpm
yum install gcc-c++ cmake openssl-devel libcurl-devel zlib-devel enet
```
### Hosting WAN (public internet) server
You are required to have an stk online account first, go [here](https://online.supertuxkart.net/register.php) for registration.
It is recommended you have a saved user in your computer to allow hosting multiple servers simultaneously with the same account, if you have a fresh STK installation, first run:
If you intend to keep your server always on (24x7) you are required to implement port forward / direct connection with NAT penetration in your network, we will regularly remove any servers not following this rule.
`supertuxkart --init-user --login=your_registered_name --password=your_password`
After that you should see `Done saving user, leaving` in terminal if it successfully logged in.
Than you can just run:
`supertuxkart --server-config=your_config.xml --network-console`
It will create that xml configuration file if not found in current directory, you can type `quit` in terminal, than you can edit that file for further configuration as required.
` --network-console` should not be used if you run supertuxkart server later with systemd service, see issue [#4299](https://github.com/supertuxkart/stk-code/issues/4299).
The current server configuration xml looks like this:
```xml
<?xml version="1.0"?>
<server-config version="6" >
<!-- Name of server, encode in XML if you want to use unicode characters. -->
<server-name value="STK Server" />
<!-- Port used in server, if you specify 0, it will use the server port specified in stk_config.xml. If you wish to use a random port, set random-server-port to '1' in user config. STK will automatically switch to a random port if the port you specify fails to be bound. -->
<server-port value="0" />
<!-- Game mode in server, 0 is normal race (grand prix), 1 is time trial (grand prix), 3 is normal race, 4 time trial, 6 is soccer, 7 is free-for-all and 8 is capture the flag. Notice: grand prix server doesn't allow for players to join and wait for ongoing game. -->
<server-mode value="3" />
<!-- Difficulty in server, 0 is beginner, 1 is intermediate, 2 is expert and 3 is supertux (the most difficult). -->
<server-difficulty value="0" />
<!-- Number of grand prix tracks per game (If grand prix enabled). -->
<gp-track-count value="3" />
<!-- Use goal target in soccer. -->
<soccer-goal-target value="false" />
<!-- Enable wan server, which requires you to have an stk-addons account with a saved session. Check init-user command for details. -->
<wan-server value="true" />
<!-- Enable network console, which can do for example kickban. -->
<enable-console value="false" />
<!-- Maximum number of players on the server, setting this to a value greater than 8 can cause performance degradation. -->
<server-max-players value="8" />
<!-- Password for private server, leave empty for a public server. -->
<private-server-password value="" />
<!-- Message of today shown in lobby, you can enter encoded XML words here or a file.txt and let STK load it. -->
<motd value="" />
<!-- If this value is set to false, the server will ignore chat messages from all players. -->
<chat value="true" />
<!-- If client sends more than chat-consecutive-interval / 2 chats within this value (read in seconds), it will be ignore, negative value to disable. -->
<chat-consecutive-interval value="8" />
<!-- Allow players to vote for which track to play. If this value is set to false, the server will randomly pick the next track to play. -->
<track-voting value="true" />
<!-- Timeout in seconds for selecting karts and (or) voting tracks in server, you may want to use a lower value if you have track-voting off. -->
<voting-timeout value="30" />
<!-- Timeout in seconds for validation of clients in wan, currently STK will use the stk-addons server to share AES key between the client and server. -->
<validation-timeout value="20" />
<!-- By default WAN server will always validate player and LAN will not, disable it to allow non-validated player in WAN. -->
<validating-player value="true" />
<!-- Disable it to turn off all stun related code in server, it allows for saving of server resources if your server is not behind a firewall. -->
<firewalled-server value="true" />
<!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently uses dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port. If STK detects your server has no public IPv6 address or port differs between IPv4 and IPv6 then it will use IPv4 only socket. For system which doesn't support dual-stack socket (like OpenBSD) you may fail to be connected by IPv4 clients. You can override the detection in config.xml at supertuxkart config-0.10 folder, with default-ip-type option. -->
<ipv6-connection value="true" />
<!-- No server owner in lobby which can control the starting of game or kick any players. -->
<owner-less value="false" />
<!-- Time to wait before entering kart selection screen if satisfied min-start-game-players below for owner less or ranked server. -->
<start-game-counter value="60" />
<!-- Clients below this value will be rejected from joining this server. It's determined by number of official karts in client / number of official karts in server -->
<official-karts-threshold value="1" />
<!-- Clients below this value will be rejected from joining this server. It's determined by number of official tracks in client / number of official tracks in server, setting this value too high will prevent android players from joining this server, because STK android apk has some official tracks removed. -->
<official-tracks-threshold value="0.7" />
<!-- Only auto start kart selection when number of connected player is larger than or equals this value, for owner less or ranked server, after start-game-counter reaches 0. -->
<min-start-game-players value="2" />
<!-- Automatically end linear race game after 1st player finished for some time (currently his finished time * 0.25 + 15.0). -->
<auto-end value="false" />
<!-- Enable team choosing in lobby in team game (soccer and CTF). If owner-less is enabled and live-spectate is not enabled, than this option is always disabled. -->
<team-choosing value="true" />
<!-- If strict-players is on, no duplicated online id or split screen players are allowed, which can prevent someone using more than 1 network AI with this server. -->
<strict-players value="false" />
<!-- Server will submit ranking to stk-addons server for linear race games, you require permission for that. validating-player, auto-end, strict-player and owner-less will be turned on. -->
<ranked value="false" />
<!-- If true, the server owner can config the difficulty and game mode in the GUI of lobby. This option cannot be used with owner-less or grand prix server, and will be automatically turned on if the server was created using the in-game GUI. The changed difficulty and game mode will not be saved in this config file. -->
<server-configurable value="false" />
<!-- If true, players can live join or spectate the in-progress game. Currently live joining is only available if the current game mode used in server is FFA, CTF or soccer, also official-karts-threshold will be made 1.0. If false addon karts will use their original hitbox other than tux, all players having it restriction applies. -->
<live-spectate value="true" />
<!-- Time in seconds when a flag is dropped a by player in CTF returning to its own base. -->
<flag-return-timeout value="20" />
<!-- Time in seconds to deactivate a flag when it's captured or returned to own base by players. -->
<flag-deactivated-time value="3" />
<!-- Hit limit of free for all, zero to disable hit limit. -->
<hit-limit value="20" />
<!-- Time limit of free for all in seconds, zero to disable time limit. -->
<time-limit-ffa value="360" />
<!-- Capture limit of CTF, zero to disable capture limit. -->
<capture-limit value="5" />
<!-- Time limit of CTF in seconds, zero to disable time limit. -->
<time-limit-ctf value="600" />
<!-- Value used by server to automatically estimate each game time. For races, it decides the lap of each race in network game, if more than 0.0f, the number of lap of each track vote in linear race will be determined by max(1.0f, auto-game-time-ratio * default lap of that track). For soccer if more than 0.0f, for time limit game it will be auto-game-time-ratio * soccer-time-limit in UserConfig, for goal limit game it will be auto-game-time-ratio * numgoals in UserConfig, -1 to disable for all. -->
<auto-game-time-ratio value="-1" />
<!-- Maximum ping allowed for a player (in ms), it's recommended to use default value if live-spectate is on. -->
<max-ping value="300" />
<!-- Tolerance of jitter in network allowed (in ms), it's recommended to use default value if live-spectate is on. -->
<jitter-tolerance value="100" />
<!-- Kick players whose ping is above max-ping. -->
<kick-high-ping-players value="false" />
<!-- Allow players exceeding max-ping to have a playable game, if enabled kick-high-ping-players will be disabled, please also use a default value for max-ping and jitter-tolerance with it. -->
<high-ping-workaround value="true" />
<!-- Kick idle player which has no network activity to server for more than some seconds during game, unless he has finished the race. Negative value to disable, and this option will always be disabled for LAN server. -->
<kick-idle-player-seconds value="60" />
<!-- Set how many states the server will send per second, the higher this value, the more bandwidth requires, also each client will trigger more rewind, which clients with slow device may have problem playing this server, use the default value is recommended. -->
<state-frequency value="10" />
<!-- Use sql database for handling server stats and maintenance, STK needs to be compiled with sqlite3 supported. -->
<sql-management value="false" />
<!-- Database filename for sqlite to use, it can be shared for all servers created in this machine, and STK will create specific table for each server. You need to create the database yourself first, see NETWORKING.md for details -->
<database-file value="stkservers.db" />
<!-- Specified in millisecond for maximum time waiting in sqlite3_busy_handler. You may need a higher value if your database is shared by many servers or having a slow hard disk. -->
<database-timeout value="1000" />
<!-- IPv4 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) whichallows live kicking peer by inserting record to database. -->
<ip-ban-table value="ip_ban" />
<!-- IPv6 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. -->
<ipv6-ban-table value="ipv6_ban" />
<!-- Online ID ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. -->
<online-id-ban-table value="online_id_ban" />
<!-- Player reports table name, which will be written when a player reports player in the network user dialog, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<player-reports-table value="player_reports" />
<!-- Days to keep player reports, older than that will be auto cleared, 0 to keep them forever. -->
<player-reports-expired-days value="3" />
<!-- IP geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<ip-geolocation-table value="ip_mapping" />
<!-- IPv6 geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<ipv6-geolocation-table value="ipv6_mapping" />
<!-- If true this server will auto add / remove AI connected with network-ai=x, which will kick N - 1 bot(s) where N is the number of human players. Only use this for non-GP racing server. -->
<ai-handling value="false" />
<!-- If true this server will allow AI instance to be connected from anywhere. (other than LAN network only) -->
<ai-anywhere value="false" />
</server-config>
```
At the moment STK has a list of STUN servers for NAT penetration which allows players or servers behind a firewall or router to be able to connect to each other, but in case it doesn't work, you have to manually disable the firewall or port forward the port(s) used by STK.
By default STK servers use port `2759`. For example, in Ubuntu based distributions, run the following command to disable the firewall on that port:
`sudo ufw allow 2759`
You may also need to handle the server discovery port `2757` for connecting your WAN server in LAN / localhost.
Notice: You don't need to make any firewall or router configuration changes if you connect to the recommended servers (marked with ☆★STK★☆).
### Hosting LAN (local internet) server
Everything is basically the same as WAN one, except you don't need an stk online account, just do:
`supertuxkart --server-config=your_config.xml --lan-server=your_server_name --network-console`
For LAN server it is required that the server and server discovery port is connectable by clients directly, no NAT penetration will be done in LAN.
LAN server can be connected too by typing your server public address (with port) in ```Enter server address``` dialog without relying on stk-addons.
------
After the first time configuration, you can just start the server with the command:
`supertuxkart --server-config=your_config.xml`, regardless of whether LAN or WAN server is chosen (of course you need to have a saved user for the WAN one), by default your server logging will be saved to the STK configuration directory with a name of `your_config.log`, given that the server configuration filename is `your_config.xml`.
You can find out that directory location [here (See Where is the configuration stored?)](https://supertuxkart.net/FAQ)
## Testing server
There is a network AI tester in STK which can use AI on player controller for server hosting linear races game mode, which helps automating the testing for servers, to enable it use it on lan server:
`supertuxkart --connect-now=x.x.x.x:y --network-ai=n --no-graphics`
Remove `--no-graphics` if you want to see the AI racing. You can also run network AI tester in server-only build of STK.
With the network AI tester, it's easier to for example simulate high-loaded servers or bad networks (ones with high ping and/or packet loss).
Tested on a Raspberry Pi 3 Model B+, if you have 8 players connected to a server hosted on it, the usage of a single CPU core is ~60% and there are ~60MB of memory usage for game with heavy tracks like Cocoa Temple or Candela City on the server, you can use the above figures to estimate how many STK servers can be hosted on the same computer.
For bad network simulation, we recommend `network traffic control` by Linux kernel, see [here](https://wiki.linuxfoundation.org/networking/netem) for details.
You will have the best gaming experience by choosing a server where all players have less than 100ms ping with no packet loss.
## Server management (Since 1.1)
Currently STK uses sqlite (if building with sqlite3 on) for server management with the following functions at the moment:
1. Server statistics
2. IP / online ID ban list
3. Player reports
4. IPv4 and IPv6 geolocation
You need to create a database in sqlite first, run `sqlite3 stkservers.db` in the folder where (all) your server_config.xml(s) located.
A table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_stats` will also be created in your database if one does not exist.:
```sql
CREATE TABLE IF NOT EXISTS (table name above)
(
host_id INTEGER UNSIGNED NOT NULL PRIMARY KEY, -- Unique host id in STKHost of each connection session for a STKPeer
ip INTEGER UNSIGNED NOT NULL, -- IP decimal of host
ipv6 TEXT NOT NULL DEFAULT '', -- IPv6 (if exists) in string of host (only created if IPv6 server)
port INTEGER UNSIGNED NOT NULL, -- Port of host
online_id INTEGER UNSIGNED NOT NULL, -- Online if of the host (0 for offline account)
username TEXT NOT NULL, -- First player name in the host (if the host has splitscreen player)
player_num INTEGER UNSIGNED NOT NULL, -- Number of player(s) from the host, more than 1 if it has splitscreen player
country_code TEXT NULL DEFAULT NULL, -- 2-letter country code of the host
version TEXT NOT NULL, -- SuperTuxKart version of the host
os TEXT NOT NULL, -- Operating system of the host
connected_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Time when connected
disconnected_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Time when disconnected (saved when disconnected)
ping INTEGER UNSIGNED NOT NULL DEFAULT 0 -- Ping of the host
) WITHOUT ROWID;
```
STK will also create the following default views from the stats table:
`*_full_stats`
Full stats with ip in human readable format and time played of each players in minutes.
`*_current_players`
Current players in server with ip in human readable format and time played of each players in minutes.
`*_player_stats`
All players with online id and username with their time played stats in this server since creation of this database.
If sqlite supports window functions (since 3.25), it will include last session player info (ip, country, ping...).
A empty table named `v(server database version)_countries` will also be created in your database if not exists:
```sql
CREATE TABLE IF NOT EXISTS (table name above)
(
country_code TEXT NOT NULL PRIMARY KEY UNIQUE, -- Unique 2-letter country code
country_flag TEXT NOT NULL, -- Unicode country flag representation of 2-letter country code
country_name TEXT NOT NULL -- Readable name of this country
) WITHOUT ROWID;
```
If you want to see flags and readable names of countries in the above views, you need to initialize `v(server database version)_countries` table, check [this script](tools/generate-countries-table.py).
For IPv4 and online ID ban list, player reports or IP mapping, you need to create one yourself:
```sql
CREATE TABLE ip_ban
(
ip_start INTEGER UNSIGNED NOT NULL UNIQUE, -- Starting of ip decimal for banning (inclusive)
ip_end INTEGER UNSIGNED NOT NULL UNIQUE, -- Ending of ip decimal for banning (inclusive)
starting_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Starting time of this banning entry to be effective
expired_days REAL NULL DEFAULT NULL, -- Days for this banning to be expired, use NULL for a permanent ban
reason TEXT NOT NULL DEFAULT '', -- Banned reason shown in user stk menu, can be empty
description TEXT NOT NULL DEFAULT '', -- Private description for server admin
trigger_count INTEGER UNSIGNED NOT NULL DEFAULT 0, -- Number of banning triggered by this ban entry
last_trigger TIMESTAMP NULL DEFAULT NULL -- Latest time this banning entry was triggered
);
CREATE TABLE ipv6_ban
(
ipv6_cidr TEXT NOT NULL UNIQUE, -- IPv6 CIDR range for banning (for example 2001::/64), use /128 for a specific ip
starting_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Starting time of this banning entry to be effective
expired_days REAL NULL DEFAULT NULL, -- Days for this banning to be expired, use NULL for a permanent ban
reason TEXT NOT NULL DEFAULT '', -- Banned reason shown in user stk menu, can be empty
description TEXT NOT NULL DEFAULT '', -- Private description for server admin
trigger_count INTEGER UNSIGNED NOT NULL DEFAULT 0, -- Number of banning triggered by this ban entry
last_trigger TIMESTAMP NULL DEFAULT NULL -- Latest time this banning entry was triggered
);
CREATE TABLE online_id_ban
(
online_id INTEGER UNSIGNED NOT NULL UNIQUE, -- Online id from STK addons database for banning
starting_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Starting time of this banning entry to be effective
expired_days REAL NULL DEFAULT NULL, -- Days for this banning to be expired, use NULL for a permanent ban
reason TEXT NOT NULL DEFAULT '', -- Banned reason shown in user stk menu, can be empty
description TEXT NOT NULL DEFAULT '', -- Private description for server admin
trigger_count INTEGER UNSIGNED NOT NULL DEFAULT 0, -- Number of banning triggered by this ban entry
last_trigger TIMESTAMP NULL DEFAULT NULL -- Latest time this banning entry was triggered
);
CREATE TABLE player_reports
(
server_uid TEXT NOT NULL, -- Report from which server unique id (config filename)
reporter_ip INTEGER UNSIGNED NOT NULL, -- IP decimal of player who reports
reporter_ipv6 TEXT NOT NULL DEFAULT '', -- IPv6 (if exists) in string of player who reports (only needed for IPv6 server)
reporter_online_id INTEGER UNSIGNED NOT NULL, -- Online id of player who reports, 0 for offline player
reporter_username TEXT NOT NULL, -- Player name who reports
reported_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Time of reporting
info TEXT NOT NULL, -- Report info by reporter
reporting_ip INTEGER UNSIGNED NOT NULL, -- IP decimal of player being reported
reporting_ipv6 TEXT NOT NULL DEFAULT '', -- IPv6 (if exists) in string of player who reports (only needed for IPv6 server)
reporting_online_id INTEGER UNSIGNED NOT NULL, -- Online id of player being reported, 0 for offline player
reporting_username TEXT NOT NULL -- Player name being reported
);
CREATE TABLE ip_mapping
(
ip_start INTEGER UNSIGNED NOT NULL PRIMARY KEY UNIQUE, -- IP decimal start
ip_end INTEGER UNSIGNED NOT NULL UNIQUE, -- IP decimal end
latitude REAL NOT NULL, -- Latitude of this IP range
longitude REAL NOT NULL, -- Longitude of this IP range
country_code TEXT NOT NULL -- 2-letter country code
) WITHOUT ROWID;
CREATE TABLE ipv6_mapping
(
ip_start INTEGER UNSIGNED NOT NULL PRIMARY KEY UNIQUE, -- IP decimal (upper 64bit) start
ip_end INTEGER UNSIGNED NOT NULL UNIQUE, -- IP decimal (upper 64bit) end
latitude REAL NOT NULL, -- Latitude of this IP range
longitude REAL NOT NULL, -- Longitude of this IP range
country_code TEXT NOT NULL -- 2-letter country code
)
```
For initialization of `ip_mapping` table, check [this script](tools/generate-ip-mappings.py).

71
README Normal file
View File

@@ -0,0 +1,71 @@
SuperTuxKart
============
SuperTuxKart is a free kart racing game. It is focusing on fun and
not on realistic kart physics. Instruction can be found on the
in-game help page.
The SuperTuxKart homepage can be found at:
http://supertuxkart.sourceforge.net
The official SuperTuxKart forum is at. If you need support,
this would be the best place to start.
http://supertuxkart.sourceforge.net/forum
Hope you enjoy the game.
- The SuperTuxKart development team.
HARDWARE REQUIREMENTS
=====================
* You need a 3D graphics card that supports OpenGL or Mesa.
* You should have a CPU that's running at 450MHz or better.
* You'll need at least 600 MB of free RAM.
* Ideally, you want a joystick with at least 6 buttons.
COMPILING SuperTuxkart
======================
WINDOWS
-------
A project file for Visual Studio 9 (e.g. the free 2008 express
edition) is included in the sources in src/ide/vc9. A separate
dependency package is available on SuperTuxKart's sourceforge
page, which includes all necessary libraries, header files,
and dlls to compile and run the source code.
While compilation with cygwin is not officially supported,
this has been done (check with the forum for details).
MAC OSX
-------
The latest information about compilation on Mac are on our wiki:
http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX
The Xcode project file is in /src/ide/Xcode/, but it still
requires that all dependencies are installed as explained on the wiki.
UNIX
----
See INSTALL for details.
LICENSE
=======
This software is released under the GNU General Public License (GPL) which
can be found in the file 'LICENSE' in the same directory as this file.
Information about the licenses for artwork are contained in
data/licenses.
3D COORDINATES
==============
A reminder for those looking at the code and 3d models:
STK : X right, Y up, Z forwards
Blender: X right, Y forwards, Z up
The exporters perform the needed transform, so in Blender you just work
with XY plane as ground, and things will appear fine in STK (using XZ
as ground in the code, obviously).

View File

@@ -1,26 +0,0 @@
STK Cat Mod {Now with 100% more git repos!}
WARNING:
I have changed enough by now that the game is getting a little unstable (random
crashes, phasing through walls if going too fast), please use with caution (and
if you find a bug, try and fix it if you can before reporting it).
What I've changed in the mod:
- You can have different default powerups (so, not POWERUP_NOTHING anymore),
and the default powerup is now the zipper.
- You always have nitro.
- Using nitro gives you nitro, instead of taking it away (can help beating
nitro collecting levels).
- Nitro engine force and mult are multiplied by 2.5 each.
- There is no more auto rescue, use backspace instead.
- The speed limit is practically removed (set to the highest float possible)
- The zipper powerup is VERY fast now, (x4) test it in the story mode level select level first.
- You can customize the zipper speed (karts/kart_properties.cpp, look for the `#define ZIPPER_SPEED`)

View File

@@ -1,42 +0,0 @@
# SuperTuxKart
[![Linux build status](https://github.com/supertuxkart/stk-code/actions/workflows/linux.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/linux.yml)
[![Apple build status](https://github.com/supertuxkart/stk-code/actions/workflows/apple.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/apple.yml)
[![Windows build status](https://github.com/supertuxkart/stk-code/actions/workflows/windows.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/windows.yml)
[![Switch build status](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml)
[![#supertuxkart on the libera IRC network](https://img.shields.io/badge/libera-%23supertuxkart-brightgreen.svg)](https://web.libera.chat/?channels=#supertuxkart)
# See [`README.cat`](README.cat)
SuperTuxKart is a free kart racing game. It focuses on fun and not on realistic kart physics. Instructions can be found on the in-game help page.
The SuperTuxKart homepage can be found at <https://supertuxkart.net/>. There is also our [FAQ](https://supertuxkart.net/FAQ) and information on how get in touch with the [community](https://supertuxkart.net/Community).
Latest release binaries can be found [here](https://github.com/supertuxkart/stk-code/releases/latest), and preview release [here](https://github.com/supertuxkart/stk-code/releases/preview).
## Hardware Requirements
To run SuperTuxKart, make sure that your computer's specifications are equal or higher than the following specifications:
* A graphics card capable of 3D rendering - NVIDIA GeForce 470 GTX, AMD Radeon 6870 HD series card or Intel HD Graphics 4000 and newer. OpenGL >= 3.3
* You should have a dual-core CPU that's running at 1 GHz or faster.
* You'll need at least 512 MB of free VRAM (video memory).
* System memory: 1 GB
* Minimum disk space: 700 MB
* Ideally, you'll want a joystick with at least 6 buttons.
## License
The software is released under the GNU General Public License (GPL) which can be found in the file [`COPYING`](COPYING) in the same directory as this file.
---
## 3D coordinates
A reminder for those who are looking at the code and 3D models:
SuperTuxKart: X right, Y up, Z forwards
Blender: X right, Y forwards, Z up
The export utilities perform the needed transformation, so in Blender you just work with the XY plane as ground, and things will appear fine in STK (using XZ as ground in the code, obviously).
## Building from source
Building instructions can be found in [`INSTALL.md`](INSTALL.md)

34
SVN-CONFIG Normal file
View File

@@ -0,0 +1,34 @@
# Please, make sure your SVN client uses something that matches the
# following config. Specially the autoprops part, that way new files
# will be added with the right settings. Default config for command line
# svn is in ~/.subversion/config. If you use SVN for multiple projects
# simultaneously, remember you can use different configs, at least in
# cmd line (via --config-dir and for example ~/.subversion/supertuxkart/
# with a new config file inside).
[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* ._* .DS_Store
enable-auto-props = yes
[auto-props]
*.c = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.cpp = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.h = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.hpp = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision
*.txt = svn:eol-style=native
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
Makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.jpeg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
*.svg = svn:mime-type=image/svg+xml
*.htm = svn:mime-type=text/html
*.html = svn:mime-type=text/html
*.css = svn:mime-type=text/css
*.pdf = svn:mime-type=application/pdf
SConstruct = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.xml = svn:eol-style=LF;svn:mime-type=text/xml
*.py = svn:eol-style=native;svn:keywords=Author Date Id Revision

43
TODO Normal file
View File

@@ -0,0 +1,43 @@
SuperTuxKart is looking for additional man power to make this
one of the best free linux games out there :) We need (in
no particular order):
1) Musicians/sound engineers
- Create additional background soundtrack
- Create sound effects
2) Artists and track designer
- Create additional tracks
- Create additional art work for tracks,
background images
3) Developers
- See todo list below - it's rather long at the moment :)
4) Web master
- Extend the current web page, keep it up to date
5) Tester
- For just about everything
- Esp. different platforms
6) Package creators
- Create packages for
- most common linux Distributors
- Windows
7) Writers
- Write documentation, ranging from man page, to
a description for the web, to a design document, ...
If you want to help the SuperTuxKart - Project, please
contact us on the email list:
supertuxkart-devel@lists.sourceforge.net
Thanks in advance!
The SuperTuxKart-Team
For details, see
http://supertuxkart.sourceforge.net/Get_involved

8
acinclude.m4 Normal file
View File

@@ -0,0 +1,8 @@
AC_DEFUN([MY_EXPAND_DIR], [
$1=$2
$1=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""[$]$1"\"
)`
])

View File

@@ -1,379 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# OpenAL
LOCAL_MODULE := openal
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/openal/libopenal.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# OGG
LOCAL_MODULE := ogg
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libogg/libogg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbis
LOCAL_MODULE := vorbis
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libvorbis/lib/libvorbis.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbisfile
LOCAL_MODULE := vorbisfile
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libvorbis/lib/libvorbisfile.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# CURL
LOCAL_MODULE := curl
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/curl/lib/libcurl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedtls
LOCAL_MODULE := libmbedtls
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedtls.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedcrypto
LOCAL_MODULE := libmbedcrypto
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedx509
LOCAL_MODULE := libmbedx509
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedx509.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# JPEG
LOCAL_MODULE := libjpeg
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libjpeg/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# zlib
LOCAL_MODULE := zlib
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/zlib/libz.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# PNG
LOCAL_MODULE := png
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libpng/libpng.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Freetype
LOCAL_MODULE := freetype
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/freetype/build/libfreetype.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Harfbuzz
LOCAL_MODULE := harfbuzz
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/harfbuzz/build/libharfbuzz.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# shaderc
LOCAL_MODULE := shaderc
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/shaderc/libshaderc/libshaderc_combined.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libsquish
LOCAL_MODULE := libsquish
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libsquish/libsquish.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# astc-encoder
LOCAL_MODULE := libastcenc
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/astc-encoder/Source/libastcenc.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# ifaddrs
LOCAL_MODULE := ifaddrs
LOCAL_PATH := .
LOCAL_SRC_FILES := ../lib/ifaddrs/ifaddrs.c
LOCAL_CFLAGS := -I../lib/ifaddrs
# Starting NDK21 it enables NEON by default on 32-bit ARM target
# Disable it to support more phones
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# AngelScript
LOCAL_MODULE := angelscript
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/angelscript/source/*.S) \
$(wildcard ../lib/angelscript/source/*.cpp)
LOCAL_CFLAGS := -I../lib/angelscript/source/
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# ENET
LOCAL_MODULE := enet
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/enet/*.c)
LOCAL_CFLAGS := -I../lib/enet/include/ -DHAS_SOCKLEN_T -DENABLE_IPV6
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Bullet
LOCAL_MODULE := bullet
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/bullet/src/*/*.cpp) \
$(wildcard ../lib/bullet/src/*/*/*.cpp)
LOCAL_CFLAGS := -I../lib/bullet/src/
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Graphics utils
LOCAL_MODULE := graphics_utils
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_utils/mipmap/*.c)
LOCAL_CFLAGS := -I../lib/graphics_utils/mipmap \
-I../lib/simd_wrapper
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Graphics engine
LOCAL_MODULE := graphics_engine
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_engine/src/*.c) \
$(wildcard ../lib/graphics_engine/src/*.cpp)
LOCAL_CFLAGS := -DENABLE_LIBASTCENC \
-I../lib/graphics_engine/include \
-I../lib/graphics_utils \
-I../lib/sdl2/include/ \
-I../lib/bullet/src/ \
-I../lib/irrlicht/include/ \
-I../lib/shaderc/libshaderc/include \
-I../lib/libsquish \
-Ideps-$(TARGET_ARCH_ABI)/astc-encoder/Source
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
LOCAL_STATIC_LIBRARIES := shaderc libsquish libastcenc
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# MCPP
LOCAL_MODULE := mcpp
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/mcpp/*.c)
LOCAL_CFLAGS := -DMCPP_LIB -DHAVE_CONFIG_H
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# SheenBidi
LOCAL_MODULE := sheenbidi
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/sheenbidi/Source/*.c)
LOCAL_CFLAGS := -I../lib/sheenbidi/Headers
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# tinygettext
LOCAL_MODULE := tinygettext
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/tinygettext/src/*.cpp)
LOCAL_CFLAGS := -I../lib/tinygettext/include -DDISABLE_ICONV
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Irrlicht
LOCAL_MODULE := irrlicht
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/irrlicht/source/Irrlicht/*.cpp)
LOCAL_CFLAGS := -I../lib/irrlicht/source/Irrlicht/ \
-I../lib/irrlicht/include/ \
-I../src \
-Ideps-$(TARGET_ARCH_ABI)/libjpeg/ \
-Ideps-$(TARGET_ARCH_ABI)/libpng/ \
-Ideps-$(TARGET_ARCH_ABI)/zlib/ \
-I../lib/sdl2/include/ \
-I../lib/graphics_engine/include \
-DMOBILE_STK \
-DANDROID_PACKAGE_CALLBACK_NAME=$(PACKAGE_CALLBACK_NAME)
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := libjpeg png zlib
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# SDL2
LOCAL_MODULE := SDL2
LOCAL_PATH := .
LOCAL_SRC_FILES := $(wildcard ../lib/sdl2/src/*.c) \
$(wildcard ../lib/sdl2/src/audio/*.c) \
$(wildcard ../lib/sdl2/src/audio/android/*.c) \
$(wildcard ../lib/sdl2/src/audio/dummy/*.c) \
$(wildcard ../lib/sdl2/src/audio/aaudio/*.c) \
$(wildcard ../lib/sdl2/src/audio/openslES/*.c) \
../lib/sdl2/src/atomic/SDL_atomic.c.arm \
../lib/sdl2/src/atomic/SDL_spinlock.c.arm \
$(wildcard ../lib/sdl2/src/core/android/*.c) \
$(wildcard ../lib/sdl2/src/cpuinfo/*.c) \
$(wildcard ../lib/sdl2/src/dynapi/*.c) \
$(wildcard ../lib/sdl2/src/events/*.c) \
$(wildcard ../lib/sdl2/src/file/*.c) \
$(wildcard ../lib/sdl2/src/haptic/*.c) \
$(wildcard ../lib/sdl2/src/haptic/android/*.c) \
$(wildcard ../lib/sdl2/src/hidapi/*.c) \
$(wildcard ../lib/sdl2/src/hidapi/android/*.cpp) \
$(wildcard ../lib/sdl2/src/joystick/*.c) \
$(wildcard ../lib/sdl2/src/joystick/android/*.c) \
$(wildcard ../lib/sdl2/src/joystick/hidapi/*.c) \
$(wildcard ../lib/sdl2/src/joystick/virtual/*.c) \
$(wildcard ../lib/sdl2/src/loadso/dlopen/*.c) \
$(wildcard ../lib/sdl2/src/locale/android/*.c) \
$(wildcard ../lib/sdl2/src/locale/*.c) \
$(wildcard ../lib/sdl2/src/misc/*.c) \
$(wildcard ../lib/sdl2/src/misc/android/*.c) \
$(wildcard ../lib/sdl2/src/power/*.c) \
$(wildcard ../lib/sdl2/src/power/android/*.c) \
$(wildcard ../lib/sdl2/src/filesystem/android/*.c) \
$(wildcard ../lib/sdl2/src/sensor/*.c) \
$(wildcard ../lib/sdl2/src/sensor/android/*.c) \
$(wildcard ../lib/sdl2/src/render/*.c) \
$(wildcard ../lib/sdl2/src/render/*/*.c) \
$(wildcard ../lib/sdl2/src/stdlib/*.c) \
$(wildcard ../lib/sdl2/src/thread/*.c) \
$(wildcard ../lib/sdl2/src/thread/pthread/*.c) \
$(wildcard ../lib/sdl2/src/timer/*.c) \
$(wildcard ../lib/sdl2/src/timer/unix/*.c) \
$(wildcard ../lib/sdl2/src/video/*.c) \
$(wildcard ../lib/sdl2/src/video/android/*.c) \
$(wildcard ../lib/sdl2/src/video/yuv2rgb/*.c)
LOCAL_CFLAGS := -I../lib/sdl2/include/ -DGL_GLEXT_PROTOTYPES
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
LOCAL_STATIC_LIBRARIES := cpufeatures
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
# STK
LOCAL_MODULE := main
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../src/*.cpp) \
$(wildcard ../src/*/*.cpp) \
$(wildcard ../src/*/*/*.cpp)
LOCAL_LDLIBS := -llog -lm -lOpenSLES
LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/bullet/src \
-I../lib/sheenbidi/Headers \
-I../lib/enet/include \
-I../lib/ifaddrs \
-I../lib/irrlicht/include \
-I../lib/irrlicht/source/Irrlicht \
-I../lib/graphics_utils \
-I../lib/graphics_engine/include \
-I../lib/mcpp \
-I../lib/sdl2/include \
-I../lib/tinygettext/include \
-I../lib/libsquish \
-I../src \
-Ideps-$(TARGET_ARCH_ABI)/curl/include \
-Ideps-$(TARGET_ARCH_ABI)/freetype/include \
-Ideps-$(TARGET_ARCH_ABI)/harfbuzz/include \
-Ideps-$(TARGET_ARCH_ABI)/libogg/include \
-Ideps-$(TARGET_ARCH_ABI)/libvorbis/include \
-Ideps-$(TARGET_ARCH_ABI)/openal/include \
-Ideps-$(TARGET_ARCH_ABI)/mbedtls/include \
-DUSE_GLES2 \
-DMOBILE_STK \
-DENABLE_SOUND \
-DENABLE_IPV6 \
-DENABLE_CRYPTO_MBEDTLS \
-DNDEBUG \
-DDISABLE_ICONV \
-DANDROID_PACKAGE_NAME=\"$(PACKAGE_NAME)\" \
-DANDROID_APP_DIR_NAME=\"$(APP_DIR_NAME)\" \
-DSUPERTUXKART_VERSION=\"$(PROJECT_VERSION)\" \
-DANDROID_PACKAGE_CLASS_NAME=\"$(PACKAGE_CLASS_NAME)\"
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := irrlicht bullet enet ifaddrs angelscript mcpp SDL2 \
vorbisfile vorbis ogg openal curl libmbedtls \
libmbedcrypto libmbedx509 c++_static sheenbidi \
harfbuzz freetype tinygettext graphics_utils \
graphics_engine
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
$(call import-module, android/cpufeatures)

View File

@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:banner="@drawable/banner"
android:hasCode="true"
android:isGame="true"
android:theme="@style/Theme.STKSplashScreen"
android:hardwareAccelerated="true"
android:resizeableActivity="true">
<activity android:name=".SuperTuxKartActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|uiMode"
android:screenOrientation="sensorLandscape"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<!-- Let Android know that we can handle some USB devices and should receive this event -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
</activity>
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.software.input_methods" android:required="false" />
<!-- Touchscreen support -->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.gamepad"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events -->
<uses-feature
android:name="android.hardware.type.pc"
android:required="false" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Allow access to Bluetooth devices -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>

View File

@@ -1,166 +0,0 @@
================================================================================
SUPERTUXKART
================================================================================
--------------------------------------------------------------------------------
SYSTEM REQUIREMENTS
--------------------------------------------------------------------------------
To run SuperTuxKart on Android, you need a device that meets following
requirements:
- Android 4.1 or later
- Processor compatible with armv7 or x86
- GPU that supports OpenGL ES 2.0
- 1 GB RAM (STK uses ~150 MB in minimal configuration)
- 300 MB of free space on internal storage
- Touch screen or external keyboard
--------------------------------------------------------------------------------
COMPILATION
--------------------------------------------------------------------------------
The build scripts are designed to run under linux. They may work under cygwin
after some tweaks, but atm. only linux is supported.
Dependencies list (may be incomplete):
autoconf, automake, make, python, gradle, imagemagick, cmake,
vorbis-tools, pngquant
Additionally some dependencies for optimize_data script:
advancecomp, libjpeg-progs, optipng
Before compilation you must download dependencies-android-src.tar.xz from:
https://github.com/supertuxkart/dependencies/releases
Choose the corresponding STK version you are compiling, use "preview" for git.
It contains sources of libraries that are used in STK, but are not available
in stk-code repository (curl, freetype, openal...).
These libraries are compiled and then statically linked with STK by the Android
build script.
You need to extract that packed file to stk-code/lib directory, so that the
directory will have following structure:
> stk-code
> build
> data
> lib
> angelscript
> bullet
> curl
> enet
> freetype
> ...
> src
> ...
You also need Android SDK for android-26 platform or later (SDL2 requirement) and
Android NDK. Version r23 is recommended, because it's known that it works
without issues. r24 or later is not compatible because it removes Android 4.1
support (https://github.com/android/ndk/wiki/Changelog-r23#announcements)
You need to create proper "android-sdk" and "android-ndk" symlinks in the
directory with Android project, so that the compilation script will have access
to the SDK and NDK.
Before running the compilation, run the generate_assets script, so that
selected assets will be copied to "assets" directory, and then included in the
apk file.
You can select different karts and tracks by setting KARTS and TRACKS variables
in the generate_assets.sh script at the beginning of file.
When you are creating the assets directory manually, note that the
directories.txt file is urgently needed and it is used by the application for
extracting assets.
If the assets directory is already prepared, you can run "./make.sh" command to
build the project and create an apk file. Note that all arguments are passed to
the make command, so that you can run "./make.sh -j5" for multi-threaded build.
Basically if all dependencies are installed in the system, it should be enough
to just run:
export SDK_PATH=/path/to/your/android/sdk
export NDK_PATH=/path/to/your/android/ndk
# Optional for STK_MIN_ANDROID_SDK, STK_TARGET_ANDROID_SDK and STK_NDK_VERSION
# If unset it will use the below values
export STK_MIN_ANDROID_SDK=16
export STK_TARGET_ANDROID_SDK=30
export STK_NDK_VERSION=23.1.7779620
./generate_assets.sh
./make_deps.sh
./make.sh
You may need to add org.gradle.jvmargs=-XX:MaxHeapSize=2048m -Xmx2048m to
.gradle/gradle.properties if you see java.lang.OutOfMemoryError / Java heap
space execption error.
--------------------------------------------------------------------------------
ENVIRONMENT VARIABLES
--------------------------------------------------------------------------------
COMPILE_ARCH - Allows one to choose CPU architecture for which the package will
be compiled.
Possible values: all, armv7, aarch64, x86, x86_64.
Default is: all.
BUILD_TYPE - Allows one to set build type.
Possible values: debug, release, beta.
Default is: debug.
BUILD_TOOLS_VER - Allows to override the SDK build-tools version.
SDK_PATH - Path to SDK directory
NDK_PATH - Path to NDK directory, it should include a list of installed
NDK version folders
PROJECT_VERSION - Set Supertuxkart version number, for example "0.9.3" or
"git20170409" or whatever. The version must match with file
assets/data/supertuxkart.$PROJECT_VERSION
and that file must exist, because it is used for extracting
and loading game data.
Default is: git.
PROJECT_CODE - Set Supertuxkart version code that is used in the manifest
file.
Default is: 1.
--------------------------------------------------------------------------------
RELEASE BUILD
--------------------------------------------------------------------------------
Making a release build is similar to typical compilation, but there are few
additional things to do.
You have to set PROJECT_VERSION variable. This is important, because assets
manager in STK checks that value and detects if already extracted data files are
up to date. So that when you will install new STK version, this will force new
data extraction automatically.
The PROJECT_CODE variable typically should be set to a value higher than for
previous release, so that users will receive the upgrade.
Before compilation you have to set:
export BUILD_TYPE=release
It's also needed to set STK_STOREPASS, STK_KEYSTORE and STK_ALIAS environment
variables, so that the apk files can be signed.
and then you make standard compilation with:
./generate_assets.sh
./make_deps.sh
./make.sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,157 +0,0 @@
buildscript
{
repositories
{
mavenCentral()
google()
}
dependencies
{
// 4.1.2 is the minimum version to support native debug symbols file
// https://developer.android.com/studio/build/shrink-code#android_gradle_plugin_version_41_or_later
// 7.0.0 to fix https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted
classpath 'com.android.tools.build:gradle:8.2.1'
}
}
allprojects
{
repositories
{
mavenCentral()
google()
}
}
apply plugin: 'com.android.application'
android
{
// Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
namespace project.getProperty('package_name')
// buildToolsVersion is no longer needed https://developer.android.com/studio/releases/gradle-plugin.html#behavior_changes_1
// Quote:
// Build Tools 27.0.3 or higher. Keep in mind, you no longer need to specify a version for the build tools using the android.buildToolsVersion property—the plugin uses the minimum required version by default.
compileSdkVersion compile_sdk_version.toInteger()
ndkVersion ndk_version
externalNativeBuild
{
ndkBuild
{
path 'Android.mk'
}
}
defaultConfig
{
versionCode project.getProperty('version_code').toInteger()
versionName project.getProperty('version_name')
minSdkVersion min_sdk_version.toInteger()
targetSdkVersion target_sdk_version.toInteger()
externalNativeBuild
{
ndkBuild
{
def app_platform = "APP_PLATFORM=android-${min_sdk_version}"
arguments app_platform, 'APP_STL=c++_static', cpu_core
if (project.getProperty('compile_arch') == 'all')
{
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
else
{
abiFilters project.getProperty('compile_arch')
}
}
}
def runTasks = gradle.startParameter.taskNames
if ('bundleRelease' in runTasks)
{
// use SYMBOL_TABLE if too large later (max limit on google play is 300MB)
ndk.debugSymbolLevel 'FULL'
}
}
signingConfigs
{
release
{
storeFile file(keystore)
storePassword storepass
keyAlias alias
keyPassword storepass
}
}
buildTypes
{
debug
{
debuggable true
jniDebuggable true
minifyEnabled false
shrinkResources false
multiDexEnabled true
externalNativeBuild
{
ndkBuild
{
arguments 'NDK_DEBUG=1'
cFlags '-O0'
cppFlags '-O0'
}
}
ndk
{
if (project.getProperty('compile_arch') == 'all')
{
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
else
{
abiFilters project.getProperty('compile_arch')
}
}
}
release
{
externalNativeBuild
{
ndkBuild
{
cFlags '-O3'
cppFlags '-O3'
}
}
signingConfig signingConfigs.release
ndk
{
if (project.getProperty('compile_arch') == 'all')
{
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
else
{
abiFilters project.getProperty('compile_arch')
}
}
}
}
sourceSets
{
main
{
manifest.srcFile 'AndroidManifest.xml'
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
dependencies
{
implementation 'org.minidns:minidns-hla:0.3.3'
}

View File

@@ -1,698 +0,0 @@
#!/bin/sh
#
# (C) 2016-2017 Dawid Gan, under the GPLv3
#
# A script that generates data files for Android apk
# Below you can find some simple configuration variables.
# It's allowed to set "all" for KARTS and TRACKS if it's intended to create
# package with full data.
# The karts and tracks directories shouldn't exist in ASSETS_DIRS variable
# because they are handled separately.
# The TEXTURE_SIZE and SOUND_QUALITY take effect only if DECREASE_QUALITY has
# value greater than 0.
# The CONVERT_TO_JPG variable enables converting all images that are safe to
# convert and keeps other images untouched.
# The script needs imagemagick, pngquant and ogg utils installed in order to
# use DECREASE_QUALITY feature
################################################################################
export KARTS_DEFAULT="all"
export TRACKS_DEFAULT="all"
export TEXTURE_SIZE_DEFAULT=256
export JPEG_QUALITY_DEFAULT=85
export PNG_QUALITY_DEFAULT=95
export PNGQUANT_QUALITY_DEFAULT=90
export SOUND_QUALITY_DEFAULT=42
export SOUND_MONO_DEFAULT=1
export SOUND_SAMPLE_DEFAULT=32000
export RUN_OPTIMIZE_SCRIPT_DEFAULT=0
export DECREASE_QUALITY_DEFAULT=1
export CONVERT_TO_JPG_DEFAULT=1
export ONLY_ASSETS_DEFAULT=0
export ASSETS_PATHS_DEFAULT="../data \
../../stk-assets \
../../supertuxkart-assets"
export OUTPUT_PATH_DEFAULT="assets"
export ASSETS_DIRS="library models music sfx textures"
export CONVERT_TO_JPG_BLACKLIST="data/models/traffic_light.png"
export BLACKLIST_FILES="data/supertuxkart.icns \
data/supertuxkart_1024.png \
data/supertuxkart_128.png \
data/supertuxkart_16.png \
data/supertuxkart_256.png \
data/supertuxkart_32.png \
data/supertuxkart_48.png \
data/supertuxkart_512.png \
data/supertuxkart_64.png"
################################################################################
export LANG=C
cd "`dirname "$0"`"
# Set default configuration if not changed outside of the script
if [ -z "$KARTS" ]; then
export KARTS="$KARTS_DEFAULT"
fi
if [ -z "$TRACKS" ]; then
export TRACKS="$TRACKS_DEFAULT"
fi
if [ -z "$TEXTURE_SIZE" ]; then
export TEXTURE_SIZE="$TEXTURE_SIZE_DEFAULT"
fi
if [ -z "$JPEG_QUALITY" ]; then
export JPEG_QUALITY="$JPEG_QUALITY_DEFAULT"
fi
if [ -z "$PNG_QUALITY" ]; then
export PNG_QUALITY="$PNG_QUALITY_DEFAULT"
fi
if [ -z "$PNGQUANT_QUALITY" ]; then
export PNGQUANT_QUALITY="$PNGQUANT_QUALITY_DEFAULT"
fi
if [ -z "$SOUND_QUALITY" ]; then
export SOUND_QUALITY="$SOUND_QUALITY_DEFAULT"
fi
if [ -z "$SOUND_MONO" ]; then
export SOUND_MONO="$SOUND_MONO_DEFAULT"
fi
if [ -z "$SOUND_SAMPLE" ]; then
export SOUND_SAMPLE="$SOUND_SAMPLE_DEFAULT"
fi
if [ -z "$RUN_OPTIMIZE_SCRIPT" ]; then
export RUN_OPTIMIZE_SCRIPT="$RUN_OPTIMIZE_SCRIPT_DEFAULT"
fi
if [ -z "$DECREASE_QUALITY" ]; then
export DECREASE_QUALITY="$DECREASE_QUALITY_DEFAULT"
fi
if [ -z "$CONVERT_TO_JPG" ]; then
export CONVERT_TO_JPG="$CONVERT_TO_JPG_DEFAULT"
fi
if [ -z "$ONLY_ASSETS" ]; then
export ONLY_ASSETS="$ONLY_ASSETS_DEFAULT"
fi
if [ -z "$ASSETS_PATHS" ]; then
export ASSETS_PATHS="$ASSETS_PATHS_DEFAULT"
fi
if [ -z "$OUTPUT_PATH" ]; then
export OUTPUT_PATH="$OUTPUT_PATH_DEFAULT"
fi
# Find assets path
for ASSETS_PATH in $ASSETS_PATHS; do
if [ -d $ASSETS_PATH ] && [ `ls $ASSETS_PATH | grep -c tracks` -gt 0 ]; then
echo "Assets found in $ASSETS_PATH"
ASSETS_PATH_FOUND=1
break
fi
done
if [ -z $ASSETS_PATH_FOUND ]; then
echo "Couldn't find assets path"
exit 1
fi
if [ ! -d "../data" ]; then
echo "Couldn't find data directory"
exit 1
fi
# Clear previous assets directory
echo "Clear previous assets directory"
rm -rf "$OUTPUT_PATH"
# Copy all assets
echo "Copy all assets"
mkdir -p "$OUTPUT_PATH/data"
for DIR in `ls $ASSETS_PATH`; do
CAN_BE_COPIED=0
for ASSETS_DIR in $ASSETS_DIRS; do
if [ $DIR = $ASSETS_DIR ]; then
CAN_BE_COPIED=1
break
fi
done;
# Don't copy karts and tracks. It will be handled later
BLACKLIST_ASSETS="karts tracks"
for ASSETS_DIR in $BLACKLIST_ASSETS; do
if [ $DIR = $ASSETS_DIR ]; then
CAN_BE_COPIED=0
break
fi
done;
if [ $CAN_BE_COPIED -gt 0 ]; then
cp -a "$ASSETS_PATH/$DIR" "$OUTPUT_PATH/data/"
fi
done;
# Copy selected tracks
echo "Copy selected tracks"
mkdir -p "$OUTPUT_PATH/data/tracks"
for DIR in `ls $ASSETS_PATH/tracks`; do
CAN_BE_COPIED=0
if [ "$TRACKS" != "all" ]; then
for TRACK in $TRACKS; do
if [ $DIR = $TRACK ]; then
CAN_BE_COPIED=1
break
fi
done;
else
CAN_BE_COPIED=1
fi
if [ $CAN_BE_COPIED -gt 0 ]; then
cp -a "$ASSETS_PATH/tracks/$DIR" "$OUTPUT_PATH/data/tracks/"
fi
done
# Copy selected karts
echo "Copy selected karts"
mkdir -p "$OUTPUT_PATH/data/karts"
for DIR in `ls $ASSETS_PATH/karts`; do
CAN_BE_COPIED=0
if [ "$KARTS" != "all" ]; then
for KART in $KARTS; do
if [ $DIR = $KART ]; then
CAN_BE_COPIED=1
break
fi
done;
else
CAN_BE_COPIED=1
fi
if [ $CAN_BE_COPIED -gt 0 ]; then
cp -a "$ASSETS_PATH/karts/$DIR" "$OUTPUT_PATH/data/karts/"
fi
done
# Decrease assets quality in order to save some disk space and RAM
echo "Decrease assets quality"
convert_image()
{
FILE="$1"
FILE_TYPE="$2"
echo "Convert file: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
W=`identify -format "%[fx:w]" "$FILE"`
H=`identify -format "%[fx:h]" "$FILE"`
if [ -z $W ] || [ -z $H ]; then
echo "Couldn't convert $FILE file"
return
fi
SCALE_CMD=""
QUALITY_CMD=""
if [ $W -gt $TEXTURE_SIZE ] || [ $H -gt $TEXTURE_SIZE ]; then
if [ $W -gt $H ]; then
SCALED_W=$TEXTURE_SIZE
SCALED_H=$(($TEXTURE_SIZE * $H / $W))
else
SCALED_W=$(($TEXTURE_SIZE * $W / $H))
SCALED_H=$TEXTURE_SIZE
fi
SCALE_CMD="-scale ${SCALED_W}x${SCALED_H}"
fi
if [ "$FILE_TYPE" = "jpg" ]; then
QUALITY_CMD="-quality $JPEG_QUALITY"
elif [ "$FILE_TYPE" = "png" ]; then
QUALITY_CMD="-quality $PNG_QUALITY"
fi
convert $SCALE_CMD $QUALITY_CMD "$FILE" "tmp.$FILE_TYPE"
if [ -s "tmp.$FILE_TYPE" ]; then
SIZE_OLD=`du -k "$FILE" | cut -f1`
SIZE_NEW=`du -k "tmp.$FILE_TYPE" | cut -f1`
if [ $SIZE_NEW -lt $SIZE_OLD ]; then
mv "tmp.$FILE_TYPE" "$FILE"
fi
fi
rm -f "tmp.$FILE_TYPE"
}
convert_sound()
{
FILE="$1"
echo "Convert file: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
oggdec "$FILE" -o tmp.wav
if [ -s tmp.wav ]; then
OGGENC_CMD=""
if [ "$SOUND_MONO" -gt 0 ]; then
OGGENC_CMD="$OGGENC_CMD --downmix"
fi
OGG_RATE=`ogginfo "$FILE" | grep "Rate: " | cut -f 2 -d " " \
| grep -o '[0-9]*'`
if [ ! -z "$OGG_RATE" ] && [ "$OGG_RATE" -gt "$SOUND_SAMPLE" ]; then
OGGENC_CMD="$OGGENC_CMD --resample $SOUND_SAMPLE"
fi
OGGENC_CMD="$OGGENC_CMD -b $SOUND_QUALITY"
oggenc $OGGENC_CMD tmp.wav -o tmp.ogg
fi
if [ -s tmp.ogg ]; then
SIZE_OLD=`du -k "$FILE" | cut -f1`
SIZE_NEW=`du -k "tmp.ogg" | cut -f1`
if [ $SIZE_NEW -lt $SIZE_OLD ]; then
mv tmp.ogg "$FILE"
fi
fi
rm -f tmp.wav tmp.ogg
}
optimize_png()
{
FILE="$1"
echo "Optimize file: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
pngquant --force --skip-if-larger --quality 0-$PNGQUANT_QUALITY --output "$FILE" -- "$FILE"
}
convert_to_jpg()
{
FILE="$1"
echo "Convert file to jpg: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
ALREADY_CONVERTED=0
if [ -s "./converted_textures" ]; then
while read -r CONVERTED_TEXTURE; do
if [ "$FILE" = "$CONVERTED_TEXTURE" ]; then
ALREADY_CONVERTED=1
break
fi
done < "./converted_textures"
fi
if [ $ALREADY_CONVERTED -eq 1 ]; then
return
fi
BLACKLISTED=0
for BLACKLIST_FILE in $CONVERT_TO_JPG_BLACKLIST; do
if [ "$FILE" = "$OUTPUT_PATH/$BLACKLIST_FILE" ]; then
BLACKLISTED=1
break
fi
done
if [ $BLACKLISTED -eq 1 ]; then
#echo " File is blacklisted. Ignore..."
return
fi
FILE_EXTENSION=`echo "$FILE" | tail -c 5`
if [ `echo "$FILE_EXTENSION" | head -c 1` != "." ]; then
#echo " Unsupported file extension. Ignore..."
return
fi
FILE_FORMAT=`identify -format %m "$FILE"`
if [ "$FILE_FORMAT" = "JPEG" ]; then
#echo " File is already JPEG. Ignore..."
return
fi
IS_OPAQUE=`identify -format '%[opaque]' "$FILE"`
#HAS_ALPHA=`identify -format '%A' "$FILE"`
if [ "$IS_OPAQUE" = "False" ] || [ "$IS_OPAQUE" = "false" ]; then
#echo " File has alpha channel. Ignore..."
return
fi
DIRNAME="`dirname "$FILE"`"
BASENAME="`basename "$FILE"`"
IS_GLOSS_MAP=`find "$DIRNAME" -iname "*.xml" -exec cat {} \; \
| grep -c "gloss-map=\"$BASENAME\""`
if [ $IS_GLOSS_MAP -gt 0 ]; then
#echo " File is a gloss-map. Ignore..."
return
fi
NEW_FILE="`echo $FILE | head -c -5`.jpg"
if [ -f "$NEW_FILE" ]; then
#echo " There is already a file with .jpg extension. Ignore..."
return
fi
# We can check if new file is smaller
convert -quality $JPEG_QUALITY "$FILE" "$NEW_FILE"
rm -f "$FILE"
echo "$FILE" >> "./converted_textures"
}
convert_to_jpg_extract_b3dz()
{
FILE="$1"
echo "Extract b3dz file: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
DIRNAME="`dirname "$FILE"`"
unzip "$FILE" -d "$DIRNAME"
rm -f "$FILE"
TEXNAME="`basename "$FILE"`"
NEWNAME="`echo $TEXNAME | head -c -6`.b3d"
sed -i "s/\"$TEXNAME\"/\"$NEWNAME\"/g" "$DIRNAME/kart.xml"
}
convert_to_jpg_update_b3d()
{
FILE="$1"
echo "Update b3d file: $FILE"
if [ ! -f "$1" ]; then
echo " File doesn't exist."
return
fi
HEX_FILE=`hexdump -ve '1/1 "%.2x"' "$FILE"`
TEXS_CHUNK="54455853"
TEXS_CHUNK_POS=24
FOUND_CHUNK=`echo $HEX_FILE | head -c $(($TEXS_CHUNK_POS + 8)) \
| tail -c +$(($TEXS_CHUNK_POS + 1))`
if [ -z "$FOUND_CHUNK" ] || [ "$FOUND_CHUNK" != "$TEXS_CHUNK" ]; then
echo " File has no textures."
return
fi
TEXS_SIZE=`echo $HEX_FILE | head -c $(($TEXS_CHUNK_POS + 16)) | tail -c 8`
TEXS_SIZE_CONVERTED=`echo $TEXS_SIZE | cut -c7-8`
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c5-6`
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c3-4`
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c1-2`
TEXS_SIZE_CONVERTED=`echo $((0x$TEXS_SIZE_CONVERTED))`
if [ $TEXS_SIZE_CONVERTED -le 0 ]; then
echo " Invalid TEXS size value."
return
fi
TEXS_BEGIN=$(($TEXS_CHUNK_POS + 16))
TEXS_END=$(($TEXS_BEGIN + $TEXS_SIZE_CONVERTED * 2))
HEX_TEXS=`echo $HEX_FILE | head -c $TEXS_END | tail -c +$(($TEXS_BEGIN+1))`
CURR_POS=0
while [ $CURR_POS -lt $TEXS_END ]; do
NULL_POS=`echo $HEX_TEXS | tail -c +$(($CURR_POS+1)) | grep -b -o "00" \
| head -n 1 | cut -f1 -d":"`
if [ -z $NULL_POS ]; then
#echo " Done."
break
fi
if [ $NULL_POS -lt 4 ]; then
echo " Something went wrong..."
break
fi
TEXNAME_BEGIN=$((($TEXS_BEGIN + $CURR_POS) / 2))
TEXNAME_END=$((($TEXS_BEGIN + $CURR_POS + $NULL_POS) / 2))
CURR_POS=$(($CURR_POS + $NULL_POS + 58))
TEXTURE_NAME=`dd if="$FILE" bs=1 skip=$TEXNAME_BEGIN \
count=$(($TEXNAME_END - $TEXNAME_BEGIN)) 2> /dev/null`
DIRNAME="`dirname "$FILE"`"
TEXTURE_PATH="$DIRNAME/$TEXTURE_NAME"
IS_CONVERTED=0
while read -r CONVERTED_TEXTURE; do
if [ "$TEXTURE_PATH" = "$CONVERTED_TEXTURE" ]; then
IS_CONVERTED=1
break
fi
done < "./converted_textures"
if [ $IS_CONVERTED -eq 1 ]; then
echo -n ".jpg" | dd of="$FILE" bs=1 seek=$(($TEXNAME_END - 4)) \
conv=notrunc 2> /dev/null
fi;
done
}
convert_to_jpg_update_spm()
{
FILE="$1"
echo "Update spm file: $FILE"
if [ ! -f "$1" ]; then
echo " File doesn't exist."
return
fi
HEX_FILE=`hexdump -ve '1/1 "%.2x"' "$FILE"`
SP_HEADER="5350"
SP_FOUND=`echo $HEX_FILE | head -c 4`
if [ -z "$SP_FOUND" ] || [ "$SP_FOUND" != "$SP_HEADER" ]; then
echo " Unsupported format."
return
fi
TEXS_BEGIN=60
TEXS_COUNT=`echo $HEX_FILE | head -c $TEXS_BEGIN | tail -c 4`
TEXS_COUNT_CONVERTED=`echo $TEXS_COUNT | cut -c3-4`
TEXS_COUNT_CONVERTED=$TEXS_COUNT_CONVERTED`echo $TEXS_COUNT | cut -c1-2`
TEXS_COUNT_CONVERTED=`echo $((0x$TEXS_COUNT_CONVERTED))`
TEXS_COUNT_CONVERTED=$(($TEXS_COUNT_CONVERTED * 2))
if [ $TEXS_COUNT_CONVERTED -le 0 ]; then
echo " Invalid textures count value."
return
fi
CURR_POS=$(($TEXS_BEGIN + 2))
while [ $TEXS_COUNT_CONVERTED -gt 0 ]; do
TEXS_COUNT_CONVERTED=$(($TEXS_COUNT_CONVERTED - 1))
TEX_LEN=`echo $HEX_FILE | head -c $(($CURR_POS)) | tail -c 2`
TEX_LEN=`echo $((0x$TEX_LEN))`
TEXNAME_BEGIN=$(($CURR_POS / 2))
TEXNAME_END=$(($CURR_POS / 2 + $TEX_LEN))
CURR_POS=$(($CURR_POS + 2 + $TEX_LEN * 2))
if [ $TEX_LEN -eq 0 ]; then
#echo " Empty texture name, ignore..."
continue
fi
TEXTURE_NAME=`dd if="$FILE" bs=1 skip=$TEXNAME_BEGIN \
count=$(($TEXNAME_END - $TEXNAME_BEGIN)) 2> /dev/null`
DIRNAME="`dirname "$FILE"`"
TEXTURE_PATH="$DIRNAME/$TEXTURE_NAME"
IS_CONVERTED=0
while read -r CONVERTED_TEXTURE; do
if [ "$TEXTURE_PATH" = "$CONVERTED_TEXTURE" ]; then
IS_CONVERTED=1
break
fi
done < "./converted_textures"
if [ $IS_CONVERTED -eq 1 ]; then
echo -n ".jpg" | dd of="$FILE" bs=1 seek=$(($TEXNAME_END - 4)) \
conv=notrunc 2> /dev/null
fi
done
}
convert_to_jpg_update_xml()
{
FILE="$1"
echo "Update xml file: $FILE"
if [ ! -f "$FILE" ]; then
echo " File doesn't exist."
return
fi
DIRNAME="`dirname "$FILE"`"
while read -r CONVERTED_TEXTURE; do
DIRNAME_TEX="`dirname "$CONVERTED_TEXTURE"`"
if [ "$DIRNAME_TEX" != "$DIRNAME" ]; then
continue;
fi
TEXNAME="`basename "$CONVERTED_TEXTURE" | head -c -5`"
sed -i "s/\"$TEXNAME.[pP][nN][gG]/\"$TEXNAME.jpg/g" "$FILE"
sed -i "s/ $TEXNAME.[pP][nN][gG]/ $TEXNAME.jpg/g" "$FILE"
done < "./converted_textures"
}
if [ $DECREASE_QUALITY -gt 0 ]; then
find "$OUTPUT_PATH/data" -iname "*.png" | while read f; do convert_image "$f" "png"; done
find "$OUTPUT_PATH/data" -iname "*.jpg" | while read f; do convert_image "$f" "jpg"; done
find "$OUTPUT_PATH/data" -iname "*.ogg" | while read f; do convert_sound "$f"; done
fi
if [ $CONVERT_TO_JPG -gt 0 ]; then
rm -f "./converted_textures"
find "$OUTPUT_PATH/data" -not -path "$OUTPUT_PATH/data/textures/*" \
-not -path "$OUTPUT_PATH/data/karts/*" \
-iname "*.png" | while read f; do convert_to_jpg "$f"; done
find "$OUTPUT_PATH/data" -iname "*.b3dz" | while read f; do convert_to_jpg_extract_b3dz "$f"; done
find "$OUTPUT_PATH/data" -iname "*.b3d" | while read f; do convert_to_jpg_update_b3d "$f"; done
find "$OUTPUT_PATH/data" -iname "*.spm" | while read f; do convert_to_jpg_update_spm "$f"; done
find "$OUTPUT_PATH/data" -iname "*.xml" | while read f; do convert_to_jpg_update_xml "$f"; done
if [ -s "./converted_textures" ]; then
echo "Converted textures:"
cat "./converted_textures"
rm -f "./converted_textures"
fi
fi
if [ $DECREASE_QUALITY -gt 0 ]; then
find "$OUTPUT_PATH/data" -iname "*.png" | while read f; do optimize_png "$f" "png"; done
fi
# Copy data directory
if [ $ONLY_ASSETS -eq 0 ]; then
echo "Copy data directory"
cp -a ../data/* "$OUTPUT_PATH/data"
fi
# Remove unused files
for BLACKLIST_FILE in $BLACKLIST_FILES; do
rm -f "$OUTPUT_PATH/$BLACKLIST_FILE"
done
# Run optimize_data.sh script
if [ $RUN_OPTIMIZE_SCRIPT -gt 0 ]; then
echo "Run optimize_data.sh script"
sh -c "cd "$OUTPUT_PATH/data"; ../../../data/optimize_data.sh"
fi
# Generate files list
echo "Generate files list"
find "$OUTPUT_PATH"/* -type d| sort > tmp1.txt
sed -i 's/$/\//' tmp1.txt
find "$OUTPUT_PATH"/* -type f| sort > tmp2.txt
cat tmp1.txt tmp2.txt | sort > "$OUTPUT_PATH/files.txt"
rm tmp1.txt tmp2.txt
sed -i s/".\/$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt"
sed -i s/"$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt"
# A file that can be used to check if apk has assets
echo "has_assets" > "$OUTPUT_PATH/has_assets.txt"
# It will be probably ignored by ant, but create it anyway...
touch "$OUTPUT_PATH/.nomedia"
echo "Done."
exit 0

View File

@@ -1 +0,0 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError

Binary file not shown.

View File

@@ -1,6 +0,0 @@
#Sun Dec 03 18:24:53 EET 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

240
android/gradlew vendored
View File

@@ -1,240 +0,0 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -1,466 +0,0 @@
#!/bin/bash
#
# (C) 2016-2017 Dawid Gan, under the GPLv3
#
# A script that creates the apk build
export DIRNAME=$(realpath "$(dirname "$0")")
export NDK_PATH_DEFAULT="$DIRNAME/android-ndk"
export SDK_PATH_DEFAULT="$DIRNAME/android-sdk"
export NDK_BUILD_SCRIPT="$DIRNAME/Android.mk"
#export NDK_CCACHE=ccache
export CPU_CORE="-j$(($(nproc) + 1))"
if [ -z "$STK_MIN_ANDROID_SDK" ]; then
export STK_MIN_ANDROID_SDK=16
fi
if [ -z "$STK_TARGET_ANDROID_SDK" ]; then
export STK_TARGET_ANDROID_SDK=34
fi
if [ -z "$STK_NDK_VERSION" ]; then
export STK_NDK_VERSION=23.1.7779620
fi
export APP_NAME_RELEASE="SuperTuxKart"
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
export PACKAGE_CLASS_NAME_RELEASE="org/supertuxkart/stk"
export APP_DIR_NAME_RELEASE="supertuxkart"
export APP_ICON_RELEASE="$DIRNAME/icon.png"
export APP_ICON_ADAPTIVE_BG_RELEASE="$DIRNAME/icon_adaptive_bg.png"
export APP_ICON_ADAPTIVE_FG_RELEASE="$DIRNAME/icon_adaptive_fg.png"
export APP_NAME_BETA="SuperTuxKart Beta"
export PACKAGE_NAME_BETA="org.supertuxkart.stk_beta"
export PACKAGE_CLASS_NAME_BETA="org/supertuxkart/stk_beta"
export APP_DIR_NAME_BETA="supertuxkart-beta"
export APP_ICON_BETA="$DIRNAME/icon-dbg.png"
export APP_ICON_ADAPTIVE_BG_BETA="$DIRNAME/icon_adaptive_bg-dbg.png"
export APP_ICON_ADAPTIVE_FG_BETA="$DIRNAME/icon_adaptive_fg-dbg.png"
export APP_NAME_DEBUG="SuperTuxKart Debug"
export PACKAGE_NAME_DEBUG="org.supertuxkart.stk_dbg"
export PACKAGE_CLASS_NAME_DEBUG="org/supertuxkart/stk_dbg"
export APP_DIR_NAME_DEBUG="supertuxkart-dbg"
export APP_ICON_DEBUG="$DIRNAME/icon-dbg.png"
export APP_ICON_ADAPTIVE_BG_DEBUG="$DIRNAME/icon_adaptive_bg-dbg.png"
export APP_ICON_ADAPTIVE_FG_DEBUG="$DIRNAME/icon_adaptive_fg-dbg.png"
# A helper function that checks if error ocurred
check_error()
{
if [ $? -gt 0 ]; then
echo "Error ocurred."
exit
fi
}
# Handle clean command
if [ ! -z "$1" ] && [ "$1" = "clean" ]; then
rm -rf "$DIRNAME/bin"
rm -rf "$DIRNAME/build"
rm -rf "$DIRNAME/libs"
rm -rf "$DIRNAME/obj"
rm -rf "$DIRNAME/res"
rm -rf "$DIRNAME/.gradle"
rm -rf "$DIRNAME/.cxx"
exit
fi
# Update variables for selected architecture
if [ -z "$COMPILE_ARCH" ]; then
COMPILE_ARCH="all"
fi
if [ "$COMPILE_ARCH" = "armv7" ]; then
COMPILE_ARCH="armeabi-v7a"
elif [ "$COMPILE_ARCH" = "aarch64" ]; then
COMPILE_ARCH="arm64-v8a"
elif [ "$COMPILE_ARCH" != "x86" ] && [ "$COMPILE_ARCH" != "x86_64" ] && \
[ "$COMPILE_ARCH" != "all" ]; then
echo "Unknown COMPILE_ARCH: $COMPILE_ARCH. Possible values are:" \
"all, armv7, aarch64, x86, x86_64"
exit
fi
# Update variables for selected build type
if [ -z "$BUILD_TYPE" ]; then
BUILD_TYPE="debug"
fi
if [ "$BUILD_TYPE" = "debug" ] || [ "$BUILD_TYPE" = "Debug" ]; then
export GRADLE_BUILD_TYPE="assembleDebug"
export IS_DEBUG_BUILD=1
export APP_NAME="$APP_NAME_DEBUG"
export PACKAGE_NAME="$PACKAGE_NAME_DEBUG"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_DEBUG"
export APP_DIR_NAME="$APP_DIR_NAME_DEBUG"
export APP_ICON="$APP_ICON_DEBUG"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_DEBUG"
export APP_ICON_ADAPTIVE_FG="$APP_ICON_ADAPTIVE_FG_DEBUG"
elif [ "$BUILD_TYPE" = "release" ] || [ "$BUILD_TYPE" = "Release" ]; then
export GRADLE_BUILD_TYPE="assembleRelease"
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_RELEASE"
export PACKAGE_NAME="$PACKAGE_NAME_RELEASE"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_RELEASE"
export APP_DIR_NAME="$APP_DIR_NAME_RELEASE"
export APP_ICON="$APP_ICON_RELEASE"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_RELEASE"
export APP_ICON_ADAPTIVE_FG="$APP_ICON_ADAPTIVE_FG_RELEASE"
elif [ "$BUILD_TYPE" = "beta" ] || [ "$BUILD_TYPE" = "Beta" ]; then
export GRADLE_BUILD_TYPE="assembleRelease"
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_BETA"
export PACKAGE_NAME="$PACKAGE_NAME_BETA"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_BETA"
export APP_DIR_NAME="$APP_DIR_NAME_BETA"
export APP_ICON="$APP_ICON_BETA"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_BETA"
export APP_ICON_ADAPTIVE_FG="$APP_ICON_ADAPTIVE_FG_BETA"
else
echo "Unsupported BUILD_TYPE: $BUILD_TYPE. Possible values are: " \
"debug, release"
exit
fi
# Check if we have access to the Android NDK and SDK
if [ -z "$NDK_PATH" ]; then
export NDK_PATH="$NDK_PATH_DEFAULT"
fi
if [ -z "$SDK_PATH" ]; then
export SDK_PATH="$SDK_PATH_DEFAULT"
fi
NDK_PATH="$(realpath "$NDK_PATH")/${STK_NDK_VERSION}"
SDK_PATH=$(realpath "$SDK_PATH")
if [ ! -d "$NDK_PATH" ]; then
echo "Error: Couldn't find $NDK_PATH directory. Please create a symlink" \
"to your Android NDK installation in the $NDK_PATH_DEFAULT or set" \
"proper path in the NDK_PATH variable"
exit
fi
if [ ! -d "$SDK_PATH" ]; then
echo "Error: Couldn't find $SDK_PATH directory. Please create a symlink" \
"to your Android SDK installation in the $SDK_PATH_DEFAULT or set" \
"proper path in the SDK_PATH variable"
exit
fi
# Check if we have key for signing in release build
if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then
if [ -z "$STK_KEYSTORE" ]; then
echo "Error: STK_KEYSTORE variable is empty."
exit
fi
if [ ! -f "$STK_KEYSTORE" ]; then
echo "Error: Couldn't find $STK_KEYSTORE file."
exit
fi
if [ -z "$STK_STOREPASS" ]; then
echo "Error: STK_STOREPASS variable is empty"
exit
fi
if [ -z "$STK_ALIAS" ]; then
echo "Error: STK_ALIAS variable is empty."
exit
fi
else
STK_KEYSTORE="empty"
STK_STOREPASS="empty"
STK_ALIAS="empty"
fi
# Find newest build-tools version
if [ -z "$BUILD_TOOLS_VER" ]; then
BUILD_TOOLS_DIRS=`ls -1 "$SDK_PATH/build-tools" | sort -V -r`
for DIR in $BUILD_TOOLS_DIRS; do
if [ "$DIR" = "`echo $DIR | sed 's/[^0-9,.]//g'`" ]; then
BUILD_TOOLS_VER="$DIR"
break
fi
done
fi
if [ -z "$BUILD_TOOLS_VER" ] || [ ! -d "$SDK_PATH/build-tools/$BUILD_TOOLS_VER" ]; then
echo "Error: Couldn't detect build-tools version."
exit
fi
BUILD_TOOLS_FULL=(${BUILD_TOOLS_VER//./ })
export COMPILE_SDK_VERSION="${BUILD_TOOLS_FULL[0]}"
# Set project version and code
if [ -f "$DIRNAME/obj/project_version" ]; then
PROJECT_VERSION_PREV=$(cat "$DIRNAME/obj/project_version")
if [ -z "$PROJECT_VERSION" ]; then
export PROJECT_VERSION="$PROJECT_VERSION_PREV"
elif [ "$PROJECT_VERSION" != "$PROJECT_VERSION_PREV" ]; then
echo "Different project version has been set. Forcing recompilation..."
touch -c "$DIRNAME/Android.mk"
fi
fi
if [ -z "$PROJECT_VERSION" ]; then
if [ $IS_DEBUG_BUILD -ne 0 ]; then
export PROJECT_VERSION="git"
else
echo "Error: Variable PROJECT_VERSION is not set. It must have unique" \
"value for release build."
exit
fi
fi
if [ -z "$PROJECT_CODE" ]; then
if [ $IS_DEBUG_BUILD -ne 0 ]; then
PROJECT_CODE="1"
else
echo "Error: Variable PROJECT_CODE is not set."
exit
fi
fi
if [ -d "$DIRNAME/assets/data" ]; then
if [ ! -f "$DIRNAME/assets/data/supertuxkart.$PROJECT_VERSION" ]; then
echo "Error: supertuxkart.$PROJECT_VERSION doesn't exist in" \
"assets/data directory."
exit
fi
fi
# Standalone toolchain
if [ ! -f "$DIRNAME/obj/make_standalone_toolchain.stamp" ]; then
echo "Creating standalone toolchain"
rm -rf "$DIRNAME/obj"
mkdir "$DIRNAME/obj"
touch "$DIRNAME/obj/make_standalone_toolchain.stamp"
fi
echo "$PROJECT_VERSION" > "$DIRNAME/obj/project_version"
# Build apk
echo "Building APK"
mkdir -p "$DIRNAME/res/drawable/"
mkdir -p "$DIRNAME/res/drawable-anydpi-v26/"
mkdir -p "$DIRNAME/res/drawable-mdpi/"
mkdir -p "$DIRNAME/res/drawable-hdpi/"
mkdir -p "$DIRNAME/res/drawable-xhdpi/"
mkdir -p "$DIRNAME/res/drawable-xxhdpi/"
mkdir -p "$DIRNAME/res/drawable-xxxhdpi/"
rm -rf "$DIRNAME/res/values*"
mkdir -p "$DIRNAME/res/values/"
STYLES_FILE="$DIRNAME/res/values/styles.xml"
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$STYLES_FILE"
echo "<!--Generated by make.sh-->" >> "$STYLES_FILE"
echo "<resources>" >> "$STYLES_FILE"
echo " <style name=\"Theme.STKSplashScreen\" parent=\"android:style/Theme.Holo\">" >> "$STYLES_FILE"
echo " <item name=\"android:windowBackground\">#A8A8A8</item>" >> "$STYLES_FILE"
echo " <item name=\"android:windowFullscreen\">true</item>" >> "$STYLES_FILE"
echo " <item name=\"android:windowNoTitle\">true</item>" >> "$STYLES_FILE"
echo " <item name=\"android:windowLayoutInDisplayCutoutMode\">shortEdges</item>" >> "$STYLES_FILE"
echo " <item name=\"android:windowContentOverlay\">@null</item>" >> "$STYLES_FILE"
echo " </style>" >> "$STYLES_FILE"
echo "</resources>" >> "$STYLES_FILE"
STRINGS_FILE="$DIRNAME/res/values/strings.xml"
# Strings used in stk android ui (when extracting game data first time)
PO_EXTRACT_GAME_DATA="po_extract_game_data"
PO_EXTRACT_GAME_DATA_STR="Extracting game data..."
PO_EXTRACT_ERROR="po_extract_error"
PO_EXTRACT_ERROR_STR="Game data extraction error"
PO_EXTRACT_ERROR_MSG="po_extract_error_msg"
PO_EXTRACT_ERROR_MSG_STR="Check remaining device space or reinstall SuperTuxKart."
PO_QUIT="po_quit"
PO_QUIT_STR="Quit"
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$STRINGS_FILE"
echo "<!--Generated by make.sh-->" >> "$STRINGS_FILE"
echo "<resources>" >> "$STRINGS_FILE"
echo " <string name=\"app_name\">$APP_NAME</string>" >> "$STRINGS_FILE"
echo " <string name=\"$PO_EXTRACT_GAME_DATA\">$PO_EXTRACT_GAME_DATA_STR</string>" >> "$STRINGS_FILE"
echo " <string name=\"$PO_EXTRACT_ERROR\">$PO_EXTRACT_ERROR_STR</string>" >> "$STRINGS_FILE"
echo " <string name=\"$PO_EXTRACT_ERROR_MSG\">$PO_EXTRACT_ERROR_MSG_STR</string>" >> "$STRINGS_FILE"
echo " <string name=\"$PO_QUIT\">$PO_QUIT_STR</string>" >> "$STRINGS_FILE"
echo "</resources>" >> "$STRINGS_FILE"
translate_str()
{
echo $(grep -A 1 -e "msgid \"$1\"" "$2" \
| sed -n 's/msgstr "\(.*\)"/\1/p' | sed "s/'/\\\'/g")
}
create_translation()
{
PO="$1"
CUR_LANG=$(basename -- "$PO" | cut -f 1 -d '.')
# Skip english po file
if [ "$CUR_LANG" = "en" ]; then
return
fi
# Fix some difference in language code
if [ "$CUR_LANG" = "he" ]; then
# Hebrew
CUR_LANG="iw"
fi
if [ "$CUR_LANG" = "id" ]; then
# Indonesian
CUR_LANG="in"
fi
if [ "$CUR_LANG" = "yi" ]; then
# Yiddish
CUR_LANG="ji"
fi
CUR_LANG=$(echo "$CUR_LANG" | sed 's/_/-r/g')
EXTRACT_GAME_DATA_STR=$(translate_str "$PO_EXTRACT_GAME_DATA_STR" "$PO")
EXTRACT_ERROR_STR=$(translate_str "$PO_EXTRACT_ERROR_STR" "$PO")
EXTRACT_ERROR_MSG_STR=$(translate_str "$PO_EXTRACT_ERROR_MSG_STR" "$PO")
QUIT_STR=$(translate_str "$PO_QUIT_STR" "$PO")
if [ -n "$EXTRACT_GAME_DATA_STR" ] \
|| [ -n "$EXTRACT_ERROR_STR" ] \
|| [ -n "$EXTRACT_ERROR_MSG_STR" ] \
|| [ -n "$QUIT_STR" ]; then
mkdir -p "$DIRNAME/res/values-$CUR_LANG"
TRANSLATION="$DIRNAME/res/values-$CUR_LANG/strings.xml"
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$TRANSLATION"
echo "<!--Generated by make.sh-->" >> "$TRANSLATION"
echo "<resources>" >> "$TRANSLATION"
if [ -n "$EXTRACT_GAME_DATA_STR" ] ; then
echo " <string name=\"$PO_EXTRACT_GAME_DATA\">$EXTRACT_GAME_DATA_STR</string>" >> "$TRANSLATION"
fi
if [ -n "$EXTRACT_ERROR_STR" ] ; then
echo " <string name=\"$PO_EXTRACT_ERROR\">$EXTRACT_ERROR_STR</string>" >> "$TRANSLATION"
fi
if [ -n "$EXTRACT_ERROR_MSG_STR" ] ; then
echo " <string name=\"$PO_EXTRACT_ERROR_MSG\">$EXTRACT_ERROR_MSG_STR</string>" >> "$TRANSLATION"
fi
if [ -n "$QUIT_STR" ] ; then
echo " <string name=\"$PO_QUIT\">$QUIT_STR</string>" >> "$TRANSLATION"
fi
echo "</resources>" >> "$TRANSLATION"
fi
}
find "$DIRNAME/assets/data/po" -type f -name '*.po' | while read -r f; do create_translation "$f"; done
ADAPTIVE_ICON_FILE="$DIRNAME/res/drawable-anydpi-v26/icon.xml"
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$ADAPTIVE_ICON_FILE"
echo "<adaptive-icon" >> "$ADAPTIVE_ICON_FILE"
echo " xmlns:android=\"http://schemas.android.com/apk/res/android\">" >> "$ADAPTIVE_ICON_FILE"
echo " <background android:drawable=\"@drawable/icon_bg\" />" >> "$ADAPTIVE_ICON_FILE"
echo " <foreground android:drawable=\"@drawable/icon_fg\" />" >> "$ADAPTIVE_ICON_FILE"
echo "</adaptive-icon>" >> "$ADAPTIVE_ICON_FILE"
sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
"$DIRNAME/src/main/java/STKEditText.java"
sed -i "s/import org.supertuxkart.*/import $PACKAGE_NAME.STKInputConnection;/g" \
"$DIRNAME/src/main/java/STKEditText.java"
sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
"$DIRNAME/src/main/java/STKInputConnection.java"
sed -i "s/import org.supertuxkart.*.STKEditText;/import $PACKAGE_NAME.STKEditText;/g" \
"$DIRNAME/src/main/java/STKInputConnection.java"
sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
"$DIRNAME/src/main/java/SuperTuxKartActivity.java"
sed -i "s/import org.supertuxkart.*/import $PACKAGE_NAME.STKEditText;/g" \
"$DIRNAME/src/main/java/SuperTuxKartActivity.java"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDL.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java" \
"$DIRNAME/src/main/java/"
cp "banner.png" "$DIRNAME/res/drawable/banner.png"
cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png"
convert -scale 48x48 "$APP_ICON" "$DIRNAME/res/drawable-mdpi/icon.png"
convert -scale 72x72 "$APP_ICON" "$DIRNAME/res/drawable-hdpi/icon.png"
convert -scale 96x96 "$APP_ICON" "$DIRNAME/res/drawable-xhdpi/icon.png"
convert -scale 144x144 "$APP_ICON" "$DIRNAME/res/drawable-xxhdpi/icon.png"
convert -scale 192x192 "$APP_ICON" "$DIRNAME/res/drawable-xxxhdpi/icon.png"
#convert -scale 108x108 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-mdpi/icon_bg.png"
#convert -scale 162x162 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-hdpi/icon_bg.png"
#convert -scale 216x216 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
#convert -scale 324x324 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
#convert -scale 432x432 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"
convert -scale 108x108 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-mdpi/icon_bg.png"
convert -scale 162x162 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-hdpi/icon_bg.png"
convert -scale 216x216 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
convert -scale 324x324 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
convert -scale 432x432 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"
convert -scale 108x108 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-mdpi/icon_fg.png"
convert -scale 162x162 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-hdpi/icon_fg.png"
convert -scale 216x216 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xhdpi/icon_fg.png"
convert -scale 324x324 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxhdpi/icon_fg.png"
convert -scale 432x432 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png"
export ANDROID_HOME="$SDK_PATH"
./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \
-Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \
-Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
-Pndk_version="$STK_NDK_VERSION" \
-Pcompile_arch="$COMPILE_ARCH" \
-Pcpu_core="$CPU_CORE" \
-Ppackage_name="$PACKAGE_NAME" \
-Pversion_name="$PROJECT_VERSION" \
-Pversion_code="$PROJECT_CODE" \
$GRADLE_BUILD_TYPE
if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then
./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \
-Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \
-Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
-Pndk_version="$STK_NDK_VERSION" \
-Pcompile_arch="$COMPILE_ARCH" \
-Pcpu_core="$CPU_CORE" \
-Ppackage_name="$PACKAGE_NAME" \
-Pversion_name="$PROJECT_VERSION" \
-Pversion_code="$PROJECT_CODE" \
"bundleRelease"
fi
check_error

View File

@@ -1,374 +0,0 @@
#!/bin/sh
# Tested with NDK 22.1.7171670
export DIRNAME=$(realpath "$(dirname "$0")")
export NDK_PATH_DEFAULT="$DIRNAME/android-ndk"
export ARCH_ARMV7=arm
export HOST_ARMV7=arm-linux-androideabi
export ARCH_AARCH64=arm64
export HOST_AARCH64=aarch64-linux-android
export ARCH_X86=x86
export HOST_X86=i686-linux-android
export ARCH_X86_64=x86_64
export HOST_X86_64=x86_64-linux-android
# A helper function that checks if error ocurred
check_error()
{
if [ $? -gt 0 ]; then
echo "Error ocurred."
exit
fi
}
# Handle clean command
if [ ! -z "$1" ] && [ "$1" = "clean" ]; then
rm -rf "$DIRNAME/deps-armeabi-v7a"
rm -rf "$DIRNAME/deps-arm64-v8a"
rm -rf "$DIRNAME/deps-x86"
rm -rf "$DIRNAME/deps-x86_64"
exit
fi
if [ -z "$NDK_PATH" ]; then
export NDK_PATH="$NDK_PATH_DEFAULT"
fi
if [ -z "$STK_NDK_VERSION" ]; then
export STK_NDK_VERSION=23.1.7779620
fi
NDK_PATH="$(realpath "$NDK_PATH")/${STK_NDK_VERSION}"
if [ ! -d "$NDK_PATH" ]; then
echo "Error: Couldn't find $NDK_PATH directory. Please create a symlink" \
"to your Android NDK installation in the $NDK_PATH_DEFAULT or set" \
"proper path in the NDK_PATH variable"
exit
fi
export NDK_TOOLCHAIN_PATH="$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin"
export NDK_SYSROOT="$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/sysroot"
export PATH="$NDK_TOOLCHAIN_PATH:$PATH"
build_deps()
{
export ARCH_OPTION=$1
if [ "$ARCH_OPTION" = "armv7" ]; then
ARCH_OPTION="armeabi-v7a"
export ARCH=$ARCH_ARMV7
# Special case
export HOST=armv7a-linux-androideabi16
export HOST_DIR=$HOST_ARMV7
elif [ "$ARCH_OPTION" = "aarch64" ]; then
ARCH_OPTION="arm64-v8a"
export ARCH=$ARCH_AARCH64
export HOST_DIR=$HOST_AARCH64
export HOST="${HOST_DIR}21"
elif [ "$ARCH_OPTION" = "x86" ]; then
export ARCH=$ARCH_X86
export HOST_DIR=$HOST_X86
export HOST="${HOST_DIR}16"
elif [ "$ARCH_OPTION" = "x86_64" ]; then
export ARCH=$ARCH_X86_64
export HOST_DIR=$HOST_X86_64
export HOST="${HOST_DIR}21"
else
echo "Unknown architecture: $1. Possible values are:"\
"all, armv7, aarch64, x86, x86_64"
exit
fi
# Zlib
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/zlib.stamp" ]; then
echo "Compiling $ARCH_OPTION zlib"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/zlib"
cp -a -f "$DIRNAME/../lib/zlib/"* "$DIRNAME/deps-$ARCH_OPTION/zlib"
cd "$DIRNAME/deps-$ARCH_OPTION/zlib"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/zlib.stamp"
fi
# Libpng
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libpng.stamp" ]; then
echo "Compiling $ARCH_OPTION libpng"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libpng"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libpng/lib"
cp -a -f "$DIRNAME/../lib/libpng/"* "$DIRNAME/deps-$ARCH_OPTION/libpng"
cd "$DIRNAME/deps-$ARCH_OPTION/libpng"
MLIBRARY="$NDK_SYSROOT/usr/lib/$HOST_DIR/libm.a"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/zlib/" \
-DM_LIBRARY="$MLIBRARY" \
-DPNG_TESTS=0 -DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/libpng.stamp"
fi
# Freetype bootstrap
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/freetype_bootstrap.stamp" ]; then
echo "Compiling $ARCH_OPTION freetype bootstrap"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/freetype/build"
cp -a -f "$DIRNAME/../lib/freetype/"* "$DIRNAME/deps-$ARCH_OPTION/freetype"
cd "$DIRNAME/deps-$ARCH_OPTION/freetype/build"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/zlib/" \
-DPNG_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/libpng/libpng.a" \
-DPNG_PNG_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/libpng/" \
-DFT_WITH_HARFBUZZ=OFF -DFT_WITH_BZIP2=OFF \
-DFT_WITH_BROTLI=OFF -DFT_WITH_ZLIB=ON -DFT_WITH_PNG=ON \
-DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
# We need to rebuild freetype after harfbuzz is compiled
touch "$DIRNAME/deps-$ARCH_OPTION/freetype_bootstrap.stamp"
fi
# Harfbuzz
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/harfbuzz.stamp" ]; then
echo "Compiling $ARCH_OPTION harfbuzz"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/harfbuzz/build"
cp -a -f "$DIRNAME/../lib/harfbuzz/"* "$DIRNAME/deps-$ARCH_OPTION/harfbuzz"
cd "$DIRNAME/deps-$ARCH_OPTION/harfbuzz/build"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DFREETYPE_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/freetype/build/libfreetype.a $DIRNAME/deps-$ARCH_OPTION/libpng/libpng.a $DIRNAME/deps-$ARCH_OPTION/zlib/libz.a" \
-DFREETYPE_INCLUDE_DIRS="$DIRNAME/deps-$ARCH_OPTION/freetype/include/" \
-DHB_HAVE_GLIB=OFF -DHB_HAVE_GOBJECT=OFF -DHB_HAVE_ICU=OFF \
-DHB_HAVE_FREETYPE=ON -DHB_BUILD_SUBSET=OFF \
-DCMAKE_C_FLAGS="-fpic -O3 -g" -DCMAKE_CXX_FLAGS="-std=gnu++0x -fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/harfbuzz/include/harfbuzz"
cp $DIRNAME/deps-$ARCH_OPTION/harfbuzz/src/*.h "$DIRNAME/deps-$ARCH_OPTION/harfbuzz/include/harfbuzz"
touch "$DIRNAME/deps-$ARCH_OPTION/harfbuzz.stamp"
fi
# Freetype
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/freetype.stamp" ]; then
echo "Compiling $ARCH_OPTION freetype"
cd "$DIRNAME/deps-$ARCH_OPTION/freetype/build"
rm -rf *
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/zlib/" \
-DPNG_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/libpng/libpng.a" \
-DPNG_PNG_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/libpng/" \
-DHarfBuzz_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/harfbuzz/build/libharfbuzz.a" \
-DHarfBuzz_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/harfbuzz/src/" \
-DFT_WITH_HARFBUZZ=ON -DFT_WITH_BZIP2=OFF \
-DFT_WITH_BROTLI=OFF -DFT_WITH_ZLIB=ON -DFT_WITH_PNG=ON \
-DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/freetype.stamp"
fi
# Openal
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/openal.stamp" ]; then
echo "Compiling $ARCH_OPTION openal"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/openal"
cp -a -f "$DIRNAME/../lib/openal/"* "$DIRNAME/deps-$ARCH_OPTION/openal"
cd "$DIRNAME/deps-$ARCH_OPTION/openal"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DALSOFT_UTILS=0 -DALSOFT_EXAMPLES=0 \
-DLIBTYPE=STATIC -DOPENSL_LIBRARY="-lOpenSLES" \
-DOPENSL_INCLUDE_DIR="$NDK_SYSROOT/usr/include/SLES/" \
-DOPENSL_ANDROID_INCLUDE_DIR="$NDK_SYSROOT/usr/include/SLES/" \
-DCMAKE_C_FLAGS="-fpic -O3 -g" -DCMAKE_CXX_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/openal.stamp"
fi
# MbedTLS
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/mbedtls.stamp" ]; then
echo "Compiling $ARCH_OPTION mbedtls"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/mbedtls"
cp -a -f "$DIRNAME/../lib/mbedtls/"* "$DIRNAME/deps-$ARCH_OPTION/mbedtls"
cd "$DIRNAME/deps-$ARCH_OPTION/mbedtls"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF \
-DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/mbedtls.stamp"
fi
# Curl
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/curl.stamp" ]; then
echo "Compiling $ARCH_OPTION curl"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/curl"
cp -a -f "$DIRNAME/../lib/curl/"* "$DIRNAME/deps-$ARCH_OPTION/curl"
cd "$DIRNAME/deps-$ARCH_OPTION/curl"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DZLIB_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/zlib/" \
-DMBEDCRYPTO_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/mbedtls/library/libmbedcrypto.a" \
-DMBEDTLS_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/mbedtls/library/libmbedtls.a" \
-DMBEDX509_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/mbedtls/library/libmbedx509.a" \
-DMBEDTLS_INCLUDE_DIRS="$DIRNAME/deps-$ARCH_OPTION/mbedtls/include/" \
-DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF \
-DCURL_USE_MBEDTLS=ON -DUSE_ZLIB=ON -DCURL_USE_OPENSSL=OFF \
-DCURL_USE_LIBSSH=OFF -DCURL_USE_LIBSSH2=OFF \
-DCURL_USE_GSSAPI=OFF -DUSE_NGHTTP2=OFF -DUSE_QUICHE=OFF \
-DHTTP_ONLY=ON -DCURL_CA_BUNDLE=none -DCURL_CA_PATH=none \
-DENABLE_THREADED_RESOLVER=ON -DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/curl.stamp"
fi
# Libjpeg
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libjpeg.stamp" ]; then
echo "Compiling $ARCH_OPTION libjpeg"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libjpeg"
cp -a -f "$DIRNAME/../lib/libjpeg/"* "$DIRNAME/deps-$ARCH_OPTION/libjpeg"
cd "$DIRNAME/deps-$ARCH_OPTION/libjpeg"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/libjpeg.stamp"
fi
# Libogg
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libogg.stamp" ]; then
echo "Compiling $ARCH_OPTION libogg"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libogg"
cp -a -f "$DIRNAME/../lib/libogg/"* "$DIRNAME/deps-$ARCH_OPTION/libogg"
cd "$DIRNAME/deps-$ARCH_OPTION/libogg"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/libogg.stamp"
fi
# Libvorbis
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libvorbis.stamp" ]; then
echo "Compiling $ARCH_OPTION libvorbis"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libvorbis"
cp -a -f "$DIRNAME/../lib/libvorbis/"* "$DIRNAME/deps-$ARCH_OPTION/libvorbis"
cd "$DIRNAME/deps-$ARCH_OPTION/libvorbis"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" \
-DOGG_LIBRARY="$DIRNAME/deps-$ARCH_OPTION/libogg/libogg.a" \
-DOGG_INCLUDE_DIR="$DIRNAME/deps-$ARCH_OPTION/libogg/include" &&
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/libvorbis.stamp"
fi
# Shaderc
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/shaderc.stamp" ]; then
echo "Compiling $ARCH_OPTION shaderc"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/shaderc"
cp -a -f "$DIRNAME/../lib/shaderc/"* "$DIRNAME/deps-$ARCH_OPTION/shaderc"
cd "$DIRNAME/deps-$ARCH_OPTION/shaderc"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3" \
-DCMAKE_CXX_FLAGS="-fpic -O3" -DSHADERC_SKIP_INSTALL=1 \
-DCMAKE_BUILD_TYPE=Release \
-DSHADERC_SKIP_TESTS=1 -DSHADERC_SKIP_EXAMPLES=1 \
-DSPIRV_HEADERS_SKIP_INSTALL=1 -DSPIRV_HEADERS_SKIP_EXAMPLES=1 \
-DSKIP_SPIRV_TOOLS_INSTALL=1 -DSPIRV_SKIP_TESTS=1 \
-DSPIRV_SKIP_EXECUTABLES=1 -DENABLE_GLSLANG_BINARIES=0 \
-DENABLE_CTEST=0 &&
make -j $(($(nproc) + 1))
# Strip debug symbol to make app bundle smaller
llvm-strip --strip-debug "$DIRNAME/deps-$ARCH_OPTION/shaderc/libshaderc/libshaderc_combined.a"
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/shaderc.stamp"
fi
# Libsquish
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libsquish.stamp" ]; then
echo "Compiling $ARCH_OPTION libsquish"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/libsquish"
cp -a -f "$DIRNAME/../lib/libsquish/"* "$DIRNAME/deps-$ARCH_OPTION/libsquish"
cd "$DIRNAME/deps-$ARCH_OPTION/libsquish"
if [[ "$ARCH_OPTION" = "x86" || "$ARCH_OPTION" = "x86_64" ]]; then
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DCMAKE_C_FLAGS="-fpic -O3 -g -DSQUISH_USE_SSE=2 -msse2" \
-DCMAKE_CXX_FLAGS="-fpic -O3 -g -DSQUISH_USE_SSE=2 -msse2"
else
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" \
-DCMAKE_CXX_FLAGS="-fpic -O3 -g"
fi
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/libsquish.stamp"
fi
# ASTC-encoder
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/astc-encoder.stamp" ]; then
echo "Compiling $ARCH_OPTION astc-encoder"
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/astc-encoder"
cp -a -f "$DIRNAME/../lib/astc-encoder/"* "$DIRNAME/deps-$ARCH_OPTION/astc-encoder"
cd "$DIRNAME/deps-$ARCH_OPTION/astc-encoder"
sed -i '/-Werror/d' Source/cmake_core.cmake
sed -i 's|${ASTCENC_TARGET}-static|astcenc|g' Source/cmake_core.cmake
if [ "$ARCH_OPTION" = "armeabi-v7a" ]; then
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DSTK_ARM_NEON=ON \
-DCMAKE_C_FLAGS="-fpic -O3 -g -mfpu=neon" \
-DCMAKE_CXX_FLAGS="-fpic -O3 -g -mfpu=neon" \
-DASTCENC_INVARIANCE=OFF -DASTCENC_CLI=OFF
elif [ "$ARCH_OPTION" = "arm64-v8a" ]; then
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" \
-DCMAKE_CXX_FLAGS="-fpic -O3 -g" \
-DASTCENC_ISA_NEON=ON -DASTCENC_INVARIANCE=OFF -DASTCENC_CLI=OFF
else
if [ "$ARCH_OPTION" = "x86" ]; then
sed -i 's/_mm_popcnt_u64/__builtin_popcountll/g' Source/astcenc_vecmathlib_sse_4.h
fi
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3 -g" \
-DCMAKE_CXX_FLAGS="-fpic -O3 -g" \
-DASTCENC_ISA_SSE41=ON -DASTCENC_INVARIANCE=OFF -DASTCENC_CLI=OFF
fi
make -j $(($(nproc) + 1))
check_error
touch "$DIRNAME/deps-$ARCH_OPTION/astc-encoder.stamp"
fi
}
if [ -z "$COMPILE_ARCH" ] || [ "$COMPILE_ARCH" = "all" ]; then
build_deps armv7
build_deps aarch64
build_deps x86
build_deps x86_64
else
build_deps "$COMPILE_ARCH"
fi

View File

@@ -1,298 +0,0 @@
package org.supertuxkart.stk_dbg;
import org.libsdl.app.SDLActivity;
import org.supertuxkart.stk_dbg.STKInputConnection;
import android.content.Context;
import android.text.InputType;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.view.KeyEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
// We need to extend EditText instead of view to allow copying to our STK
// editbox
public class STKEditText extends EditText
{
private int m_composing_start;
private int m_composing_end;
/* Used to prevent copying text to non focused widget in STK. */
private int m_stk_widget_id;
private STKInputConnection m_stk_input_connection;
/* Used to avoid infinite calling updateSTKEditBox if setText currently
* by jni or clearing text when out focus. */
private boolean m_from_stk_editbox;
// ------------------------------------------------------------------------
private native static void editText2STKEditbox(int widget_id,
String full_text, int start,
int end,
int composing_start,
int composing_end);
// ------------------------------------------------------------------------
private native static void handleActionNext(int widget_id);
// ------------------------------------------------------------------------
private native static void handleLeftRight(boolean left, int widget_id);
// ------------------------------------------------------------------------
public STKEditText(Context context)
{
super(context);
setInputType(InputType.TYPE_CLASS_TEXT);
setFocusableInTouchMode(true);
m_composing_start = 0;
m_composing_end = 0;
m_stk_widget_id = -1;
m_from_stk_editbox = false;
m_stk_input_connection = null;
setOnEditorActionListener(new EditText.OnEditorActionListener()
{
@Override
public boolean onEditorAction(TextView v, int action_id,
KeyEvent event)
{
if (action_id == EditorInfo.IME_ACTION_NEXT)
{
handleActionNext(m_stk_widget_id);
// STK will handle the closing of the screen keyboard
return true;
}
return false;
}
});
setOnKeyListener(new EditText.OnKeyListener()
{
@Override
public boolean onKey(View v, int keyCode, KeyEvent event)
{
// Up or down pressed, leave focus
if (keyCode == KeyEvent.KEYCODE_DPAD_UP ||
keyCode == KeyEvent.KEYCODE_DPAD_DOWN)
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
beforeHideKeyboard(true/*clear_text*/);
SDLActivity.onNativeKeyDown(keyCode);
SDLActivity.onNativeKeyUp(keyCode);
}
return true;
}
// For left or right let STK decides
else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT &&
getSelectionStart() == 0)
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
beforeHideKeyboard(true/*clear_text*/);
handleLeftRight(true, m_stk_widget_id);
}
else
updateSTKEditBox();
return true;
}
else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT &&
getSelectionEnd() == getText().length())
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
beforeHideKeyboard(true/*clear_text*/);
handleLeftRight(false, m_stk_widget_id);
}
else
updateSTKEditBox();
return true;
}
else if (keyCode == KeyEvent.KEYCODE_ENTER)
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
handleActionNext(m_stk_widget_id);
return true;
}
// Requires for hardware key like "Ctrl-a" so it will select
// all text in stk edit box
updateSTKEditBox();
return false;
}
});
}
// ------------------------------------------------------------------------
@Override
public InputConnection onCreateInputConnection(EditorInfo out_attrs)
{
if (m_stk_input_connection == null)
{
m_stk_input_connection = new STKInputConnection(
super.onCreateInputConnection(out_attrs), this);
}
out_attrs.actionLabel = null;
out_attrs.inputType = getInputType();
out_attrs.imeOptions = EditorInfo.IME_ACTION_NEXT |
EditorInfo.IME_FLAG_NO_FULLSCREEN |
EditorInfo.IME_FLAG_NO_EXTRACT_UI;
return m_stk_input_connection;
}
// ------------------------------------------------------------------------
@Override
public boolean onCheckIsTextEditor() { return true; }
// ------------------------------------------------------------------------
@Override
public boolean onKeyPreIme(int key_code, KeyEvent event)
{
// Always remove the focus on STKEdit when pressing back button in
// phone, which hideSoftInputFromWindow is called by java itself
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK &&
event.getAction() == KeyEvent.ACTION_UP)
beforeHideKeyboard(false/*clear_text*/);
return false;
}
// ------------------------------------------------------------------------
public void setComposingRegion(int start, int end)
{
// From doc of InputConnectionWrapper, it says:
// Editor authors, be ready to accept a start that is greater than end.
if (start != end && start > end)
{
m_composing_end = start;
m_composing_start = end;
}
else
{
m_composing_start = start;
m_composing_end = end;
}
}
// ------------------------------------------------------------------------
public void updateSTKEditBox()
{
if (!isFocused() || m_from_stk_editbox)
return;
editText2STKEditbox(m_stk_widget_id, getText().toString(),
getSelectionStart(), getSelectionEnd(), m_composing_start,
m_composing_end);
}
// ------------------------------------------------------------------------
public void beforeHideKeyboard(final boolean clear_text)
{
try
{
if (clear_text)
{
// No need updating stk editbox on clearing text when out focus
m_from_stk_editbox = true;
{
super.clearComposingText();
super.getText().clear();
}
m_from_stk_editbox = false;
}
clearFocus();
setVisibility(View.GONE);
SDLActivity.reFocusAfterSTKEditText();
}
catch (Exception e)
{
m_from_stk_editbox = false;
}
}
// ------------------------------------------------------------------------
/* Called by STK with JNI to set this view with new text (like user focus
* a new editbox in stk, or change cursor / selection). */
public void setTextFromSTK(int widget_id, final String text,
int selection_start, int selection_end)
{
m_stk_widget_id = widget_id;
// Avoid sending the newly set text back to STK at the same time
m_from_stk_editbox = true;
try
{
String old_text = getText().toString();
boolean text_changed = !text.equals(old_text);
if (text_changed)
{
super.clearComposingText();
super.setText(text);
m_stk_input_connection.setComposingRegion(0, 0);
}
if (selection_start != selection_end &&
selection_start > selection_end)
{
int temp = selection_end;
selection_end = selection_start;
selection_start = temp;
}
if (selection_start < 0)
selection_start = 0;
if (selection_end > length())
selection_end = length();
if (text_changed)
{
InputMethodManager imm = (InputMethodManager)getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null)
{
// From google, You should call this when the text within
// your view changes outside of the normal input method or
// key input flow, such as when an application calls
// TextView.setText().
imm.restartInput(this);
}
}
setSelection(selection_start, selection_end);
}
catch (Exception e)
{
m_from_stk_editbox = false;
}
m_from_stk_editbox = false;
}
// ------------------------------------------------------------------------
public STKInputConnection getSTKInputConnection()
{ return m_stk_input_connection; }
// ------------------------------------------------------------------------
public void configType(final int type)
{
int it = InputType.TYPE_CLASS_TEXT;
// Check text_box_widget.hpp for definition
switch (type)
{
case 0:
{
it = InputType.TYPE_CLASS_TEXT;
break;
}
case 1:
{
it = InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES;
break;
}
case 2:
{
it = InputType.TYPE_TEXT_VARIATION_PASSWORD;
break;
}
case 3:
{
it = InputType.TYPE_CLASS_NUMBER;
break;
}
case 4:
{
it = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
break;
}
default:
break;
}
if (it != getInputType())
setInputType(it);
}
}

View File

@@ -1,68 +0,0 @@
package org.supertuxkart.stk_dbg;
import org.supertuxkart.stk_dbg.STKEditText;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
public class STKInputConnection extends InputConnectionWrapper
{
/* The global edittext which will be "copied" to the current focused STK
* box. */
final private STKEditText m_stk_edittext;
// ------------------------------------------------------------------------
public STKInputConnection(InputConnection target, STKEditText stk_edittext)
{
super(target, true/*mutable*/);
m_stk_edittext = stk_edittext;
}
// ------------------------------------------------------------------------
@Override
public boolean setComposingText(CharSequence text, int new_cursor_position)
{
boolean ret = super.setComposingText(text, new_cursor_position);
String composing_text = text.toString();
String new_text = m_stk_edittext.getText().toString();
int composing_start = 0;
int composing_end = 0;
// Test last char
if (!composing_text.isEmpty() && !new_text.isEmpty() &&
composing_text.charAt(composing_text.length() - 1) ==
new_text.charAt(new_text.length() - 1))
{
composing_start = new_text.length() - composing_text.length();
composing_end = composing_start + composing_text.length();
}
m_stk_edittext.setComposingRegion(composing_start, composing_end);
m_stk_edittext.updateSTKEditBox();
return ret;
}
// ------------------------------------------------------------------------
@Override
public boolean finishComposingText()
{
m_stk_edittext.setComposingRegion(0, 0);
m_stk_edittext.updateSTKEditBox();
return super.finishComposingText();
}
// ------------------------------------------------------------------------
@Override
public boolean setComposingRegion(int start, int end)
{
m_stk_edittext.setComposingRegion(start, end);
m_stk_edittext.updateSTKEditBox();
return super.setComposingRegion(start, end);
}
// ------------------------------------------------------------------------
@Override
public boolean commitText(CharSequence text, int new_cursor_position)
{
// Usually only a single character, so dismiss composing region
boolean ret = super.commitText(text, new_cursor_position);
m_stk_edittext.setComposingRegion(0, 0);
m_stk_edittext.updateSTKEditBox();
return ret;
}
}

View File

@@ -1,547 +0,0 @@
package org.supertuxkart.stk_dbg;
import org.supertuxkart.stk_dbg.STKEditText;
import org.libsdl.app.SDLActivity;
import org.libsdl.app.SDL;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Process;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Display;
import android.view.DisplayCutout;
import android.view.Gravity;
import android.view.inputmethod.InputMethodManager;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.View;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.util.DisplayMetrics;
import java.io.InputStream;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.Set;
import org.minidns.hla.DnssecResolverApi;
import org.minidns.hla.ResolverResult;
import org.minidns.record.SRV;
import org.minidns.record.TXT;
public class SuperTuxKartActivity extends SDLActivity
{
private AlertDialog m_progress_dialog;
private ProgressBar m_progress_bar;
private ImageView m_splash_screen;
private STKEditText m_stk_edittext;
private int m_bottom_y;
private int m_intial_orientation;
private float m_top_padding;
private float m_bottom_padding;
private float m_left_padding;
private float m_right_padding;
private AtomicInteger m_keyboard_height;
private AtomicInteger m_moved_height;
// ------------------------------------------------------------------------
public native static void debugMsg(String msg);
// ------------------------------------------------------------------------
private native static void handlePadding(boolean val);
// ------------------------------------------------------------------------
private native static void saveKeyboardHeight(int height);
// ------------------------------------------------------------------------
private native static void saveMovedHeight(int height);
// ------------------------------------------------------------------------
private native static void addDNSSrvRecords(String name, int weight);
// ------------------------------------------------------------------------
private native static void pauseRenderingJNI();
// ------------------------------------------------------------------------
private void showExtractProgressPrivate()
{
WindowManager wm =
(WindowManager)getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics display_metrics = new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(display_metrics);
int padding = display_metrics.widthPixels / 64;
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
ll.setPadding(padding, padding, padding, padding);
ll.setGravity(Gravity.CENTER);
LinearLayout.LayoutParams ll_param = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
ll_param.gravity = Gravity.CENTER;
TextView tv = new TextView(this);
// From values strings.xml which is generated by make.sh
tv.setText(getString(R.string.po_extract_game_data));
tv.setLayoutParams(ll_param);
ll_param = new LinearLayout.LayoutParams(
display_metrics.widthPixels,
LinearLayout.LayoutParams.WRAP_CONTENT);
ll_param.gravity = Gravity.CENTER;
ll.setLayoutParams(ll_param);
m_progress_bar = new ProgressBar(this, null,
android.R.attr.progressBarStyleHorizontal);
m_progress_bar.setIndeterminate(false);
m_progress_bar.setPadding(0, padding, 0, padding);
m_progress_bar.setLayoutParams(ll_param);
ll.addView(tv);
ll.addView(m_progress_bar);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setCancelable(false);
builder.setView(ll);
m_progress_dialog = builder.create();
m_progress_dialog.show();
Window window = m_progress_dialog.getWindow();
if (window != null)
{
WindowManager.LayoutParams layout_params =
new WindowManager.LayoutParams();
layout_params.copyFrom(
m_progress_dialog.getWindow().getAttributes());
layout_params.width = WindowManager.LayoutParams.MATCH_PARENT;
layout_params.height = LinearLayout.LayoutParams.WRAP_CONTENT;
m_progress_dialog.getWindow().setAttributes(layout_params);
}
}
// ------------------------------------------------------------------------
private void hideKeyboardNative(final boolean clear_text)
{
if (m_stk_edittext == null)
return;
m_stk_edittext.beforeHideKeyboard(clear_text);
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null)
return;
imm.hideSoftInputFromWindow(m_stk_edittext.getWindowToken(), 0);
}
// ------------------------------------------------------------------------
private void createSTKEditText()
{
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
// We move the dummy edittext out of the android screen because we draw
// our own manually
params.setMargins(0, -100000, 1, -100010);
m_stk_edittext = new STKEditText(this);
// For some copy-and-paste text are not done by commitText in
// STKInputConnection, so we need an extra watcher
m_stk_edittext.addTextChangedListener(new TextWatcher()
{
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {}
@Override
public void afterTextChanged(Editable edit)
{
if (m_stk_edittext != null)
m_stk_edittext.updateSTKEditBox();
}
});
addContentView(m_stk_edittext, params);
// Only focus it and make visible when soft keybord is opened
m_stk_edittext.setVisibility(View.GONE);
}
// ------------------------------------------------------------------------
@Override
public void onCreate(Bundle instance)
{
super.onCreate(instance);
m_keyboard_height = new AtomicInteger();
m_moved_height = new AtomicInteger();
m_progress_dialog = null;
m_progress_bar = null;
m_splash_screen = null;
m_bottom_y = m_intial_orientation = 0;
m_top_padding = m_bottom_padding = m_left_padding = m_right_padding =
0.0f;
final View root = getWindow().getDecorView().findViewById(
android.R.id.content);
root.getViewTreeObserver().addOnGlobalLayoutListener(new
OnGlobalLayoutListener()
{
@Override
public void onGlobalLayout()
{
Rect r = new Rect();
root.getWindowVisibleDisplayFrame(r);
int screen_height = root.getRootView().getHeight();
int keyboard_height = screen_height - (r.bottom);
m_keyboard_height.set(keyboard_height);
int moved_height = 0;
int margin = screen_height - m_bottom_y;
if (keyboard_height > margin)
moved_height = -keyboard_height + margin;
m_moved_height.set(-moved_height);
SDLActivity.moveView(moved_height);
}
});
InputStream istr = null;
try
{
LinearLayout ll = new LinearLayout(this);
LinearLayout.LayoutParams ll_param = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
ll.setLayoutParams(ll_param);
WindowManager wm =
(WindowManager)getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics display_metrics = new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(display_metrics);
Bitmap.Config conf = Bitmap.Config.ARGB_8888;
int w = display_metrics.widthPixels;
int h = display_metrics.heightPixels;
Bitmap scaled = Bitmap.createBitmap(w, h, conf);
Canvas canvas = new Canvas(scaled);
istr = getAssets().open("data/gui/icons/logo.png");
Bitmap logo = BitmapFactory.decodeStream(istr);
Rect src = new Rect(0, 0, logo.getWidth(), logo.getHeight());
// STK logo is a square
int target_size = w;
if (target_size > h)
target_size = h;
target_size /= 2;
Rect dest = new Rect(w / 2 - target_size / 2,
h / 2 - target_size / 2,
w / 2 - target_size / 2 + target_size,
h / 2 - target_size / 2 + target_size);
canvas.drawBitmap(logo, src, dest, null);
m_splash_screen = new ImageView(this);
m_splash_screen.setBackgroundColor(Color.argb(255, 168, 168, 168));
m_splash_screen.setImageDrawable(new BitmapDrawable(getResources(),
scaled));
addContentView(m_splash_screen, ll_param);
}
catch (Exception e) {}
finally
{
try
{
if (istr != null)
istr.close();
}
catch(Exception e) {}
}
}
// ------------------------------------------------------------------------
@Override
public void onStart()
{
super.onStart();
m_keyboard_height.set(0);
m_moved_height.set(0);
}
// ------------------------------------------------------------------------
@Override
public void onPause()
{
super.onPause();
hideKeyboardNative(false/*clear_text*/);
if (SDLActivity.mSDLThread != null)
pauseRenderingJNI();
}
// ------------------------------------------------------------------------
/* SDL manually dlopen main to allow unload after main thread exit. */
protected String[] getLibraries()
{
return new String[]{ "SDL2" };
}
// ------------------------------------------------------------------------
protected String getMainSharedObject()
{
return getContext().getApplicationInfo().nativeLibraryDir + "/libmain.so";
}
// ------------------------------------------------------------------------
public void showKeyboard(final int type, final int y)
{
final Context context = this;
// Need to run in ui thread as it access the view m_stk_edittext
runOnUiThread(new Runnable()
{
@Override
public void run()
{
m_bottom_y = y;
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null)
return;
if (m_stk_edittext == null)
createSTKEditText();
m_stk_edittext.configType(type);
m_stk_edittext.setVisibility(View.VISIBLE);
m_stk_edittext.requestFocus();
imm.showSoftInput(m_stk_edittext,
InputMethodManager.SHOW_FORCED);
}
});
}
// ------------------------------------------------------------------------
/* Called by STK in JNI. */
public void hideKeyboard(final boolean clear_text)
{
runOnUiThread(new Runnable()
{
@Override
public void run()
{
m_bottom_y = 0;
hideKeyboardNative(clear_text);
}
});
}
// ------------------------------------------------------------------------
/* Called by STK in JNI. */
public void fromSTKEditBox(final int widget_id, final String text,
final int selection_start,
final int selection_end, final int type)
{
runOnUiThread(new Runnable()
{
@Override
public void run()
{
if (m_stk_edittext == null)
createSTKEditText();
m_stk_edittext.configType(type);
m_stk_edittext.setTextFromSTK(widget_id, text, selection_start,
selection_end);
}
});
}
// ------------------------------------------------------------------------
public String[] getDNSTxtRecords(String domain)
{
try
{
ResolverResult<TXT> txts =
DnssecResolverApi.INSTANCE.resolve(domain, TXT.class);
Set<TXT> ans = txts.getAnswers();
String[] result = new String[ans.size()];
int i = 0;
for (TXT t : ans)
result[i++] = t.getText();
return result;
}
catch (Exception e)
{
e.printStackTrace();
return new String[0];
}
}
// ------------------------------------------------------------------------
public void getDNSSrvRecords(String domain)
{
try
{
ResolverResult<SRV> srvs =
DnssecResolverApi.INSTANCE.resolve(domain, SRV.class);
Set<SRV> ans = srvs.getAnswers();
for (SRV s : ans)
addDNSSrvRecords(s.target.toString() + ":" + s.port, s.weight);
}
catch (Exception e)
{
e.printStackTrace();
}
}
// ------------------------------------------------------------------------
public boolean isHardwareKeyboardConnected()
{
return getResources().getConfiguration()
.keyboard == Configuration.KEYBOARD_QWERTY;
}
// ------------------------------------------------------------------------
public int getScreenSize()
{
return getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK;
}
// ------------------------------------------------------------------------
public float getTopPadding() { return m_top_padding; }
// ------------------------------------------------------------------------
public float getBottomPadding() { return m_bottom_padding; }
// ------------------------------------------------------------------------
public float getLeftPadding() { return m_left_padding; }
// ------------------------------------------------------------------------
public float getRightPadding() { return m_right_padding; }
// ------------------------------------------------------------------------
public int getInitialOrientation() { return m_intial_orientation; }
// ------------------------------------------------------------------------
public void showExtractProgress(final int progress)
{
runOnUiThread(new Runnable()
{
@Override
public void run()
{
if (progress == -1)
{
if (m_progress_dialog != null)
{
m_progress_dialog.dismiss();
m_progress_dialog = null;
m_progress_bar = null;
}
AlertDialog.Builder error =
new AlertDialog.Builder(SDL.getContext());
error.setMessage(getString(R.string.po_extract_error_msg));
error.setTitle(getString(R.string.po_extract_error));
error.setPositiveButton(getString(R.string.po_quit),
new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog,
int id)
{
android.os.Process.killProcess(
android.os.Process.myPid());
}
});
error.setCancelable(false);
error.create().show();
return;
}
if (progress == 0 && m_progress_dialog == null)
showExtractProgressPrivate();
else if (progress == 100 && m_progress_dialog != null)
{
m_progress_dialog.dismiss();
m_progress_dialog = null;
m_progress_bar = null;
}
else if (m_progress_bar != null &&
m_progress_bar.getProgress() != progress)
{
m_progress_bar.setProgress(progress);
}
}
});
}
// ------------------------------------------------------------------------
public void hideSplashScreen()
{
if (m_splash_screen != null)
{
m_splash_screen.animate().setDuration(200).alpha(0).setListener(
new AnimatorListenerAdapter()
{
@Override
public void onAnimationEnd(Animator animation)
{
if (m_splash_screen.getParent() instanceof ViewGroup)
{
ViewGroup view = (ViewGroup)m_splash_screen.getParent();
view.removeView(m_splash_screen);
m_splash_screen = null;
}
}
});
}
}
// ------------------------------------------------------------------------
@Override
public void onAttachedToWindow()
{
super.onAttachedToWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
{
DisplayCutout dc = getWindow().getDecorView().getRootWindowInsets()
.getDisplayCutout();
if (dc != null)
{
m_top_padding = (float)dc.getBoundingRectTop().height();
m_bottom_padding = (float)dc.getBoundingRectBottom().height();
m_left_padding = (float)dc.getBoundingRectLeft().width();
m_right_padding = (float)dc.getBoundingRectRight().width();
// Left or right will depend on the device initial orientation
// So save it for dealing with device rotation later
m_intial_orientation = SDLActivity.getCurrentOrientation();
}
}
}
// ------------------------------------------------------------------------
@Override
public void onMultiWindowModeChanged(boolean isInMultiWindowMode,
Configuration newConfig)
{
handlePadding(isInMultiWindowMode);
}
// ------------------------------------------------------------------------
public int getKeyboardHeight() { return m_keyboard_height.get(); }
// ------------------------------------------------------------------------
public int getMovedHeight() { return m_moved_height.get(); }
// ------------------------------------------------------------------------
public String getLocaleString()
{
String language = "";
if (mCurrentLocale != null)
{
language = mCurrentLocale.getLanguage();
if (language == "iw")
language = "he";
else if (language == "in")
language = "id";
else if (language == "ji")
language = "yi";
String country = mCurrentLocale.getCountry();
if (country != "")
language += "_" + country;
}
return language;
}
}

4
autogen.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# [Re]generate autoconf files.
autoreconf --install "$@"

View File

@@ -1,27 +0,0 @@
# Build type STKRelease is similar to Release provided by CMake,
# but it uses a lower optimization level
set(CMAKE_CXX_FLAGS_STKRELEASE "-O2 -DNDEBUG" CACHE STRING
"Flags used by the C++ compiler during STK release builds."
FORCE)
set(CMAKE_C_FLAGS_STKRELEASE "-O2 -DNDEBUG" CACHE STRING
"Flags used by the C compiler during STK release builds."
FORCE)
set(CMAKE_EXE_LINKER_FLAGS_STKRELEASE
"" CACHE STRING
"Flags used for linking binaries during STK release builds."
FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_STKRELEASE
"" CACHE STRING
"Flags used by the shared libraries linker during STK release builds."
FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_STKRELEASE
CMAKE_C_FLAGS_STKRELEASE
CMAKE_EXE_LINKER_FLAGS_STKRELEASE
CMAKE_SHARED_LINKER_FLAGS_STKRELEASE)
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel STKRelease."
FORCE)

View File

@@ -1,33 +0,0 @@
# - Try to find angelscript
# Once done this will define
#
# ANGELSCRIPT_FOUND - system has angelscript
# Angelscript_INCLUDE_DIRS - the angelscript include directory
# Angelscript_LIBRARIES - the libraries needed to use angelscript
#
FIND_PATH(Angelscript_INCLUDE_DIRS angelscript.h
PATHS
/usr/local
/usr
PATH_SUFFIXES include
)
FIND_LIBRARY(Angelscript_LIBRARY
NAMES angelscript angelscript_s
PATHS
/usr/local
/usr
PATH_SUFFIXES lib lib64 lib32
)
# handle the QUIETLY and REQUIRED arguments and set ANGELSCRIPT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Angelscript DEFAULT_MSG Angelscript_LIBRARY Angelscript_INCLUDE_DIRS)
IF (ANGELSCRIPT_FOUND)
SET(Angelscript_LIBRARIES ${Angelscript_LIBRARY})
ENDIF (ANGELSCRIPT_FOUND)
MARK_AS_ADVANCED(Angelscript_LIBRARY Angelscript_LIBRARIES Angelscript_INCLUDE_DIRS)

View File

@@ -1,18 +0,0 @@
# - Find EGL
# Find the EGL includes and libraries
#
# Following variables are provided:
# EGL_FOUND
# True if EGL has been found
# EGL_INCLUDE_DIR
# The include directory of EGL
# EGL_LIBRARY
# EGL library list
find_path(EGL_INCLUDE_DIR EGL/egl.h)
find_library(EGL_LIBRARY NAMES EGL)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR)

View File

@@ -1,25 +0,0 @@
# - Find Freetype
# Find the Freetype includes and libraries
#
# Following variables are provided:
# FREETYPE_FOUND
# True if Freetype has been found
# FREETYPE_INCLUDE_DIRS
# The include directories of Freetype
# FREETYPE_LIBRARIES
# Freetype library list
if(WIN32)
find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include/freetype2")
find_library(FREETYPE_LIBRARY NAMES freetype libfreetype PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
set(FREETYPE_FOUND 1)
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
elseif(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
find_path(FREETYPE_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2 include/freetype2 include)
find_library(FREETYPE_LIBRARY NAMES freetype)
set(FREETYPE_FOUND 1)
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
else()
pkg_check_modules(FREETYPE freetype2)
endif()

View File

@@ -1,89 +0,0 @@
# - Try to find libbfd
# Once done this will define
#
# LIBBFD_FOUND - system has libbfd
# LIBBFD_INCLUDE_DIRS - the libbfd include directory
# LIBBFD_LIBRARIES - Link these to use libbfd
# LIBBFD_DEFINITIONS - Compiler switches required for using libbfd
#
# Based on:
#
# Copyright (c) 2008 Bernhard Walle <bernhard.walle@gmx.de>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (LIBBFD_LIBRARIES AND LIBBFD_INCLUDE_DIRS)
set (LIBBFD_FIND_QUIETLY TRUE)
endif ()
find_path (LIBBFD_INCLUDE_DIRS
NAMES
bfd.h
dis-asm.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/opt/include
ENV CPATH)
# Ugly, yes ugly...
find_library (LIBBFD_BFD_LIBRARY
NAMES
bfd
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/usr/include
/opt/local/lib
/opt/usr/lib64
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_IBERTY_LIBRARY
# NAMES
# iberty
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_OPCODES_LIBRARY
# NAMES
# opcodes
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
include (FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBBFD_FOUND to TRUE if all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBBFD DEFAULT_MSG
LIBBFD_BFD_LIBRARY
# LIBBFD_IBERTY_LIBRARY
# LIBBFD_OPCODES_LIBRARY
LIBBFD_INCLUDE_DIRS)
set(LIBBFD_LIBRARIES "${LIBBFD_BFD_LIBRARY}")
mark_as_advanced(LIBBFD_INCLUDE_DIRS LIBBFD_LIBRARIES LIBBFD_BFD_LIBRARY)

View File

@@ -1,37 +0,0 @@
# - Find OggVorbis
# Find the OggVorbis includes and libraries
#
# Following variables are provided:
# OGGVORBIS_FOUND
# True if OggVorbis has been found
# OGGVORBIS_INCLUDE_DIRS
# The include directories of OggVorbis
# OGGVORBIS_LIBRARIES
# OggVorbis library list
if((UNIX AND NOT APPLE) OR NINTENDO_SWITCH)
pkg_check_modules(OGGVORBIS vorbisfile)
else()
find_path(OGGVORBIS_OGG_INCLUDE_DIR NAMES ogg/ogg.h PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
find_path(OGGVORBIS_VORBIS_INCLUDE_DIR NAMES vorbis/vorbisfile.h PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
find_library(OGGVORBIS_OGG_LIBRARY NAMES ogg Ogg libogg PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
find_library(OGGVORBIS_VORBIS_LIBRARY NAMES vorbis Vorbis libvorbis PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
find_library(OGGVORBIS_VORBISFILE_LIBRARY NAMES vorbisfile libvorbisfile PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
find_library(OGGVORBIS_VORBISENC_LIBRARY NAMES vorbisenc libvorbisenc PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OggVorbis DEFAULT_MSG
OGGVORBIS_OGG_INCLUDE_DIR OGGVORBIS_VORBIS_INCLUDE_DIR
OGGVORBIS_OGG_LIBRARY OGGVORBIS_VORBIS_LIBRARY OGGVORBIS_VORBISFILE_LIBRARY)
# Publish variables
set(OGGVORBIS_INCLUDE_DIRS ${OGGVORBIS_OGG_INCLUDE_DIR} ${OGGVORBIS_VORBIS_INCLUDE_DIR})
set(OGGVORBIS_LIBRARIES ${OGGVORBIS_OGG_LIBRARY} ${OGGVORBIS_VORBIS_LIBRARY} ${OGGVORBIS_VORBISFILE_LIBRARY} ${OGGVORBIS_VORBISENC_LIBRARY})
list(REMOVE_DUPLICATES OGGVORBIS_INCLUDE_DIRS)
list(REMOVE_DUPLICATES OGGVORBIS_LIBRARIES)
mark_as_advanced(OGGVORBIS_OGG_INCLUDE_DIR OGGVORBIS_VORBIS_INCLUDE_DIR)
mark_as_advanced(OGGVORBIS_OGG_LIBRARY OGGVORBIS_VORBIS_LIBRARY OGGVORBIS_VORBISFILE_LIBRARY OGGVORBIS_VORBISENC_LIBRARY)
endif()

View File

@@ -1,66 +0,0 @@
# - Find Wayland
# Find the Wayland includes and libraries
#
# Following variables are provided:
# WAYLAND_FOUND
# True if Wayland has been found
# WAYLAND_INCLUDE_DIRS
# The include directories of Wayland
# WAYLAND_LIBRARIES
# Wayland library list
find_package(PkgConfig REQUIRED)
if(NOT PKGCONFIG_FOUND)
message(FATAL_ERROR "Pkg-config not found.")
endif()
pkg_check_modules(PKG_WAYLAND QUIET wayland-client)
if(PKG_WAYLAND_FOUND)
set(WAYLAND_VERSION ${PKG_WAYLAND_VERSION})
else()
set(WAYLAND_VERSION 0)
endif()
find_path(WAYLAND_CLIENT_INCLUDE_DIR wayland-client.h)
find_path(WAYLAND_CURSOR_INCLUDE_DIR wayland-cursor.h)
find_path(WAYLAND_EGL_INCLUDE_DIR wayland-egl.h)
find_path(XKBCOMMON_INCLUDE_DIR xkbcommon/xkbcommon.h)
find_library(WAYLAND_CLIENT_LIBRARY NAMES wayland-client)
find_library(WAYLAND_CURSOR_LIBRARY NAMES wayland-cursor)
find_library(WAYLAND_EGL_LIBRARY NAMES wayland-egl)
find_library(XKBCOMMON_LIBRARY NAMES xkbcommon)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wayland DEFAULT_MSG WAYLAND_CLIENT_LIBRARY
WAYLAND_CURSOR_LIBRARY
WAYLAND_EGL_LIBRARY
XKBCOMMON_LIBRARY
WAYLAND_CLIENT_INCLUDE_DIR
WAYLAND_CURSOR_INCLUDE_DIR
WAYLAND_EGL_INCLUDE_DIR
XKBCOMMON_INCLUDE_DIR)
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIR}
${WAYLAND_CURSOR_INCLUDE_DIR}
${WAYLAND_EGL_INCLUDE_DIR}
${XKBCOMMON_INCLUDE_DIR})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARY}
${WAYLAND_CURSOR_LIBRARY}
${WAYLAND_EGL_LIBRARY}
${XKBCOMMON_LIBRARY})
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
list(REMOVE_DUPLICATES WAYLAND_LIBRARIES)
mark_as_advanced(WAYLAND_CLIENT_LIBRARY
WAYLAND_CURSOR_LIBRARY
WAYLAND_EGL_LIBRARY
XKBCOMMON_LIBRARY
WAYLAND_CLIENT_INCLUDE_DIR
WAYLAND_CURSOR_INCLUDE_DIR
WAYLAND_EGL_INCLUDE_DIR
XKBCOMMON_INCLUDE_DIR)

View File

@@ -1,99 +0,0 @@
# - try to find WiiUse library
#
# Cache Variables: (probably not for direct use in your scripts)
# WIIUSE_INCLUDE_DIR
# WIIUSE_LIBRARY
#
# Non-cache variables you might use in your CMakeLists.txt:
# WIIUSE_FOUND
# WIIUSE_INCLUDE_DIRS
# WIIUSE_LIBRARIES
# WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing
# WIIUSE_RUNTIME_LIBRARY_DIRS
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(WIIUSE_ROOT_DIR
"${WIIUSE_ROOT_DIR}"
CACHE
PATH
"Directory to search for WiiUse")
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(_LIBSUFFIXES /lib64 /lib)
else()
set(_LIBSUFFIXES /lib)
endif()
find_library(WIIUSE_LIBRARY
NAMES
wiiuse
PATHS
"${WIIUSE_ROOT_DIR}"
PATH_SUFFIXES
"${_LIBSUFFIXES}")
get_filename_component(_libdir "${WIIUSE_LIBRARY}" PATH)
find_path(WIIUSE_INCLUDE_DIR
NAMES
wiiuse.h
HINTS
"${_libdir}"
"${_libdir}/.."
PATHS
"${WIIUSE_ROOT_DIR}"
PATH_SUFFIXES
include/)
set(_deps_check)
if(WIN32)
find_file(WIIUSE_RUNTIME_LIBRARY
NAMES
wiiuse.dll
HINTS
"${_libdir}"
"${_libdir}/.."
PATH_SUFFIXES
bin)
set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}")
get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS
"${WIIUSE_RUNTIME_LIBRARY}"
PATH)
list(APPEND _deps_check WIIUSE_RUNTIME_LIBRARY)
else()
set(WIIUSE_RUNTIME_LIBRARY "${WIIUSE_LIBRARY}")
set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}")
get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS
"${WIIUSE_LIBRARY}"
PATH)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WiiUse
DEFAULT_MSG
WIIUSE_LIBRARY
WIIUSE_INCLUDE_DIR
${_deps_check})
if(WIIUSE_FOUND)
set(WIIUSE_LIBRARIES "${WIIUSE_LIBRARY}")
set(WIIUSE_INCLUDE_DIRS "${WIIUSE_INCLUDE_DIR}")
mark_as_advanced(WIIUSE_ROOT_DIR)
endif()
mark_as_advanced(WIIUSE_INCLUDE_DIR
WIIUSE_LIBRARY
WIIUSE_RUNTIME_LIBRARY)

View File

@@ -1,39 +0,0 @@
# Generate source groups which mimic the original folder hierarchy.
# This is mainly useful for MSVC's project explorer
# - SRCS list of source files
# - HDRS list of header files
function(source_group_hierarchy SRCS HDRS)
if(MSVC)
# This removes the 'Source Files' folder, which is
# not really necessary. Also, put header and source
# files into the same folder
foreach(source_file ${${SRCS}})
source_group_file(${source_file} "")
endforeach()
foreach(header_file ${${HDRS}})
source_group_file(${header_file} "")
endforeach()
else()
foreach(source_file ${${SRCS}})
source_group_file(${source_file} "Source Files\\")
endforeach()
foreach(header_file ${${HDRS}})
source_group_file(${header_file} "Source Files\\")
endforeach()
endif()
endfunction()
# Determine source_group depending on file path
# - FILE path to a file (header or source)
# - GROUP_PREFIX prefix for group name
function(source_group_file file group_prefix)
get_filename_component(file_path ${file} PATH)
if(${file_path} STREQUAL "src")
source_group("${group_prefix}" FILES ${file})
else()
string(REGEX REPLACE "^src/(.*)$" "\\1" group_name ${file_path})
string(REPLACE "/" "\\\\" group_name ${group_name})
source_group("${group_prefix}${group_name}" FILES ${file})
endif()
endfunction()

View File

@@ -1,40 +0,0 @@
# Cross-compiling requires CMake 2.6 or newer. Example:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile-Android.txt -DHOST=arm-linux-androideabi
# Where 'arm-linux-androideabi' is the host prefix for the cross-compiler. If
# you already have a toolchain file setup, you may use that instead of this
# file. Make sure to set CMAKE_FIND_ROOT_PATH to where the NDK toolchain was
# installed (e.g. "$ENV{HOME}/toolchains/arm-linux-androideabi-r10c-21").
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Linux)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER "${HOST}-clang")
SET(CMAKE_CXX_COMPILER "${HOST}-clang++")
set(CMAKE_SYSTEM_PROCESSOR ${ARCH})
# Starting NDK21 it enables NEON by default on 32-bit ARM target
# Disable it to support more devices
if("${ARCH}" STREQUAL "arm" AND NOT STK_ARM_NEON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfpv3-d16")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfpv3-d16")
endif()
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH $ENV{NDK_TOOLCHAIN_PATH})
# here is where stuff gets installed to
SET(CMAKE_INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}" CACHE STRING "Install path prefix, prepended onto install directories." FORCE)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# set env vars so that pkg-config will look in the appropriate directory for
# .pc files (as there seems to be no way to force using ${HOST}-pkg-config)
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "")

View File

@@ -1,48 +0,0 @@
# Usage:
# cmake .. -DCCTOOLS_PREFIX=/path/to/cctools -DCCTOOLS_ARCH=arch -DCCTOOLS_PLATFORM=platform \
# -DRT=/path/to/cctools/darwin/libclang_rt.{ios, iossim, osx, tvos, tvossim}.a -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cctools.cmake
# Download precompiled cctools at https://github.com/supertuxkart/dependencies/releases/download/preview/cctools.tar.xz
# Compiled in Ubuntu 18.04
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Darwin)
# which compilers to use for C and C++
string(TOLOWER "${CCTOOLS_PLATFORM}" platform_lower)
set(CLANG_ARCH ${CCTOOLS_ARCH})
if(CCTOOLS_ARCH MATCHES ^arm)
set(CLANG_ARCH arm)
else()
set(CLANG_ARCH ${CCTOOLS_ARCH})
endif()
SET(CMAKE_C_COMPILER ${CCTOOLS_PREFIX}/bin/${CCTOOLS_ARCH}-${platform_lower}-clang)
SET(CMAKE_CXX_COMPILER ${CCTOOLS_PREFIX}/bin/${CCTOOLS_ARCH}-${platform_lower}-clang++)
SET(CMAKE_RANLIB ${CCTOOLS_PREFIX}/bin/${CLANG_ARCH}-apple-darwin11-ranlib)
SET(CMAKE_AR ${CCTOOLS_PREFIX}/bin/${CLANG_ARCH}-apple-darwin11-ar)
SET(CMAKE_INSTALL_NAME_TOOL ${CCTOOLS_PREFIX}/bin/${CLANG_ARCH}-apple-darwin11-install_name_tool)
SET(CMAKE_SYSTEM_PROCESSOR ${CCTOOLS_ARCH})
SET(CMAKE_MACOSX_RPATH TRUE)
SET(CMAKE_EXE_LINKER_FLAGS ${RT})
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH ${PROJECT_SOURCE_DIR}/dependencies-${platform_lower} ${CCTOOLS_PREFIX}/sdk/${CCTOOLS_PLATFORM}.sdk)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# fix statically linking because of order
if (NOT CCTOOLS_PLATFORM MATCHES MacOSX)
set(CURL_LIBRARY "${PROJECT_SOURCE_DIR}/dependencies-${platform_lower}/lib/libcurl.a;${PROJECT_SOURCE_DIR}/dependencies-${platform_lower}/lib/libmbedtls.a;${PROJECT_SOURCE_DIR}/dependencies-${platform_lower}/lib/libmbedx509.a")
endif()
set(USE_CRYPTO_OPENSSL FALSE CACHE BOOL "")
if (NOT CCTOOLS_PLATFORM MATCHES MacOSX)
set(USE_WIIUSE FALSE CACHE BOOL "")
set(USE_SQLITE3 FALSE CACHE BOOL "")
set(IOS TRUE CACHE BOOL "")
endif()

View File

@@ -1,127 +0,0 @@
# Usage:
# cmake .. -DDEPS_PATH=/path/to/dependencies -DIOS_ASSETS=/path/to/generated/assets -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-ios-xcode.cmake -G Xcode
# Need to use ../android/generate_assets.sh for assets first
# In Xcode you need to choose Product -> Scheme -> supertuxkart
# And then Signing & Capabilities choose a suitable team
# You may need to use another bundle identifier as the current one is already used by STK team
# You can also use -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=xxxxxxxxxx to specify team
# Increase every upload to App store
SET(IOS_BUILD_VERSION 26)
# Get SDK path
execute_process(COMMAND xcodebuild -version -sdk iphoneos Path
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_IOS
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcodebuild -version -sdk iphonesimulator Path
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_SIMULATOR
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion
OUTPUT_VARIABLE SDK_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT DEFINED CMAKE_OSX_SYSROOT_IOS OR NOT DEFINED CMAKE_OSX_SYSROOT_SIMULATOR OR NOT DEFINED SDK_VERSION)
message(FATAL_ERROR "Cannot find iphoneos or iphonesimulator sdk location and their version info.")
else()
message(STATUS "Using SDK path: ${CMAKE_OSX_SYSROOT_IOS}.")
endif()
set(CMAKE_OSX_SYSROOT "iphoneos" CACHE INTERNAL "")
# Manaully set the values for both arm64 and simulator
set(JPEG_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libjpeg.a CACHE STRING "")
set(JPEG_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(ZLIB_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libz.a CACHE STRING "")
set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(PNG_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libpng16.a CACHE STRING "")
set(PNG_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(PNG_PNG_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(OGGVORBIS_OGG_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libogg.a CACHE STRING "")
set(OGGVORBIS_OGG_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/ogg CACHE STRING "")
set(OGGVORBIS_VORBIS_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libvorbis.a CACHE STRING "")
set(OGGVORBIS_VORBIS_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/vorbis CACHE STRING "")
set(OGGVORBIS_VORBISFILE_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libvorbisfile.a CACHE STRING "")
set(OGGVORBIS_VORBISFILE_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/vorbis CACHE STRING "")
set(OGGVORBIS_VORBISENC_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libvorbisenc.a CACHE STRING "")
set(OGGVORBIS_VORBISENC_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/vorbis CACHE STRING "")
set(HARFBUZZ_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libharfbuzz.a CACHE STRING "")
set(HARFBUZZ_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(FREETYPE_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libfreetype.a CACHE STRING "")
set(FREETYPE_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/freetype2 CACHE STRING "")
set(CURL_LIBRARY "${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libcurl.a;${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libmbedtls.a;${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libmbedx509.a;${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libmbedcrypto.a" CACHE STRING "")
set(CURL_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(MBEDCRYPTO_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libmbedcrypto.a CACHE STRING "")
set(MBEDTLS_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(SDL2_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libSDL2.a CACHE STRING "")
set(SDL2_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include/SDL2 CACHE STRING "")
set(LIBSAMPLERATE_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libsamplerate.a CACHE STRING "")
set(LIBSAMPLERATE_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(MOLTENVK_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libMoltenVK.a CACHE STRING "")
set(VULKAN_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(LIBASTCENC_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libastcenc.a CACHE STRING "")
set(LIBASTCENC_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
set(SHADERC_LIBRARY ${PROJECT_SOURCE_DIR}/dependencies\${EFFECTIVE_PLATFORM_NAME}/lib/libshaderc_combined.a CACHE STRING "")
set(SHADERC_INCLUDEDIR ${PROJECT_SOURCE_DIR}/dependencies-iphoneos/include CACHE STRING "")
# For universal iOS and simulator
set(LIBRESOLV_LIBRARY -lresolv CACHE STRING "")
set(PTHREAD_LIBRARY -lpthread CACHE STRING "")
# Standard config
set(CMAKE_SYSTEM_VERSION ${SDK_VERSION} CACHE INTERNAL "")
set(UNIX TRUE CACHE BOOL "")
set(APPLE TRUE CACHE BOOL "")
set(IOS TRUE CACHE BOOL "")
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
set(CMAKE_STRIP strip CACHE FILEPATH "" FORCE)
# Set the architectures for which to build
set(CMAKE_OSX_ARCHITECTURES "arm64 x86_64" CACHE STRING "Build architecture for iOS")
set(CMAKE_C_SIZEOF_DATA_PTR 8)
set(CMAKE_CXX_SIZEOF_DATA_PTR 8)
set(CMAKE_SYSTEM_PROCESSOR "arm64")
set(CMAKE_SYSTEM_NAME iOS CACHE INTERNAL "" FORCE)
# Change the type of target generated for try_compile() so it'll work when cross-compiling
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
# All iOS/Darwin specific settings - some may be redundant.
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_C_COMPILER_ABI ELF)
set(CMAKE_CXX_COMPILER_ABI ELF)
set(CMAKE_C_HAS_ISYSROOT 1)
set(CMAKE_CXX_HAS_ISYSROOT 1)
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "")
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
# Fixed variables in iOS STK
set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC NO CACHE INTERNAL "")
set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES CACHE INTERNAL "")
set(USE_WIIUSE FALSE CACHE BOOL "")
set(USE_SQLITE3 FALSE CACHE BOOL "")
set(USE_CRYPTO_OPENSSL FALSE CACHE BOOL "")
set(IOS_LAUNCHSCREEN ${DEPS_PATH}/ios-icon/launch_screen.storyboard)
set(IOS_IMAGES_XCASSETS ${DEPS_PATH}/ios-icon/Images.xcassets)
set(SDK_NAME_VERSION_FLAGS "-miphoneos-version-min=9.0")
set(CMAKE_OSX_DEPLOYMENT_TARGET 9.0 CACHE STRING "Set CMake deployment target" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" CACHE INTERNAL "")
# Replace the above two with these if you use an apple silicon
#set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "arm64")
#set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "arm64")

View File

@@ -1,28 +0,0 @@
# Usage:
# cmake .. -DLLVM_ARCH=aarch64 i686 or x86_64 -DLLVM_PREFIX=/path/to/llvm-mingw-prefix -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake
# the name of the target operating system
if(WIN32)
SET(PATH_EXE .exe)
endif()
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER ${LLVM_PREFIX}/bin/${LLVM_ARCH}-w64-mingw32-clang${PATH_EXE})
SET(CMAKE_CXX_COMPILER ${LLVM_PREFIX}/bin/${LLVM_ARCH}-w64-mingw32-clang++${PATH_EXE})
SET(CMAKE_RC_COMPILER ${LLVM_PREFIX}/bin/${LLVM_ARCH}-w64-mingw32-windres${PATH_EXE})
SET(CMAKE_SYSTEM_PROCESSOR ${LLVM_ARCH})
SET(CMAKE_BUILD_TYPE RelWithDebInfo)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-pdb=")
SET(CMAKE_C_FLAGS -gcodeview)
SET(CMAKE_CXX_FLAGS -gcodeview)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH ${LLVM_PREFIX}/generic-w64-mingw32 ${LLVM_PREFIX}/${LLVM_ARCH}-w64-mingw32/bin ${PROJECT_SOURCE_DIR}/dependencies-win-${LLVM_ARCH})
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@@ -1,23 +0,0 @@
# Usage:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw-64bit.cmake
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# figure out folder to look in
execute_process(COMMAND sh -c "ls /usr/lib/gcc/x86_64-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-x86_64)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@@ -1,23 +0,0 @@
# Usage:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc-posix)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++-posix)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
# figure out folder to look in
execute_process(COMMAND sh -c "ls /usr/lib/gcc/i686-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-i686)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@@ -1,31 +0,0 @@
# Collect all currently added targets in all subdirectories
#
# Parameters:
# - _result the list containing all found targets
# - _dir root directory to start looking from
function(get_all_targets _result _dir)
get_property(_subdirs DIRECTORY "${_dir}" PROPERTY SUBDIRECTORIES)
foreach(_subdir IN LISTS _subdirs)
get_all_targets(${_result} "${_subdir}")
endforeach()
get_directory_property(_sub_targets DIRECTORY "${_dir}" BUILDSYSTEM_TARGETS)
set(${_result} ${${_result}} ${_sub_targets} PARENT_SCOPE)
endfunction()
# set(CMAKE_XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS doesn't work in ios toolchain, below fixed it
macro(configure_xcode_defaults _EXE_NAME)
if (APPLE)
macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
endmacro()
endif()
if (APPLE)
set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] YES)
set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=MinSizeRel] YES)
set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=RelWithDebInfo] YES)
set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] YES)
endif()
endmacro()

666
config.rpath Executable file
View File

@@ -0,0 +1,666 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2007 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case $cc_basename in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | cygwin* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
:
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case $cc_basename in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_direct=no
;;
*)
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix4* | aix5*)
library_names_spec='$libname$shrext'
;;
amigaos*)
library_names_spec='$libname.a'
;;
beos*)
library_names_spec='$libname$shrext'
;;
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
library_names_spec='$libname$shrext'
;;
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd1*)
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
library_names_spec='$libname$shrext$versuffix' ;;
*)
library_names_spec='$libname$shrext' ;;
esac
;;
gnu*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
library_names_spec='$libname$shrext'
;;
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
library_names_spec='$libname$shrext'
;;
netbsd*)
library_names_spec='$libname$shrext'
;;
newsos6)
library_names_spec='$libname$shrext'
;;
nto-qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
library_names_spec='$libname$shrext'
;;
sysv4*MP*)
library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Format of library name prefix.
libname_spec="$escaped_libname_spec"
# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

462
configure.ac Normal file
View File

@@ -0,0 +1,462 @@
# Process this file with autogen.sh to produce a configure script.
AC_INIT(supertuxkart,0.7.3)
AC_CONFIG_SRCDIR([src/main.cpp])
AC_PREREQ(2.61)
# ================================================
# Initialize the automake stuff
# set the $host variable based on local machine/os
# ================================================
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign tar-ustar])
# =====================================================
# Set the default CFLAGS/CXXFLAGS
# If these were not set, the AC_PROG_CC and AC_PROG_CXX
# scripts set them to "-g -O2".
# =====================================================
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -Wall"
# ===================
# Check for compilers
# ===================
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
# This macro defines WORDS_BIGENDIAN if building for a big endian machine.
AC_C_BIGENDIAN
AC_LANG(C++)
# ===========================
# Check for `configure' flags
# ===========================
SUMMARY="\nSummary of optional components:\n==============================="
AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,
[enable debugging info])])
if test x$enable_debug = xyes; then
AC_DEFINE([DEBUG], [], [enable debugging cheats and shortcuts])
CFLAGS="$CFLAGS -g -pg"
CXXFLAGS="$CXXFLAGS -g -pg"
SUMMARY="$SUMMARY\nEnabled debugging, please disable for a release!!"
else
CFLAGS="$CFLAGS -DNDEBUG"
CXXFLAGS="$CXXFLAGS -DNDEBUG"
SUMMARY="$SUMMARY\nDisabled debugging, asserts have been turned off"
fi
AC_ARG_ENABLE(optimization, [AS_HELP_STRING(--disable-optimization,
[disable compiler optimizations])],,
enable_optimization=yes)
if test x$enable_optimization = xyes; then
CFLAGS="$CFLAGS -O2"
CXXFLAGS="$CXXFLAGS -O2"
else
SUMMARY="$SUMMARY\nDisabled compiler optimizations."
fi
# ===================
# Checks for programs.
# ===================
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
# ===============================
# Check for MS Windows environment
# ================================
AC_CHECK_HEADER(windows.h)
# ==================================
# check for OpenGL related libraries
# ==================================
case "${host}" in
*darwin*|*macosx*)
opengl_LIBS="$LIBS -framework Carbon -framework OpenGL -framework IOKit -framework AGL"
;;
*-*-cygwin* | *-*-mingw32*)
# CygWin under Windoze.
echo Win32 specific hacks...
AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
opengl_LIBS="-lopengl32 -luser32 -lgdi32 -lm -lwinmm"
joystick_LIBS="$joystick_LIBS -lwinmm"
LDFLAGS="$LDFLAGS -mwindows"
echo "Will link apps with $LIBS"
;;
*)
# X-Windows based machines
save_LIBS=$LIBS
AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
opengl_LIBS="$LIBS"
LIBS=$save_LIBS
if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
# if GLcore found, then also check for GL
AC_SEARCH_LIBS(glXCreateContext, GL)
fi
;;
esac
# ========================================
# check for OpenAL libraries
# ========================================
save_LIBS=$LIBS
case "${host}" in
*darwin*|*macosx*)
# search for OpenAL installed in a UNIX way first. This is necessary since OS X 10.4
# comes with an OpenAL framework that's too old, so to retain 10.4 support we need to
# build OpenAL from source, and can't use Apple's framework.
AC_SEARCH_LIBS(alGenBuffers, [openal alut], have_al_lib=yes)
# We couldn't find OpenAL installed the UNIX way, so fall back to using frameworks
if test x$have_al_lib != xyes; then
LIBS="-framework OpenAL $LIBS"
have_al_lib=yes
fi
;;
*)
AC_SEARCH_LIBS(alGenBuffers, [openal alut], have_al_lib=yes)
;;
esac
if test x$have_al_lib = xyes; then
# Apple has the headers in OpenAL/al.h instead of AL/al.h
AC_CHECK_HEADERS([AL/al.h OpenAL/al.h], have_al_hdr=yes)
fi
if test x$have_al_hdr != xyes; then
AC_MSG_ERROR([[cannot find useable OpenAL installation. You need to install OpenAL.]])
fi
openal_LIBS="$LIBS"
LIBS="$save_LIBS"
# ====================
# check for Ogg Vorbis
# ====================
save_LIBS=$LIBS
# also check in /usr/local
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
# search for the libraries needed to use ogg vorbis
AC_SEARCH_LIBS(ov_open, [vorbisfile], have_vorbisfile_lib=yes, have_vorbisfile_lib=no, [-lvorbis])
if test x$have_vorbisfile_lib = xyes; then
# check for the headers needed by ogg vorbis
AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes)
AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes)
fi
SUMMARY="$SUMMARY\n"
if test x$have_vorbisfile_hdr = xyes -a x$have_ogg_hdr = xyes; then
AC_DEFINE([HAVE_OGGVORBIS], 1, [Defined when Ogg Vorbis is available])
SUMMARY="$SUMMARY\nWe have Ogg Vorbis support."
else
AC_MSG_ERROR([[cannot find useable Ogg Vorbis installation. You need to install libogg and libvorbis.]])
#SUMMARY="$SUMMARY\nNo Ogg Vorbis support - the game will play with sound effects, but without music."
#SUMMARY="$SUMMARY\nPlease install ogg vorbis!"
fi
oggvorbis_LIBS="$LIBS"
LIBS=$save_LIBS
# The following are C++ items that need to be tested for with the c++
# compiler
AC_LANG_PUSH(C++)
# ==================
# Check for irrlicht
# ==================
AC_ARG_WITH(irrlicht, [AS_HELP_STRING(--with-irrlicht=PREFIX,
[specify the prefix path to irrlicht])])
if test "x$with_irrlicht" != "x" ; then
CPPFLAGS="${CPPFLAGS} -I $with_irrlicht/include -I $with_irrlicht/include/irrlicht"
AC_CHECK_HEADER(irrlicht.h, have_irrlicht_hdr=yes)
if test x$have_irrlicht_hdr != xyes; then
AC_MSG_ERROR([Can not find irrlicht in $with_irrlicht.])
fi
else
CPPFLAGS_Save=$CPPFLAGS
# check in /usr
echo " in /usr/ : "
CPPFLAGS="${CPPFLAGS_Save} -I/usr/include/irrlicht"
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr=yes, irrlicht_found_in_usr=no)
# if it's not found there, try /usr/local instead
if test x$irrlicht_found_in_usr == xyes; then
with_irrlicht="/usr"
else
# I'd like to fall back to check /usr/local second, but stupid autotools does not support
# checking for a header in 2 directories because it caches results
#AC_MSG_ERROR([Can't find irrlicht installation in /usr, use --with-irrlicht...])
# erase cached result
unset ac_cv_header_irrlicht_h
echo " in /usr/local/ : "
CPPFLAGS="${CPPFLAGS_Save} -I/usr/local/include/irrlicht"
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr_local=yes, irrlicht_found_in_usr_local=no)
if test x$irrlicht_found_in_usr_local == xyes; then
with_irrlicht="/usr/local"
else
AC_MSG_ERROR([Can not find irrlicht installation in standard prefixes, use --with-irrlicht...])
fi
fi
CPPFLAGS="${CPPFLAGS_Save} -I ${with_irrlicht}/include/irrlicht"
fi
case "${host}" in
*-*-linux* )
irrlicht_LIBS="-L/$with_irrlicht/lib/Linux -L/$with_irrlicht/lib -lIrrlicht -lX11"
;;
*darwin*|*macosx*)
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht -framework Cocoa"
;;
*freebsd*)
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht -lpthread"
esac
# ---- Check these flags do work by building a small irrLicht sample
echo "checking for irrlicht libraries..."
save_LIBS=$LIBS
LIBS="$LIBS $irrlicht_LIBS $opengl_LIBS"
irrlicht_sample_built_fine="false"
AC_TRY_RUN(
[
# include "irrlicht.h"
int main() {
irr::createDevice(irr::video::EDT_NULL);
return 0;
}
],
irrlicht_sample_built_fine="true",
irrlicht_sample_built_fine="false"
)
case "${host}" in
*-*-linux* )
# If base irrLicht flags failed, try again with Xxf86vm
# FIXME: this program when run prints out two lines (version numbers) to stdout
if test x$irrlicht_sample_built_fine = xfalse; then
LIBS="$LIBS -lXxf86vm"
works_with_Xxf86vm="false"
AC_TRY_RUN([
# include "irrlicht.h"
int main() {
irr::createDevice(irr::video::EDT_NULL);
return 0;
}
],
works_with_Xxf86vm="true",
)
if test x$works_with_Xxf86vm = xtrue; then
irrlicht_LIBS="$irrlicht_LIBS -lXxf86vm"
irrlicht_sample_built_fine="true"
fi
fi
;;
esac
if test x$irrlicht_sample_built_fine = xfalse; then
AC_MSG_ERROR([Cann not build test irrLicht program. Check config.log to see the errors])
fi
# ---- Check we have the minimum required irrLicht version
echo -n "checking irrlicht version is recent enough... "
irrlicht_min_version_met="false"
# Note that irrlicht 1.8 potentially needs additional flags (-lXcursor, or
# undefine _IRR_LINUX_XCURSOR_ # in IrrCompileConfig.h). Since there might
# be other changes, for now I remove support for irrlicht trunk/1.8
AC_TRY_RUN(
[
# include "irrlicht.h"
int main() {
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR == 7)
#error "STK needs irrlicht 1.8* to work properly (which might be only available"
#error "as svn trunk atm"
#else
// ok
#endif
return 0;
}
],
irrlicht_min_version_met="true",
irrlicht_min_version_met="false"
)
if test x$irrlicht_min_version_met = xfalse; then
AC_MSG_ERROR([Your irrLicht is too old, please update irrLicht.
You need irrlicht 1.8.
While irrlicht 1.8 is not released, we recommend using version 3843 from irrlicht SVN trunk.])
else
echo "yes"
fi
LIBS=$save_LIBS
# ==================
# Check for Fribidi
# ==================
save_LIBS=$LIBS
# also check in /usr/local
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
# search for the libraries needed to use ogg vorbis
AC_SEARCH_LIBS(fribidi_log2vis, [fribidi], have_fribidi=yes, have_fribidi=no)
if test x$have_fribidi = xyes; then
AC_CHECK_HEADER(fribidi/fribidi.h, have_fribidi_hdr=yes)
fi
SUMMARY="$SUMMARY\n"
if test x$have_fribidi = xyes -a x$have_fribidi_hdr = xyes; then
AC_DEFINE([ENABLE_BIDI], 1, [Defined when Fribidi is available])
SUMMARY="$SUMMARY\nFribidi (RTL languages support) support enabled."
fribidi_LIBS="$LIBS"
else
SUMMARY="$SUMMARY\nFribidi (RTL languages support) support disabled."
fribidi_LIBS=""
fi
LIBS=$save_LIBS
# Libcurl is needed in all build modes
PKG_CHECK_MODULES(LIBCURL, libcurl >= 0.1)
# ======================================================
# Try to supply the SVN revision number for the compiler
# ======================================================
AC_CHECK_PROGS(have_svnversion,[svnversion],"no")
if test x$have_svnversion != xno; then
SVNVERSION="`svnversion $srcdir`"
AC_DEFINE_UNQUOTED([SVNVERSION],"$SVNVERSION",["SVN revision number"])
fi
# ==============
# Bullet physics
# ==============
AC_DEFINE([BT_NO_PROFILE], [], [Disable bullet internal profiling])
BULLETTREE="src/bullet"
bullet_LIBS="-Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath"
# ====
# enet
# ====
AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)])
AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)])
AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)])
AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)])
AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])
AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], ,
#include <sys/types.h>
#include <sys/socket.h>
)
AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
enet_LIBS="-Lenet -lenet -lws2_32"
;;
*)
enet_LIBS="-Lenet -lenet"
;;
esac
ENETTREE="src/enet"
# ==========================================
# Check for a known compiler bug, details in
# src/bullet/src/Makefile.am
# ==========================================
ORIGCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-elide-constructors"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
AC_MSG_RESULT(yes); NOELIDE=-fno-elide-constructors,
AC_MSG_RESULT(no); NOELIDE="")
CXXFLAGS="$ORIGCXXFLAGS"
AC_SUBST(NOELIDE)
# =========================
# subst bars in Makefile.am
# =========================
AC_SUBST(irrlicht_LIBS)
AC_SUBST(fribidi_LIBS)
AC_SUBST(bullet_LIBS)
AC_SUBST(enet_LIBS)
AC_SUBST(opengl_LIBS)
AC_SUBST(openal_LIBS)
AC_SUBST(oggvorbis_LIBS)
AC_SUBST(BULLETTREE)
AC_SUBST(ENETTREE)
# ================
# Create makefiles
# ================
AC_CONFIG_FILES([ \
Makefile \
data/Makefile \
data/challenges/Makefile \
data/fonts/Makefile \
data/gfx/Makefile \
data/grandprix/Makefile \
data/gui/Makefile \
data/karts/Makefile \
data/models/Makefile \
data/music/Makefile \
data/po/Makefile \
data/shaders/Makefile \
data/sfx/Makefile \
data/textures/Makefile \
data/tracks/Makefile \
data/tutorials/Makefile \
doc/Makefile \
src/Makefile \
src/ide/Makefile \
src/bullet/Makefile \
src/bullet/src/Makefile \
src/enet/Makefile \
tools/Makefile
])
AC_OUTPUT
echo -e $SUMMARY

1
contrib/README.contrib Normal file
View File

@@ -0,0 +1 @@
In this directory there are unsorted files that can be useful, but aren't used inside the game yet.

241
contrib/black_closedbook.ac Normal file
View File

@@ -0,0 +1,241 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 0.125 0.114 0.102 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.502 0.502 0.502 shi 10 trans 0
OBJECT world
kids 7
OBJECT poly
name "box"
loc -0.9 0.05 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.9 0.35 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.15 0.20203 -1.05
numvert 8
-0.05 -0.15 -1.15
-0.05 0.15 -1.15
0.05 0.15 -1.15
0.05 -0.15 -1.15
-0.05 -0.15 1.15
-0.05 0.15 1.15
0.05 0.15 1.15
0.05 -0.15 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 -1.05
-0.65 0.1 -1.05
0.65 0.1 -1.05
0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 0.1 1.05
0.65 -0.1 1.05
0.65 -0.1 -1.05
0.65 0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 0 1
1 0 0
2 1 0
3 1 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 -0.1 1.05
0.65 0.1 1.05
-0.65 0.1 1.05
-0.65 -0.1 1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 1.05
-0.65 0.1 1.05
-0.65 0.1 -1.05
-0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0

468
contrib/black_openbook.ac Normal file
View File

@@ -0,0 +1,468 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 0.133 0.153 0.122 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.502 0.502 0.502 shi 10 trans 0
OBJECT world
kids 3
OBJECT poly
name "box"
loc 0 1.21271 -1.16783
numvert 24
0.889244 1.16215 -0.166283
0.802644 1.16214 -0.216282
0.00623977 1.16214 1.05596
0.0928401 1.16215 1.10596
0.889247 -1.13786 -0.166282
0.802644 -1.13786 -0.216282
0.00624018 -1.13786 1.05597
0.0928425 -1.13786 1.10597
-0.1 1.16215 1.2173
-0.1 1.16214 1.1173
-1.6 1.16214 1.17089
-1.6 1.16215 1.27088
-0.1 -1.13786 1.2173
-0.1 -1.13786 1.1173
-1.6 -1.13786 1.17089
-1.6 -1.13786 1.27089
0.166074 1.14416 1.0949
0.0875697 1.14415 1.04957
-0.17794 1.14415 1.18454
-0.17794 1.14416 1.27519
0.166069 -1.1711 1.0949
0.0875686 -1.1711 1.04957
-0.17794 -1.1711 1.18454
-0.17794 -1.1711 1.27518
numsurf 18
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
SURF 0x10
mat 1
refs 4
8 1 0
9 1 1
10 0 1
11 0 0
SURF 0x10
mat 1
refs 4
14 0 1
15 0 0
11 1 0
10 1 1
SURF 0x10
mat 1
refs 4
15 1 0
14 1 1
13 0 1
12 0 0
SURF 0x10
mat 1
refs 4
12 1 0
13 1 1
9 0 1
8 0 0
SURF 0x10
mat 1
refs 4
9 0 0
13 1 0
14 1 1
10 0 1
SURF 0x10
mat 1
refs 4
12 0 0
8 1 0
11 1 1
15 0 1
SURF 0x10
mat 1
refs 4
16 1 0
17 1 1
18 0 1
19 0 0
SURF 0x10
mat 1
refs 4
22 0 1
23 0 0
19 1 0
18 1 1
SURF 0x10
mat 1
refs 4
23 1 0
22 1 1
21 0 1
20 0 0
SURF 0x10
mat 1
refs 4
20 1 0
21 1 1
17 0 1
16 0 0
SURF 0x10
mat 1
refs 4
17 0 0
21 1 0
22 1 1
18 0 1
SURF 0x10
mat 1
refs 4
20 0 0
16 1 0
19 1 1
23 0 1
kids 0
OBJECT poly
name "mesh"
loc -0.724976 1.1989 -1.28171
texture "../images/homework.rgb"
texrep -1 1
texoff -0.02 0
numvert 20
0.247142 -1.08817 1.08951
-0.661664 -1.08817 1.20644
-0.661964 1.08817 1.2081
0.247142 1.08817 1.0895
0.413804 1.08817 1.04951
0.413804 -1.08817 1.04951
0.580474 -1.08817 1.08424
0.580474 1.08817 1.08424
0.733932 1.08817 1.28801
0.733927 -1.08817 1.28801
0.189261 -1.08817 1.21685
-0.723994 -1.08817 1.28994
-0.723994 1.08817 1.28994
0.189261 1.08817 1.21685
0.390654 1.08816 1.17685
0.390654 -1.08817 1.17685
0.638354 -1.08817 1.25788
0.638354 1.08817 1.25788
0.666104 1.08817 1.35049
0.666104 -1.08817 1.35049
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.670682 0
1 0.0430446 0.000216054
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
3 0.670682 1
0 0.670682 0
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
4 0.785785 1
0 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
5 0.785785 0
0 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
6 0.900887 0
5 0.785785 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
9 1 0
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 4
0 0.670682 0
10 0.630709 0
11 0 0.000324094
1 0.0430446 0.000216054
SURF 0x10
mat 0
refs 4
2 0.0428392 0.999303
12 0 0.998606
13 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
13 0.630709 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
9 1 0
19 0.960026 0
16 0.940861 0
6 0.900887 0
SURF 0x30
mat 0
refs 4
12 0 0.998606
2 0.0428392 0.999303
1 0.0430446 0.000216054
11 0 0.000324094
kids 0
OBJECT poly
name "mesh"
loc 0.724976 1.20186 -1.33573
texture "../images/homework.rgb"
texoff -0.02 0
numvert 20
-0.142032 1.08817 0.0707934
-0.143624 -1.08816 0.0702209
-0.699298 -1.08816 0.798807
-0.699293 1.08817 0.79881
-0.817265 1.08817 0.923148
-0.817271 -1.08816 0.923144
-0.870526 -1.08816 1.08485
-0.870527 1.08817 1.08485
-0.761829 1.08817 1.31332
-0.761829 -1.08816 1.31332
-0.0401483 -1.08816 0.0579898
-0.560077 -1.08816 0.81235
-0.560073 1.08817 0.812352
-0.0401469 1.08817 0.0579908
-0.695416 1.08817 0.966764
-0.695415 -1.08816 0.966764
-0.749089 -1.08816 1.2218
-0.749085 1.08817 1.2218
-0.682765 1.08817 1.29213
-0.682761 -1.08816 1.29213
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
1 0.0430446 0.000216054
2 0.670682 0
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
2 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
3 0.670682 1
2 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
4 0.785785 1
2 0.670682 0
5 0.785785 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
5 0.785785 0
6 0.900887 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
9 1 0
SURF 0x10
mat 0
refs 4
1 0.0430446 0.000216054
10 0 0.000324094
11 0.630709 0
2 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
12 0.630709 1
13 0 0.998606
0 0.0428392 0.999303
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
12 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
19 0.960026 0
9 1 0
SURF 0x30
mat 0
refs 4
10 0 0.000324094
1 0.0430446 0.000216054
0 0.0428392 0.999303
13 0 0.998606
kids 0

241
contrib/closedbook.ac Normal file
View File

@@ -0,0 +1,241 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 1 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 7
OBJECT poly
name "box"
loc -0.9 0.05 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.9 0.35 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.15 0.20203 -1.05
numvert 8
-0.05 -0.15 -1.15
-0.05 0.15 -1.15
0.05 0.15 -1.15
0.05 -0.15 -1.15
-0.05 -0.15 1.15
-0.05 0.15 1.15
0.05 0.15 1.15
0.05 -0.15 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 -1.05
-0.65 0.1 -1.05
0.65 0.1 -1.05
0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 0.1 1.05
0.65 -0.1 1.05
0.65 -0.1 -1.05
0.65 0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 0 1
1 0 0
2 1 0
3 1 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 -0.1 1.05
0.65 0.1 1.05
-0.65 0.1 1.05
-0.65 -0.1 1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 1.05
-0.65 0.1 1.05
-0.65 0.1 -1.05
-0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0

Binary file not shown.

View File

@@ -0,0 +1,78 @@
#
# Track itself.
#
"geekopeak.ac",0,0,0,0,0,0
#
"tree1.ac",0,35,{},90,{},{}
"tree1.ac",-10,35,{},90,{},{}
"tree1.ac",-20,35,{},90,{},{}
"tree1.ac",-30,35,{},90,{},{}
"tree1.ac",-40,38,{},90,{},{}
"tree1.ac",-50,38,{},90,{},{}
"tree1.ac",-60,38,{},90,{},{}
"tree1.ac",-70,38,{},90,{},{}
"tree1.ac",-80,40,{},90,{},{}
"tree1.ac",-90,40,{},90,{},{}
"tree1.ac",-100,40,{},90,{},{}
"tree1.ac",-110,40,{},90,{},{}
"tree1.ac",-120,40,{},90,{},{}
"tree1.ac",-130,36,{},90,{},{}
"tree1.ac",-140,36,{},90,{},{}
#"tree1.ac",-45,-35,{},90,{},{}
#"tree1.ac",-152,-25,{},180,{},{}
#"tree1.ac",-50,-90,{},90,{},{}
#"tree1.ac",-15,-60,{},180,{},{}
#
#"roadblock.ac",60,-29,{},0,{},{}
#"roadcone.ac",58,-33,{},27,{},{}
#"roadcone.ac",56,-34,{},147,{},{}
#"roadcone.ac",54,-35,{},47,{},{}
#"icecreamtruck.ac",70,-30,{},-110,{},{}
#"mytruck.ac",-60,105,{},-100,{},{}
#
#"multisign.ac",26,85,{},-55,{},{}
#"multisign.ac",110,-90,{},-125,{},{}
#"tuxsign.ac",-30,80,0,45,0,0
#"vasign.ac",30,100,0,-90,0,0
#"susesign.ac",130,-40,5,-90,0,0
#
#"explode.ac",0,0,1,0,0,0
#
YHERRING,-115,-95
RHERRING,0,25
RHERRING,-60,30
RHERRING,-60,33
RHERRING,-60,27
RHERRING,-150,-20
RHERRING,-150,-40
RHERRING,-150,-60
RHERRING,-150,-80
RHERRING,-150,-100
RHERRING,-30,-110
RHERRING,-30,-113
RHERRING,-33,-110
RHERRING,-33,-113
RHERRING,20,-65
RHERRING,20,-90
SHERRING,70,-70
SHERRING,70,-80
SHERRING,70,-90
SHERRING,70,-100
GHERRING,0,-30
GHERRING,5,-30
GHERRING,-5,-30
GHERRING,-100,-10
GHERRING,-100,-20
GHERRING,-100,-30
GHERRING,-100,-40
MUSIC "mods/tk2.mod"

View File

@@ -0,0 +1,20 @@
This directory contains the following files:
tree1.blend
A tree, created in blender 2.33a.
(1349 Verticies, 708 Faces, 14 Objects.)
umbrella1.blend
An umbrella, created in blender 2.33a.
For the beach level(s) of tuxkart.
I haven't scaled it to the correct size yet.
umbrella1.jpg
Rendered image of 'umbrealla1.blend'.
tree1.ac
'tree1.blend' in AC format, created by blender's AC3DExport
version 2.32-1. Place this file in tuxkart 'model' directory.
geekopeak.loc
An updated 'Geeko's Peak' track location file that includes the
'tree1.ac' model. Place this file in tuxkart 'data' directory.
Used for testing and demonstration purposes.
Craig Keogh
<cskeogh@bigpond.net.au>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

6200
contrib/cskeogh/tree1.ac Normal file

File diff suppressed because it is too large Load Diff

BIN
contrib/cskeogh/tree1.blend Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

37
contrib/drvsorter.rb Normal file
View File

@@ -0,0 +1,37 @@
def dist(p1, p2)
return Math.sqrt((p2[0] - p1[0])**2 +(p2[1] - p1[1])**2)
end
f = File.new("/tmp/test.drv", "r")
points = []
while !f.eof?
line = f.readline()
(x, y) = line.scan(/(.*),(.*)/)[0]
x = x.to_f
y = y.to_f
points.push([x, y])
end
ppoints = points.clone()
p1 = points.pop
while !points.empty?
print p1[0], ", ", p1[1], "\n"
min_dist = 9999999999
min_dist_i = -1
points.each_index{|i|
p2 = points[i]
if (dist(p1, p2) < min_dist)
min_dist = dist(p1, p2)
min_dist_i = i
end
}
p1 = points[min_dist_i]
points.delete_at(min_dist_i)
end
print p1[0], ", ", p1[1], "\n"
# EOF #

4545
contrib/geekokart.ac Normal file

File diff suppressed because it is too large Load Diff

3717
contrib/gownkart.ac Normal file

File diff suppressed because it is too large Load Diff

324
contrib/lunchbox.ac Normal file
View File

@@ -0,0 +1,324 @@
AC3Db
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 2
OBJECT poly
name "line"
loc -0.0499999 1.7 -0.0500001
texture "./../images/lunchbox.rgb"
texrep 0.9 0.8
texoff 0.07 -0.02
numvert 26
0.55 -0.6 -1.05
0.55 -0.884701 2.11252
0.55 0.884701 2.11252
-0.55 -0.884701 2.11252
-0.55 0.884701 2.11252
-0.55 -0.6 -1.05
0.55 -1.37782 1.82782
-0.55 -1.37782 1.82782
0.55 -1.66252 1.3347
-0.55 -1.66252 1.3347
0.55 -1.66252 -1.3347
-0.55 -1.66252 -1.3347
0.55 -1.37782 -1.82782
-0.55 -1.37782 -1.82782
0.55 -0.884701 -2.11252
-0.55 -0.884701 -2.11252
0.55 0.884701 -2.11252
-0.55 0.884701 -2.11252
0.55 1.37782 -1.82782
-0.55 1.37782 -1.82782
0.55 1.66252 -1.3347
-0.55 1.66252 -1.3347
0.55 1.66252 1.3347
-0.55 1.66252 1.3347
0.55 1.37782 1.82782
-0.55 1.37782 1.82782
numsurf 36
SURF 0x10
mat 1
refs 3
2 0 0.766073
1 5.64299e-08 0.233928
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
4 0 0
3 1 0
1 1 1
2 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
3 5.64299e-08 0.233928
4 0 0.766073
SURF 0x10
mat 1
refs 3
1 5.64299e-08 0.233928
6 0.0673843 0.0856234
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
3 0 0
7 1 0
6 1 1
1 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
7 0.0673843 0.0856234
3 5.64299e-08 0.233928
SURF 0x10
mat 1
refs 3
6 0.0673843 0.0856234
8 0.184097 3.5852e-08
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
7 0 0
9 1 0
8 1 1
6 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
9 0.184097 3.5852e-08
7 0.0673843 0.0856234
SURF 0x10
mat 1
refs 3
8 0.184097 3.5852e-08
10 0.815903 7.1704e-08
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
9 0 0
11 1 0
10 1 1
8 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
11 0.815903 7.1704e-08
9 0.184097 3.5852e-08
SURF 0x10
mat 1
refs 3
10 0.815903 7.1704e-08
12 0.932616 0.0856234
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
11 0 0
13 1 0
12 1 1
10 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
13 0.932616 0.0856234
11 0.815903 7.1704e-08
SURF 0x10
mat 1
refs 3
12 0.932616 0.0856234
14 1 0.233928
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
13 0 0
15 1 0
14 1 1
12 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
15 1 0.233928
13 0.932616 0.0856234
SURF 0x10
mat 1
refs 3
14 1 0.233928
16 1 0.766073
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
15 1 0
17 0 0
16 0 1
14 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
17 1 0.766073
15 1 0.233928
SURF 0x10
mat 1
refs 3
16 1 0.766073
18 0.932616 0.914377
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
17 1 0
19 0 0
18 0 1
16 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
19 0.932616 0.914377
17 1 0.766073
SURF 0x10
mat 1
refs 3
18 0.932616 0.914377
20 0.815903 1
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
19 1 0
21 0 0
20 0 1
18 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
21 0.815903 1
19 0.932616 0.914377
SURF 0x10
mat 1
refs 3
20 0.815903 1
22 0.184097 1
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
21 1 0
23 0 0
22 0 1
20 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
23 0.184097 1
21 0.815903 1
SURF 0x10
mat 1
refs 3
22 0.184097 1
24 0.0673842 0.914377
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
23 1 0
25 0 0
24 0 1
22 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
25 0.0673842 0.914377
23 0.184097 1
SURF 0x10
mat 1
refs 3
24 0.0673842 0.914377
2 0 0.766073
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
25 1 0
4 0 0
2 0 1
24 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
4 0 0.766073
25 0.0673842 0.914377
kids 0
OBJECT poly
name "box"
loc -0.0499998 3.6 -0.15
numvert 8
-0.25 0.0999999 1.25
0.25 0.0999999 1.25
0.25 0.0999999 -1.25
-0.25 0.0999999 -1.25
-0.25 -0.0999999 1.25
0.25 -0.0999999 1.25
0.25 -0.0999999 -1.25
-0.25 -0.0999999 -1.25
numsurf 6
SURF 0x0
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 0
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x0
mat 0
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 0
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x0
mat 0
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x0
mat 0
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0

322
contrib/lunchbox2.ac Normal file
View File

@@ -0,0 +1,322 @@
AC3Db
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 2
OBJECT poly
name "line"
loc 0.0500001 1.6 0.25
texture "./../images/lunchbox2.rgb"
numvert 26
0.55 -0.6 -1.05
0.55 -0.884701 2.11252
0.55 0.884701 2.11252
-0.55 -0.884701 2.11252
-0.55 0.884701 2.11252
-0.55 -0.6 -1.05
0.55 -1.37782 1.82782
-0.55 -1.37782 1.82782
0.55 -1.66252 1.3347
-0.55 -1.66252 1.3347
0.55 -1.66252 -1.3347
-0.55 -1.66252 -1.3347
0.55 -1.37782 -1.82782
-0.55 -1.37782 -1.82782
0.55 -0.884701 -2.11252
-0.55 -0.884701 -2.11252
0.55 0.884701 -2.11252
-0.55 0.884701 -2.11252
0.55 1.37782 -1.82782
-0.55 1.37782 -1.82782
0.55 1.66252 -1.3347
-0.55 1.66252 -1.3347
0.55 1.66252 1.3347
-0.55 1.66252 1.3347
0.55 1.37782 1.82782
-0.55 1.37782 1.82782
numsurf 36
SURF 0x10
mat 1
refs 3
2 0 0.766073
1 5.64299e-08 0.233928
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
4 0 0
3 1 0
1 1 1
2 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
3 5.64299e-08 0.233928
4 0 0.766073
SURF 0x10
mat 1
refs 3
1 5.64299e-08 0.233928
6 0.0673843 0.0856234
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
3 0 0
7 1 0
6 1 1
1 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
7 0.0673843 0.0856234
3 5.64299e-08 0.233928
SURF 0x10
mat 1
refs 3
6 0.0673843 0.0856234
8 0.184097 3.5852e-08
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
7 0 0
9 1 0
8 1 1
6 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
9 0.184097 3.5852e-08
7 0.0673843 0.0856234
SURF 0x10
mat 1
refs 3
8 0.184097 3.5852e-08
10 0.815903 7.1704e-08
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
9 0 0
11 1 0
10 1 1
8 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
11 0.815903 7.1704e-08
9 0.184097 3.5852e-08
SURF 0x10
mat 1
refs 3
10 0.815903 7.1704e-08
12 0.932616 0.0856234
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
11 0 0
13 1 0
12 1 1
10 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
13 0.932616 0.0856234
11 0.815903 7.1704e-08
SURF 0x10
mat 1
refs 3
12 0.932616 0.0856234
14 1 0.233928
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
13 0 0
15 1 0
14 1 1
12 0 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
15 1 0.233928
13 0.932616 0.0856234
SURF 0x10
mat 1
refs 3
14 1 0.233928
16 1 0.766073
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
15 1 0
17 0 0
16 0 1
14 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
17 1 0.766073
15 1 0.233928
SURF 0x10
mat 1
refs 3
16 1 0.766073
18 0.932616 0.914377
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
17 1 0
19 0 0
18 0 1
16 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
19 0.932616 0.914377
17 1 0.766073
SURF 0x10
mat 1
refs 3
18 0.932616 0.914377
20 0.815903 1
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
19 1 0
21 0 0
20 0 1
18 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
21 0.815903 1
19 0.932616 0.914377
SURF 0x10
mat 1
refs 3
20 0.815903 1
22 0.184097 1
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
21 1 0
23 0 0
22 0 1
20 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
23 0.184097 1
21 0.815903 1
SURF 0x10
mat 1
refs 3
22 0.184097 1
24 0.0673842 0.914377
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
23 1 0
25 0 0
24 0 1
22 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
25 0.0673842 0.914377
23 0.184097 1
SURF 0x10
mat 1
refs 3
24 0.0673842 0.914377
2 0 0.766073
0 0.748519 0.319551
SURF 0x10
mat 1
refs 4
25 1 0
4 0 0
2 0 1
24 1 1
SURF 0x10
mat 1
refs 3
5 0.748519 0.319551
4 0 0.766073
25 0.0673842 0.914377
kids 0
OBJECT poly
name "box"
loc 0.0500002 3.5 0.15
numvert 8
-0.25 0.0999999 1.25
0.25 0.0999999 1.25
0.25 0.0999999 -1.25
-0.25 0.0999999 -1.25
-0.25 -0.0999999 1.25
0.25 -0.0999999 1.25
0.25 -0.0999999 -1.25
-0.25 -0.0999999 -1.25
numsurf 6
SURF 0x0
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 0
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x0
mat 0
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 0
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x0
mat 0
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x0
mat 0
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0

16559
contrib/nolokkart.ac Normal file

File diff suppressed because it is too large Load Diff

13676
contrib/old_tuxkart.ac Normal file

File diff suppressed because it is too large Load Diff

468
contrib/openbook.ac Normal file
View File

@@ -0,0 +1,468 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 1 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 3
OBJECT poly
name "box"
loc 0 1.21271 -1.16783
numvert 24
0.889244 1.16215 -0.166283
0.802644 1.16214 -0.216282
0.00623977 1.16214 1.05596
0.0928401 1.16215 1.10596
0.889247 -1.13786 -0.166282
0.802644 -1.13786 -0.216282
0.00624018 -1.13786 1.05597
0.0928425 -1.13786 1.10597
-0.1 1.16215 1.2173
-0.1 1.16214 1.1173
-1.6 1.16214 1.17089
-1.6 1.16215 1.27088
-0.1 -1.13786 1.2173
-0.1 -1.13786 1.1173
-1.6 -1.13786 1.17089
-1.6 -1.13786 1.27089
0.166074 1.14416 1.0949
0.0875697 1.14415 1.04957
-0.17794 1.14415 1.18454
-0.17794 1.14416 1.27519
0.166069 -1.1711 1.0949
0.0875686 -1.1711 1.04957
-0.17794 -1.1711 1.18454
-0.17794 -1.1711 1.27518
numsurf 18
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
SURF 0x10
mat 1
refs 4
8 1 0
9 1 1
10 0 1
11 0 0
SURF 0x10
mat 1
refs 4
14 0 1
15 0 0
11 1 0
10 1 1
SURF 0x10
mat 1
refs 4
15 1 0
14 1 1
13 0 1
12 0 0
SURF 0x10
mat 1
refs 4
12 1 0
13 1 1
9 0 1
8 0 0
SURF 0x10
mat 1
refs 4
9 0 0
13 1 0
14 1 1
10 0 1
SURF 0x10
mat 1
refs 4
12 0 0
8 1 0
11 1 1
15 0 1
SURF 0x10
mat 1
refs 4
16 1 0
17 1 1
18 0 1
19 0 0
SURF 0x10
mat 1
refs 4
22 0 1
23 0 0
19 1 0
18 1 1
SURF 0x10
mat 1
refs 4
23 1 0
22 1 1
21 0 1
20 0 0
SURF 0x10
mat 1
refs 4
20 1 0
21 1 1
17 0 1
16 0 0
SURF 0x10
mat 1
refs 4
17 0 0
21 1 0
22 1 1
18 0 1
SURF 0x10
mat 1
refs 4
20 0 0
16 1 0
19 1 1
23 0 1
kids 0
OBJECT poly
name "mesh"
loc -0.724976 1.1989 -1.28171
texture "../images/homework.rgb"
texrep -1 1
texoff -0.02 0
numvert 20
0.247142 -1.08817 1.08951
-0.661664 -1.08817 1.20644
-0.661964 1.08817 1.2081
0.247142 1.08817 1.0895
0.413804 1.08817 1.04951
0.413804 -1.08817 1.04951
0.580474 -1.08817 1.08424
0.580474 1.08817 1.08424
0.733932 1.08817 1.28801
0.733927 -1.08817 1.28801
0.189261 -1.08817 1.21685
-0.723994 -1.08817 1.28994
-0.723994 1.08817 1.28994
0.189261 1.08817 1.21685
0.390654 1.08816 1.17685
0.390654 -1.08817 1.17685
0.638354 -1.08817 1.25788
0.638354 1.08817 1.25788
0.666104 1.08817 1.35049
0.666104 -1.08817 1.35049
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.670682 0
1 0.0430446 0.000216054
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
3 0.670682 1
0 0.670682 0
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
4 0.785785 1
0 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
5 0.785785 0
0 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
6 0.900887 0
5 0.785785 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
9 1 0
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 4
0 0.670682 0
10 0.630709 0
11 0 0.000324094
1 0.0430446 0.000216054
SURF 0x10
mat 0
refs 4
2 0.0428392 0.999303
12 0 0.998606
13 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
13 0.630709 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
9 1 0
19 0.960026 0
16 0.940861 0
6 0.900887 0
SURF 0x30
mat 0
refs 4
12 0 0.998606
2 0.0428392 0.999303
1 0.0430446 0.000216054
11 0 0.000324094
kids 0
OBJECT poly
name "mesh"
loc 0.724976 1.20186 -1.33573
texture "../images/homework.rgb"
texoff -0.02 0
numvert 20
-0.142032 1.08817 0.0707934
-0.143624 -1.08816 0.0702209
-0.699298 -1.08816 0.798807
-0.699293 1.08817 0.79881
-0.817265 1.08817 0.923148
-0.817271 -1.08816 0.923144
-0.870526 -1.08816 1.08485
-0.870527 1.08817 1.08485
-0.761829 1.08817 1.31332
-0.761829 -1.08816 1.31332
-0.0401483 -1.08816 0.0579898
-0.560077 -1.08816 0.81235
-0.560073 1.08817 0.812352
-0.0401469 1.08817 0.0579908
-0.695416 1.08817 0.966764
-0.695415 -1.08816 0.966764
-0.749089 -1.08816 1.2218
-0.749085 1.08817 1.2218
-0.682765 1.08817 1.29213
-0.682761 -1.08816 1.29213
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
1 0.0430446 0.000216054
2 0.670682 0
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
2 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
3 0.670682 1
2 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
4 0.785785 1
2 0.670682 0
5 0.785785 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
5 0.785785 0
6 0.900887 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
9 1 0
SURF 0x10
mat 0
refs 4
1 0.0430446 0.000216054
10 0 0.000324094
11 0.630709 0
2 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
12 0.630709 1
13 0 0.998606
0 0.0428392 0.999303
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
12 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
19 0.960026 0
9 1 0
SURF 0x30
mat 0
refs 4
10 0 0.000324094
1 0.0430446 0.000216054
0 0.0428392 0.999303
13 0 0.998606
kids 0

5078
contrib/pennykart.ac Normal file

File diff suppressed because it is too large Load Diff

176
contrib/plibsign.ac Normal file
View File

@@ -0,0 +1,176 @@
AC3Db
MATERIAL "" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "" rgb 0.553 0.251 0.251 amb 0.553 0.2 0.2 emis 0 0 0 spec 0 0 0 shi 0 trans 0
OBJECT world
kids 2
OBJECT poly
name "box"
loc 1.20452 0.8493 0.567803
texture "../images/adverts.rgb"
texrep -0.4 0.22
texoff -0.58 0
numvert 4
-7.10453 5.1014 -1.22962
-7.10453 12.0986 -1.22962
4.89547 12.0986 -1.22962
4.89547 5.1014 -1.22962
numsurf 1
SURF 0x0
mat 0
refs 4
0 0 0
1 0 1
2 1 1
3 1 0
kids 0
OBJECT poly
name "box"
loc 0.0999994 7.1169 -0.0794191
texrep -0.4 0.22
texoff -0.58 0
numvert 24
-3.44376 -7.731 0.5824
-3.34376 5.7972 0.5824
-3.87616 5.7972 0.5824
-3.97616 -7.731 0.5824
-3.87616 5.7972 0.0500004
-3.97616 -7.731 0.0500004
-3.34376 5.7972 0.0500001
-3.44376 -7.731 0.0500001
5.99998 -1.1662 -0.049999
5.99998 5.831 -0.049999
-5.99998 5.831 -0.0499999
-5.99998 -1.1662 -0.0499999
-6 5.831 -0.582399
-6 -1.1662 -0.582399
6 -1.1662 -0.5824
6 5.831 -0.5824
3.85624 -7.731 0.5824
3.95624 5.7972 0.5824
3.42384 5.7972 0.5824
3.32384 -7.731 0.5824
3.42384 5.7972 0.0500003
3.32384 -7.731 0.0500003
3.85624 -7.731 0.0500001
3.95624 5.7972 0.0500001
numsurf 17
SURF 0x0
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 1
refs 4
4 0 1
5 0 0
3 1 0
2 1 1
SURF 0x0
mat 1
refs 4
5 1 0
4 1 1
6 0 1
7 0 0
SURF 0x0
mat 1
refs 4
7 1 0
6 1 1
1 0 1
0 0 0
SURF 0x0
mat 1
refs 4
1 0 0
6 1 0
4 1 1
2 0 1
SURF 0x0
mat 1
refs 4
7 0 0
0 1 0
3 1 1
5 0 1
SURF 0x0
mat 1
refs 4
8 1 0
9 1 1
10 0 1
11 0 0
SURF 0x0
mat 1
refs 4
12 0 1
13 0 0
11 1 0
10 1 1
SURF 0x0
mat 1
refs 4
14 1 0
15 1 1
9 0 1
8 0 0
SURF 0x0
mat 1
refs 4
9 0 0
15 1 0
12 1 1
10 0 1
SURF 0x0
mat 1
refs 4
14 0 0
8 1 0
11 1 1
13 0 1
SURF 0x0
mat 1
refs 4
16 1 0
17 1 1
18 0 1
19 0 0
SURF 0x0
mat 1
refs 4
20 0 1
21 0 0
19 1 0
18 1 1
SURF 0x0
mat 1
refs 4
22 1 0
23 1 1
17 0 1
16 0 0
SURF 0x0
mat 1
refs 4
17 0 0
23 1 0
20 1 1
18 0 1
SURF 0x0
mat 1
refs 4
22 0 0
16 1 0
19 1 1
21 0 1
SURF 0x0
mat 1
refs 4
21 1 0
20 1 1
23 0 1
22 0 0
kids 0

BIN
contrib/railroadtrack.rgb Normal file

Binary file not shown.

BIN
contrib/start.rgb Normal file

Binary file not shown.

1058
contrib/truck1.ac Normal file

File diff suppressed because it is too large Load Diff

BIN
contrib/tuxkarttex.rgb Normal file

Binary file not shown.

BIN
contrib/tuxtex.rgb Normal file

Binary file not shown.

230
contrib/tv.ac Normal file
View File

@@ -0,0 +1,230 @@
AC3Db
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 4
OBJECT poly
name "box"
loc -0.168385 1.225 0.308664
texture "../images/tv.rgb"
numvert 8
-0.408137 -1.225 -1.41983
-0.408137 1.225 -1.41983
1.32739 1.225 0.648488
1.32739 -1.225 0.648488
-1.32739 -1.225 -0.648488
-1.32739 1.225 -0.648488
0.408137 1.225 1.41983
0.408137 -1.225 1.41983
numsurf 6
SURF 0x0
mat 1
refs 4
0 0 0
1 0 1
2 1 1
3 1 0
SURF 0x0
mat 1
refs 4
6 1 1
7 1 0
3 1 0
2 1 1
SURF 0x0
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 1
refs 4
4 0 0
5 0 1
1 0 1
0 0 0
SURF 0x0
mat 1
refs 4
1 0 1
5 0 1
6 1 1
2 1 1
SURF 0x0
mat 1
refs 4
4 0 0
0 0 0
3 1 0
7 1 0
kids 0
OBJECT poly
name "box"
loc -0.168385 -0.15 0.308664
numvert 8
-0.46009 -0.15 -1.63732
-0.46009 0.15 -1.63732
1.53255 0.15 0.737418
1.53255 -0.15 0.737418
-1.53255 -0.15 -0.737418
-1.53255 0.15 -0.737418
0.46009 0.15 1.63732
0.46009 -0.15 1.63732
numsurf 6
SURF 0x0
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 0
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x0
mat 0
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 0
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x0
mat 0
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x0
mat 0
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc 0.870173 2.6 0.0898512
numvert 8
0.7 -0.1 -0.1
0.7 0.0999999 -0.1
0.7 0.0999999 0.0999999
0.7 -0.1 0.0999999
-0.7 -0.1 -0.1
-0.7 0.0999999 -0.1
-0.7 0.0999999 0.1
-0.7 -0.1 0.1
numsurf 6
SURF 0x0
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 0
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x0
mat 0
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 0
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x0
mat 0
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x0
mat 0
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc 0.138033 2.525 0.0515489
numvert 8
-0.791159 -0.125 -1.09844
-0.791159 0.125 -1.09844
0.944368 0.125 0.969881
0.944368 -0.125 0.969881
-0.944368 -0.125 -0.969881
-0.944368 0.125 -0.969881
0.791159 0.125 1.09844
0.791159 -0.125 1.09844
numsurf 6
SURF 0x0
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x0
mat 0
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x0
mat 0
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x0
mat 0
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x0
mat 0
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x0
mat 0
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0

View File

@@ -0,0 +1,241 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 1 1 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.502 0.502 0.502 shi 10 trans 0
OBJECT world
kids 7
OBJECT poly
name "box"
loc -0.9 0.05 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.9 0.35 -1.05
numvert 8
-0.7 -0.05 -1.15
-0.7 0.05 -1.15
0.7 0.05 -1.15
0.7 -0.05 -1.15
-0.7 -0.05 1.15
-0.7 0.05 1.15
0.7 0.05 1.15
0.7 -0.05 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.15 0.20203 -1.05
numvert 8
-0.05 -0.15 -1.15
-0.05 0.15 -1.15
0.05 0.15 -1.15
0.05 -0.15 -1.15
-0.05 -0.15 1.15
-0.05 0.15 1.15
0.05 0.15 1.15
0.05 -0.15 1.15
numsurf 6
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 -1.05
-0.65 0.1 -1.05
0.65 0.1 -1.05
0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 0.1 1.05
0.65 -0.1 1.05
0.65 -0.1 -1.05
0.65 0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 0 1
1 0 0
2 1 0
3 1 1
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
0.65 -0.1 1.05
0.65 0.1 1.05
-0.65 0.1 1.05
-0.65 -0.1 1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc -0.85 0.2 -1.05
numvert 4
-0.65 -0.1 1.05
-0.65 0.1 1.05
-0.65 0.1 -1.05
-0.65 -0.1 -1.05
numsurf 1
SURF 0x10
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0

468
contrib/yellow_openbook.ac Normal file
View File

@@ -0,0 +1,468 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "ac3dmat3" rgb 1 1 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.502 0.502 0.502 shi 10 trans 0
OBJECT world
kids 3
OBJECT poly
name "box"
loc 0 1.21271 -1.16783
numvert 24
0.889244 1.16215 -0.166283
0.802644 1.16214 -0.216282
0.00623977 1.16214 1.05596
0.0928401 1.16215 1.10596
0.889247 -1.13786 -0.166282
0.802644 -1.13786 -0.216282
0.00624018 -1.13786 1.05597
0.0928425 -1.13786 1.10597
-0.1 1.16215 1.2173
-0.1 1.16214 1.1173
-1.6 1.16214 1.17089
-1.6 1.16215 1.27088
-0.1 -1.13786 1.2173
-0.1 -1.13786 1.1173
-1.6 -1.13786 1.17089
-1.6 -1.13786 1.27089
0.166074 1.14416 1.0949
0.0875697 1.14415 1.04957
-0.17794 1.14415 1.18454
-0.17794 1.14416 1.27519
0.166069 -1.1711 1.0949
0.0875686 -1.1711 1.04957
-0.17794 -1.1711 1.18454
-0.17794 -1.1711 1.27518
numsurf 18
SURF 0x10
mat 1
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
SURF 0x10
mat 1
refs 4
6 0 1
7 0 0
3 1 0
2 1 1
SURF 0x10
mat 1
refs 4
7 1 0
6 1 1
5 0 1
4 0 0
SURF 0x10
mat 1
refs 4
4 1 0
5 1 1
1 0 1
0 0 0
SURF 0x10
mat 1
refs 4
1 0 0
5 1 0
6 1 1
2 0 1
SURF 0x10
mat 1
refs 4
4 0 0
0 1 0
3 1 1
7 0 1
SURF 0x10
mat 1
refs 4
8 1 0
9 1 1
10 0 1
11 0 0
SURF 0x10
mat 1
refs 4
14 0 1
15 0 0
11 1 0
10 1 1
SURF 0x10
mat 1
refs 4
15 1 0
14 1 1
13 0 1
12 0 0
SURF 0x10
mat 1
refs 4
12 1 0
13 1 1
9 0 1
8 0 0
SURF 0x10
mat 1
refs 4
9 0 0
13 1 0
14 1 1
10 0 1
SURF 0x10
mat 1
refs 4
12 0 0
8 1 0
11 1 1
15 0 1
SURF 0x10
mat 1
refs 4
16 1 0
17 1 1
18 0 1
19 0 0
SURF 0x10
mat 1
refs 4
22 0 1
23 0 0
19 1 0
18 1 1
SURF 0x10
mat 1
refs 4
23 1 0
22 1 1
21 0 1
20 0 0
SURF 0x10
mat 1
refs 4
20 1 0
21 1 1
17 0 1
16 0 0
SURF 0x10
mat 1
refs 4
17 0 0
21 1 0
22 1 1
18 0 1
SURF 0x10
mat 1
refs 4
20 0 0
16 1 0
19 1 1
23 0 1
kids 0
OBJECT poly
name "mesh"
loc -0.724976 1.1989 -1.28171
texture "../images/homework.rgb"
texrep -1 1
texoff -0.02 0
numvert 20
0.247142 -1.08817 1.08951
-0.661664 -1.08817 1.20644
-0.661964 1.08817 1.2081
0.247142 1.08817 1.0895
0.413804 1.08817 1.04951
0.413804 -1.08817 1.04951
0.580474 -1.08817 1.08424
0.580474 1.08817 1.08424
0.733932 1.08817 1.28801
0.733927 -1.08817 1.28801
0.189261 -1.08817 1.21685
-0.723994 -1.08817 1.28994
-0.723994 1.08817 1.28994
0.189261 1.08817 1.21685
0.390654 1.08816 1.17685
0.390654 -1.08817 1.17685
0.638354 -1.08817 1.25788
0.638354 1.08817 1.25788
0.666104 1.08817 1.35049
0.666104 -1.08817 1.35049
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.670682 0
1 0.0430446 0.000216054
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
3 0.670682 1
0 0.670682 0
2 0.0428392 0.999303
SURF 0x10
mat 0
refs 3
4 0.785785 1
0 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
5 0.785785 0
0 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
6 0.900887 0
5 0.785785 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
9 1 0
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 4
0 0.670682 0
10 0.630709 0
11 0 0.000324094
1 0.0430446 0.000216054
SURF 0x10
mat 0
refs 4
2 0.0428392 0.999303
12 0 0.998606
13 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
13 0.630709 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
10 0.630709 0
0 0.670682 0
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
9 1 0
19 0.960026 0
16 0.940861 0
6 0.900887 0
SURF 0x30
mat 0
refs 4
12 0 0.998606
2 0.0428392 0.999303
1 0.0430446 0.000216054
11 0 0.000324094
kids 0
OBJECT poly
name "mesh"
loc 0.724976 1.20186 -1.33573
texture "../images/homework.rgb"
texoff -0.02 0
numvert 20
-0.142032 1.08817 0.0707934
-0.143624 -1.08816 0.0702209
-0.699298 -1.08816 0.798807
-0.699293 1.08817 0.79881
-0.817265 1.08817 0.923148
-0.817271 -1.08816 0.923144
-0.870526 -1.08816 1.08485
-0.870527 1.08817 1.08485
-0.761829 1.08817 1.31332
-0.761829 -1.08816 1.31332
-0.0401483 -1.08816 0.0579898
-0.560077 -1.08816 0.81235
-0.560073 1.08817 0.812352
-0.0401469 1.08817 0.0579908
-0.695416 1.08817 0.966764
-0.695415 -1.08816 0.966764
-0.749089 -1.08816 1.2218
-0.749085 1.08817 1.2218
-0.682765 1.08817 1.29213
-0.682761 -1.08816 1.29213
numsurf 19
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
1 0.0430446 0.000216054
2 0.670682 0
SURF 0x10
mat 0
refs 3
0 0.0428392 0.999303
2 0.670682 0
3 0.670682 1
SURF 0x10
mat 0
refs 3
3 0.670682 1
2 0.670682 0
4 0.785785 1
SURF 0x10
mat 0
refs 3
4 0.785785 1
2 0.670682 0
5 0.785785 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
5 0.785785 0
6 0.900887 0
SURF 0x10
mat 0
refs 3
4 0.785785 1
6 0.900887 0
7 0.900887 1
SURF 0x10
mat 0
refs 3
7 0.900887 1
6 0.900887 0
8 1 1
SURF 0x10
mat 0
refs 3
8 1 1
6 0.900887 0
9 1 0
SURF 0x10
mat 0
refs 4
1 0.0430446 0.000216054
10 0 0.000324094
11 0.630709 0
2 0.670682 0
SURF 0x10
mat 0
refs 4
3 0.670682 1
12 0.630709 1
13 0 0.998606
0 0.0428392 0.999303
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
4 0.785785 1
14 0.769795 1
12 0.630709 1
3 0.670682 1
SURF 0x10
mat 0
refs 4
2 0.670682 0
11 0.630709 0
15 0.769795 0
5 0.785785 0
SURF 0x10
mat 0
refs 4
5 0.785785 0
15 0.769795 0
16 0.940861 0
6 0.900887 0
SURF 0x10
mat 0
refs 4
7 0.900887 1
17 0.940861 1
14 0.769795 1
4 0.785785 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
18 0.960026 1
8 1 1
SURF 0x10
mat 0
refs 4
8 1 1
18 0.960026 1
17 0.940861 1
7 0.900887 1
SURF 0x10
mat 0
refs 4
6 0.900887 0
16 0.940861 0
19 0.960026 0
9 1 0
SURF 0x30
mat 0
refs 4
10 0 0.000324094
1 0.0430446 0.000216054
0 0.0428392 0.999303
13 0 0.998606
kids 0

Binary file not shown.

25
data/Makefile.am Normal file
View File

@@ -0,0 +1,25 @@
# data/
SUBDIRS = challenges fonts gfx gui karts models music po sfx textures tracks \
grandprix tutorials shaders
pkgdatadir = $(datadir)/games/$(PACKAGE)/data
dist_pkgdata_DATA = \
$(shell find $(srcdir) -maxdepth 1 -name "*.challenge") \
stk_config.xml powerup.xml items.xml \
CREDITS run_me.sh
desktopdir = $(prefix)/share/applications
desktop_DATA = supertuxkart.desktop
icondir = $(prefix)/share/pixmaps
dist_icon_DATA = supertuxkart_32.xpm supertuxkart_64.xpm
# The desktop file needs the absolute path to the binary
# since e.g. /usr/games might not be in the standard path
EXTRA_DIST = supertuxkart_desktop.template
CLEANFILES = supertuxkart.desktop
supertuxkart.desktop: Makefile supertuxkart_desktop.template
sed 's#PREFIX#$(prefix)#' $(srcdir)/supertuxkart_desktop.template|sed 's#VERSION#@VERSION@#' >supertuxkart.desktop

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>SuperTuxKart</string>
<key>CFBundleExecutable</key>
<string>supertuxkart</string>
<key>CFBundleIdentifier</key>
<string>net.supertuxkart.stkios</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SuperTuxKart </string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${PROJECT_VERSION}</string>
<key>CFBundleVersion</key>
<string>${IOS_BUILD_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UILaunchStoryboardName</key>
<string>launch_screen</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UIRequiresFullScreen</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>supertuxkart</string>
<key>CFBundleIconFile</key>
<string>supertuxkart.icns</string>
<key>CFBundleIdentifier</key>
<string>net.sourceforge.supertuxkart</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SuperTuxKart</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>SPTK</string>
<key>CFBundleVersion</key>
<string>${PROJECT_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More