3 Commits

Author SHA1 Message Date
hiker
9ef1b65eba Fixed compilation ... again :P 2015-06-25 23:03:55 +10:00
hiker
4d10a680c1 Fixed non-debug compilation. 2015-06-25 22:11:52 +10:00
hiker
b8e4aa589d Added a very rough logging feature for SFXs to debug bug #2169. 2015-06-25 16:54:47 +10:00
3095 changed files with 354622 additions and 634190 deletions

View File

@@ -1,58 +0,0 @@
environment:
DEPS_DIR: c:\\projects\dependencies
DEPS_BRANCH: master
ASSETS_DIR: c:\\projects\stk-assets
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=9
os: Visual Studio 2015
clone_depth: 1
shallow_clone: true
platform:
# - x86
- x64
configuration:
- Debug
- Release
matrix:
fast_finish: true
#cache:
# - '%DEPS_DIR%'
#- '%ASSETS_DIR%'
install:
- ps: >-
If(!(Test-Path "$env:DEPS_DIR")) {
Write-Host "Downloading dependencies";
Start-Process -FilePath "git" -ArgumentList "clone --branch $env:DEPS_BRANCH --single-branch --depth 1 https://github.com/supertuxkart/dependencies.git $env:DEPS_DIR" -Wait;
}
Else {
Write-Host "Updating dependencies";
Start-Process -FilePath "git" -ArgumentList "fetch --depth 1" -WorkingDirectory "$env:DEPS_DIR" -Wait;
}
Get-ChildItem $env:DEPS_DIR | Measure-Object -property length -sum
#- ps: >-
#If(!(Test-Path "$env:ASSETS_DIR")) {
# Write-Host "Downloading assets";
# Start-Process -FilePath "svn" -ArgumentList "checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets $env:ASSETS_DIR" -Wait;
#}
#Else {
# Write-Host "Updating assets";
# Start-Process -FilePath "svn" -ArgumentList "update" -WorkingDirectory "$env:ASSETS_DIR" -Wait;
#}
#Get-ChildItem $env:ASSETS_DIR | Measure-Object -property length -sum
before_build:
- ps: Copy-Item "${env:DEPS_DIR}\windows_64bit\dependencies" c:\projects\stk-code\dependencies-64bit Recurse
- cmd: |
md build
cd build
if "%platform%"=="x64" set CMAKE_GENERATOR_NAME="Visual Studio 14 2015 Win64"
cmake -G %CMAKE_GENERATOR_NAME% -DCMAKE_BUILD_TYPE="%configuration%" .. -DCHECK_ASSETS=OFF
build:
parallel: true
project: build\ALL_BUILD.vcxproj

View File

@@ -1,54 +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\0.8.2 (Windows)
* ~/Library/Application Support/supertuxkart/0.8.2 (mac)
* $XDG_CONFIG_HOME/supertuxkart/0.8.2 or ~/.config/supertuxkart/0.8.2 (Linux and other unix based systems)
Note that in the Git/beta version the folder is 0.10-git rather than 0.8.2.
-->
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:
```
```

26
.gitignore vendored
View File

@@ -1,15 +1,14 @@
bld*/
build*/
cmake_build/
cmake_build*/
dependencies*/
dependencies/
CMakeFiles/
stk-editor/
.vscode/
.config/
supertuxkart-64
make*.bat
__pycache__
data/editor
data/karts
@@ -52,24 +51,3 @@ packets_log.txt
history.dat
README.dependencies
xx
android/android-ndk*
android/android-sdk*
android/assets
android/bin
android/build
android/libs
android/obj
android/res
android/.gradle
android-*
*.apk
*.keystore
lib/curl
lib/freetype
lib/ifaddrs
lib/libogg
lib/libvorbis
lib/openal
lib/openssl

View File

@@ -1,56 +1,49 @@
# Travis-CI configuration file for SuperTuxKart
# Travis-CI configuration file for SuperTuxKart
#
# Configuration manual:
# http://docs.travis-ci.com/user/build-configuration/
#
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
matrix:
fast_finish: true
env:
matrix:
- BUILD_TYPE="Debug" SERVER_ONLY="OFF"
- BUILD_TYPE="Debug" SERVER_ONLY="ON"
- BUILD_TYPE="Release" SERVER_ONLY="OFF"
- BUILD_TYPE="Release" SERVER_ONLY="ON"
addons:
apt:
packages:
- build-essential
- cmake
- libbluetooth-dev
- libcurl4-gnutls-dev
- libfreetype6-dev
- libfribidi-dev
- libgl1-mesa-dev
- libjpeg-dev
- libogg-dev
- libopenal-dev
- libpng-dev
- libvorbis-dev
- libxrandr-dev
- mesa-common-dev
- pkg-config
- zlib1g-dev
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew bundle; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo mkdir -p /usr/local/include/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/; fi
# - clang
#branches:
# only:
# - master
before_install:
# Update repos
- sudo apt-get update -qq
# Install dependencies
- sudo apt-get install build-essential libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev
# Install mesa from an other repo (a newer version is required). Quantal is not supported anymore, saucy is only supported till July 2014,
# so we try to use trusty (precise which is what traiv uses a too old mesa version which doesn't link)
- sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty main restricted"
- sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
- sudo apt-get update -qq
- sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libglew-dev cmake
script:
- mkdir "build"
- cd "build"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
- make VERBOSE=1 -j3
# First a debug build:
- mkdir build-debug
- cd build-debug
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
- make VERBOSE=1 -j 4
# Then a release build:
- cd ..
- mkdir build-release
- cd build-release
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCHECK_ASSETS=off
- make VERBOSE=1 -j 4
notifications:
irc:
channels:
- "irc.freenode.org#stk"
skip_join: false
use_notice: true
template:
#- "[%{commit}: %{author}] %{message}"
#- "%{build_url}"
- "[%{repository}#%{branch} @%{commit}] %{author}): %{message}"
- "Diff: %{compare_url}"
- "Build: %{build_url}"

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 "nettle"
brew "fribidi"
brew "glew"

View File

@@ -1,217 +1,59 @@
# 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 do 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 shorcut for overall contribution.
## 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 Fantasmos
* 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
* Race UI improvements (new speedometer, nitro gauge, bigger minimap, minimap display options, more legible text with outlines and for some bigger font) by Alayan
* 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
### Tracks and modeling
#### Tracks
* Black Forest by Sven Andreas Belting, replacing Green Valley
* Ravenbridge Mansion by samuncle, replacing Black Hill Mansion
* Las Dunas Soccer by samuncle
* Candela City arena by Benau based on samuncle's track
* 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
#### 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)
## SupertTuxKart 0.9 (April 2015)
* Fully shader-based rendering engine
* New tracks Cocoa Temple and Gran Paradiso
* Graphical improvements to many other tracks
* New karts amanda and gavroche
* New and improved tux, adiumy, sara the wizard and the racer, xue kart
* Online login which allows to:
* connect with friends and see when they are playing
* vote for addons
* collect online achievements
** 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 track STK Enterprise
* Updated track The old mines
* Updated Lighthouse track
* Updated Zen Garden track
* New Soccer mode
* New Egg Hunt mode
* New karts Xue and Sara
* Updated Beastie kart
* Added Tutorial
* Added new Supertux difficulty
* New bubblegum shield weapon
* New Speedometer and nitro meter
* Add ability to filter addons
* Updated nitro models
* 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
* New green valley track
* New Blackhill Mansion track
* Updated XR591 track
* Updated Fort Magma track
* Updated jungle track
* Updates Sand track
* 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 Zen Garden 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
@@ -220,28 +62,16 @@ For similar reasons, and because some features are vastly more complex than othe
* 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
* 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
### 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
@@ -249,6 +79,8 @@ For similar reasons, and because some features are vastly more complex than othe
## SuperTuxKart 0.7.1 (15. April 2011)
* 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
@@ -263,12 +95,6 @@ For similar reasons, and because some features are vastly more complex than othe
* 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:
@@ -281,12 +107,8 @@ Too many to list them all. Main points:
* 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
* 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
@@ -306,7 +128,7 @@ Too many to list them all. Main points:
* Bugfix: battle mode would not display track groups.
## SuperTuxKart 0.6.1 (February 2009)
* New music for Snow Mountain.
* 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.
@@ -314,19 +136,15 @@ Too many to list them all. Main points:
* 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 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
@@ -341,23 +159,9 @@ Too many to list them all. Main points:
* 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)
* 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
@@ -368,29 +172,18 @@ Too many to list them all. Main points:
* 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
* 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
### Tracks and modeling
#### Karts
* New kart: wilber
#### Tracks
* Improved 'Shifting Sands' and 'Lighthouse'
## SuperTuxKart 0.3 (May 2007)
* Highscore lists
@@ -422,7 +215,7 @@ Too many to list them all. Main points:
- Fixed keyboard keys unable to work on the first key press bug
- And others
## SuperTuxKart 0.2 (22. Sep 2006)
##SuperTuxKart 0.2 (22. Sep 2006)
* Significant performance improvement by using display lists
* Improved AI
* Support for different grand prixs
@@ -440,7 +233,7 @@ Too many to list them all. Main points:
* 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)
##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
@@ -448,7 +241,7 @@ Too many to list them all. Main points:
* Some bug fixes and small improvements
* Added profile option to support automatic profiling
## SuperTuxKart 0.0.0 (22. Dec 2004)
##SuperTuxKart 0.0.0 (22. Dec 2004)
* new tracks
* new characters and karts
* new user-interface

View File

@@ -1,63 +1,26 @@
cmake_minimum_required(VERSION 2.8.4)
# root CMakeLists for the SuperTuxKart project
project(SuperTuxKart)
set(PROJECT_VERSION "1.0")
add_definitions( -DSUPERTUXKART_VERSION="${PROJECT_VERSION}" )
set(PROJECT_VERSION "0.8.1")
cmake_minimum_required(VERSION 2.8.4)
if(NOT (CMAKE_MAJOR_VERSION VERSION_LESS 3))
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
include(CMakeDependentOption)
include(BuildTypeSTKRelease)
if(NOT CMAKE_BUILD_TYPE)
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to STKRelease")
set(CMAKE_BUILD_TYPE "STKRelease")
endif()
option(SERVER_ONLY "Create a server only (i.e. no graphics or sound)" OFF)
option(USE_WIIUSE "Support for wiimote input devices" ON)
option(USE_FRIBIDI "Support for right-to-left languages" ON)
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF)
option(USE_SYSTEM_ENET "Use system ENet instead of the built-in version, when available." ON)
option(USE_SYSTEM_GLEW "Use system GLEW instead of the built-in version, when available." ON)
option(USE_SYSTEM_WIIUSE "Use system WiiUse instead of the built-in version, when available." OFF)
option(USE_CRYPTO_OPENSSL "Use OpenSSL instead of Nettle for cryptography in STK." OFF)
CMAKE_DEPENDENT_OPTION(BUILD_RECORDER "Build opengl recorder" ON
"NOT SERVER_ONLY;NOT APPLE" OFF)
CMAKE_DEPENDENT_OPTION(USE_FRIBIDI "Support for right-to-left languages" ON
"NOT SERVER_ONLY" OFF)
CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
"NOT SERVER_ONLY;NOT MINGW;NOT CYGWIN" OFF)
if(APPLE)
list(APPEND CMAKE_PREFIX_PATH /usr/local/opt)
include_directories(/usr/local/opt/fribidi/include/)
include_directories(/usr/local/opt/openssl@1.1/include/)
include_directories(/usr/local/opt/openssl@1.1/include/openssl/)
include_directories(/usr/local/opt/freetype/include/freetype2/)
endif()
if((UNIX AND NOT APPLE) AND NOT SERVER_ONLY)
option(ENABLE_WAYLAND_DEVICE "Enable Wayland device for linux build" ON)
if((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") OR
(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
option(USE_GLES2 "Use OpenGL ES2 renderer" ON)
else()
option(USE_GLES2 "Use OpenGL ES2 renderer" OFF)
endif()
endif()
if(UNIX OR MINGW)
option(DEBUG_SYMBOLS "Compile with debug symbols" OFF)
endif()
if(MSVC AND (MSVC_VERSION LESS 1900))
if(MSVC)
# Normally hide the option to build wiiuse on VS, since it depends
# on the installation of the Windows DDK (Driver Developer Kit),
# which also needs an absolute path :(
@@ -67,9 +30,13 @@ else()
set(WIIUSE_BUILD ON)
endif()
if(MINGW OR CYGWIN)
set(USE_WIIUSE OFF)
endif()
if(UNIX AND NOT APPLE)
option(USE_XRANDR "Use xrandr instead of vidmode" ON)
option(USE_ASAN "Build with Leak/Address sanitizer" OFF)
option(USE_LIBBFD "Use libbfd for crash reporting and leak check" OFF)
endif()
set(STK_SOURCE_DIR "src")
@@ -82,182 +49,53 @@ set(STK_INSTALL_BINARY_DIR "bin" CACHE
set(STK_INSTALL_DATA_DIR "share/supertuxkart" CACHE
STRING "Install data folder to this directory, absolute or relative to CMAKE_INSTALL_PREFIX")
# Define dependencies path
if(MSVC)
set(DEPENDENCIES "dependencies-vs")
elseif(MINGW)
set(DEPENDENCIES "dependencies-mingw")
else()
set(DEPENDENCIES "dependencies")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DEPENDENCIES "${DEPENDENCIES}-64bit")
endif()
if(WIN32)
if(NOT IS_DIRECTORY "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}")
set(DEPENDENCIES "dependencies")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DEPENDENCIES "${DEPENDENCIES}-64bit")
endif()
endif()
if(NOT IS_DIRECTORY "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}")
message(FATAL_ERROR "Dependencies directory not found.")
endif()
endif()
# These variables enable MSVC to find libraries located in "dependencies"
if(WIN32)
set(ENV{PATH} "$ENV{PATH};${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
set(ENV{LIB} ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib)
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/${DEPENDENCIES})
set(ENV{PATH} "$ENV{PATH};${PROJECT_SOURCE_DIR}/dependencies/include")
set(ENV{LIB} ${PROJECT_SOURCE_DIR}/dependencies/lib)
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/dependencies)
add_definitions(-D_IRR_STATIC_LIB_)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
include_directories(${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include)
endif()
if(USE_GLES2)
add_definitions(-DUSE_GLES2)
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_ -DNO_IRR_COMPILE_WITH_OPENGL_)
endif()
if(SERVER_ONLY)
add_definitions(-DSERVER_ONLY)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_COMPILE_WITH_OSX_DEVICE_)
endif()
if(UNIX OR MINGW)
if(DEBUG_SYMBOLS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
endif()
endif()
if(UNIX AND NOT APPLE)
find_package(PkgConfig REQUIRED)
if(NOT PKGCONFIG_FOUND)
message(FATAL_ERROR "Pkg-config not found.")
endif()
endif()
# Build the Bullet physics library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
# Find system ENet library or build it if missing
if((UNIX AND NOT APPLE) AND USE_SYSTEM_ENET)
pkg_check_modules(ENET libenet>=1.3.4)
endif()
# Build the ENet UDP network library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
if(ENET_FOUND)
include_directories(${ENET_INCLUDE_DIRS})
else()
# Fallback to built-in version
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
set(ENET_LIBRARIES "enet")
endif()
# Build glew library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
# Find system GLEW library or build it if missing
if (APPLE)
find_package(glew)
if(GLEW_FOUND)
include_directories(${GLEW_INCLUDE_DIRS})
endif()
elseif(NOT USE_GLES2 AND NOT SERVER_ONLY)
add_definitions(-DGLEW_NO_GLU)
if((UNIX AND NOT APPLE) AND USE_SYSTEM_GLEW)
pkg_check_modules(GLEW glew>=2.1)
endif()
if(GLEW_FOUND)
include_directories(${GLEW_INCLUDE_DIRS})
else()
# Fallback to built-in version silently
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
set(GLEW_LIBRARIES "glew")
endif()
endif()
if(MSVC)
if((WIN32 AND NOT MINGW) OR APPLE)
if (NOT APPLE)
# Build zlib library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib")
include_directories("${PROJECT_SOURCE_DIR}/lib/zlib")
set(ZLIB_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/zlib" "${PROJECT_BINARY_DIR}/lib/zlib/")
set(ZLIB_LIBRARY zlibstatic)
endif()
if (NOT SERVER_ONLY)
if(MSVC OR APPLE)
# Build png library
set(SKIP_INSTALL_ALL TRUE)
set(PNG_STATIC TRUE CACHE BOOL "Build static lib")
set(PNG_TESTS FALSE CACHE BOOL "Build libpng tests")
set(PNG_SHARED FALSE CACHE BOOL "Build shared lib")
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng")
include_directories("${PROJECT_SOURCE_DIR}/lib/libpng")
set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/")
set(PNG_LIBRARY png_static)
endif()
# Add jpeg library
if (APPLE)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/jpeglib")
include_directories("${PROJECT_SOURCE_DIR}/lib/jpeglib")
set(JPEG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/jpeglib/")
set(JPEG_LIBRARY jpeglib)
else()
find_package(JPEG REQUIRED)
include_directories(${JPEG_INCLUDE_DIR})
endif()
endif()
# Build png library
set (SKIP_INSTALL_ALL TRUE)
set (PNG_STATIC TRUE)
set (PNG_TESTS FALSE)
set (PNG_SHARED FALSE)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng")
include_directories("${PROJECT_SOURCE_DIR}/lib/libpng")
if (BUILD_RECORDER)
find_library(OPENGLRECORDER_LIBRARY NAMES openglrecorder libopenglrecorder PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
find_path(OPENGLRECORDER_INCLUDEDIR NAMES openglrecorder.h PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
if (NOT OPENGLRECORDER_LIBRARY OR NOT OPENGLRECORDER_INCLUDEDIR)
if(PROJECT_VERSION STREQUAL "git")
message(WARNING "libopenglrecorder not found, disabling in-game recorder. "
"To use recorder, install libopenglrecorder.")
set(OPENGLRECORDER_LIBRARY CACHE INTERNAL "")
set(OPENGLRECORDER_INCLUDEDIR CACHE INTERNAL "")
set(BUILD_RECORDER OFF)
else()
message(FATAL_ERROR "libopenglrecorder not found. "
"Either install libopenglrecorder or disable in-game recorder with -DBUILD_RECORDER=0")
endif()
else()
include_directories(${OPENGLRECORDER_INCLUDEDIR})
mark_as_advanced(OPENGLRECORDER_LIBRARY OPENGLRECORDER_INCLUDEDIR)
add_definitions(-DENABLE_RECORDER)
endif()
endif()
#build jpeg library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/jpeglib")
include_directories("${PROJECT_SOURCE_DIR}/lib/jpeglib")
if(NOT SERVER_ONLY)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/graphics_utils")
include_directories("${PROJECT_SOURCE_DIR}/lib/graphics_utils")
set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/")
set(PNG_LIBRARY png15_static)
set(JPEG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/jpeglib/")
set(JPEG_LIBRARY jpeglib)
endif()
if(NOT SERVER_ONLY)
find_library(SQUISH_LIBRARY NAMES squish libsquish)
find_path(SQUISH_INCLUDEDIR NAMES squish.h PATHS)
if (NOT SQUISH_LIBRARY OR NOT SQUISH_INCLUDEDIR)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libsquish")
include_directories("${PROJECT_SOURCE_DIR}/lib/libsquish")
SET(SQUISH_LIBRARY squish)
else()
include_directories("${SQUISH_INCLUDEDIR}")
MESSAGE(STATUS "Use system libsquish: ${SQUISH_LIBRARY}")
endif()
endif()
# Build the irrlicht library
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/irrlicht")
include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include")
@@ -267,71 +105,56 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include")
# (at least on VS) irrlicht will find wiiuse io.h file because
# of the added include directory.
if(USE_WIIUSE)
# Find system WiiUse library or build it if missing
if((UNIX AND NOT APPLE) AND USE_SYSTEM_WIIUSE)
find_package(WiiUse)
endif()
if(WIIUSE_FOUND)
include_directories(${WIIUSE_INCLUDE_DIR})
else()
# Fallback to built-in version
if(WIIUSE_BUILD)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse")
endif()
include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse/src")
set(WIIUSE_LIBRARIES "wiiuse" "bluetooth")
if(WIIUSE_BUILD)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse")
endif()
include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse")
endif()
# Set include paths
include_directories(${STK_SOURCE_DIR})
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
endif()
# Build the angelscript library if not in system
if(USE_SYSTEM_ANGELSCRIPT)
find_package(Angelscript)
if(ANGELSCRIPT_FOUND)
include_directories(${Angelscript_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Angelscript not found. "
"Either install angelscript or use built-in version using "
"-DUSE_SYSTEM_ANGELSCRIPT=0")
endif()
find_package(Angelscript)
if(USE_SYSTEM_ANGELSCRIPT AND ANGELSCRIPT_FOUND)
include_directories(${Angelscript_INCLUDE_DIRS})
else()
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake")
include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include")
set(Angelscript_LIBRARIES angelscript)
endif()
if(NOT SERVER_ONLY)
# OpenAL
# OpenAL
if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :
# the mac I use to make STK releases does have other installs of vorbis/ogg/etc. which aren't compatible with STK, so letting
# CMake pick the library it wants essentially means I can't build.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework OpenAL")
set(OPENAL_LIBRARY)
else()
find_package(OpenAL REQUIRED)
include_directories(${OPENAL_INCLUDE_DIR})
# OggVorbis
find_package(OggVorbis REQUIRED)
include_directories(${OGGVORBIS_INCLUDE_DIRS})
add_definitions(-DENABLE_SOUND)
endif()
# Freetype
if (NOT SERVER_ONLY)
find_package(Freetype)
if(FREETYPE_FOUND)
include_directories(${FREETYPE_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Freetype not found. "
"Freetype is required to display characters in SuperTuxKart. ")
endif()
# OggVorbis
if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :
# the mac I use to make STK releases does have other installs of vorbis/ogg/etc. which aren't compatible with STK, so letting
# CMake pick the library it wants essentially means I can't build.
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -I/Library/Frameworks/Ogg.framework/Versions/A/Headers -I/Library/Frameworks/Vorbis.framework/Versions/A/Headers")
else()
find_package(OggVorbis REQUIRED)
include_directories(${OGGVORBIS_INCLUDE_DIRS})
endif()
# Fribidi
@@ -346,27 +169,36 @@ if(USE_FRIBIDI)
endif()
endif()
# OpenGL
if(NOT USE_GLES2 AND NOT SERVER_ONLY)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
# OpenMP
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
if(USE_LIBBFD)
find_package(Libbfd)
if(LIBBFD_FOUND)
add_definitions(-DENABLE_LIBBFD)
include_directories(${LIBBFD_INCLUDE_DIRS})
# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
if(USE_XRANDR)
find_package(Xrandr REQUIRED)
if(NOT XRANDR_FOUND)
message(FATAL_ERROR "XRANDR not found.")
endif()
else()
set(USE_LIBBFD OFF CACHE BOOL "Use libbfd for crash reporting and leak check" FORCE)
message(WARNING "Libbfd not found, disable integrated stack trace.")
find_library(IRRLICHT_XF86VM_LIBRARY Xxf86vm)
mark_as_advanced(IRRLICHT_XF86VM_LIBRARY)
endif()
endif()
# Set some compiler options
if(UNIX OR MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-function")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
if(MINGW AND CMAKE_BUILD_TYPE MATCHES Release)
@@ -379,11 +211,6 @@ if(WIN32)
# And shut up about unsafe stuff
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Avoid timespec structure redeclaration on Visual Studio 2015
if (NOT (MSVC_VERSION LESS 1900))
add_definitions(-DHAVE_STRUCT_TIMESPEC)
endif()
endif()
if(MSVC)
@@ -400,9 +227,11 @@ else()
endif()
endif()
# TODO: remove this switch
add_definitions(-DHAVE_OGGVORBIS)
if(WIN32)
configure_file("${STK_SOURCE_DIR}/../tools/windows_installer/icon_rc.template" "${PROJECT_BINARY_DIR}/tmp/icon.rc")
configure_file("${STK_SOURCE_DIR}/windows_installer/icon_rc.template" "${PROJECT_BINARY_DIR}/tmp/icon.rc")
endif()
# Provides list of source and header files (STK_SOURCES and STK_HEADERS)
@@ -423,10 +252,16 @@ if(APPLE)
add_executable(supertuxkart MACOSX_BUNDLE ${STK_SOURCES})
find_library(IOKIT_LIBRARY IOKit)
find_library(QUICKTIME_LIBRARY QuickTime)
find_library(CARBON_LIBRARY Carbon)
find_library(AUDIOUNIT_LIBRARY AudioUnit)
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(supertuxkart
${IOKIT_LIBRARY}
${QUICKTIME_LIBRARY}
${CARBON_LIBRARY}
${AUDIOUNIT_LIBRARY}
${COCOA_LIBRARY})
# configure CMake to use a custom Info.plist
@@ -446,7 +281,7 @@ else()
elseif(MINGW)
set(PTHREAD_NAMES "winpthread-1" "libwinpthread-1" "pthreadGC2")
endif()
find_library(PTHREAD_LIBRARY NAMES pthread ${PTHREAD_NAMES} PATHS ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib)
find_library(PTHREAD_LIBRARY NAMES pthread ${PTHREAD_NAMES} PATHS ${PROJECT_SOURCE_DIR}/dependencies/lib)
mark_as_advanced(PTHREAD_LIBRARY)
# Set data dir (absolute or relative to CMAKE_INSTALL_PREFIX)
@@ -466,45 +301,12 @@ else()
target_link_libraries(supertuxkart ${PTHREAD_LIBRARY})
endif()
# CURL and OpenSSL or Nettle
# 1.0.1d for compatible AES GCM handling
SET(OPENSSL_MINIMUM_VERSION "1.0.1d")
if(MSVC)
set(USE_CRYPTO_OPENSSL ON)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib/libcurl.lib)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib/libeay32.lib)
elseif(MINGW)
set(USE_CRYPTO_OPENSSL ON)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib/libcurldll.a)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib/libeay32.dll)
# CURL
if(WIN32)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/libcurldll.a)
else()
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})
find_path(NETTLE_INCLUDE_DIRS nettle/version.h)
find_library(NETTLE_LIBRARY NAMES nettle libnettle)
if (NOT NETTLE_INCLUDE_DIRS OR NOT NETTLE_LIBRARY OR USE_CRYPTO_OPENSSL)
set(USE_CRYPTO_OPENSSL ON)
find_package(OpenSSL REQUIRED)
if(${OPENSSL_VERSION} VERSION_LESS ${OPENSSL_MINIMUM_VERSION} OR
(${OPENSSL_VERSION} VERSION_EQUAL ${OPENSSL_MINIMUM_VERSION} AND ${OPENSSL_VERSION} STRLESS ${OPENSSL_MINIMUM_VERSION}))
message(FATAL_ERROR "OpenSSL version found (${OPENSSL_VERSION}) is less then the minimum required (${OPENSSL_MINIMUM_VERSION}), aborting.")
endif()
include_directories(${OpenSSL_INCLUDE_DIRS})
else()
set(USE_CRYPTO_OPENSSL OFF)
include_directories(${NETTLE_INCLUDE_DIRS})
endif()
endif()
if (USE_CRYPTO_OPENSSL)
message(STATUS "OpenSSL will be used for cryptography in STK.")
add_definitions(-DENABLE_CRYPTO_OPENSSL)
else()
message(STATUS "Nettle will be used for cryptography in STK.")
add_definitions(-DENABLE_CRYPTO_NETTLE)
endif()
# Common library dependencies
@@ -512,37 +314,22 @@ target_link_libraries(supertuxkart
bulletdynamics
bulletcollision
bulletmath
${ENET_LIBRARIES}
enet
glew
stkirrlicht
${Angelscript_LIBRARIES}
${CURL_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${OPENAL_LIBRARY}
${OPENGL_LIBRARIES}
)
if (USE_CRYPTO_OPENSSL)
target_link_libraries(supertuxkart ${OPENSSL_CRYPTO_LIBRARY})
else()
target_link_libraries(supertuxkart ${NETTLE_LIBRARY})
endif()
if(NOT SERVER_ONLY)
if(NOT USE_GLES2)
target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARIES})
else()
target_link_libraries(supertuxkart GLESv2)
endif()
target_link_libraries(supertuxkart
${SQUISH_LIBRARY}
${FREETYPE_LIBRARIES}
${JPEG_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${OPENAL_LIBRARY}
graphics_utils)
endif()
if(UNIX AND NOT APPLE)
if(USE_LIBBFD)
target_link_libraries(supertuxkart ${LIBBFD_LIBRARIES})
target_link_libraries(supertuxkart ${X11_LIBRARIES})
if(USE_XRANDR)
target_link_libraries(supertuxkart ${XRANDR_LIBRARIES})
else()
target_link_libraries(supertuxkart ${IRRLICHT_XF86VM_LIBRARY})
endif()
if(USE_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
@@ -550,13 +337,13 @@ if(UNIX AND NOT APPLE)
endif()
endif()
if(BUILD_RECORDER)
target_link_libraries(supertuxkart ${OPENGLRECORDER_LIBRARY})
endif()
# FreeBSD does not search in /usr/local/lib, but at least Freetype is installed there :(
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :
# the mac I use to make STK releases does have other installs of vorbis/ogg/etc. which aren't compatible with STK, so letting
# CMake pick the library it wants essentially means I can't build.
set_target_properties(supertuxkart PROPERTIES LINK_FLAGS "-arch i386 -F/Library/Frameworks -framework OpenAL -framework Ogg -framework Vorbis")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/Library/Frameworks/OpenAL.framework/Versions/A/Headers")
endif()
if(USE_FRIBIDI)
@@ -575,10 +362,10 @@ if(USE_WIIUSE)
if(WIIUSE_BUILD)
target_link_libraries(supertuxkart wiiuse)
else()
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib/wiiuse.lib)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/wiiuse.lib)
endif()
else()
target_link_libraries(supertuxkart ${WIIUSE_LIBRARIES})
target_link_libraries(supertuxkart wiiuse bluetooth)
endif()
add_definitions(-DENABLE_WIIUSE)
@@ -588,13 +375,13 @@ if(MSVC OR MINGW)
target_link_libraries(supertuxkart iphlpapi.lib)
add_custom_command(TARGET supertuxkart POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/dll"
"${PROJECT_SOURCE_DIR}/dependencies/dll"
$<TARGET_FILE_DIR:supertuxkart>)
add_custom_target(stkshaders SOURCES ${STK_SHADERS})
endif()
if(MINGW)
find_library(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" "libgcc_s_seh-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
find_library(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
if(LIBGCC)
file(COPY ${LIBGCC} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()
@@ -602,12 +389,37 @@ if(MINGW)
if(LIBSTDCPP)
file(COPY ${LIBSTDCPP} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()
find_library(LIBOPENMP NAMES "libgomp-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
if(LIBOPENMP)
file(COPY ${LIBOPENMP} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()
find_library(LIBPTHREAD NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
if(LIBPTHREAD)
file(COPY ${LIBPTHREAD} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()
endif()
# Optional tools
add_subdirectory(tools/font_tool)
# ==== Make dist target ====
if(MSVC OR MINGW)
# Don't create a dist target for VS
else()
add_custom_target(dist
COMMAND rm -rf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION} && rm -f ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}.tar.bz2
&& echo "Exporting..."
&& svn export ${PROJECT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}
&& echo "Compressing..."
&& cd ${CMAKE_BINARY_DIR}
&& tar -cjf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}.tar.bz2 ./SuperTuxKart-${PROJECT_VERSION}
&& echo "Done, cleaning up"
&& rm -rf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endif()
# ==== Checking if data folder exists ====
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
@@ -645,10 +457,10 @@ if(STK_ASSETS_DIR AND CHECK_ASSETS)
install(DIRECTORY ${STK_ASSETS_DIR} DESTINATION ${STK_INSTALL_DATA_DIR}/data PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE)
endif()
install(FILES ${STK_DATA_DIR}/supertuxkart.desktop DESTINATION share/applications)
install(FILES data/supertuxkart_48.png DESTINATION share/icons/hicolor/48x48/apps RENAME supertuxkart.png)
install(FILES data/supertuxkart_32.png DESTINATION share/icons/hicolor/32x32/apps RENAME supertuxkart.png)
install(FILES data/supertuxkart_128.png DESTINATION share/icons/hicolor/128x128/apps RENAME supertuxkart.png)
install(FILES data/supertuxkart_48.png DESTINATION share/pixmaps RENAME supertuxkart.png)
install(FILES data/supertuxkart.appdata.xml DESTINATION share/metainfo)
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
install(FILES data/supertuxkart.appdata.xml DESTINATION share/appdata)
if(MINGW)
install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION ${STK_INSTALL_BINARY_DIR}

169
COPYING
View File

@@ -1,21 +1,18 @@
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
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 +46,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 +96,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.
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.
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.
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.
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.
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.
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>.

View File

@@ -1,118 +1,63 @@
## Building from source
#SuperTuxKart Installation Instructions
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):
Note : If you obtained this source code from github, you also need to download the game assets from sourceforge using SVN.
```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
```
`svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets`
## Building SuperTuxKart on Linux
Place the `stk-assets` folder next to the source root `stk-code` folder.
See <http://supertuxkart.sourceforge.net/Source_control> for more information
### Dependencies
To build SuperTuxKart from source, you'll need to install the following packages:
##Building STK on Linux
First, make sure that you have the following packages installed:
* OpenGL (mesa)
* OpenAL (recommended: openal-soft-devel)
* Ogg (libogg-dev)
* Ogg (libogg-dev)
* Vorbis (libvorbis-dev)
* Freetype (libfreetype6-dev)
* libcurl (libcurl-devel)
* libbluetooth (bluez-devel)
* libnettle (nettle-dev)
* libpng (libpng-devel)
* zlib (zlib-devel)
* jpeg (libjpeg-turbo-devel)
Fedora command:
```bash
sudo dnf install @development-tools cmake bluez-libs-devel \
openssl-devel libcurl-devel freetype-devel fribidi-devel mesa-libGL-devel \
libjpeg-turbo-devel libogg-devel openal-soft-devel libpng-devel \
libvorbis-devel libXrandr-devel libGLEW nettle-devel pkgconf zlib-devel
```
Mageia 6 command:
```bash
su -c 'urpmi gcc-c++ cmake openssl-devel libcurl-devel freetype-devel \
fribidi-devel libjpeg-turbo-devel libogg-devel openal-soft-devel \
libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion \
mesa-comon-devel libxrandr-devel libbluez-devel libfreetype6-devel'
```
OpenSUSE command:
```bash
sudo zypper install gcc-c++ cmake openssl-devel libcurl-devel \
freetype-devel fribidi-devel libogg-devel openal-soft-devel libpng-devel \
libvorbis-devel libXrandr-devel pkgconf zlib-devel enet-devel glew-devel \
libjpeg-devel bluez-devel freetype2-devel glu-devel
```
Ubuntu command:
```bash
sudo apt-get install build-essential cmake libbluetooth-dev \
libcurl4-openssl-dev libenet-dev libfreetype6-dev libfribidi-dev \
libgl1-mesa-dev libglew-dev libjpeg-dev libogg-dev libopenal-dev libpng-dev \
libssl-dev libvorbis-dev libxrandr-dev libx11-dev nettle-dev pkg-config zlib1g-dev
```
sudo apt-get install autoconf automake build-essential cmake libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev \
libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev libxrandr-dev
```
Unpack the files from the tarball like this:
```
tar xzf supertuxkart-*.tar.gz
cd supertuxkart-*
```
### In-game recorder
where `*` is the version of SuperTuxkart you downloaded - eg `0.8.0`. Then:
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.
### Compiling
Compile SuperTuxKart:
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)
make VERBOSE=1 -j2
```
STK can then be run from the build directory with `bin/supertuxkart`
To create a debug version of STK, use:
#### Keeping your build up to date
`cmake .. -DCMAKE_BUILD_TYPE=Debug`
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:
To test the compilation, supertuxkart can be run from the build
directory by ./bin/supertuxkart
```bash
git pull
cd cmake_build
cmake ..
make -j$(nproc)
```
To install the file, as root execute:
##### 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
```
`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
@@ -120,158 +65,10 @@ 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 STK on OS X
See <http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX>
## 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.
2a. If you want the stable version, download the SuperTuxKart source package from the latest stable version [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/) and unpack it.
2b. 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 correspodning 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!*
3a. If you got the stable version, download the Windows dependencies package from [SuperTuxKart download area: Dependencies - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/) and unpack it.
3b. If you got the development version go to SuperTuxKart-dev in your file browser, right-click somewhere empty, select "Git clone..." and paste https://github.com/supertuxkart/dependencies.git in the URL field; click OK. When finished, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory; rename the latter to `dependencies-64bit` if you want to compile a 64-bit build.
4. 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 it to a new directory called `build` or `bld` inside the stk-code directory.
5. 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.
6. Navigate to your build directory and open the `SuperTuxKart.sln` file; Visual Studio will now load the solution.
7. In the 'Solution Explorer', right click on the `supertuxkart` project and select "Set as StartUp project".
8. 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 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 0.9.2 download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/0.9.2) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory
3. Download the Windows dependencies package from either [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/)
or [SuperTuxKart on GitHub - Dependencies](https://github.com/supertuxkart/dependencies)
and unpack the archive; once unpacked, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory
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 macOS
### Getting Started
Install the developer tools, either from the OS X Install DVD or from Apple's website.
If you have never built anything before, you have create `/usr/local/include/` first:
```bash
sudo mkdir -p /usr/local/include/
```
Symlink the `include`-folder of OpenGL framework to `/usr/local/include/GL` (Unix programs have an easier time finding it this way):
```bash
sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL
```
On OS X 10.9.5, you might need the following workaround:
```bash
sudo ln -s `xcrun --show-sdk-path`/usr/include/ /usr/include
sudo ln -s `xcrun --show-sdk-path`/System/Library/Frameworks/OpenGL.framework/Headers/ /usr/local/include/OpenGL
```
The first link is required in order to find libcurl, the second to find opengl.
### STK 0.10 or later (or latest git)
Install homebrew (https://brew.sh/)
Install all of the dependencies using homebrew:
```bash
cd /path/to/stk-code
brew bundle
```
Build STK
```bash
mkdir cmake_build
cd cmake_build
CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/glew/:/usr/local/opt/fribidi/ cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib
make
```
#### (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/
```
Afterwards, copy the contents of `stk-assets` into `/SuperTuxKart.app/Contents/Resources/data`.
### STK 0.9.3 or earlier
Download pre-built dependencies from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/OSX/) and put the frameworks in [hard disk root]/Library/Frameworks
Building with clang:
```bash
cd /path/to/stk-code
mkdir cmake_build
cd cmake_build
cmake ..
make
```
Building with GCC:
```bash
cd /path/to/stk-code
mkdir cmake_build
cd cmake_build
cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc
make
```
Building on 10.10 with 10.9 compatibility:
```bash
cmake .. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
```
#### Xcode
Place an additional copy of the dependencies into `Users/<YOUR_USERNAME>/Library/Frameworks`.
Then cd to your cloned stk-code directory and execute the following commands:
```bash
mkdir xcode_build && cd xcode_build
cmake .. -GXcode
```
Use Finder to navigate to your stk-code/xcode_build folder and open the newly generated Xcode project (`SuperTuxKart.xcodeproj`).
You can then build the project in Xcode using Product -> Build
Note: Xcode is much less well tested than makefiles, so there may be issues when trying to use Xcode.
##Building STK on Windows
See <http://supertuxkart.sourceforge.net/How_to_build_the_Windows_version>

View File

@@ -1,204 +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-11.noarch.rpm; rpm -Uvh epel-release*rpm
yum install gcc-c++ cmake openssl-devel libcurl-devel zlib-devel enet gcc-c++
```
### 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:
`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.
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 or if random-server-port is enabled in user config, than any port. STK will auto change to random port if the port you specify failed 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 it more than 8 will have performance degradation. -->
<server-max-players value="8" />
<!-- Password for private server, 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 off this server will ignore chat message from all players. -->
<chat value="true" />
<!-- Allow players to vote track to play, if off server will pick next track to play randomly. -->
<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 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 saving server resource if your server is not behind a firewall. -->
<firewalled-server 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-players 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 no addon karts will be available for players to choose, and official-karts-threshold will be made 1.0. -->
<live-players 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-players is on. -->
<max-ping value="300" />
<!-- Tolerance of jitter in network allowed (in ms), it's recommended to use default value if live-players is on. -->
<jitter-tolerance value="100" />
<!-- Kick players whose ping is above max-ping. -->
<kick-high-ping-players value="false" />
<!-- 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" />
<!-- ip: IP in X.X.X.X/Y (CIDR) format for banning, use Y of 32 for a specific ip, expired-time: unix timestamp to expire, -1 (uint32_t max) for a permanent ban. -->
<server-ip-ban-list>
<ban ip="0.0.0.0/0" expired-time="0"/>
</server-ip-ban-list>
<!-- online-id: online id for banning, expired-time: unix timestamp to expire, -1 (uint32_t max) for a permanent ban. -->
<server-online-id-ban-list>
<ban online-id="0" expired-time="0"/>
</server-online-id-ban-list>
</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 the 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`
In LAN network it is required that the server and server discovery port is connectable by clients directly, no NAT penetration will be done in LAN.
------
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:
`supertuxkart --connect-now=x.x.x.x:y --server-id=id --network-ai=n --auto-connect --no-graphics`
x.x.x.x:y is your server ip address with its port, id is the id field of server-info in STK server xml list, omit it if you are testing LAN server, n is the number of AI you want to create.
You can see STK server xml list [here](https://online.supertuxkart.net/api/v2/server/get-all).
You can remove `--auto-connect` if you have another client which can control the starting of games in server, or you can consider enable owner-less mode on server so the games on server can keep going. 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 (high ping with packet loss) network.
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 consider number of STK servers hosting on a 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 have the best gaming experience when choosing server having all players less than 100ms ping with no packet loss.

View File

@@ -1,33 +1,67 @@
# SuperTuxKart
[![Build Status](https://travis-ci.org/supertuxkart/stk-code.svg?branch=master)](https://travis-ci.org/supertuxkart/stk-code)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/supertuxkart/stk-code?svg=true&branch=master)](https://ci.appveyor.com/project/supertuxkart/stk-code)
[![#supertuxkart on the freenode IRC network](https://img.shields.io/badge/freenode-%23supertuxkart-brightgreen.svg)](https://webchat.freenode.net/?channels=supertuxkart)
#SuperTuxKart
[![Build Status](https://travis-ci.org/supertuxkart/stk-code.png?branch=master)](https://travis-ci.org/supertuxkart/stk-code)
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.
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 <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)
The SuperTuxKart homepage can be found at: <http://supertuxkart.sourceforge.net>
## Hardware Requirements
To run SuperTuxKart, make sure that your computer's specifications are equal or higher than the following specifications:
The official SuperTuxKart forum is at <http://supertuxkart.sourceforge.net/forum>. If you need support,
this would be the best place to start.
* A graphics card capable of 3D rendering - NVIDIA GeForce 8 series and newer (GeForce 8100 or newer), AMD/ATI Radeon HD 4000 series and newer, Intel HD Graphics 3000 and newer. OpenGL >= 3.3
* You should have a CPU that's running at 1 GHz or faster.
Hope you enjoy the game.
-- The SuperTuxKart development team.
##Hardware Requirements
* You need a 3D graphics card. (NVIDIA GeForce 8xxx and higher, ATI Radeon HD 4xxx and higher or Intel HD 3000 and higher)
* You should have a CPU that's running at 1GHz or better.
* You'll need at least 512 MB of free VRAM (video memory).
* Minimum disk space: 800 MB
* Ideally, you'll want a joystick with at least 6 buttons.
* Disk space: 400MB
* Ideally, you 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. Information about the licenses for the artwork is contained in `data/licenses`.
## 3D coordinates
A reminder for those who are looking at the code and 3D models:
##Compiling SuperTuxKart
SuperTuxKart: X right, Y up, Z forwards
###Windows
1. Install VS 2013 (or later). The free express versions work fine.
2. Download and install a source package - either a released package or from our [git/svn repositories](http://supertuxkart.sourceforge.net/Source_control)
3. Download the latest dependency package depdendencies_for_0.8.2.zip from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/). Unzip it in the root directory, so that the dependencies directory is next to the src and data directory (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
4. Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as build directory (for now I assume that this directory is called bld).
5. Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure to select the right version (be aware of the easy to confuse version numbers: VS 2013 = version 12). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
6. In Visual Studio open the project file generated in the 'bld' folder
7. Right click on the supertuxkart project in the solution explorer, and select "Set as StartUp Project".
8. Select Build->Build Solution (or press F7) to compile.
Compilation with cygwin is not officially supported, but
this has been done (check with the forum for details).
###Mac OS X
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 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)
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).

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 *.blend1 *.blend2
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

33
TODO.md Normal file
View File

@@ -0,0 +1,33 @@
##TODO
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
- Check our bug and enhancement request tracker on
https://github.com/supertuxkart/stk-code/issues
- Extend the current web page, keep it up to date
4. Tester
- For just about everything
- Esp. different platforms and graphics cards
5. 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](mailto:supertuxkart-devel@lists.sourceforge.net)
Thanks in advance!
-- The SuperTuxKart-Team
For details, see <http://supertuxkart.sourceforge.net/Get_involved>

View File

@@ -1,176 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# OpenAL
LOCAL_MODULE := openal
LOCAL_SRC_FILES := obj/openal/libopenal.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# OGG
LOCAL_MODULE := ogg
LOCAL_SRC_FILES := obj/libogg/src/.libs/libogg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbis
LOCAL_MODULE := vorbis
LOCAL_SRC_FILES := obj/libvorbis/lib/.libs/libvorbis.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbisfile
LOCAL_MODULE := vorbisfile
LOCAL_SRC_FILES := obj/libvorbis/lib/.libs/libvorbisfile.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# CURL
LOCAL_MODULE := curl
LOCAL_SRC_FILES := obj/curl/lib/.libs/libcurl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libcrypto
LOCAL_MODULE := libcrypto
LOCAL_SRC_FILES := obj/openssl/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libssl
LOCAL_MODULE := libssl
LOCAL_SRC_FILES := obj/openssl/libssl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# JPEG
LOCAL_MODULE := jpeglib
LOCAL_SRC_FILES := obj/jpeglib/libjpeglib.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Freetype
LOCAL_MODULE := freetype
LOCAL_SRC_FILES := obj/freetype/objs/.libs/libfreetype.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# zlib
LOCAL_MODULE := zlib
LOCAL_SRC_FILES := obj/zlib/libz.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# PNG
LOCAL_MODULE := png
LOCAL_SRC_FILES := obj/libpng/libpng.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
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/
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
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/
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Irrlicht
LOCAL_MODULE := irrlicht
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/irrlicht/source/Irrlicht/*.cpp) \
$(wildcard ../lib/irrlicht/source/Irrlicht/Android/*.cpp) \
../lib/irrlicht/source/Irrlicht/stk_android_native_app_glue.c
LOCAL_CFLAGS := -I../lib/irrlicht/source/Irrlicht/ \
-I../lib/irrlicht/include/ \
-Iobj/jpeglib/ \
-Iobj/libpng/ \
-Iobj/zlib/
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := jpeglib png zlib
include $(BUILD_STATIC_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 -landroid -lEGL -lGLESv3 -lOpenSLES
LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/bullet/src \
-I../lib/enet/include \
-I../lib/ifaddrs \
-I../lib/irrlicht/include \
-I../lib/irrlicht/source/Irrlicht \
-I../src \
-Iobj/curl/include \
-Iobj/freetype/include \
-Iobj/libogg/include \
-Iobj/libvorbis/include \
-Iobj/openal/include \
-Iobj/openssl/include \
-DUSE_GLES2 \
-DENABLE_SOUND \
-DENABLE_CRYPTO_OPENSSL \
-DNDEBUG \
-DANDROID_PACKAGE_NAME=\"$(PACKAGE_NAME)\" \
-DANDROID_APP_DIR_NAME=\"$(APP_DIR_NAME)\" \
-DSUPERTUXKART_VERSION=\"$(PROJECT_VERSION)\"
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := irrlicht bullet enet freetype ifaddrs angelscript \
vorbisfile vorbis ogg openal curl libssl libcrypto \
gnustl_static
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.supertuxkart.stk_dbg"
android:versionCode="1"
android:versionName="git"
android:installLocation="auto">
<!-- This .apk has no Java code itself, so set hasCode to false. -->
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:banner="@drawable/banner"
android:hasCode="false"
android:isGame="true"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar.TranslucentDecor"
android:hardwareAccelerated="true"
android:resizeableActivity="false">
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:configChanges="fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|uiMode"
android:screenOrientation="sensorLandscape">
<!-- Tell NativeActivity the name of or .so -->
<meta-data android:name="android.app.lib_name"
android:value="main" />
<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>
</activity>
</application>
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="26" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@@ -1,150 +0,0 @@
================================================================================
SUPERTUXKART
================================================================================
--------------------------------------------------------------------------------
SYSTEM REQUIREMENTS
--------------------------------------------------------------------------------
To run SuperTuxKart on Android, you need a device that meets following
requirements:
- Android 4.4 or later
- Processor compatible with armv7 or x86
- GPU that supports OpenGL ES 3.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, ant, imagemagick, cmake,
vorbis-tools, pngquant
Additionally some dependencies for optimize_data script:
advancecomp, libjpeg-progs, optipng
Before compilation you must download the package with dependencies from:
https://github.com/supertuxkart/dependencies
and extract it to stk-code/lib. It contains sources of libraries that are used
in STK, but are not availiable in stk-code repository (curl, freetype, openal).
You need also Android SDK for android-19 platform (the API for Android 4.4) and
Android NDK. Note that NDK >= r15 is atm. not supported. Version r12b is
strongly recommended, because it's known that it works without issues.
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
./generate_assets.sh
./make.sh -j5
--------------------------------------------------------------------------------
ENVIRONMENT VARIABLES
--------------------------------------------------------------------------------
COMPILE_ARCH - Allows to choose CPU architecture for which the package will
be compiled.
Possible values: armv7, aarch64, x86, x86_64.
Default is: armv7.
BUILD_TYPE - Allows to set build type.
Possible values: debug, release, beta.
Default is: debug.
BUILD_TOOL - Allows to choose a tool that is used for creating package.
Note that ant has been already removed from Android SDK, so
you have to use SDK <= 25.2.5 for building with ant.
Possible values: ant, gradle.
Default is: gradle.
BUILD_TOOLS_VER - Allows to override the SDK build-tools version.
SDK_PATH - Path to SDK directory
NDK_PATH - Path to NDK directory
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
and then you make standard compilation with:
./generate_assets.sh
./make.sh -j5
The compiled apk is unsigned, so you have to sign it with your key. To sign it,
you have to run:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore \
my-release-key.keystore SuperTuxKart-release-unsigned.apk alias_name
and then:
zipalign -v 4 SuperTuxKart-release-unsigned.apk SuperTuxKart-release.apk

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -1,31 +0,0 @@
buildscript
{
repositories
{
jcenter()
}
dependencies
{
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
apply plugin: 'com.android.application'
android
{
compileSdkVersion compile_sdk_version.toInteger()
buildToolsVersion build_tools_ver
sourceSets
{
main
{
manifest.srcFile 'AndroidManifest.xml'
jniLibs.srcDirs = ['libs']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="SuperTuxKart" default="help">
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

View File

@@ -1,622 +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="all"
export TRACKS="abyss arena_candela_city battleisland cave cornfield_crossing \
endcutscene featunlocked fortmagma gplose gpwin hacienda \
icy_soccer_field introcutscene introcutscene2 lasdunasarena \
lasdunassoccer lighthouse mines minigolf olivermath overworld \
ravenbridge_mansion sandtrack scotland snowmountain snowtuxpeak \
soccer_field stadium stk_enterprise temple tutorial \
volcano_island xr591 zengarden"
export ASSETS_PATHS="../data \
../../stk-assets \
../../supertuxkart-assets"
export ASSETS_DIRS="library models music sfx textures"
export TEXTURE_SIZE=256
export JPEG_QUALITY=85
export PNG_QUALITY=95
export SOUND_QUALITY=42
export SOUND_MONO=1
export SOUND_SAMPLE=32000
export RUN_OPTIMIZE_SCRIPT=0
export DECREASE_QUALITY=1
export CONVERT_TO_JPG=1
export CONVERT_TO_JPG_BLACKLIST="data/models/traffic_light.png"
export BLACKLIST_FILES="data/music/cocoa_river_fast.ogg2"
################################################################################
export LANG=C
cd "`dirname "$0"`"
# 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 assets
# Copy all assets
echo "Copy all assets"
mkdir -p assets/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" assets/data/
fi
done;
# Copy selected tracks
echo "Copy selected tracks"
mkdir -p assets/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" assets/data/tracks/
fi
done
# Copy selected karts
echo "Copy selected karts"
mkdir -p assets/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" assets/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 --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" = "assets/$BLACKLIST_FILE" ]; then
BLACKLISTED=1
break
fi
done
if [ $BLACKLISTED -eq 1 ]; then
#echo " File is blacklisted. Ignore..."
continue
fi
FILE_EXTENSION=`echo "$FILE" | tail -c 5`
if [ `echo "$FILE_EXTENSION" | head -c 1` != "." ]; then
#echo " Unsupported file extension. Ignore..."
continue
fi
FILE_FORMAT=`identify -format %m "$FILE"`
if [ "$FILE_FORMAT" = "JPEG" ]; then
#echo " File is already JPEG. Ignore..."
continue
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..."
continue
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..."
continue
fi
NEW_FILE="`echo $FILE | head -c -5`.jpg"
if [ -f "$NEW_FILE" ]; then
#echo " There is already a file with .jpg extension. Ignore..."
continue
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 assets/data -iname "*.png" | while read f; do convert_image "$f" "png"; done
find assets/data -iname "*.jpg" | while read f; do convert_image "$f" "jpg"; done
find assets/data -iname "*.ogg" | while read f; do convert_sound "$f"; done
fi
if [ $CONVERT_TO_JPG -gt 0 ]; then
rm -f "./converted_textures"
find assets/data -not -path "assets/data/textures/*" \
-not -path "assets/data/karts/*" \
-iname "*.png" | while read f; do convert_to_jpg "$f"; done
find assets/data -iname "*.b3dz" | while read f; do convert_to_jpg_extract_b3dz "$f"; done
find assets/data -iname "*.b3d" | while read f; do convert_to_jpg_update_b3d "$f"; done
find assets/data -iname "*.spm" | while read f; do convert_to_jpg_update_spm "$f"; done
find assets/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 assets/data -iname "*.png" | while read f; do optimize_png "$f" "png"; done
fi
# Copy data directory
echo "Copy data directory"
cp -a ../data/* assets/data/
# Remove unused files
for BLACKLIST_FILE in $BLACKLIST_FILES; do
rm -f "assets/$BLACKLIST_FILE"
done
# Run optimize_data.sh script
if [ $RUN_OPTIMIZE_SCRIPT -gt 0 ]; then
echo "Run optimize_data.sh script"
sh -c 'cd assets/data; ../../../data/optimize_data.sh'
fi
# Generate directories list
echo "Generate directories list"
find assets/* -type d | sort > assets/directories.txt
sed -i s/'.\/assets\/'// assets/directories.txt
sed -i s/'assets\/'// assets/directories.txt
# It will be probably ignored by ant, but create it anyway...
touch assets/.nomedia
echo "Done."
exit 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -1,497 +0,0 @@
#!/bin/sh
#
# (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_TOOLCHAIN_PATH="$DIRNAME/obj/bin"
export NDK_BUILD_SCRIPT="$DIRNAME/Android.mk"
export PATH="$DIRNAME/obj/bin:$PATH"
export CROSS_SYSROOT="$DIRNAME/obj/sysroot"
#export NDK_CCACHE=ccache
export NDK_CPPFLAGS="-O3 -g"
export NDK_ABI_ARMV7=armeabi-v7a
export ARCH_ARMV7=arm
export HOST_ARMV7=arm-linux-androideabi
export NDK_PLATFORM_ARMV7=android-19
export MIN_SDK_VERSION_ARMV7=19
export TARGET_SDK_VERSION_ARMV7=26
export COMPILE_SDK_VERSION_ARMV7=26
export NDK_ABI_AARCH64=arm64-v8a
export ARCH_AARCH64=arm64
export HOST_AARCH64=aarch64-linux-android
export NDK_PLATFORM_AARCH64=android-21
export MIN_SDK_VERSION_AARCH64=21
export TARGET_SDK_VERSION_AARCH64=26
export COMPILE_SDK_VERSION_AARCH64=26
export NDK_ABI_X86=x86
export ARCH_X86=x86
export HOST_X86=i686-linux-android
export NDK_PLATFORM_X86=android-19
export MIN_SDK_VERSION_X86=19
export TARGET_SDK_VERSION_X86=26
export COMPILE_SDK_VERSION_X86=26
export NDK_ABI_X86_64=x86_64
export ARCH_X86_64=x86_64
export HOST_X86_64=x86_64-linux-android
export NDK_PLATFORM_X86_64=android-21
export MIN_SDK_VERSION_X86_64=21
export TARGET_SDK_VERSION_X86_64=26
export COMPILE_SDK_VERSION_X86_64=26
export APP_NAME_RELEASE="SuperTuxKart"
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
export APP_DIR_NAME_RELEASE="supertuxkart"
export APP_ICON_RELEASE="$DIRNAME/icon.png"
export APP_NAME_BETA="SuperTuxKart Beta"
export PACKAGE_NAME_BETA="org.supertuxkart.stk_beta"
export APP_DIR_NAME_BETA="supertuxkart-beta"
export APP_ICON_BETA="$DIRNAME/icon-dbg.png"
export APP_NAME_DEBUG="SuperTuxKart Debug"
export PACKAGE_NAME_DEBUG="org.supertuxkart.stk_dbg"
export APP_DIR_NAME_DEBUG="supertuxkart-dbg"
export APP_ICON_DEBUG="$DIRNAME/icon-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"
exit
fi
# Check if compilation for different platform has been started before
if [ -f "$DIRNAME/obj/compile_arch" ]; then
PROJECT_ARCH=$(cat "$DIRNAME/obj/compile_arch")
if [ -z "$COMPILE_ARCH" ]; then
COMPILE_ARCH="$PROJECT_ARCH"
elif [ "$PROJECT_ARCH" != "$COMPILE_ARCH" ]; then
echo "Error: Compilation for different platform has been already made."
echo "Run './make.sh clean' first or set COMPILE_ARCH variable" \
"to '$PROJECT_ARCH.'"
exit
fi
fi
# Update variables for selected architecture
if [ -z "$COMPILE_ARCH" ]; then
COMPILE_ARCH="armv7"
fi
if [ "$COMPILE_ARCH" = "armv7" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_ARMV7
export NDK_ABI=$NDK_ABI_ARMV7
export ARCH=$ARCH_ARMV7
export HOST=$HOST_ARMV7
export MIN_SDK_VERSION=$MIN_SDK_VERSION_ARMV7
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_ARMV7
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_ARMV7
elif [ "$COMPILE_ARCH" = "aarch64" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_AARCH64
export NDK_ABI=$NDK_ABI_AARCH64
export ARCH=$ARCH_AARCH64
export HOST=$HOST_AARCH64
export MIN_SDK_VERSION=$MIN_SDK_VERSION_AARCH64
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_AARCH64
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_AARCH64
elif [ "$COMPILE_ARCH" = "x86" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_X86
export NDK_ABI=$NDK_ABI_X86
export ARCH=$ARCH_X86
export HOST=$HOST_X86
export MIN_SDK_VERSION=$MIN_SDK_VERSION_X86
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_X86
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_X86
elif [ "$COMPILE_ARCH" = "x86_64" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_X86_64
export NDK_ABI=$NDK_ABI_X86_64
export ARCH=$ARCH_X86_64
export HOST=$HOST_X86_64
export MIN_SDK_VERSION=$MIN_SDK_VERSION_X86_64
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_X86_64
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_X86_64
else
echo "Unknow COMPILE_ARCH: $COMPILE_ARCH. Possible values are: " \
"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 ANT_BUILD_TYPE="debug"
export GRADLE_BUILD_TYPE="assembleDebug"
export IS_DEBUG_BUILD=1
export APP_NAME="$APP_NAME_DEBUG"
export PACKAGE_NAME="$PACKAGE_NAME_DEBUG"
export APP_DIR_NAME="$APP_DIR_NAME_DEBUG"
export APP_ICON="$APP_ICON_DEBUG"
elif [ "$BUILD_TYPE" = "release" ] || [ "$BUILD_TYPE" = "Release" ]; then
export ANT_BUILD_TYPE="release"
export GRADLE_BUILD_TYPE="assembleRelease"
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_RELEASE"
export PACKAGE_NAME="$PACKAGE_NAME_RELEASE"
export APP_DIR_NAME="$APP_DIR_NAME_RELEASE"
export APP_ICON="$APP_ICON_RELEASE"
elif [ "$BUILD_TYPE" = "beta" ] || [ "$BUILD_TYPE" = "Beta" ]; then
export ANT_BUILD_TYPE="release"
export GRADLE_BUILD_TYPE="assembleRelease"
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_BETA"
export PACKAGE_NAME="$PACKAGE_NAME_BETA"
export APP_DIR_NAME="$APP_DIR_NAME_BETA"
export APP_ICON="$APP_ICON_BETA"
else
echo "Unsupported BUILD_TYPE: $BUILD_TYPE. Possible values are: " \
"debug, release"
exit
fi
# Check selected build tool
if [ -z "$BUILD_TOOL" ]; then
BUILD_TOOL="gradle"
fi
if [ "$BUILD_TOOL" != "gradle" ] && [ "$BUILD_TOOL" != "ant" ]; then
echo "Unsupported BUILD_TOOL: $BUILD_TOOL. Possible values are: " \
"gradle, ant"
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")
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
# 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
# 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"
${NDK_PATH}/build/tools/make-standalone-toolchain.sh \
--platform=$NDK_PLATFORM \
--install-dir="$DIRNAME/obj/" \
--arch=$ARCH
check_error
touch "$DIRNAME/obj/make_standalone_toolchain.stamp"
echo $COMPILE_ARCH > "$DIRNAME/obj/compile_arch"
fi
echo "$PROJECT_VERSION" > "$DIRNAME/obj/project_version"
# Freetype
if [ ! -f "$DIRNAME/obj/freetype.stamp" ]; then
echo "Compiling freetype"
mkdir -p "$DIRNAME/obj/freetype"
cp -a -f "$DIRNAME/../lib/freetype/"* "$DIRNAME/obj/freetype"
cd "$DIRNAME/obj/freetype"
./configure --host=$HOST \
--without-zlib \
--without-png \
--without-harfbuzz &&
make $@
check_error
touch "$DIRNAME/obj/freetype.stamp"
fi
# Zlib
if [ ! -f "$DIRNAME/obj/zlib.stamp" ]; then
echo "Compiling zlib"
mkdir -p "$DIRNAME/obj/zlib"
cp -a -f "$DIRNAME/../lib/zlib/"* "$DIRNAME/obj/zlib"
cd "$DIRNAME/obj/zlib"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST &&
make $@
check_error
touch "$DIRNAME/obj/zlib.stamp"
fi
# Libpng
if [ ! -f "$DIRNAME/obj/libpng.stamp" ]; then
echo "Compiling libpng"
mkdir -p "$DIRNAME/obj/libpng"
mkdir -p "$DIRNAME/obj/libpng/lib"
cp -a -f "$DIRNAME/../lib/libpng/"* "$DIRNAME/obj/libpng"
cd "$DIRNAME/obj/libpng"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST \
-DZLIB_LIBRARY="$DIRNAME/obj/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/obj/zlib/" \
-DPNG_TESTS=0 &&
make $@
check_error
touch "$DIRNAME/obj/libpng.stamp"
fi
# Openal
if [ ! -f "$DIRNAME/obj/openal.stamp" ]; then
echo "Compiling openal"
mkdir -p "$DIRNAME/obj/openal"
cp -a -f "$DIRNAME/../lib/openal/"* "$DIRNAME/obj/openal"
cd "$DIRNAME/obj/openal"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST \
-DALSOFT_UTILS=0 \
-DALSOFT_EXAMPLES=0 \
-DALSOFT_TESTS=0 \
-DLIBTYPE=STATIC &&
make $@
check_error
touch "$DIRNAME/obj/openal.stamp"
fi
# OpenSSL
if [ ! -f "$DIRNAME/obj/openssl.stamp" ]; then
echo "Compiling openssl"
mkdir -p "$DIRNAME/obj/openssl"
cp -a -f "$DIRNAME/../lib/openssl/"* "$DIRNAME/obj/openssl"
cd "$DIRNAME/obj/openssl"
./Configure android --cross-compile-prefix="$HOST-"
make $@
check_error
touch "$DIRNAME/obj/openssl.stamp"
fi
# Curl
if [ ! -f "$DIRNAME/obj/curl.stamp" ]; then
echo "Compiling curl"
mkdir -p "$DIRNAME/obj/curl"
cp -a -f "$DIRNAME/../lib/curl/"* "$DIRNAME/obj/curl"
cd "$DIRNAME/obj/curl"
CPPFLAGS="-I$DIRNAME/obj/openssl/include -I$DIRNAME/obj/zlib $CPPFLAGS" \
LDFLAGS="-L$DIRNAME/obj/openssl/ -L$DIRNAME/obj/zlib $LDFLAGS" \
./configure --host=$HOST \
--with-ssl \
--disable-shared \
--enable-static \
--enable-threaded-resolver &&
make $@
check_error
touch "$DIRNAME/obj/curl.stamp"
fi
# Jpeglib
if [ ! -f "$DIRNAME/obj/jpeglib.stamp" ]; then
echo "Compiling jpeglib"
mkdir -p "$DIRNAME/obj/jpeglib"
cp -a -f "$DIRNAME/../lib/jpeglib/"* "$DIRNAME/obj/jpeglib"
cd "$DIRNAME/obj/jpeglib"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST &&
make $@
check_error
touch "$DIRNAME/obj/jpeglib.stamp"
fi
# Libogg
if [ ! -f "$DIRNAME/obj/libogg.stamp" ]; then
echo "Compiling libogg"
mkdir -p "$DIRNAME/obj/libogg"
cp -a -f "$DIRNAME/../lib/libogg/"* "$DIRNAME/obj/libogg"
cd "$DIRNAME/obj/libogg"
./configure --host=$HOST &&
make $@
check_error
touch "$DIRNAME/obj/libogg.stamp"
fi
# Libvorbis
if [ ! -f "$DIRNAME/obj/libvorbis.stamp" ]; then
echo "Compiling libvorbis"
mkdir -p "$DIRNAME/obj/libvorbis"
cp -a -f "$DIRNAME/../lib/libvorbis/"* "$DIRNAME/obj/libvorbis"
cd "$DIRNAME/obj/libvorbis"
CPPFLAGS="-I$DIRNAME/obj/libogg/include $CPPFLAGS" \
LDFLAGS="-L$DIRNAME/obj/libogg/src/.libs $LDFLAGS" \
./configure --host=$HOST &&
make $@
check_error
touch "$DIRNAME/obj/libvorbis.stamp"
fi
# STK
echo "Compiling STK"
cd "$DIRNAME"
${NDK_PATH}/ndk-build $@ \
APP_BUILD_SCRIPT="$NDK_BUILD_SCRIPT" \
APP_ABI="$NDK_ABI" \
APP_PLATFORM="$NDK_PLATFORM" \
APP_CPPFLAGS="$NDK_CPPFLAGS" \
APP_STL=gnustl_static \
NDK_DEBUG=$IS_DEBUG_BUILD
check_error
# Build apk
echo "Building APK"
mkdir -p "$DIRNAME/res/drawable/"
mkdir -p "$DIRNAME/res/drawable-hdpi/"
mkdir -p "$DIRNAME/res/drawable-mdpi/"
mkdir -p "$DIRNAME/res/drawable-xhdpi/"
mkdir -p "$DIRNAME/res/drawable-xxhdpi/"
mkdir -p "$DIRNAME/res/values/"
STRINGS_FILE="$DIRNAME/res/values/strings.xml"
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$STRINGS_FILE"
echo "<resources>" >> "$STRINGS_FILE"
echo " <string name=\"app_name\">$APP_NAME</string>" >> "$STRINGS_FILE"
echo "</resources>" >> "$STRINGS_FILE"
sed -i "s/minSdkVersion=\".*\"/minSdkVersion=\"$MIN_SDK_VERSION\"/g" \
"$DIRNAME/AndroidManifest.xml"
sed -i "s/targetSdkVersion=\".*\"/targetSdkVersion=\"$TARGET_SDK_VERSION\"/g" \
"$DIRNAME/AndroidManifest.xml"
sed -i "s/package=\".*\"/package=\"$PACKAGE_NAME\"/g" \
"$DIRNAME/AndroidManifest.xml"
sed -i "s/versionName=\".*\"/versionName=\"$PROJECT_VERSION\"/g" \
"$DIRNAME/AndroidManifest.xml"
sed -i "s/versionCode=\".*\"/versionCode=\"$PROJECT_CODE\"/g" \
"$DIRNAME/AndroidManifest.xml"
cp "banner.png" "$DIRNAME/res/drawable/banner.png"
cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png"
convert -scale 72x72 "$APP_ICON" "$DIRNAME/res/drawable-hdpi/icon.png"
convert -scale 48x48 "$APP_ICON" "$DIRNAME/res/drawable-mdpi/icon.png"
convert -scale 96x96 "$APP_ICON" "$DIRNAME/res/drawable-xhdpi/icon.png"
convert -scale 144x144 "$APP_ICON" "$DIRNAME/res/drawable-xxhdpi/icon.png"
if [ -f "/usr/lib/jvm/java-8-openjdk-amd64/bin/java" ]; then
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export PATH=$JAVA_HOME/bin:$PATH
fi
if [ "$BUILD_TOOL" = "gradle" ]; then
export ANDROID_HOME="$SDK_PATH"
gradle -Pcompile_sdk_version=$COMPILE_SDK_VERSION \
-Pbuild_tools_ver="$BUILD_TOOLS_VER" \
$GRADLE_BUILD_TYPE
elif [ "$BUILD_TOOL" = "ant" ]; then
ant -Dsdk.dir="$SDK_PATH" \
-Dtarget="android-$TARGET_SDK_VERSION" \
$ANT_BUILD_TYPE
fi
check_error

View File

@@ -14,11 +14,11 @@ FIND_PATH(Angelscript_INCLUDE_DIRS angelscript.h
)
FIND_LIBRARY(Angelscript_LIBRARY
NAMES angelscript angelscript_s
NAMES angelscript
PATHS
/usr/local
/usr
PATH_SUFFIXES lib lib64 lib32
PATH_SUFFIXES lib
)
# handle the QUIETLY and REQUIRED arguments and set ANGELSCRIPT_FOUND to TRUE if

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,29 +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")
find_library(FREETYPE_LIBRARY NAMES freetype PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
set(FREETYPE_FOUND 1)
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
elseif(APPLE)
find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h PATHS "/Library/Frameworks/FreeType.Framework/Versions/2.4/unix/include")
find_library(FREETYPE_LIBRARY NAMES freetype PATHS "/Library/Frameworks/FreeType.Framework/Versions/2.4/")
include_directories(/Library/Frameworks/FreeType.Framework/Versions/2.4/unix/include)
set(FREETYPE_FOUND 1)
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
elseif(UNIX)
include(FindPkgConfig)
pkg_check_modules(FREETYPE freetype2)
else()
set(FREETYPE_FOUND 0)
endif()

View File

@@ -9,7 +9,14 @@
# FRIBIDI_LIBRARIES
# Fribidi library list
if(UNIX AND NOT APPLE)
if(APPLE)
set(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h PATHS /Library/Frameworks/fribidi.framework/Headers)
find_library(FRIBIDI_LIBRARY NAMES fribidi PATHS /Library/Frameworks/fribidi.framework)
set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
include_directories(/Library/Frameworks/fribidi.framework/Headers)
#add_definitions(-framework fribidi)
set(FRIBIDI_FOUND 1)
elseif(UNIX)
include(FindPkgConfig)
pkg_check_modules(FRIBIDI fribidi)
else()
@@ -17,8 +24,8 @@ else()
endif()
if(NOT FRIBIDI_FOUND)
find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h PATHS /Library/Frameworks/fribidi.framework/Headers "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
find_library(FRIBIDI_LIBRARY NAMES fribidi PATHS /Library/Frameworks/fribidi.framework "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h PATHS /Library/Frameworks/fribidi.framework/Headers "${PROJECT_SOURCE_DIR}/dependencies/include")
find_library(FRIBIDI_LIBRARY NAMES fribidi PATHS /Library/Frameworks/fribidi.framework "${PROJECT_SOURCE_DIR}/dependencies/lib")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fribidi DEFAULT_MSG FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY)

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

@@ -10,13 +10,21 @@
# OggVorbis library list
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")
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")
if (APPLE)
set(OGGVORBIS_OGG_INCLUDE_DIR "/Library/Frameworks/Ogg.framework/Headers/")
set(OGGVORBIS_VORBIS_INCLUDE_DIR "/Library/Frameworks/Vorbis.framework/Headers/")
endif()
if(APPLE AND NOT OGGVORBIS_VORBISFILE_LIBRARY)
# Seems to be the same on Apple systems
set(OGGVORBIS_VORBISFILE_LIBRARY ${OGGVORBIS_VORBIS_LIBRARY})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OggVorbis DEFAULT_MSG
@@ -25,8 +33,8 @@ find_package_handle_standard_args(OggVorbis DEFAULT_MSG
# 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})
set(OGGVORBIS_LIBRARIES ${OGGVORBIS_OGG_LIBRARY} ${OGGVORBIS_VORBIS_LIBRARY} ${OGGVORBIS_VORBISFILE_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)
mark_as_advanced(OGGVORBIS_OGG_LIBRARY OGGVORBIS_VORBIS_LIBRARY OGGVORBIS_VORBISFILE_LIBRARY)

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)

18
cmake/FindXrandr.cmake Normal file
View File

@@ -0,0 +1,18 @@
find_path(XRANDR_INCLUDE_DIR NAMES X11/extensions/Xrandr.h
PATH_SUFFIXES X11/extensions
DOC "The XRANDR include directory"
)
find_library(XRANDR_LIBRARY NAMES Xrandr
DOC "The XRANDR library"
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRANDR DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
if(XRANDR_FOUND)
set( XRANDR_LIBRARIES ${XRANDR_LIBRARY} )
set( XRANDR_INCLUDE_DIRS ${XRANDR_INCLUDE_DIR} )
endif()
mark_as_advanced(XRANDR_INCLUDE_DIR XRANDR_LIBRARY)

View File

@@ -1,32 +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}-gcc")
SET(CMAKE_CXX_COMPILER "${HOST}-g++")
SET(CMAKE_RC_COMPILER "${HOST}-windres")
# 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,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-mingw-64bit ${PROJECT_SOURCE_DIR}/dependencies-64bit)
# 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,6 +1,3 @@
# Usage:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
@@ -9,11 +6,8 @@ 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-mingw ${PROJECT_SOURCE_DIR}/dependencies)
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/4.9-posix ${PROJECT_SOURCE_DIR}/dependencies)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search

Binary file not shown.

View File

@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>supertuxkart</string>
<string>SuperTuxKart</string>
<key>CFBundleIconFile</key>
<string>supertuxkart.icns</string>
<key>CFBundleIdentifier</key>
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.8.1</string>
<key>CFBundleSignature</key>
<string>SPTK</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>0.8.1</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>

View File

@@ -1,178 +1,68 @@
<?xml version="1.0"?>
<!-- List of counters the achievements can query.
The format to use is <goal type="name_of_the_counter" value="X"/>
where X is the desired value of the counter ;e.g. <won_races value="10"/>
WARNING! If a goal node is malformed, it is ignored.
___________________________________________________________________________
S - Logical relations and subgoals
When you define multiple goals, the achievement will be completed
if they are all met, but they don't need to be met at once.
To have more possibilities, you can define subgoals and the
logical relationship they need to meet.
The available relations are :
AND // The subgoals have to be met, but not necessarily at once
AND-AT-ONCE // The subgoals have to be met at the same time.
OR // One of the subgoal has to be met
SUM // The subgoals sum must reach a certain (positive !) number.
The format to use for AND, AND-AT-ONCE and OR is :
<goal type="AND">
<goal type="name_of_counter" value="X"/>
<goal type="name_of_counter" value="Y"/>
</goal>
For SUM, it is :
<goal type="SUM" value="X">
<goal type="name_of_counter" operation="+"/>
<goal type="name_of_counter" operation="-"/>
</goal>
With the value of operation (+ or -) defining if the subgoal is added
or substracted from the total.
Sub-goals can also have their own sub-goals,
however a AND, AND-AT-ONCE or OR can't have a SUM goal for parent.
___________________________________________________________________________
I - Won races (normal, time-trial, FTL) counters.
Require to beat at least 3 AIs in any difficulty.
won-races : total number of races won
won-normal-races
won-tt-races
won-ftl-races
II - Consecutive won races counters.
These counters are reset if a race is restarted,
or if a race is lost even if the AI count to increment
is not met.
cons-won-races
cons-won-races-hard // This requires 5+ AIs and expert+ difficulty
III - Race started and finished counters, by difficulty (linear races only)
easy-started
easy-finished
medium-started
medium-finished
hard-started
hard-finished
best-started
best-finished
IV - Race started and finished counters, by game mode.
Races against a ghost are counted both in the base mode counter,
either time-trial or egg hunt, and in their own specific counter.
normal-started
normal-finished
tt-started
tt-finished
ftl-started
ftl-finished
three-strikes-started
three-strikes-finished
soccer-started
soccer-finished
egg-hunt-started
egg-hunt-finished
with-ghost-started
with-ghost-finished
ctf-started
ctf-finished
ffa-started
ffa-finished
IV - Counters related to powerup use. The hit counters reference how many
times the player kart has hit other karts, not how often it was hit.
powerup-used
powerup-used-1race
bowling-hit
bowling-hit-1race
swatter-hit
swatter-hit-1race
all-hits // hits from bowling ball, cake and swatter
all-hits-1race
hit-same-kart-1race
V - Counters related to other race events.
banana // counts how many banana the player's kart has hit
banana-1race
skidding
skidding-1race
skidding-1lap
VI - Per-track counters (at least one track reach the value)
race-started
race-finished
race-won
race-finished-reverse
race-finished-alone
less-laps
more-laps
twice-laps
egg-hunt-started
egg-hunt-finished
VII - Per-track counters (all non-addon tracks reach the value)
race-started-all
race-finished-all
race-won-all
race-finished-reverse-all
race-finished-alone-all
less-laps-all
more-laps-all
twice-laps-all
// For egg hunts, all non-addon tracks with egg hunt support
// must reach the value
egg-hunt-started-all
egg-hunt-finished-all
-->
<achievements>
<achievement id="1" name="Christoffel Columbus" description="Play every official track at least once." >
<goal type="race-finished-all" value="1"/>
</achievement>
<achievement id="2" name="Strike!" description="Hit 10 karts with a bowling-ball.">
<goal type="bowling-hit" value="10"/>
</achievement>
<achievement id="3" name="Arch Enemy" description="Hit the same kart at least 5 times in one race.">
<goal type="hit-same-kart-1race" value="5"/>
</achievement>
<achievement id="4" name="Marathoner" description="Finish a race with at least twice the track's default lap number.">
<goal type="twice-laps" value="1"/>
</achievement>
<achievement id="5" name="Skid-row" description="Skid 5 times in a single lap.">
<goal type="skidding-1lap" value="5"/>
</achievement>
<achievement id="6" name="Gold driver" description="Win against at least 3 AIs in normal race, time-trial, and follow the leader.">
<goal type="won-normal-races" value="1"/>
<goal type="won-tt-races" value="1"/>
<goal type="won-ftl-races" value="1"/>
</achievement>
<achievement id="7" name="Powerup Love" description="Use 10 or more powerups in a race.">
<goal type="powerup-used-1race" value="10"/>
</achievement>
<achievement id="8" name="Unstoppable" description="Win 5 single races in a row against at least 3 AIs. Beware, restarting a race counts as a loss.">
<goal type="cons-won-races" value="5"/>
</achievement>
<achievement id="9" name="Banana Lover" description="Collect at least 5 bananas in one race.">
<goal type="banana-1race" value="5"/>
</achievement>
<achievement id="10" name="It's secret" description="Really ... a secret." secret="yes">
</achievement>
<achievement id="11" name="Mosquito Hunter" description="Take your opponents for mosquitos! With the swatter, squash them at least 5 times in a race.">
<goal type="swatter-hit-1race" value="5"/>
</achievement>
<achievement id="12" name="Beyond Luck" description="Win 10 single races in a row in Expert or SuperTux against at least 5 AIs. Beware, restarting a race counts as a loss.">
<goal type="cons-won-races-hard" value="10"/>
</achievement>
<achievement id="1" check-type="all-at-least" reset-type="never"
name="Christoffel Columbus" description="Play every official track at least once." >
<city goal="1"/>
<cocoa_temple goal="1"/>
<farm goal="1"/>
<fortmagma goal="1"/>
<gran_paradiso_island goal="1"/>
<greenvalley goal="1"/>
<hacienda goal="1"/>
<lighthouse goal="1"/>
<mansion goal="1"/>
<mines goal="1"/>
<minigolf goal="1"/>
<olivermath goal="1"/>
<sandtrack goal="1"/>
<scotland goal="1"/>
<snowmountain goal="1"/>
<snowtuxpeak goal="1"/>
<stk_enterprise goal="1"/>
<subsea goal="1"/>
<xr591 goal="1"/>
<zengarden goal="1"/>
</achievement>
<achievement id="2" check-type="all-at-least" reset-type="never"
name="Strike!" description="Hit 10 karts with a bowling-ball.">
<ball goal="10"/>
</achievement>
<achievement id="3" check-type="one-at-least" reset-type="race"
name="Arch Enemy" description="Hit the same kart at least 5 times in one race.">
<hit goal="5"/>
</achievement>
<achievement id="4" check-type="all-at-least" reset-type="race"
name="Marathoner" description="Make a race with 5 laps or more.">
<laps goal="5"/>
</achievement>
<achievement id="5" check-type="all-at-least" reset-type="lap"
name="Skid-row" description="Make 5 skidding in a single lap.">
<skidding goal="5"/>
</achievement>
<achievement id="6" check-type="all-at-least" reset-type="never"
name="Gold driver" description="Win against at least 3 opponents in all single player modes.">
<standard goal="1"/>
<std_timetrial goal="1"/>
<follow_leader goal="1"/>
<opponents goal="3"/>
</achievement>
<achievement id="7" check-type="all-at-least" reset-type="race"
name="Powerup Love" description="Use 10 or more powerups in a race.">
<poweruplover goal="10"/>
</achievement>
<achievement id="8" check-type="all-at-least" reset-type="never"
name="Unstoppable" description="Win 5 single races in a row.">
<wins goal="5"/>
</achievement>
<achievement id="9" check-type="all-at-least" reset-type="race"
name="Banana Lover" description="Collect at least 5 bananas in one race.">
<banana goal="5"/>
</achievement>
<achievement id="10" secret="yes" check-type="all-at-least" reset-type="race"
name="It's secret" description="Really ... a secret.">
</achievement>
<achievement id="11" check-type="all-at-least" reset-type="race"
name="Mosquito Hunter" description="Take your opponents for mosquitos! With the swatter, squash at least 5 of them in a race.">
<swatter goal="5"/>
</achievement>
</achievements>

View File

@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDezCCAmOgAwIBAgIJAO+A8uXtEMRsMA0GCSqGSIb3DQEBCwUAMFQxCzAJBgNV
BAYTAlVTMQwwCgYDVQQIDANTVEsxFTATBgNVBAoMDFN1cGVyVHV4S2FydDEgMB4G
A1UEAwwXYWRkb25zLnN1cGVydHV4a2FydC5uZXQwHhcNMTQxMjEwMTEzMTAwWhcN
MjQxMjA3MTEzMTAwWjBUMQswCQYDVQQGEwJVUzEMMAoGA1UECAwDU1RLMRUwEwYD
VQQKDAxTdXBlclR1eEthcnQxIDAeBgNVBAMMF2FkZG9ucy5zdXBlcnR1eGthcnQu
bmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2ysZE9rb4y0tHOhk
wxYpqsvDv5LCRFTAeyfAfyBVDcOn+4A3sX8MkQdoH/QDi823z4bn9ZsGV8T444FN
S4yK/aSRv3eAKkkJm5TUxbs3crATVt3JYusMr5W4wHvRVyDe0DlulSdW4EUEklMP
iPat/jwlDZRvZueio3wJoOhZXnl8E8EfnuYtlNONIB1nYGdUHD9xeNyKSPr4zTEp
brjvSw0l5G88LmQOROQBDbTDknAcIQwsFT1mf9Bt+N9LK14r95GWRmL3ZtfbrJn4
ZEfkOjl0Abv6gET4sQOXv0KioUdEJwzFCwKFLZVcuOrscmcHBOhgD3EruVvprIJ0
wZ3z1wIDAQABo1AwTjAdBgNVHQ4EFgQUmQwaPsD+ylVUUsUXMAYpUlnVbNwwHwYD
VR0jBBgwFoAUmQwaPsD+ylVUUsUXMAYpUlnVbNwwDAYDVR0TBAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAQEASyl6BMpnZhJlirDL84/RkVeVjBkr7x68UFAblmKjgfGg
pRbYPNSld0IrfZ4pcrDAUkg9WJb0Zxuh0oYiV+RjdW/6s5mF/qiSv8V60xb2myRd
z90ZGfhB5SAECI5zfIZSmsMjOEjKjuz8S26aEtJe8Vq7GF2P7/889lfNXrbvIkZX
HQpx2P+T07zy++6Ca/K2vmWcf1a+GrN+o0nZTYbz/2r/JJwXdWqT1ZmtEA9GNwvZ
J8HhgvspgjgVP/EURUUhOaQ8zfhriU5CJAIuhMhzW7oOBPHxxtxme3auAfxi5zpK
wRNluCayrrjhy2I8mABRnBqgMwAQUIrgk9IU6SyQxw==
-----END CERTIFICATE-----

File diff suppressed because it is too large Load Diff

View File

@@ -1,26 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="candela_city" laps="3" reverse="false"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="90"/>
<best>
<karts number="9"/>
<requirements position="1" time="112"/>
</best>
<hard>
<karts number="8"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="7"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="6"/>
<requirements position="1"/>
</easy>
<unlock kart="sara_the_racer"/>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="abyss" laps="3" reverse="false"/>
<challenge version="2">
<track id="city" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<requirements trophies="70"/>
<best>
<karts number="7"/>
<requirements position="1" time="130"/>
</best>
<hard>
<karts number="6"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="5"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="4"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="cocoa_temple" laps="3" reverse="false"/>
<mode major="single" minor="timetrial"/>
<requirements trophies="45"/>
<best>
<karts number="1"
replay_file="challenge_cocoa_temple_supertux.replay"/>
<requirements position="1"/>
</best>
<hard>
<karts number="1"
replay_file="challenge_cocoa_temple_expert.replay"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="1"
replay_file="challenge_cocoa_temple_intermediate.replay"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="1"
replay_file="challenge_cocoa_temple_novice.replay"/>
<karts number="1"/>
<requirements position="1"/>
</easy>
<unlock kart="suzanne"/>
</challenge>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="cornfield_crossing" laps="3" reverse="false"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<best>
<karts number="8"/>
<requirements position="1" time="128"/>
</best>
<hard>
<karts number="7"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="6"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="5"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="farm" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<hard>
<karts number="5"/>
<requirements position="1" time="110"/>
</hard>
<medium>
<karts number="4"/>
<requirements time="125"/>
</medium>
<easy>
<karts number="4"/>
<requirements time="155"/>
</easy>
</challenge>

View File

@@ -1,14 +1,9 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="fortmagma" laps="3" reverse="false"/>
<challenge version="2">
<track id="fortmagma" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="190" challenges="24"/>
<requirements trophies="180"/>
<best>
<karts number="2" aiIdent="nolok" superPower="nolokBoss"/>
<requirements position="1"/>
</best>
<hard>
<karts number="2" aiIdent="nolok" superPower="nolokBoss"/>
<requirements position="1"/>
@@ -24,5 +19,6 @@
<unlock kart="gnu"/>
<unlock kart="nolok"/>
<unlock difficulty="difficulty_best"/>
<unlock track="fortmagma"/>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<challenge version="2">
<grandprix id="1_penguinplayground"/>
<mode major="grandprix" minor="quickrace"/>
<requirements trophies="30"/>
<requirements trophies="40"/>
<best>
<karts number="7"/>
<requirements position="1"/>
</best>
<hard>
<karts number="6"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="5"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="4"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<challenge version="2">
<grandprix id="2_offthebeatentrack"/>
<mode major="grandprix" minor="quickrace"/>
<requirements trophies="70"/>
<requirements trophies="85"/>
<best>
<karts number="8"/>
<requirements position="1"/>
</best>
<hard>
<karts number="7"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="6"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="5"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<challenge version="2">
<grandprix id="3_tothemoonandback"/>
<mode major="grandprix" minor="timetrial"/>
<requirements trophies="120"/>
<mode major="grandprix" minor="quickrace"/>
<requirements trophies="125"/>
<best>
<karts number="9"/>
<requirements position="1"/>
</best>
<hard>
<karts number="8"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="7"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="6"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<challenge version="2">
<grandprix id="4_atworldsend"/>
<mode major="grandprix" minor="quickrace"/>
<requirements trophies="165"/>
<best>
<karts number="10"/>
<requirements position="1"/>
</best>
<hard>
<karts number="9"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="8"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="7"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="gran_paradiso_island" laps="3" reverse="false"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="80"/>
<best>
<karts number="9"/>
<requirements position="1" time="134"/>
</best>
<hard>
<karts number="8"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="7"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="6"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="black_forest" laps="2" reverse="false"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="130"/>
<best>
<karts number="10"/>
<requirements position="1" time="170"/>
</best>
<hard>
<karts number="9"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="8"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="7"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="hacienda" laps="3" reverse="false"/>
<challenge version="2">
<track id="hacienda" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<requirements trophies="45"/>
<best>
<karts number="7"/>
<requirements position="1" time="124"/>
</best>
<hard>
<karts number="6"/>
<requirements position="1"/>
<karts number="5"/>
<requirements position="2" time="170"/>
</hard>
<medium>
<karts number="5"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="185"/>
</medium>
<easy>
<karts number="4"/>
<requirements position="1"/>
<requirements time="220"/>
</easy>
</challenge>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="gran_paradiso_island" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="95"/>
<hard>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="4"/>
<requirements position="2"/>
</medium>
<easy>
<karts number="3"/>
<requirements position="3"/>
</easy>
</challenge>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="cocoa_temple" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="15"/>
<hard>
<karts number="5"/>
<requirements position="1" time="170"/>
</hard>
<medium>
<karts number="4"/>
<requirements time="210"/>
</medium>
<easy>
<karts number="4"/>
<requirements time="300"/>
</easy>
</challenge>

View File

@@ -1,24 +1,20 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="lighthouse" laps="4" reverse="false"/>
<challenge version="2">
<track id="lighthouse" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="95"/>
<requirements trophies="135"/>
<best>
<karts number="9"/>
<requirements position="1" time="120"/>
</best>
<hard>
<karts number="8"/>
<requirements position="1"/>
<karts number="5"/>
<requirements time="110" position="1"/>
</hard>
<medium>
<karts number="7"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="145" position="1"/>
</medium>
<easy>
<karts number="6"/>
<requirements position="1"/>
<karts number="3"/>
<requirements time="185"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="ravenbridge_mansion" laps="3" reverse="false"/>
<challenge version="2">
<track id="mansion" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<best>
<karts number="8"/>
<requirements position="1" time="130"/>
</best>
<requirements trophies="110"/>
<hard>
<karts number="7"/>
<requirements position="1"/>
<karts number="5"/>
<requirements time="130"/>
</hard>
<medium>
<karts number="6"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="130"/>
</medium>
<easy>
<karts number="5"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="160"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="mines" laps="3" reverse="false"/>
<challenge version="2">
<track id="mines" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="140"/>
<requirements trophies="150"/>
<best>
<karts number="10"/>
<requirements position="1" time="122"/>
</best>
<hard>
<karts number="9"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="170"/>
</hard>
<medium>
<karts number="8"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="190"/>
</medium>
<easy>
<karts number="7"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="255"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="minigolf" laps="4" reverse="false"/>
<challenge version="2">
<track id="minigolf" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="125"/>
<requirements trophies="150"/>
<best>
<karts number="10"/>
<requirements position="1" time="116"/>
</best>
<hard>
<karts number="9"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="8"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="7"/>
<karts number="3"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -1,24 +1,20 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="olivermath" laps="5" reverse="false"/>
<challenge version="2">
<track id="olivermath" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="75"/>
<best>
<karts number="9"/>
<requirements position="1" time="77"/>
</best>
<requirements trophies="0"/>
<hard>
<karts number="8"/>
<requirements position="1"/>
<karts number="5"/>
<requirements position="1" time="50"/>
</hard>
<medium>
<karts number="7"/>
<requirements position="1"/>
<karts number="5"/>
<requirements position="1" time="65"/>
</medium>
<easy>
<karts number="6"/>
<requirements position="1"/>
<karts number="5"/>
<requirements position="1" time="80"/>
</easy>
</challenge>

View File

@@ -1,21 +1,16 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="sandtrack" laps="3" reverse="false"/>
<mode major="single" minor="timetrial"/>
<challenge version="2">
<track id="sandtrack" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<best>
<karts number="1"/>
<requirements energy="20" time="128"/>
</best>
<hard>
<karts number="1"/>
<requirements energy="18" time="155"/>
<requirements energy="18" time="167"/>
</hard>
<medium>
<karts number="1"/>
<requirements energy="15" time="190"/>
<requirements energy="15" time="195"/>
</medium>
<easy>
<karts number="1"/>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="scotland" laps="3" reverse="false"/>
<challenge version="2">
<track id="scotland" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<best>
<karts number="7"/>
<requirements position="1" time="125"/>
</best>
<hard>
<karts number="6"/>
<requirements position="1" time="150"/>
<karts number="5"/>
<requirements position="1" time="165"/>
</hard>
<medium>
<karts number="5"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="185"/>
</medium>
<easy>
<karts number="4"/>
<requirements position="1"/>
<requirements time="270"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="snowmountain" laps="3" reverse="false"/>
<challenge version="2">
<track id="snowmountain" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="105"/>
<best>
<karts number="9"/>
<requirements position="1" time="110"/>
</best>
<requirements trophies="60"/>
<hard>
<karts number="8"/>
<requirements position="1"/>
<karts number="5"/>
<requirements time="160"/>
</hard>
<medium>
<karts number="7"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="187"/>
</medium>
<easy>
<karts number="6"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="250"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="snowtuxpeak" laps="3" reverse="false"/>
<challenge version="2">
<track id="snowtuxpeak" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<requirements trophies="60"/>
<best>
<karts number="8"/>
<requirements position="1" time="105"/>
</best>
<hard>
<karts number="7"/>
<requirements position="1"/>
<karts number="5"/>
<requirements position="1" time="145"/>
</hard>
<medium>
<karts number="6"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="170"/>
</medium>
<easy>
<karts number="5"/>
<requirements position="1"/>
<karts number="4"/>
<requirements time="195"/>
</easy>
</challenge>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="stk_enterprise" laps="3"/>
<mode major="single" minor="followtheleader"/>
<requirements trophies="110"/>
<hard>
<karts number="6"/>
<requirements position="2"/>
</hard>
<medium>
<karts number="6"/>
<requirements position="2"/>
</medium>
<easy>
<karts number="5"/>
<requirements position="2"/>
</easy>
</challenge>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="stk_enterprise" laps="3" reverse="false"/>
<mode major="single" minor="timetrial"/>
<requirements trophies="145"/>
<best>
<karts number="10"/>
<requirements position="1" time="132"/>
</best>
<hard>
<karts number="9"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="8"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="7"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="subsea" laps="2"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<hard>
<karts number="5"/>
<requirements position="1" time="200"/>
</hard>
<medium>
<karts number="4"/>
<requirements time="225"/>
</medium>
<easy>
<karts number="4"/>
<requirements time="290"/>
</easy>
</challenge>

View File

@@ -1,20 +1,15 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="volcano_island" laps="2" reverse="false"/>
<challenge version="2">
<track id="greenvalley" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<requirements trophies="95"/>
<best>
<karts number="7"/>
<requirements position="1" time="138"/>
</best>
<hard>
<karts number="6"/>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="5"/>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="true"/>
<!-- This is the (rounded) point equivalent of finishing all challenges
in easy, except the final challenge -->
<requirements trophies="190"/>
<unlock kart="amanda"/>
</challenge>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="true"/>
<!-- This is the point equivalent of finishing the
story mode with 8 supertux challenges and the rest in gold -->
<requirements trophies="280"/>
<unlock kart="sara_the_wizard"/>
</challenge>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="true"/>
<!-- This is the point equivalent of finishing the
story mode with all gold except 14 silver challenges -->
<requirements trophies="250"/>
<alt_requirements max-req-in-lower-diff="5"/>
<unlock difficulty="difficulty_best"/>
</challenge>

View File

@@ -1,17 +1,12 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="xr591" laps="2" reverse="false"/>
<mode major="single" minor="timetrial"/>
<requirements trophies="150"/>
<challenge version="2">
<track id="xr591" laps="2"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="135"/>
<best>
<karts number="1"/>
<requirements energy="20" time="92"/>
</best>
<hard>
<karts number="1"/>
<requirements energy="18" time="112"/>
<requirements energy="18" time="120"/>
</hard>
<medium>
<karts number="1"/>
@@ -22,3 +17,5 @@
<requirements energy="12" time="180"/>
</easy>
</challenge>

View File

@@ -1,24 +1,19 @@
<?xml version="1.0"?>
<challenge version="3">
<unlock_list list="false"/>
<track id="zengarden" laps="4" reverse="false"/>
<challenge version="2">
<track id="zengarden" laps="3"/>
<mode major="single" minor="timetrial"/>
<requirements trophies="35"/>
<requirements trophies="45"/>
<best>
<karts number="8"/>
<requirements position="1" time="105"/>
</best>
<hard>
<karts number="7"/>
<karts number="2"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="6"/>
<karts number="2"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="5"/>
<karts number="2"/>
<requirements position="1"/>
</easy>
</challenge>

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
data/fonts/BigDigitFont.xml Executable file

Binary file not shown.

BIN
data/fonts/LayneHansom0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
data/fonts/Mplus2p_JP0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
data/fonts/StkChineseFont.xml Executable file

Binary file not shown.

BIN
data/fonts/StkFont.xml Normal file

Binary file not shown.

Binary file not shown.

BIN
data/fonts/comix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

22
data/fonts/materials.xml Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<materials>
<!-- Fonts -->
<material name="title_font.png" shader="unlit" lazy-load="Y"/>
<material name="title_font_2.png" shader="unlit" lazy-load="Y"/>
<material name="sigmar0.png" shader="unlit" lazy-load="Y"/>
<material name="comix.png" shader="unlit" lazy-load="Y"/>
<material name="LayneHansom0.png" shader="unlit" lazy-load="Y"/>
<material name="Mplus2p_JP0.png" shader="unlit" lazy-load="Y"/>
<material name="rasheeq0.png" shader="unlit" lazy-load="Y"/>
<material name="rasheeq3.png" shader="unlit" lazy-load="Y"/>
<material name="rasheeq4.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei0.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei1.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei2.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei3.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei4.png" shader="unlit" lazy-load="Y"/>
<material name="wqyMicroHei5.png" shader="unlit" lazy-load="Y"/>
<material name="AR_PL_SungtiL_GB0.png" shader="unlit" lazy-load="Y"/>
<material name="LayneHansomBigDigits.png" shader="unlit" lazy-load="Y"/>
</materials>

BIN
data/fonts/rasheeq.xml Normal file

Binary file not shown.

BIN
data/fonts/rasheeq0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
data/fonts/rasheeq1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
data/fonts/rasheeq3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
data/fonts/rasheeq4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
data/fonts/sigmar0.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/fonts/title_font.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
data/fonts/title_font.xml Normal file

Binary file not shown.

BIN
data/fonts/title_font_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

BIN
data/fonts/wqyMicroHei0.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
data/fonts/wqyMicroHei1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
data/fonts/wqyMicroHei2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
data/fonts/wqyMicroHei3.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
data/fonts/wqyMicroHei4.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
data/fonts/wqyMicroHei5.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
data/fonts/wqyMicroHei6.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -4,26 +4,27 @@
<spreading angle="10" />
<velocity x="0.0"
y="0.003"
y="0.002"
z="0.0" />
<material file="smoke_black.png" />
<!-- Amount of particles emitted per second -->
<rate min="7"
max="12" />
<rate min="25"
max="50" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="2500"
max="5000" />
<!-- Size of the particles -->
<size min="1.6"
max="2.5"
x-increase-factor="2.6"
y-increase-factor="2.6" />
<size min="0.6"
max="1.5" />
<color min="50 50 50"
max="100 100 100" />
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="1000" />
</particles>

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