827 Commits

Author SHA1 Message Date
ilikecats
1cf9d28400 Make zipper faster + speed is more easily customizable 2024-08-18 14:47:14 -07:00
b8233a7dc6 Warning about game being unstable
Some checks failed
windows / build (aarch64, ubuntu-latest) (push) Has been cancelled
windows / build (aarch64, windows-latest) (push) Has been cancelled
windows / build (armv7, ubuntu-latest) (push) Has been cancelled
windows / build (armv7, windows-latest) (push) Has been cancelled
windows / build (i686, ubuntu-latest) (push) Has been cancelled
windows / build (i686, windows-latest) (push) Has been cancelled
windows / build (x86_64, ubuntu-latest) (push) Has been cancelled
windows / build (x86_64, windows-latest) (push) Has been cancelled
windows / Packaging STK (push) Has been cancelled
apple / build (arm64, MacOSX) (push) Has been cancelled
apple / build (arm64, iPhoneOS) (push) Has been cancelled
apple / build (x86_64, MacOSX) (push) Has been cancelled
linux / build (Debug, clang, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Debug, clang, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Debug, gcc, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Debug, gcc, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Release, clang, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Release, clang, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Release, gcc, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Release, gcc, ubuntu-latest, ON) (push) Has been cancelled
switch / Build Switch (push) Has been cancelled
apple / Packaging STK (push) Has been cancelled
2024-07-14 12:48:57 -07:00
2c56e19620 Nitro and zipper are faster + update README.cat 2024-07-14 12:46:36 -07:00
7d55d196c4 Nitro makes you faster 2024-07-14 12:17:49 -07:00
30f9460b97 Removed speed limit 2024-07-06 12:46:28 -07:00
12fb756d89 Clarifying README.cat a bit, removed auto rescue 2024-07-05 18:40:40 -07:00
c7af2ae557 Forgot to add README.cat in the last commit 2024-07-05 18:27:15 -07:00
06d30d1b77 At the start of a race, give 1 nitro, and give nitro when used (instead of taking away, effectivly infinite nitro) 2024-07-05 18:25:32 -07:00
6e6c5de622 Add separate README for my changes and stuff, changed README.md to link to it 2024-07-05 18:16:21 -07:00
b88e96888d Looks a little better (maybe in future, make it say infinite amount?) 2024-07-05 18:09:37 -07:00
d31c8c4e04 Allow setting default powerup (instead of nothing) and set default powerup to zipper 2024-07-05 18:06:55 -07:00
6c5eb075aa Make README.md work with gitea
Some checks failed
apple / build (arm64, MacOSX) (push) Has been cancelled
apple / build (arm64, iPhoneOS) (push) Has been cancelled
apple / build (x86_64, MacOSX) (push) Has been cancelled
linux / build (Debug, clang, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Debug, clang, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Debug, gcc, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Debug, gcc, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Release, clang, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Release, clang, ubuntu-latest, ON) (push) Has been cancelled
linux / build (Release, gcc, ubuntu-latest, OFF) (push) Has been cancelled
linux / build (Release, gcc, ubuntu-latest, ON) (push) Has been cancelled
switch / Build Switch (push) Has been cancelled
windows / build (aarch64, ubuntu-latest) (push) Has been cancelled
windows / build (aarch64, windows-latest) (push) Has been cancelled
windows / build (armv7, ubuntu-latest) (push) Has been cancelled
windows / build (armv7, windows-latest) (push) Has been cancelled
windows / build (i686, ubuntu-latest) (push) Has been cancelled
windows / build (i686, windows-latest) (push) Has been cancelled
windows / build (x86_64, ubuntu-latest) (push) Has been cancelled
windows / build (x86_64, windows-latest) (push) Has been cancelled
apple / Packaging STK (push) Has been cancelled
windows / Packaging STK (push) Has been cancelled
2024-07-05 17:46:06 -07:00
Alayan
9dbe576f58 Display the main graphical settings in the benchmark result screen 2024-07-05 19:23:00 +02:00
Alayan
374e756d80 Fix selection square theming for new cartoon skins 2024-07-05 17:58:04 +02:00
Alayan
372fdc4c57 Fix #5125 2024-07-05 17:15:08 +02:00
Deve
ffa49dd3ba Don't build stk-editor in linux builder as its data files are already removed from stk assets. 2024-07-03 21:43:29 +02:00
CodingJellyfish
afbb58ed44 Merge pull request #5122 from kimden/fix5116
Fix #5116
2024-07-01 22:01:12 +08:00
kimden
e50a06a11a Fix #5116
Moved the entirety of ParticleEmitter and the objects referring to it under #ifndef SERVER_ONLY
2024-06-29 19:26:26 +04:00
Icenowy Zheng
41a7b804a1 Fix exit crash when built for GLES2 on Linux (#5118) 2024-06-26 23:06:53 +02:00
CodingJellyfish
118cde2498 Revert #5047 2024-06-25 20:53:27 +08:00
CodingJellyfish
d9789726a2 Merge pull request #5047 from ognevny/improve-mingw-build
improve MinGW build
2024-06-25 20:35:41 +08:00
CodingJellyfish
319d0fc68c Merge pull request #5117 from kimden/add-usan
Add an option for -fsanitize=undefined
2024-06-25 20:03:43 +08:00
kimden
f0af5ed992 Add an option for -fsanitize=undefined 2024-06-25 13:44:48 +04:00
CodingJellyfish
84dff4423e Guarantee 2048 bones 2024-05-30 02:06:51 +08:00
Alayan
7320f2e70d Fix a crash in debug mode
The assert for spinner getStringValue not returning empty is unnecessary.
2024-05-28 19:07:29 +02:00
Alayan
66a85d8bf7 Update the Cartoon Coal skin
Changes by CrystalDaEevee:
- Fix some UI elements that were incorrectly using the base Cartoon variant instead of the correctly contrasted Cartoon Coal variant
- Use a dark table-header to fix contrast issues
- Fix Licenses.txt
2024-05-27 19:36:45 +02:00
Alayan
d459d45925 When changing base theme, keep the theme variant if possible 2024-05-27 19:25:17 +02:00
Alayan
9271c26576 Minor code cleanup
- Avoid loading the skin spinners in many different places
- Also remove a leftover printf
2024-05-27 19:12:23 +02:00
Alayan
06d503a54b Use two distinct spinners to select skins
- Use new 'base theme name' and 'variant name' values for skins to determine spinner values
- Ensure the skin is correctly set based on the values of both spinners
- Keep the options in the 'variant' spinners correct when updating the base spinner, as different base themes may have different variants (or no variants)
- Many other small changes to make it all work smoothly.
- Rename the folders of the classic skins, as the order of variants is determined by folder name alphabetic order. Using the same structure as with the cartoon skins ensure the variant order is the same.
- Also remove some redundant comments that were missed in the previous commit.

Remaining:
- Tidying up the code
- Ensure that if a variant exists in both the previous 'base theme' and the new 'base theme', switching the base theme while this variant is active doesn't reset to the default variant.
2024-05-27 18:12:20 +02:00
Alayan
d79cca3667 Add a SKIN_MAKING.md file
Instead of duplicating the general skin-making advice in all 12 stkskin.xml files, centralize it in one place.

Also correct header comments regarding the theme names.
2024-05-27 12:08:08 +02:00
Alayan
fa0bb71c3a Add new variants of the cartoon skin
The variants use the same accent colors as variants of the standard skin : blue (ocean), green (forest), black (coal), pink (ruby), yellow (desert). Made by CrystalDaEevee with help from QwertyChouskie (base theme advice, original cartoon theme) and myself (forest screenshot, advice regarding screenshots, initiative to get it merged)
2024-05-27 11:37:48 +02:00
Alayan
8b4741133d Add new Desert skin
Variation of the standard theme using a yellow accent color, by CrystalDaEevee
2024-05-27 11:30:17 +02:00
Benau
3d86d93769 Use forward enum declaration 2024-05-23 08:55:08 +00:00
Benau
57a80c209a Fix possibly missed dynamic spm buffer rendering 2024-05-23 08:43:52 +00:00
Alayan
af18315c73 Clean up repetitive CTF code 2024-05-23 00:10:25 +02:00
Alayan
c086a6774d Misc. improvements
- Fix MSVC compilation
- Improve some repetitive code
2024-05-22 23:24:50 +02:00
Alayan
2923a86cd6 Minor fixes
- The code starting a tutorial race was duplicated in three places. Consolidate it in one place.
- When launching the tutorial from the overworld, use the last used input device instead of the keyboard
- Restore the old cmake policy. The new way to replace that code suggested by the cmake manual fails CI, and debugging MSVC fantasies without a local install is a nightmare.
- Restrict this policy setting to MSVC as that's the only compile path that needs it, avoiding the warning for non-MSVC builds.
- Add missing define guards
- Remove some extraneous includes
2024-05-21 21:35:41 +02:00
Alayan
e165a5680b Fix #4742 2024-05-21 15:31:46 +02:00
Alayan
5bfb9aa054 Fix an error detected by CI
- Update MSVC cmakelist to properly add DEBUG
2024-05-21 15:12:59 +02:00
Alayan
7df170b394 Fix dialog titles clashing with dialog borders 2024-05-21 14:45:51 +02:00
Alayan
7d4e8433c1 Require Cmake 3.6 or higher
This gets rid of deprecation warnings. Cmake 3.6 has been out for almost 8 years by now, so this requirement should not cause undue trouble to people trying to compile the game.
2024-05-21 14:06:16 +02:00
Alayan
48764a6202 Update Wiiuse to 0.15.6
STK-specific patches are kept, CI related changes are not included
2024-05-21 13:53:57 +02:00
Alayan
97faf4a492 Move the camera files in a subfolder 2024-05-20 12:07:06 +02:00
Alayan
dca91a6ee8 Move the start benchmark function to the profiler
This simplifies its reuse for the recommend video settings function
2024-05-20 11:46:06 +02:00
Alayan
fb3596f699 Fix #3510
- Call autoComputeLevel to make the LoD distance for on-track items (bananas, nitro, gifts, etc.) depend on the user settings
- Ensure that the distance is reasonably high even on the lowest settings
2024-05-19 21:34:06 +02:00
Alayan
61f6f59b12 Fix #5075
A basic restart of the screen does not reinitialize what's needed to properly update anisotropic filtering. Therefore, ensure a full restart is done, but avoid showing the user a resolution confirmation dialog afterwards.

Also use a new applySettings function to avoid having two places to update when changing the code that manages applying updated graphics settings.
2024-05-19 16:12:47 +02:00
Alayan
deff598b6d Prepare the GUI to recommend video settings
- Add a new dialog that gives some information and asks for the user's preferences
- Ensure that one and only one of the 'Performance', 'Balanced' and 'Graphics quality' checkboxes is active
- Add a new button in video settings to access this dialog
2024-05-19 14:58:58 +02:00
Benau
fcd8cea5cd Remove hardcoded 1 pixel 2024-05-17 12:43:37 +00:00
Benau
02e540ba67 Rename variables to match the coding style 2024-05-17 07:32:42 +00:00
Benau
14c002c7ca Rewrite getSplitscreenWindow to fully occupy the remaining pixels
It fixed render inconsistency when drawing lap
2024-05-17 07:27:18 +00:00
Alayan
37e024f1e1 Make the minimum distance for a LoD transition depend on the object's size
Also:
- Since draw distance is used to account for the object's size, have parameters depending on geometry detail correct for it. The minimum switch distance increases slightly with each geometry detail level.
- Clarify what the formula spreading the distances for each LoD level does
- Adjust slightly the auto-LoD multipliers.
2024-05-14 00:36:47 +02:00
Alayan
91d3bceb03 Ensure the LOD multiplier is applied before the quality limiter 2024-05-13 22:31:05 +02:00
Alayan
10943ac0ff New auto-LoD formula
Avoid the sudden transitions that characterize the old formula.
2024-05-13 22:05:03 +02:00
Nomagno
0f719d0cc5 Fix #5072 (#5082) 2024-05-12 20:12:56 +02:00
CodingJellyfish
e2c245c420 Fix #4574 (#5080)
* Improve normal accuracy & Fix wrong SSR

* One less sample count
2024-05-12 19:59:49 +02:00
CodingJellyfish
68d9fd2138 Fix #5067 (#5071)
* Blur shadows by distance

* Copy from Bevy
2024-05-12 19:53:47 +02:00
Alayan
ad10bda37e Add a 7th graphical level preset
Compared to level 6, it increases shadow resolution to 2048 and auto-LoD distances to Ultra.
2024-05-12 18:12:19 +02:00
Alayan
53b6267d9d Fix #5076 2024-05-12 12:45:26 +02:00
Alayan
3ec2b9a54d Fix #4166
Based on the alerts for timed challenges:
- Change the timer color when an elimination is coming shortly
- Play a sound when an elimination is coming shortly
2024-05-11 20:39:36 +02:00
Alayan
1c58f0154f Add graphics settings to the perf report 2024-05-11 20:33:03 +02:00
Benau
f2b61826c9 Allow changing splitscreen layout in race 2024-05-11 17:31:33 +00:00
Alayan
27ae455460 Update the changelog
Add all significant changes since the release of 1.4 that will be included for the 1.5 release.

The changelog for 1.4 remains incomplete and will be updated later.
2024-05-10 19:05:06 +02:00
Alayan
5883a27dfc Update credits
- Change the order top contributors are presented in
- Credit several noticeable contributors that were missing
2024-05-10 17:35:08 +02:00
Alayan
185772ca4a Fix a strict-aliasing violation
See #5035, based on a commit by @miller-alex
2024-05-10 15:48:37 +02:00
CodingJellyfish
0542e6b279 Fix #3671 and fix #4254 2024-05-10 12:35:30 +02:00
Alayan
8e49634e77 Move the new quality switch logic to autoComputeLevel
Doing additional checks every frame was wasteful, and this change will also allow to easily adapt this logic to account for an object's size.

Also fix and improve comments
2024-05-08 19:01:55 +02:00
Alayan
e9a75f6c52 Fix #3678
Don't play drive-on sound from materials when the game state is paused.
2024-05-08 17:40:48 +02:00
Alayan
99868d5897 Fix #5026
The SFX manager and SFXOpenAL would check if SFXs are enabled before pausing (looping) sound effects, so disabling SFXs in the options would fail to stop looping SFxs.

Furthermore, 'OnSoundEnabledBack' would pause all looping SFXs. This commit checks for the pause status of the World (if applicable) to decide if the looping SFXs should be immediately resumed (networking) or not (real pause).

Also clean some comments and move some code around.

This patch doesn't address sound resuming when going from the pause menu to the options in networked mode, whereas it doesn't in a normal race. This is what caused the bug to trigger in the first place, but it's very minor by itself and the design of the SFX code could have triggered other future issues too.
2024-05-08 17:21:39 +02:00
Alayan
8dbf0a9922 Add geometry detail to the graphics presets 2024-05-07 18:27:15 +02:00
Alayan
e83fdc9324 Display a basic summary of benchmark results 2024-05-07 17:11:16 +02:00
Alayan
e505d9c686 Show a lower LoD level instead of having a detailled level pop up when very close
- It is visually more pleasant to have a low quality model than to have a sudden popping from the high quality one appearing when already close
- This also boosts performance
2024-05-06 23:24:43 +02:00
Alayan
553595fa63 Prevent geometry level from removing objects
The latest version was bugged as it removed all standard objects, but removing only objects marked by track-makers removed almost nothing of note, and bugs would sometimes remove normal objects. Fix #5052. Fix #5066. This makes #5063 moot.
2024-05-06 22:59:58 +02:00
Alayan
df803c18b8 Various adjustments to auto-LOD
- Increase the effect preventing LoD objects from popping at very short distances
- Add comments to all the steps and other clarifications
- Update the multiplier values to be approximately equally spaced geometrically
2024-05-06 22:51:25 +02:00
Nomagno
e47958f2d3 Fix #5053 (bool vector -> uint8_t vector) (#5073) 2024-05-05 23:21:31 +02:00
Alayan
dae5c49fcc Add the label widget to common options includes
Should fix compilation on mobile
2024-05-05 18:13:28 +02:00
Alayan
785915770a Remove code duplication in the help screens
Same approach as with the options screen: managing all the generic includes needed by all help screens in one place and adding a new standalone 'switchTab function
2024-05-05 18:00:45 +02:00
Alayan
fa421b43c7 Move the splitscreen split orientation in the display settings
It makes a lot of sense there too, and it makes the UI settings less crowded. This allows also to put the label as a section title, fixing an overflow that happened with some translations when using the very large font size.
2024-05-05 17:29:14 +02:00
Alayan
ad02608744 Remove code duplication in the options screens
Use a new standalone 'switchTab' function to centralize the activation of the screen matching the selected tab
2024-05-05 17:06:36 +02:00
Alayan
2fc05e94fc Miscellaneous improvements to the options screens
* Use a new file for includes to reduce redundancy between option files
* Remove some unnecessary includes
* Reorder some includes
* Increase spacing in the graphics settings screen
* Increase spacing in the audio settings screen
2024-05-05 16:16:22 +02:00
Alayan
7ad4040b2d Add a new 'Display' option tab
The video settings were getting crowded with the benchmark mode, and with large font size the benchmark buttons ended off-screen.
2024-05-05 14:24:56 +02:00
CodingJellyfish
aba99c22b6 Enable new screen resizing code 2024-05-05 13:45:23 +08:00
CodingJellyfish
6e2d528b91 Remove static variable in cutscenes 2024-05-05 13:18:59 +08:00
CodingJellyfish
7d02e57a19 Avoid resetting FOV which caused issue after resizing cutscene 2024-05-05 13:08:35 +08:00
Alayan
0969a173c7 Fix #5069 2024-05-04 20:26:24 +02:00
Alayan
8fd0a0a09d Split the displaySoccerResults function
Use a 'drawTeamScorers' function to reduce code duplication and make it easier to understand what's going on. Some minor clean-up has also been done, but more could be done, especially regarding variables that had to be recreated in the new separate function.
2024-05-04 20:19:54 +02:00
Alayan
7a75f9e541 Clean up the Race Result GUI code
- Remove excessive indentations in race_result_gui.cpp
- Move the bulk of the displayPostRaceInfo function into new functions: displayHighscores, displayLapDifficulty and displayChallengeInfo
- Add comments for the closing braces of functions, for the closing braces of some large code blocks, and explaining some functions
2024-05-04 19:14:48 +02:00
CodingJellyfish
3a0a2eaf97 Add resizing code for kart selection 2024-05-04 16:54:09 +08:00
CodingJellyfish
0266b03809 Add minimum resizing code for race result screen 2024-05-04 15:38:18 +08:00
Deve
a14b9fd747 Update linux build script 2024-05-04 00:52:07 +02:00
CodingJellyfish
26aa328994 Add resizing code for credits 2024-05-03 20:20:03 +08:00
CodingJellyfish
e52b2fafdc Add resizing code for soccer setup screen 2024-05-03 18:02:46 +08:00
CodingJellyfish
31239615ef Add resizing code for add device dialog 2024-05-03 17:54:13 +08:00
CodingJellyfish
f73e56c204 Add resizing code for dialog and screen keyboard 2024-05-02 15:34:08 +08:00
CodingJellyfish
f8a43b86ea Fix server only build 2024-05-01 16:04:39 +08:00
CodingJellyfish
ff186339e1 Use proper method to shrink text in bubble widget to fix #3432 2024-05-01 13:00:54 +08:00
CodingJellyfish
c9d44736ed Add resizing code for bubble widget 2024-04-30 10:45:01 +08:00
Alayan
0716965df7 Improve Auto-LoD
- Increase the Auto-LoD distance on tracks with a low scene complexity (fix #5065)
- Increase the Auto-LoD distance when the old formula gives a too low base distance (small objects). This helps with some of the worst popping issues for comparatively little performance cost.
- Make the LoD distance auto-compute code clearer by moving the settings-related multiplier after the squaring step
- Also fix a couple of unrelated warnings about comparison between signed and unsigned integers
2024-04-29 21:47:17 +02:00
Alayan
ec4f4065f5 Enable a higher maximum shadow resolution in the video settings 2024-04-29 12:01:54 +02:00
Alayan
95c8f452de Update the LoD distance factors
With the existing engine and tracks, when the framerate is rather GPU-limited, the performance cost of increasing LoD distance is minor. It becomes more significant at higher framerates when the CPU can be more of a limiting factor, but it also noticeably enhances the player experience by removing the distracting 'popping' when an object visibly changes shape or appears because of LoD.

- Lowest is changed from 0.75 to 0.8
- Low is reduced to 0.8, just like Lowest. The difference is now only the display of optional geometry objects, but it's a big difference.
- Medium is changed from 1.25 to 1.3
- High is changed from 1.3 to 1.8
- Very high is changed from 1.8 to 2.4
- Ultra is changed from 3.0 to 3.2
2024-04-29 11:12:25 +02:00
Alayan
32a53827a8 Fix #5063
- Ensure that optional geometry objects are properly removed. This provides a massive performance boost, at the cost of visuals. Benchmark on graphics 2 with lowest geometry level: bugged has 202 steady FPS, 230 mostly stable FPS, fixed has 427 steady FPS, 495 mostly stable FPS.
- Restrict the removal of objects based on geometry detail to the lowest geometry level. This ignore the different levels of geometry removal that track authors can set for objects, and which was mostly unused: all objects marked for removal at any level are either all removed or all kept.
2024-04-29 10:55:55 +02:00
CodingJellyfish
3f8b78dc41 Add resizing code for CGUIEditBox 2024-04-29 10:18:51 +08:00
CodingJellyfish
5ff449d6c9 Remove an unneeded method 2024-04-29 10:06:47 +08:00
Alayan
e64e2d8cd5 Fix #4931
The assert could be triggered when a new sign-in request was sent before the first one was resolved, usually when using the enter key to request the sign in. Since it can happen in normal operations to have the player profile status different from signing out or signed out, an assert is incorrect.

Also fix server-only compilation for the previous commit.
2024-04-28 21:43:42 +02:00
Alayan
01d62be5de Fix crashing when turning the modern renderer on or off before benchmarking 2024-04-28 18:32:51 +02:00
CodingJellyfish
9206b923f7 Use xmlDecode for news 2024-04-28 15:57:42 +08:00
CodingJellyfish
18094c505a Add resizing code for networking lobby 2024-04-28 13:25:20 +08:00
CodingJellyfish
f6949972b3 Add resizing code for label widget 2024-04-28 11:15:41 +08:00
CodingJellyfish
97ca195e20 Fix dynamic ribbon widget being shown above a dialog after resized 2024-04-27 15:05:52 +08:00
CodingJellyfish
10b6c4b1e1 Fix focus bug when multiplayer handling is not needed 2024-04-26 23:24:51 +08:00
Alayan
543ee92e00 Confirm the performance report saving to the user
Also fix a compilation issue with compilers not recognizing uint
2024-04-26 16:50:50 +02:00
Alayan
792c1e0926 Compute new performance metrics and improve saving of profiler data
* Format the standard CPU and GPU profiler data as CSV, to simplify its analysis
* Include the internal identifier name of the track in the report name, or 'menu' if there is no active track. This uses the current track at the time of report saving. It is possible to keep the profiler on through multiple tracks and menus, but it's on people enabling the artist debug mode and the profiler to use it sensibly
* Stop the profiler when saving data, if it's not already stopped
* Compute, when profiling is stopped, for all integer FPS values up to 1000, three key metrics:
 - The number of frames too slow to reach this FPS value
 - The proportion of total time spent in frames slower than this FPS value
 - The proportion of total time spent in frames beyond the maximum duration associated with this FPS value
* Compute three key indicator values:
 - Steady FPS (highest FPS with no more than 1% time spent in slower frames and no more than 0.1% time spent beyond the maximum duration)
 - Mostly stable FPS (highest FPS with no more than 12% time spent in slower frames and no more than 2% time spent beyond the maximum duration)
 - Typical FPS (highest FPS with no more than 50% time spent in slower frames and no more than 10% time spent beyond the maximum duration)
* Save an additional 'perf-report' containing this new data

 Traditional performance measurements, such as average FPS and 1% lows (which are typically based on the 1% slowest frames, not on the 1% slowest gameplay time), are flawed because they unduly reward outputting more fast frames. Increasing the number of fast frames without speeding up the slow frames is useless when it comes to making the game feel smooth, which is especially critical in a racing game.

 Missing features:
 - Displaying a summary of the performance test instead of the normal end screen
 - Confirm to the user that the report has been successfully saved
 - And more advanced options.
2024-04-26 16:11:55 +02:00
Alayan
62d0281a18 Adapt the end screen in benchmark mode (part 1)
- Customize the race result screen to offer three options : leave to main menu, save test data, and return to video settings
- Ensure all three options do as they say
- Ensure that the benchmark mode and the profiler are always turned off when leaving through the end screen
2024-04-26 13:39:39 +02:00
CodingJellyfish
e68acaa02a Add resizing code for dynamic ribbon widget 2024-04-26 13:05:36 +08:00
CodingJellyfish
26b24a63ea Add onResize for options screen video 2024-04-26 11:34:08 +08:00
CodingJellyfish
8e5304d4a9 Fix icon button widget crash 2024-04-26 10:38:41 +08:00
CodingJellyfish
5adbb3f16b Add resizing code for spinner widget 2024-04-25 10:13:24 +08:00
CodingJellyfish
0dffd116a9 Remove unneeded hacks 2024-04-24 23:32:34 +08:00
CodingJellyfish
e0be4cfc4f Reset coordinates before they are updated by layout manager 2024-04-24 22:51:51 +08:00
Alayan
893c5a7b5d Move help and option files in subfolders 2024-04-24 13:46:49 +02:00
Alayan
171ac3c0b0 Adapt the pause menu in benchmark mode
* Use explicit activation and desactivation functions for the profiler to improve code clarity and robustness
* In the pause dialog, only display the 'back to race' and 'exit' buttons in benchmark mode
* Relabel the buttons in the pause menu in benchmark mode
* Use 'Performance test' in user-facing texts to ensure better translations
* Fix parts of the UI disappearing when leaving the pause menu in benchmark mode

Additional known issue introduced in the previous benchmark commit:
* With big text sizes, the performance test button overflows in the graphics settings.
2024-04-24 13:29:05 +02:00
CodingJellyfish
db2cc69d89 Refactor sprite scaling in STKModifiedSpriteBank
Make it proportional to font height so that it can be auto-resized
2024-04-23 15:30:35 +08:00
CodingJellyfish
1319c9845b Remove list header properly 2024-04-23 10:18:19 +08:00
CodingJellyfish
85e52de194 Add more resizing code to CGUISTKListBox 2024-04-22 11:35:19 +08:00
CodingJellyfish
f6836998f0 Use a better setOverrideFont in ribbon widget 2024-04-22 10:56:01 +08:00
CodingJellyfish
34119e1c5f Remove unneeded if in Widget::resize 2024-04-21 14:40:10 +08:00
CodingJellyfish
0d2fd6f628 Recalculate glyph layouts when list box resized 2024-04-21 14:08:39 +08:00
CodingJellyfish
af1238d688 Backport irrlicht changes to CGUISTKListBox 2024-04-21 14:05:34 +08:00
CodingJellyfish
2a60d6508b Add resizing code for list widget 2024-04-21 13:24:07 +08:00
CodingJellyfish
3641183121 Add resizing code for ribbon widget 2024-04-20 18:55:31 +08:00
CodingJellyfish
0cea06d935 Add resizing code for icon button widget 2024-04-19 20:21:54 +08:00
CodingJellyfish
52edb8507e Remove the remaining unneeded header file includes 2024-04-19 17:28:11 +08:00
CodingJellyfish
f70c2abe54 Remove unneeded header file includes in online screens 2024-04-19 15:55:56 +08:00
CodingJellyfish
913a082528 Keep multiplayer in kart selection screen after reloading 2024-04-19 13:35:37 +08:00
CodingJellyfish
2f87966ff6 Add basic code for widget and screen resize 2024-04-19 13:18:31 +08:00
Deve
78c6f16d79 Fixed a crash when entering story mode 2024-04-18 19:27:18 +02:00
Deve
754a11030e Update gradle and android build script 2024-04-18 17:20:09 +02:00
CodingJellyfish
6be521fc96 Fix #5054 (#5055) 2024-04-17 14:09:18 +02:00
Alayan
a6cecd2279 First steps for a benchmark mode
* Add a button in the graphics options to start a benchmark
* Added logic to play a custom replay for benchmarking
* Added logic to automatically start and end the profiling as the race starts and ends, when in benchmark mode
* Disable the profiler drawings in benchmark mode, they take additional resources and are useless
* Keep the race going when the pause menu is opened, as it would otherwise distort the results
* Added logic to clean up the profiler data each time profiling is switched back from off to on. This avoids multiple profiling sessions piling up in one report, for example when benchmarking tw
* Added a sped up Black Forest replay for use during the benchmark

Missing features and known issues:
* The end screen should display a benchmark result summary instead of a normal end screen
* Entering and leaving the pause menu in benchmark mode makes some parts of the race UI disappear
* The end screen should send the player back to the graphics settings, not the main menu
* Pausing and quitting can leave the profiler enabled when it should not be
* The options in the pause menu should be customized in benchmark mode
* The replay used for benchmarking should be configurable in a data file
* Automatically testing multiple graphics settings and providing an overall summary
* And more advanced options.
2024-04-16 05:46:30 +02:00
CodingJellyfish
8577408cec LOD improvements (#5038)
* Quick cull invisible LOD nodes
* Reduce dynamic cast
* Fix for Vulkan

Maintainer's comment: Helps only in select tracks and more in already fast frames than in the more problematic slow frames, but an improvement nonetheless.
2024-04-15 16:30:08 +02:00
Alayan
6cf094ab78 Add new setting values for increased view distances
Add 3 new setting values, increasing the distance at which a lower level of detail is used by factors of 1.6, 2.0 and 3.0 (default is 1.25). This allows players for which getting enough FPS is not an issue to reduce pop-in and improve the looks of tracks.

In local testing with a strong CPU and a weak GPU, the performance impact of increasing the view distances is small and well worth it, but this may vary from system to system. More testing is needed on different systems, but this suggests room to increase minimum, default and maximum values in future releases.

This patch also slightly changes the auto-computation of LoD distance, making the transition around a distance of 250 smoother.
2024-04-15 01:48:58 +02:00
ognevnydemon
e232bcf25c improve MinGW build 2024-04-08 16:40:32 +03:00
kimden
31bdb52bfd Make sure handleAllVotes returns true at least once 2024-04-02 01:00:32 +04:00
kimden
c520c441d3 Don't pick first vote if vote majority is achieved but no vote coincides completely 2024-04-02 00:43:58 +04:00
kimden
4ee7c51131 Fix random choice of several equal votes in handleAllVotes 2024-04-02 00:42:33 +04:00
oldherl
979077abab Update Cantarell font
Update to Cantarell 0.303.
Upstream releases only include VF files now.
This single weight file was extracted from debian package fonts-cantarell_0.303.1-1_all.deb
2024-03-20 16:53:31 +11:00
Benau
1a8dbbdc74 Fix #5024 2024-02-23 22:30:43 +08:00
jacekpoz
a254c7afc2 make loopback checking more readable (#5016)
* make loopback checking more readable

* follow coding style

---------

Co-authored-by: jacekpoz <jacekpoz@cock.li>
2024-02-07 23:18:25 +08:00
Benau
e1454a007e Fix memory corruption when vector being resized 2024-01-25 10:51:10 +08:00
CodingJellyfish
ec8362915d Fix #4984 & #4995 (#4998) 2024-01-18 01:13:23 +08:00
Sonter
6573ebe09e Fix #4960 (#5003)
Adjust linked buttons.

Enum MultitouchButtonType is here: https://github.com/supertuxkart/stk-code/blob/master/src/input/multitouch_device.hpp
2024-01-18 01:12:55 +08:00
Xiangquan Xiao
fab7915011 Minor fix on coding styles. 2024-01-07 14:08:59 -05:00
CodingJellyfish
2e89eeed1a Fix #3471 v2 (#4989)
Add factor to fonts for scaling to higher size
2024-01-08 01:13:13 +08:00
CodingJellyfish
3928a49d5e Fix #4923 (#4981) 2024-01-06 12:17:57 +08:00
CodingJellyfish
b35cd18eb0 Fix #4969 (#4985) 2024-01-06 11:39:16 +08:00
Benau
42d4eaae96 Fix switch build 2023-12-18 10:39:21 +08:00
Benau
caf6a1b504 Revert "Drop support for the DirectX9 renderer"
This reverts commit c11a7236c7.
2023-12-18 10:35:58 +08:00
Benau
5a4020bcb8 Revert "Remove DX9 leftovers"
This reverts commit 4525411e84.
2023-12-18 10:32:29 +08:00
Alayan
4525411e84 Remove DX9 leftovers 2023-12-16 16:05:41 +01:00
Alayan
c11a7236c7 Drop support for the DirectX9 renderer 2023-12-16 15:24:35 +01:00
CodingJellyfish
65ee612110 Fix #3754 (#4966)
* Fix portrait

* Fix vertical tabs

* Fix server selection

* Update race_setup.stkgui
2023-12-14 19:08:41 +01:00
Alayan
bba568d9b8 Use theme color for textbox cursor and fix #4947
- Change the colors of the background and borders of the textbox to ensure they always contrast with each other
- Make the color of the textbox cursor the same as the skin's text color - this ensure it always has good contrast
- Offset the display of text slightly in the textbox. This avoids the cursor 'blending in' with the textbox border
2023-12-14 18:24:37 +01:00
Alayan
f8db600d09 Fix #4965 2023-12-14 16:58:36 +01:00
Alayan
6d38bfec8c Fix 'Replay with UID of lu' error
- Correctly format the log to display the actual UID
- Fix getReplaydIdByUid being called with an UID of 0, when no replay to compare has been selected
2023-12-06 20:00:52 +01:00
Alayan
4ca872f23d Make the unsupported replay version warning more compact 2023-11-29 22:35:52 +01:00
Alayan
5bb5f5e86e Fix #4951 2023-11-29 22:29:34 +01:00
Alayan
a57ac415bb Fix #3578
- If there is 2 or 3 karts in the GP, karts in 2nd and (if any) 3rd place display a sad animation
- If there is 4 karts in the GP, the kart in 3rd displays a sad animation
- If there is 5 karts or more in the GP, all karts on the podium display a happy animation

The first kart in the GP always displays a happy animation even if alone.
2023-11-24 17:59:39 +01:00
Alayan
bf88954e31 Fix #4944 2023-11-24 16:29:18 +01:00
Alayan
2a903271aa Fix #4844 2023-11-24 16:13:12 +01:00
Alayan
e744fd3033 More audio improvements
- Fix a bug that made the last lap SFX played only if music was on.
- Fix the behavior of the music volume adjustment when the last lap SFX is played. Previously, the music volume was only adjusted when the music volume was above a certain threshold, but when it was above that threshold, the adjustment was too strong.
2023-11-17 19:11:25 +01:00
Alayan
40511b218c Fix #4938
- Set the minimum sound volume to 0.025f instead of effectively 0.1f. This is particularly helpful for headphone users.
- Make the step between each volume setting exponential.
- Add parameters to remember the parameters of the audio spinners.
- Increase the default number of values the audio spinners can take from 10 to 15. Old config files will keep using 10.
- Set the default values to 10 (spinners), which translates to 0.2678 (volume fraction) instead of 0.6 (previous default)
2023-11-17 18:49:25 +01:00
Alayan
858ed6bb3e Fix #4926
Also add more explicit error logging for this case.
2023-11-12 23:02:27 +01:00
Benau
8cd6a231cc Enable AppleMomentumScrollSupported on macOS 2023-11-12 12:56:28 +08:00
CodingJellyfish
bd245e17bf Fix #4895 (#4896) 2023-11-12 11:32:04 +08:00
Benau
1ba1e7e59f Use high precision for time2Ticks 2023-11-12 11:29:41 +08:00
Benau
7ecdc3efd7 Update macOS building instructions 2023-11-12 10:06:49 +08:00
Alayan
0eb64d0ad5 Fix #4922 by enforcing the bounds
Testing with high reduce-turn-max, skidding looks fine with steer values that would have previously gone out of boundaries. No further fix is needed.
2023-11-11 01:40:04 +01:00
Alayan
f4fd914858 Mostly revert #4632 and properly fix #4609
Not displaying a win message when there is only one kart was intended behaviour. A win requires the possibility of a loss. However, displaying the finishing rank with only one kart is ugly.
2023-11-11 01:32:31 +01:00
Alayan-stk-2
6c2dd48c48 Changelog update
1.3 changelog completed
2023-11-10 23:49:07 +01:00
Alayan
491c3dee34 Fix updateAndTestFinished to use time2ticks
Also remove the useless function parameter
2023-11-10 19:45:03 +01:00
Deve
f5cc8b4bde Small fixes in android build script 2023-09-30 10:50:12 +02:00
Benau
e00a81a961 Fix broken ProgressBarMessage after 8f596e29b3 2023-08-15 10:48:21 +08:00
Benau
a47e69d74e Add animated by step texture matrix for kart model 2023-07-27 08:11:51 +08:00
CodingJellyfish
3b043b7f47 Fix #4876 (#4897) 2023-07-21 08:37:08 +08:00
CodingJellyfish
13f61d609c Fix #4893 (#4894) 2023-07-16 09:53:40 +08:00
CodingJellyfish
8f596e29b3 Add multiple skin container & Fix #4891 2023-07-13 16:09:38 +08:00
Boreal
9443a66878 Clarify Shaderc Punctuation 2023-07-04 13:25:44 -07:00
kimden
1ed896bf9e Fix start positions for negative sidewards distance 2023-06-29 00:40:38 +03:00
Benau
545348fe37 Update for the latest MoltenVK and astcenc 2023-06-25 16:36:45 +08:00
QwertyChouskie
f991468bf7 Clarify online chatting options
Fixes https://github.com/supertuxkart/stk-code/issues/4623
2023-06-24 00:47:07 -07:00
Benau
c2840e972b Always add 1 player when leaving the lobby without splitscreen players added 2023-06-24 12:42:57 +08:00
Benau
d5886cf2ef Update translation, AppData and Desktop file 2023-06-22 14:56:51 +08:00
Snoker101
747cd8f128 Update soccer_world.cpp (#4875)
* Update soccer_world.cpp

edited getRescueTransform function in soccer_world.cpp so that the rescue bird places the kart towards the ball in soccer, as requested by many players.
2023-06-20 08:50:44 +08:00
Benau
0d22d03104 Fix instruction for online options 2023-06-16 01:41:46 +08:00
Newow
41609ef69a Add fflush(stdout) after writing to stdout with printf
fixes issues with backlog when server is running through a pipe
2023-06-11 14:55:53 +06:00
Benau
3d76bc0108 Keep server bookmarks in save order 2023-05-26 11:15:44 +08:00
QwertyChouskie
1ff8b0fc9c UI/UX: Add success dialog for password change
This brings the UX more in line with password recovery and email change
2023-05-11 12:44:04 -07:00
QwertyChouskie
4932a60a9b UI/UX: Add new icon for Lap Trial mode
Also fix more license documentation stuff
2023-05-11 12:44:04 -07:00
QwertyChouskie
4174237302 UI/UX: Use dedicated icons for new/existing online account 2023-05-11 12:44:04 -07:00
QwertyChouskie
7dae679007 UI/UX: Use dedicated icon for online user profile button
Update license file accordingly, also fix some missing/incorrect documentation of licenses.
2023-05-11 12:44:04 -07:00
QwertyChouskie
21a0391ea0 UI/UX: Use better icons for player-related things
- Add and use new icons
- Make some labels more explicit
- Properly document copyright of both the new icons, and the icons used to make them
  - Note that the Cartoon icons fall under the same copyright as all other Cartoon icons, so no licenses.txt update is needed
2023-05-11 12:44:04 -07:00
QwertyChouskie
4b7344c1ea UI/UX: Fix update button label bug
`setLabel()` does not work in `beforeAddingWidgets()`, use `setText()` instead as was originally used when the code was written.

This fixes a regression introduced in 0ace825d5f (almost exactly 10 years ago!)
2023-05-11 12:44:04 -07:00
QwertyChouskie
85d12931ce UI/UX: Use more applicable icons and labels 2023-05-11 12:44:04 -07:00
QwertyChouskie
315af9a7f9 UI/UX: Fix misc sizing/centering issues 2023-05-11 12:44:04 -07:00
QwertyChouskie
0c9a136d7c UI/UX: Use password recovery dialog instead of opening webpage 2023-05-11 12:44:04 -07:00
QwertyChouskie
365e0074ee UI/UX: Improve keybinding dialog
- Better icons for actions
- Make dialog bigger, fixes squashed text issue
2023-05-11 12:44:04 -07:00
QwertyChouskie
b92fb66f38 UI/UX: Use OK button in Vote dialog 2023-05-11 12:44:04 -07:00
QwertyChouskie
f130f63209 UI/UX: Cutscene button tweaks
- Make button text "Skip" instead of "Continue"
- Move to right side
- Improve sizing
2023-05-11 12:44:04 -07:00
QwertyChouskie
275e962de8 UI/UX: Use better icon for Cancel/No/etc
Icon style now matches what is used for Confirm/Yes/etc
2023-05-11 12:44:04 -07:00
QwertyChouskie
935c6b2191 UI/UX: Put OK/Confirm/Yes on the right
In UX, back/cancel/etc buttons usually go on the left, while forward/confirm/etc go on the right.  (Note that even the icon for "Back" is a leftwards-pointing arrow.)  STK put the Back arrow button on general screens in the upper left corner, but before this commit, put back/cancel/etc on the right in dialogs and such.  This commit fixes things to be in line with standard UX conventions, and also in line with the pre-existing upper-left corner Back button placement on screens in STK.

https://ux.stackexchange.com/a/63239
2023-05-11 12:44:04 -07:00
QwertyChouskie
4cabef6879 UI/UX: Make first Continue button in GP results screen centered
Since we only show one button at first, make it centered.  (This is the continue button that switches from displaying race results to overall GP results.)
2023-05-11 12:44:04 -07:00
QwertyChouskie
cce966683b UI/UX: Add back button on server creation screen
This functions the same as the cancel button, adding it for UI consistency.
2023-05-11 12:44:04 -07:00
QwertyChouskie
082d02eef3 UI/UX: Improve manual server connect dialog
- Center top text
 - Word wrap top text, fixes overflow on large font sizes
 - Better sizing/spacing of dialog and elements
2023-05-11 12:44:04 -07:00
QwertyChouskie
a99c554850 UI/UX: Remove unused dropdown.png icon
Look like this was added back in early development of the Irrlicht-based GUI engine, but this was never used for anything.
2023-05-11 12:44:04 -07:00
QwertyChouskie
5185e4c487 UI/UX: Remove unused main_race_multi icon
This icon isn't used anywhere.
2023-05-11 12:44:04 -07:00
QwertyChouskie
8a004adcad UI/UX: Remove unused dialog file
The code that called this dialog was removed in 2014 via 3372d06759
2023-05-11 12:44:04 -07:00
QwertyChouskie
be598ea1da UI/UX: Fix LayoutManager warnings
Fixes most of the occurrences of these warnings in the terminal/log:

[warn   ] LayoutManager: Statically sized widgets took all the place!!

Removing these spacers did not make a difference in actual layout/spacing according to my testing.
2023-05-11 12:44:04 -07:00
QwertyChouskie
dd6cbe4f88 UI/UX: Fix dialog text centering
`text_align="top"` isn't even valid, `top` is only valid for `text_valign`.  Not sure how this got messed up in the first place, but this finally fixes it.
2023-05-11 12:44:04 -07:00
QwertyChouskie
2c9e581c60 UI/UX: Fix race UX when something is unlocked
Challenge completion status is already shown on the race results screen, changing the icon and text of the Continue button just causes confusion.

Fixes https://github.com/supertuxkart/stk-code/issues/4859
2023-05-11 12:44:04 -07:00
Benau
d825c32e76 Fix tips 2023-05-05 12:02:07 +08:00
Semphriss
fd12829e5b Revert "Hide the cursor during gameplay (#4861)" (#4862)
This reverts commit 07e22b033b.
2023-04-25 08:40:34 +08:00
Semphriss
07e22b033b Hide the cursor during gameplay (#4861)
* Hide the cursor during gameplay

The cursor will show back up whenever:
- The mouse is moved
- The game is paused
- The race finished

This is probably not the best implementation, but it's a start.

* Wrap mouse display code in PT_MAIN checker

* Moved mouse display code to updateGraphics

* Protect SDL calls with #ifndef SERVER_ONLY

---------

Co-authored-by: Semphris <semphris@protonmail.com>
2023-04-23 16:32:11 +08:00
Mike Blumenkrantz
64c74ed516 declare some ssao.frag variables as highp to avoid precision issues (#4860)
this fixes opaque shadow rendering on drivers that implement
mediump as 16bit

fixes #4855

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
2023-04-18 16:00:52 +08:00
Benau
94fa3c8a63 Remove some gcc compiler warnings 2023-04-15 11:55:15 +08:00
Benau
69fdbb8f45 Add missing exception handling in shader loading threads 2023-04-14 09:56:06 +08:00
Benau
8c90d7b3d0 Fix missing srgb for compressed textures 2023-04-13 12:56:06 +08:00
Benau
f9d10fe9ff Don't pause in network game for debug dialog 2023-03-30 08:14:47 +08:00
Benau
6f789164ff Add srgb image view for vulkan engine 2023-03-20 10:08:18 +08:00
Benau
7817e14a5a Add pbr texture handling for vulkan engine 2023-03-19 11:35:11 +08:00
Benau
c170c69749 Load pbr textures for vulkan engine 2023-03-18 14:52:37 +08:00
Benau
12a8b1da1d Update haiku file_manager handling code 2023-03-12 08:26:20 +08:00
Benau
1a3a944a97 Update translation source, AppData and Desktop file 2023-03-09 08:19:19 +08:00
searinminecraft
1eb48e25f0 Add previously missing Lap Trial mode in game modes help screen 2023-03-08 10:43:22 +08:00
Benau
5e161f663d Clean m_ondemand_load_texture_paths after texture loaded 2023-03-04 10:26:31 +08:00
Benau
dcc7397668 Make dumpAllTextures usable in legacy video drivers 2023-03-03 22:35:58 +08:00
Gwyn Ciesla
27eb0f3116 gcc13 fixes 2023-02-23 08:56:27 -06:00
Benau
9eda9f7559 Add current ai count to server lobby 2023-02-21 10:41:54 +08:00
Benau
f5800ac487 Fix #4847 2023-02-06 08:06:53 +08:00
Deve
ad74f20bdf Add shaderc to linux builder 2023-02-03 22:20:57 +01:00
Benau
1f8ffccd97 Allow disabling gift boxes and bananas indicators by removing their textures 2023-02-02 08:01:45 +08:00
Benau
90277eebd5 Fix #4843 2023-01-28 10:01:12 +08:00
Heiko Becker
0163e3fa88 Add missing includes to fix the build with gcc 13
Like other versions before, gcc 13 moved some includes around and as a
result <stdexcept> and <cstdio> are no longer transitively included.
Explicitly include them for std::runtime_error and snprintf.
2023-01-26 16:35:54 +01:00
Benau
1041736750 Rename setting string as sven suggested 2023-01-23 08:21:01 +08:00
Benau
be0c83e9a8 Add getGeometryLevel to scripting engine 2023-01-22 14:47:40 +08:00
Jip Fr
d0bbf8f5f4 Make bot names start at one 2023-01-21 00:10:30 +01:00
Benau
ab3defb424 Remove draw_translucently in draw2DImage 2023-01-11 11:27:43 +08:00
Benau
a85bf04b1c Update download assets size 2023-01-09 16:24:41 +08:00
Benau
292bafcf9a Check for libshaderc.so (used by debian) 2023-01-08 08:15:06 +08:00
Benau
e798c1abee Remove rotation uniform in gl shaders 2023-01-08 08:08:35 +08:00
Benau
9dd9363ab4 Make draw2DImageCustomAlpha usable in legacy video drivers 2023-01-07 11:18:12 +08:00
Benau
65b2e2104a Avoid leaking widgets (model view especially) when closing STK
It crashes when vulkan validation is on if closing during kart
selection screen
2023-01-06 17:01:29 +08:00
Benau
7ecaf74dd3 Remove incorrect animation data in some b3d models, see #4829 2023-01-05 11:15:50 +08:00
Benau
8544f19b59 Fix #4834 2023-01-05 10:33:39 +08:00
Benau
356406c40b Update building instructions and workflows files 2023-01-04 09:12:46 +08:00
Benau
99bd8a338a Remove bundled shaderc 2023-01-03 10:01:41 +08:00
Benau
93613d884e Compile SPIR-V shaders with multiple threads 2023-01-01 10:26:38 +08:00
Benau
b4a3970720 Use shaderc C api only 2022-12-31 13:08:26 +08:00
Benau
bed2228ac8 Remove search textfield widget in non-network tracks screen 2022-12-30 11:05:24 +08:00
Benau
5bc2ef5b91 Update translation source 2022-12-29 15:15:58 +08:00
QwertyChouskie
3bad8d943a Fix capitalization of categories, fixes #4622 (#4832)
- Fix capitalization of "Standard" in kart and track selection screens
 - Fix both "All" and "Standard" in random GP screen
 - Code style/documentation/consistency improvements
2022-12-28 01:27:55 +08:00
Benau
ebaf521269 Update translation source 2022-12-18 09:24:41 +08:00
Benau
285fc8df5f Update for the latest SDL2 2022-12-16 08:46:19 +08:00
Benau
2eb5d10e38 Update to the latest MoltenVK and cctools 2022-12-11 11:22:22 +08:00
Benau
92a3035fb2 Fix #4830 2022-12-08 16:26:28 +08:00
Benau
ddc0b9d1ed Add setDirtyOffset for GEVulkanDynamicSPMBuffer 2022-12-05 16:32:00 +08:00
Benau
1d00e44f97 Add rendering for GEVulkanDynamicSPMBuffer 2022-12-01 16:16:58 +08:00
Benau
392bdbf78b Move m_current_buffer_idx to GEVulkanDriver 2022-11-30 10:41:39 +08:00
Benau
90a22a691a Use GEVulkanDynamicSPMBuffer on streaming buffers 2022-11-29 13:02:36 +08:00
Benau
d5fdcb2d98 Add GEVulkanDynamicSPMBuffer 2022-11-28 15:16:28 +08:00
Benau
fd579111e1 Add setNormal and setTCoords for IMeshBuffer 2022-11-27 09:07:07 +08:00
Benau
641dbcf9c0 Add support for 3-letter language code in android 2022-11-26 11:11:55 +08:00
Benau
987558bf66 Remove unneeded en.po 2022-11-25 11:40:22 +08:00
Benau
3a290ed328 Add update_translation.py for updating po
Remove unused pull_from_transifex.sh
2022-11-24 13:27:21 +08:00
Benau
562c9dec13 Update country names 2022-11-23 10:34:29 +08:00
Benau
77c4b99c70 Update translation and add Filipino language 2022-11-23 10:29:28 +08:00
Benau
0fbbd7bbaa Allow using fixed laps in server with --laps option 2022-11-21 12:30:17 +08:00
Benau
96f01d54ce Fix github workflows 2022-11-20 10:41:08 +08:00
Benau
257c208a1d Use libsquish in stk-code for android 2022-11-19 16:52:08 +08:00
Benau
bc311a445e Use libsquish for skybox texture compression 2022-11-19 16:01:54 +08:00
Benau
9e70abb631 Remove IAnimatedMeshSceneNode.h in header files 2022-11-19 13:29:21 +08:00
Benau
c8a828aa00 Remove ISceneNode.h in check_line.hpp 2022-11-19 12:33:17 +08:00
Benau
b77333749c Remove irrlicht headers in referee.hpp 2022-11-18 10:36:13 +08:00
Benau
f522e4c72f Remove IMesh.h in header files 2022-11-18 10:18:19 +08:00
Benau
3ecc4ccdad Remove IFileSystem.h in file_manager.hpp 2022-11-18 09:24:31 +08:00
Benau
a688912872 Remove IrrlichtDevice.h and IVideoDriver.h in header files 2022-11-17 11:09:56 +08:00
Benau
d170f0f445 Remove irrlicht.h in remaining code if unneeded 2022-11-17 08:46:54 +08:00
Benau
6b9a34b767 Remove irrlicht.h in tracks code 2022-11-17 08:21:58 +08:00
Benau
ec76b29633 Fix android compilation 2022-11-17 08:14:41 +08:00
Benau
c4306186b1 Fix compilation 2022-11-16 21:21:33 +08:00
Benau
0a1e22451b Remove irrlicht.h in graphics code 2022-11-16 10:54:38 +08:00
Benau
8fb52db8f2 Remove irrlicht.h in font code 2022-11-16 09:26:30 +08:00
Benau
e6111a4084 Remove irrlicht.h in glwrap.hpp 2022-11-16 09:12:08 +08:00
Benau
0cd458cff4 Add skid marks rendering for legacy video drivers 2022-11-15 12:28:33 +08:00
Benau
86391e8b8e Add shadow rendering for legacy video drivers 2022-11-14 14:04:23 +08:00
Benau
58223928d8 Add rubber band rendering for legacy video drivers 2022-11-13 16:08:54 +08:00
Benau
013d604846 Update download assets size 2022-11-12 09:19:23 +08:00
Benau
7702da5965 Fix some shell script issues 2022-11-11 10:43:34 +08:00
Benau
eac07c8f5c Update android to target sdk 33 2022-11-11 10:21:47 +08:00
Benau
b4fff82dc1 Add more options for frame rate 2022-11-10 11:17:23 +08:00
Benau
4e8744f047 Improve accuracy of frame rate limiter 2022-11-09 14:06:31 +08:00
Benau
4c7353a3a4 Add fullscreen desktop option for non-ge capable device 2022-11-08 12:08:27 +08:00
Benau
d9fad6ab55 Don't exit if SDL_GetWindowWMInfo fails 2022-11-08 09:10:41 +08:00
Benau
e2a82b3c09 Fix sometimes android black screen after resuming in vulkan 2022-11-07 10:51:29 +08:00
Benau
6b8e0644db Remove validation warnings when RTT is used 2022-11-07 10:18:32 +08:00
Benau
d5abf8d8a0 Update country names 2022-11-06 08:51:18 +08:00
Benau
255a5960a4 Update translation and add Rusyn language 2022-11-06 08:48:12 +08:00
Benau
89337a6d11 Fix billboard text not disappearing after player disconnects 2022-11-05 09:05:13 +08:00
Benau
f79ffffc64 Hide slipstream for eliminated kart 2022-11-04 14:29:09 +08:00
Benau
0c2b81ac1f Fix missing rotation when lto is used, see #4811 2022-11-03 11:39:25 +08:00
Benau
0d2a39c091 Update update_desktop_file_appdata.py for 1.4 2022-11-02 14:15:28 +08:00
AsciiWolf
8da0d09d27 Add missing 1.4 release into AppData 2022-11-01 15:58:24 +01:00
Benau
1d5613072c Update translation and AppData 2022-10-31 15:24:08 +08:00
Benau
5e841110f3 Update changelog 2022-10-31 15:15:41 +08:00
Benau
5e86dafe73 Update credits 2022-10-31 14:07:44 +08:00
Benau
412f30d2c1 Fix incorrect color emoji position after resizing window 2022-10-31 13:18:54 +08:00
Benau
4ad30fa2bf Update to latest noto color emoji 2022-10-31 12:26:37 +08:00
Benau
b69fd92524 Disable bitcode building for Xcode 14
From Apple:

Starting with Xcode 14, bitcode is no longer required for watchOS and
tvOS applications, and the App Store no longer accepts bitcode
submissions from Xcode 14.

Xcode no longer builds bitcode by default and generates a warning message
if a project explicitly enables bitcode: “Building with bitcode is
deprecated. Please update your project and/or target settings to disable
bitcode.” The capability to build with bitcode will be removed in a future
Xcode release. IPAs that contain bitcode will have the bitcode stripped
before being submitted to the App Store. Debug symbols for past bitcode
submissions remain available for download. (86118779)
2022-10-31 11:59:27 +08:00
Denis Kim
0546c1c91a Avoid triggering other goal lines when the goal is already scored (#4802) 2022-10-31 11:38:05 +08:00
Jörn Eichler
538e03c514 fix parachute powerup (#4738)
only deshield karts ahead of the kart firing the parachute
2022-10-31 11:37:54 +08:00
Benau
54973d0174 Fix missing news text in main menu if loading is too fast 2022-10-31 10:39:54 +08:00
Benau
61bd2a6e70 Fix legacy device in switch homebrew
Allow setting it from config.xml
2022-10-31 09:31:44 +08:00
Benau
cab25432c2 Update download assets size 2022-10-30 16:50:27 +08:00
Benau
440def908b Fix missing stk.nro 2022-10-30 15:29:11 +08:00
Licaon_Kter
3f08e4cbf4 make.sh - specify interpreter directly (#4807)
Run directly it fails with: `./make.sh: 203: Syntax error: "(" unexpected`

A scan on https://www.shellcheck.net/ shows too many issues, this needs to be redesigned a lot to be clean of bashisms
2022-10-30 13:10:06 +08:00
Benau
2707234ada Add armv7 and aarch64 detection in run_game.bat, see #4805 2022-10-28 13:39:06 +08:00
Benau
d2a1144cf4 Fix possible division by zero 2022-10-27 09:16:43 +08:00
Benau
b2d1f94adc Fix hovering ghost kart since 2696ef2 2022-10-26 12:55:03 +08:00
Benau
5beafdce8e Fix #4808 2022-10-25 09:48:22 +08:00
Benau
683f5ece7f Fix thunderbird traffic light in legacy video drivers 2022-10-24 13:39:01 +08:00
Benau
7109729010 Add slipstream meshes to irrlicht mesh cache
This enables instancing of them in vulkan engine
2022-10-23 10:02:54 +08:00
Benau
8358b7be0a Allow SMesh to be used in irrlicht mesh cache 2022-10-22 15:40:27 +08:00
Benau
9cd217acfe Add convertIrrlichtMeshToSPM 2022-10-21 08:40:23 +08:00
Benau
243f7f7008 Add slipstream rendering for all video drivers 2022-10-20 12:42:36 +08:00
Benau
0e142e645c Handle vertex color in render info for COGLES2FixedPipelineRenderer 2022-10-19 09:29:06 +08:00
Benau
58a00f7627 Store and render custom vertex color in GERenderInfo 2022-10-18 15:07:11 +08:00
Benau
1b604666c3 Fix sky particles rendering in modern gl3 too, see #2779 2022-10-17 09:33:51 +08:00
Benau
5ecdc11ffd Fix sky particles rendering in vulkan
Align them with the vertical axis
2022-10-16 12:08:02 +08:00
Benau
cfb10dbb1f Make sure sky particles always fall vertically 2022-10-15 14:31:07 +08:00
Benau
1fc460ff4e Add flips particle rendering for vulkan 2022-10-14 10:17:58 +08:00
Benau
46f44b5d59 Add getBulletQuaternion for MiniGLM 2022-10-13 12:12:07 +08:00
Benau
6cdc554d21 Avoid updating data descriptor sets every frame 2022-10-12 15:30:31 +08:00
Benau
26f96b0986 Allow GEVulkanDynamicBuffer to use a specific frame 2022-10-11 12:05:47 +08:00
Benau
f85f631c4b Return true if buffer resized 2022-10-10 10:26:05 +08:00
Benau
e9be8d91ef Avoid using VMA_MEMORY_USAGE_AUTO if possible 2022-10-09 09:37:18 +08:00
Benau
542ece64f9 Use triple buffer to avoid memcpy after fence 2022-10-08 13:04:22 +08:00
Benau
982a5b2be8 Reduce usage of local buffer in GEVulkanDrawCall 2022-10-07 11:48:39 +08:00
Benau
91dea5f50d Use VMA_MEMORY_USAGE_AUTO_PREFER_HOST for host buffer
This improves performance when particles are used
2022-10-06 16:12:44 +08:00
Benau
51a1396313 Allow creating different buffer sizes in GEVulkanDynamicBuffer 2022-10-05 11:08:52 +08:00
Benau
e5318d8ea9 Fix crash when minimizing in windows 2022-10-04 13:55:51 +08:00
Benau
d69f83c7cc Fix WRITE_AFTER_WRITE error:
vkCmdBeginRenderPass: Hazard WRITE_AFTER_WRITE vs. layout transition in
subpass 0 for attachment 1 aspect depth during load with loadOp
VK_ATTACHMENT_LOAD_OP_CLEAR.
2022-10-03 10:05:33 +08:00
Benau
b2404aadd2 Reduce instance data size
MoltenVK has no DrawIndex support yet
2022-10-02 16:41:09 +08:00
Benau
e1f8294008 Use dedicated buffer for sbo 2022-10-01 12:20:35 +08:00
Benau
421293b8e9 Add shader draw parameters detection 2022-09-30 14:42:06 +08:00
Benau
86c349e5f2 Properly check and enable vulkan extensions 2022-09-29 16:01:27 +08:00
Benau
51496cf5ef Fix moltenvk without binding all mesh textures 2022-09-28 08:56:15 +08:00
Benau
5424d4fe77 Fix typo in ge shaders 2022-09-27 15:21:08 +08:00
Benau
11a168b4bf Avoid error when particle size is zero 2022-09-26 10:36:01 +08:00
Benau
82218afc40 Reset video driver in GE when vulkan creation fails 2022-09-25 09:55:32 +08:00
Benau
3b5a1d6c74 Notarize macOS release build 2022-09-23 21:44:09 +08:00
Benau
dd9808fd05 Fix uninitialized m_current_ai 2022-09-22 16:32:54 +08:00
Benau
e4515e7454 Add AI number detection in server screen 2022-09-22 10:46:19 +08:00
Benau
cfd7fa662b Show a dialog and revert if device is not vulkan capable 2022-09-21 10:33:54 +08:00
Dmitry Marakasov
dd511638db Initialize vulkan handles properly 2022-09-20 23:47:45 +03:00
Benau
40f218e6c8 Update translation source 2022-09-20 11:30:44 +08:00
Benau
fdc4a19e1a Copy debug symbols for android build 2022-09-19 11:28:44 +08:00
Benau
4f0b9644a8 Update download assets size 2022-09-19 11:23:44 +08:00
Benau
0b405a8642 Update translation and AppData file 2022-09-19 10:35:12 +08:00
Benau
bf0db0497b Don't throw when missing texture during ondemand loading
It can happen when the texture is deleted later
2022-09-19 10:24:55 +08:00
Benau
25540fc6a7 Add CMAKE_BUILD_TYPE=Release when building shaderc 2022-09-19 09:51:00 +08:00
Benau
7a1706834f Default to opengl render for arm64 windows
The opengl compatibility pack is pre-installed on
arm64 windows according to a user
2022-09-19 00:12:51 +08:00
Benau
dd6768911d Build for armv7 windows
No installer as armv7 windows has no x86 emulation
2022-09-18 23:54:44 +08:00
Benau
f270b4acf8 Add particle rendering in vulkan 2022-09-18 11:31:06 +08:00
Benau
4d79ccdea5 Add different texture per draw call for billboard 2022-09-18 10:54:22 +08:00
Benau
50c22a5837 Use real transparent shader first in vulkan draw call 2022-09-18 08:18:47 +08:00
Benau
7199409de4 Fix vulkan projection matrix 2022-09-17 16:26:10 +08:00
Benau
53351257fc Use vertex color alpha to draw translucently 2022-09-16 11:15:36 +08:00
Benau
a36276811e Fix missing vertex color in gles2 driver
Also make sure all vertex colors are applied after colorization is done
2022-09-16 10:58:17 +08:00
Benau
b77160527c Fix texture matrix for gles2 driver 2022-09-15 09:01:55 +08:00
Benau
16173207ee Add colorization support for gles2 driver 2022-09-15 08:30:24 +08:00
Benau
9947c87fe1 Fix #4795 2022-09-15 01:11:14 +08:00
Benau
787d157933 Add billboard rendering in vulkan 2022-09-14 16:19:38 +08:00
Benau
b1fa45437f Add dedicated skybox textures folder 2022-09-13 14:23:04 +08:00
Benau
9804416a82 Fix transparent shader drawing order
Use the same order like current engine
2022-09-12 13:38:01 +08:00
Benau
bf8a411f01 Always use GESPMBuffer for GEVulkanDrawCall::m_materials key 2022-09-12 13:14:05 +08:00
Benau
23470bbde2 Add custom vertex color to instance data 2022-09-12 11:07:22 +08:00
Benau
48730d1db4 Add billboard text rendering in vulkan 2022-09-12 10:56:39 +08:00
Benau
7cc238e101 Remove friend class in GE::GESPMBuffer 2022-09-11 15:04:38 +08:00
Benau
76c39afd8b Add colorization for vulkan 2022-09-11 11:05:33 +08:00
Benau
d3ddcd884d Fix broken splitscreen network when no track selection screen 2022-09-11 09:16:19 +08:00
Benau
8eb8c6392e Don't spam logging about missing rewinder 2022-09-11 00:47:34 +08:00
Benau
f1fdc98779 Always send (empty if applicable) kart data to ensure forward compatibility 2022-09-11 00:41:21 +08:00
Benau
ebd380c0bc Allow using real addon karts in networking 2022-09-10 15:49:21 +08:00
Benau
39e3c189da Make it possible to enable kart exhaust in legacy device 2022-09-09 10:25:33 +08:00
Benau
e52a9dce59 Fix particle xml after code change 2022-09-09 10:08:54 +08:00
Benau
dcad21b830 Use uniform rendering code for particle rendering
1. Remove pow in shader and do srgb conversion in code

2. Fix setGreen and setBlue order

3. Multiply particle color first like vertex color in the other shaders

4. Fix incorrect smoothstep
2022-09-09 09:41:32 +08:00
Benau
155b73d452 Remove unneeded pow in transparent.frag
It's only used in 2d rendering so no srgb sampling is needed
2022-09-08 15:24:40 +08:00
Benau
efcdd79d42 Fix missing snowflake in icy soccer field
It used to work in 1.2 because the top of the invisible wall was
not covered, which will affect height map calculation. Now we
ignore physics only objects when doing the height map calculation.
2022-09-07 13:53:08 +08:00
Benau
4207714352 Use GE::GERenderInfo to draw ghost kart and ctf flag in vulkan 2022-09-06 15:46:05 +08:00
Benau
885e08c559 Fix ghost kart missing for non-colorizable kart 2022-09-06 09:54:07 +08:00
Benau
2d0c945dd8 Move RenderInfo class to GE 2022-09-05 16:22:04 +08:00
Benau
647988ad30 Load colorization data for vulkan 2022-09-05 13:39:02 +08:00
Benau
5252c78a05 Fix crash when getActiveCamera is used after rendering scene 2022-09-05 09:54:42 +08:00
Benau
4335d95215 Preload icon materials to avoid hang when firstly insert item 2022-09-04 11:37:09 +08:00
Benau
9a7e2f6c39 Simplify m_icon_node handling in item class
Item::handleNewMesh already creates new m_icon_node everytime
2022-09-04 11:12:07 +08:00
Benau
79bf026c74 Don't check for descriptor indexing properties on non-apple devices
Some drivers (like ivybridge on linux) report incorrect values and
make graphics pipeline creation crash later
2022-09-04 09:05:00 +08:00
Benau
90453e6128 Update AppData file game screenshots url 2022-09-04 08:35:32 +08:00
Benau
d93b5d3b8d Fix hang when switching kart in selection screen for vulkan 2022-09-03 12:04:44 +08:00
Benau
784b77723c Add missing vkCmdBindDescriptorSets for supportsBindMeshTexturesAtOnce 2022-09-03 10:30:54 +08:00
Benau
b0b9f44aeb Always use stable_sort to avoid flickering with alpha blending 2022-09-03 09:27:06 +08:00
Benau
d55eb56d78 Fix logic error in GEVulkanTexture::getTextureData 2022-09-02 19:37:37 +08:00
Benau
1eb19e5e13 Allow changing texture compression setting without restarting stk 2022-09-02 10:04:10 +08:00
Benau
caf9fb448b Take BPTC into account for texture compression support 2022-09-02 09:12:05 +08:00
Benau
0b4bf178d7 Add texture matrix support in vulkan 2022-09-02 09:07:43 +08:00
Benau
7a5f14cb37 Don't call KartPropertiesManager::onDemandLoadKartTextures on child process 2022-09-01 16:04:47 +08:00
Benau
ad8ba4d417 Mirror UV if needed in vulkan 2022-09-01 10:54:33 +08:00
Benau
089dd025f1 Implement GEVulkanTexture::getTextureSize correctly 2022-08-31 13:09:41 +08:00
Benau
3db036d67f Fix data race when deleting GEVulkanTexture 2022-08-31 12:36:55 +08:00
Benau
4ceec85edc Fix infinite GEVulkanTexture::waitImageView if createImageView failed 2022-08-31 11:20:04 +08:00
Benau
38b995bf61 Avoid hangs if reloading textures too much 2022-08-31 11:08:48 +08:00
Benau
c929002eba Fix crash when recreating irrlicht device 2022-08-30 09:44:31 +08:00
Benau
1703e829eb Keep fullscreen checkbox focus when toggling it 2022-08-30 09:27:54 +08:00
Deve
7a9300b56a Update linux builder 2022-08-29 20:12:48 +02:00
Benau
4f3dbb43a2 Fix bad gui after toggling fullscreen ingame 2022-08-29 14:55:02 +08:00
Benau
1f53895a25 Attempt to restore vulkan device after out focus in gnome fullscreen 2022-08-29 12:30:18 +08:00
Benau
97bc2696db Fix broken IrrDriver::cancelResChange 2022-08-29 11:06:12 +08:00
Benau
3d9828b6e3 Don't check for larger window size if fullscreen is used 2022-08-29 10:48:39 +08:00
Benau
d322720147 Add option to use original fullscreen code for vulkan 2022-08-29 10:30:31 +08:00
Benau
bba636263e Use fullscreen desktop for vulkan 2022-08-28 10:55:06 +08:00
Benau
e6f8dcfdb0 Make render scale configurable in ui for vulkan 2022-08-28 09:27:08 +08:00
Benau
8f061c6367 Remove depth attachement if rtt is used 2022-08-27 13:04:22 +08:00
Benau
d31281cb6f Add render scale support in vulkan 2022-08-27 12:49:17 +08:00
Benau
97e5064535 Use location, rotation and scale instead of model matrix in vulkan 2022-08-26 09:36:30 +08:00
Benau
514e3a50ad Fix uninitialized m_compressed_data 2022-08-25 15:20:04 +08:00
Benau
57c5446e55 Add GECompressorBPTCBC7 2022-08-25 15:13:23 +08:00
Benau
3e2de9419e Update download assets size 2022-08-24 12:00:07 +08:00
Benau
adedc7e80f Update translation, AppData and Desktop file 2022-08-24 11:56:49 +08:00
Benau
fefb3c1949 Mark skybox textures to be loaded on demand 2022-08-23 08:54:27 +08:00
Benau
5699ede148 Draw skybox before transparent objects 2022-08-22 10:53:07 +08:00
Benau
4f9d40f3b2 Add GEVulkanSkyBoxRenderer 2022-08-21 14:09:56 +08:00
Benau
5aa70333ce Add GEVulkanArrayTexture 2022-08-20 15:44:38 +08:00
Benau
694c1b6c29 Fix xcode build 2022-08-19 23:28:54 +08:00
Benau
5c26ac73df Fix bottom skybox uv and revert custom irrlicht change 2022-08-19 11:26:07 +08:00
Benau
058aa45894 Increase sampler size for max 20 karts in game 2022-08-18 14:56:44 +08:00
Benau
2d1c7385c6 Fix unlocked screen track screeshot display for vulkan 2022-08-17 15:49:10 +08:00
Benau
c2ab58148f Fix missing continue button in next cutscene part 2022-08-16 14:11:37 +08:00
Benau
7aff7f9ba9 Fix broken continue button in cutscene if long loading time 2022-08-15 09:44:12 +08:00
Benau
8fead715da Add onDemandLoadTrackScreenshots for all tracks 2022-08-14 15:21:37 +08:00
Benau
f777e01a21 Make kart textures loading ondemand if needed 2022-08-13 11:44:06 +08:00
Benau
e0636495f0 Add ondemand texture loading for vulkan 2022-08-12 13:07:53 +08:00
Benau
eace871c66 Add getImageSize for all image loaders 2022-08-11 14:46:00 +08:00
Benau
c698d4a601 Wait for GEVulkanCommandLoader to finish task before deleting textures 2022-08-10 11:07:54 +08:00
Benau
ed4dcc24c6 Fix CImageLoaderJPG::isALoadableFileFormat according to upstream 2022-08-09 10:20:04 +08:00
Benau
1b42688cbf Enable vulkan texture compression in ui 2022-08-09 10:03:56 +08:00
Benau
bed0acda7a Build shaderc in android without debug symbols 2022-08-09 09:26:05 +08:00
Benau
c6dafd4b80 Make isTextureCompressionEnabled return false for MOBILE_STK 2022-08-08 11:40:26 +08:00
Benau
1b671c932a Build libsquish and astc-encoder for android 2022-08-08 11:32:01 +08:00
Benau
d7390a1824 Add GECompressorASTC4x4 2022-08-07 15:33:54 +08:00
Benau
93dc6ed770 Fix GEVulkanTexture::getTextureData for compressed internal format 2022-08-06 11:01:54 +08:00
Benau
b4b0ddc620 Add GECompressorS3TCBC3 2022-08-06 09:48:11 +08:00
QwertyChouskie
4f32435ef2 Tweaks to crash report dialog (#4789)
* Use error icon in crash report dialog

Found this change when going through old folders, looks like it never made it in.

* Update crash error message

Improve grammar; avoid reports for one-off errors; link to proper subforum (id 17 is STK General)
2022-08-05 18:08:20 +08:00
Benau
118fc7fa96 Add GEMipmapGenerator 2022-08-05 12:15:08 +08:00
Benau
211c901335 Add checking for compute in main queue 2022-08-04 10:56:29 +08:00
Benau
c96881208a Use vkResetCommandPool for every frame commands 2022-08-03 13:44:59 +08:00
Benau
00e7b04f13 Add code to render vbo and ibo individually for some devices 2022-08-02 10:21:07 +08:00
Benau
0ad22efcf7 Re-order the buffer to use less memory 2022-08-02 00:56:11 +08:00
Benau
403f748b4a Add dynamic descriptor code for some devices 2022-08-02 00:25:36 +08:00
Benau
72b177c354 Fix incorrect vertex attribute 2022-08-01 09:13:20 +08:00
Benau
331ae9a30f Fix crash when GEVulkanTexture::getTextureData failed 2022-08-01 00:59:43 +08:00
Benau
83595d55a7 Add missing dstAccessMask for indirect command 2022-07-31 10:43:11 +08:00
Benau
2696ef2567 Add shader to render ghost kart 2022-07-30 09:03:56 +08:00
Benau
1a953b8a6c Add grass shader 2022-07-29 10:51:14 +08:00
Benau
c2c8468fa8 Sort drawing based on nodes surface area 2022-07-28 15:48:06 +08:00
Benau
e9d3152c1a Add more shaders 2022-07-28 13:37:09 +08:00
Benau
3f99e63a3c Don't use sampler array for non-single texture descriptor
Devices like Apple A8 don't support it
2022-07-27 13:54:22 +08:00
Benau
6d74e84609 Reduce vram usage by removing bones data in static spm 2022-07-27 11:45:09 +08:00
Benau
d37a3b8c7e Sort materials if needed 2022-07-26 13:21:07 +08:00
Benau
d4b2b03174 Add animated mesh rendering 2022-07-26 12:47:31 +08:00
Benau
8e1de345fb Add animation support in GEVulkanAnimatedMeshSceneNode 2022-07-26 00:12:35 +08:00
Benau
b75dec1fbc Move struct Armature to GE 2022-07-25 10:54:27 +08:00
Benau
61b87d3b31 Convert irrlicht mesh for addSphere 2022-07-25 10:05:46 +08:00
Benau
819b3ad27f Add minimap rendering 2022-07-25 09:41:35 +08:00
Benau
a2228adef1 Fix padding size calculation 2022-07-24 14:32:37 +08:00
Benau
593f78a230 Move MiniGLM to graphics engine folder 2022-07-24 12:22:06 +08:00
Benau
da0cce6cd6 Add render to texture support in GEVulkanDriver 2022-07-24 11:38:02 +08:00
Benau
99d565f961 Allow using custom command buffer for draw call 2022-07-24 08:54:47 +08:00
Benau
9f25652455 Fix one possible crash 2022-07-23 15:10:45 +08:00
Benau
d325e33fc0 Use multi-draw indirect if supported 2022-07-23 14:02:37 +08:00
Benau
7f31ffa552 Add anisotropic samplers 2022-07-23 10:58:37 +08:00
Benau
e991e06640 Implement high dpi support in sdl2 properly 2022-07-22 21:10:51 +08:00
Benau
ea69c36cb3 Fix splitscreen lod (mainly for karts) 2022-07-22 11:05:30 +08:00
Benau
bf77863c53 Simplify OnRegisterSceneNode of vulkan mesh nodes 2022-07-22 08:18:18 +08:00
Benau
3d0d666e09 Add texture mapping 2022-07-21 12:26:06 +08:00
Benau
fec21afc8e Add FileIncluder to shaderc compiler 2022-07-20 13:40:55 +08:00
Benau
e9924357cd Add polycount display in GEVulkanDriver 2022-07-20 10:37:09 +08:00
Benau
f768badee0 Add initial 3d rendering 2022-07-19 15:56:08 +08:00
Benau
44b2468003 Add GEVulkanDrawCall 2022-07-18 13:28:07 +08:00
Benau
5853d618a6 Add GEVulkanMeshSceneNode and GEVulkanAnimatedMeshSceneNode 2022-07-17 16:06:52 +08:00
Benau
fc7413800c Use GEVulkanTextureDescriptor on GEVulkan2dRenderer 2022-07-16 09:54:40 +08:00
Benau
713ab53272 Add GEVulkanTextureDescriptor to avoid refilling every frame 2022-07-15 14:09:57 +08:00
Benau
3769c18288 Remove hardcoded shader names 2022-07-14 15:25:16 +08:00
Benau
15eec8a8d2 Combine vbo and ibo buffers 2022-07-14 10:44:28 +08:00
Benau
c864b9bd60 Use vma in GEVulkanMeshCache 2022-07-13 12:09:45 +08:00
Benau
cf8bafaab3 Use vma in GEVulkanDynamicBuffer 2022-07-13 11:23:08 +08:00
Benau
b0f91ff33d Use vma in GEVulkanTexture 2022-07-12 15:46:33 +08:00
Benau
0f4a21ab6e Add Vulkan Memory Allocator 2022-07-11 12:58:03 +08:00
Benau
0b4ebc35b9 Add performance validation layer code 2022-07-10 15:36:27 +08:00
Benau
27b5770ea9 Add GEVulkanDepthTexture 2022-07-10 14:48:07 +08:00
Benau
7d94bf1f6f Update vk_mvk_moltenvk.h to latest version 2022-07-09 09:01:06 +08:00
Benau
90794c2c8f Only update bounding box of lod node every frame if needed 2022-07-08 23:20:57 +08:00
Benau
d0a177c3cc Fix hang when resizing window with vsync on 2022-07-08 11:46:17 +08:00
Benau
fa72ef7246 Fix matrix in GEVulkanCameraSceneNode::render 2022-07-07 13:08:44 +08:00
Benau
8ab63edd30 Save viewport in GEVulkanCameraSceneNode 2022-07-06 10:53:26 +08:00
Benau
4351926137 Fix possible crash if throw early 2022-07-06 10:06:28 +08:00
Benau
cc6914631a Don't upload if size is empty 2022-07-05 08:54:06 +08:00
Benau
defd58a465 Add getRealSize to GEVulkanDynamicBuffer 2022-07-04 14:51:59 +08:00
Benau
0875db0db6 Add buildCommandBuffers in GEVulkanDriver 2022-07-03 11:48:07 +08:00
Benau
dfd6a1820d Fix crash when closing in RTT screen 2022-07-02 10:52:20 +08:00
Benau
dc168e1b13 Better error handling when GEVulkanDriver construction fails 2022-07-01 12:52:07 +08:00
Benau
34ae56d33a Use matrix4 directly after the removal of sse 2022-06-30 16:49:51 +08:00
Benau
8fb0005020 Remove useless sse code in matrix4 2022-06-29 15:45:08 +08:00
Benau
3a64cc9f6a Fix uninitialized values in btKart 2022-06-28 10:08:33 +08:00
Benau
21d9b4bc70 Fix lod node after updateAbsolutePosition optimization 2022-06-27 13:22:07 +08:00
Benau
11fb04bd95 Fix sp mesh node after updateAbsolutePosition optimization 2022-06-26 09:46:08 +08:00
Benau
f63ce6917b Only updateAbsolutePosition if transformation changed 2022-06-25 11:54:06 +08:00
Benau
e599a7fff8 Disable minimap in vulkan driver for now 2022-06-24 13:23:01 +08:00
Benau
648c7c84d4 Clean up and optimize lod node 2022-06-23 16:00:08 +08:00
Benau
b8cb96b81f Add GEVulkanCameraSceneNode 2022-06-16 12:00:15 +08:00
Benau
4b17d2133a Try to allow cake and plunger to have collision callbacks 2022-06-13 16:16:26 +08:00
Benau
8ea38a6103 Fix memory leak 2022-06-09 15:18:20 +08:00
Benau
d85c1e3ee7 Use class inheritance for GEVulkanMeshCache 2022-06-08 13:38:24 +08:00
Benau
b0cddc462a Add GEVulkanSceneManager 2022-06-07 10:34:08 +08:00
Benau
ca1f61b898 Add GEVulkanMeshCache 2022-05-29 12:33:06 +08:00
Benau
95d9277046 Regenerate plural forms from po files 2022-05-28 15:44:18 +08:00
Benau
8affae4861 Update translation, add Macedonian 2022-05-28 15:38:22 +08:00
Benau
2b80513a8f Add getMonoTimeMs to GE 2022-05-27 09:41:34 +08:00
Benau
ac5351ae5e Add irrlicht device pointer to vulkan driver 2022-05-26 17:22:39 +08:00
Deve
78f871d7f2 Use OpenGL ES by default for RISC-V 2022-05-26 10:06:46 +02:00
Benau
364e380dfd Update translation source, AppData and Desktop file 2022-05-25 09:03:57 +08:00
Benau
090d2e8038 Add new things to Appdata generation script 2022-05-25 09:01:04 +08:00
Benau
4c97bcbae5 Update translation file from transifex 2022-05-25 08:58:54 +08:00
Benau
1bdeffc7ed Convert b3d to GE spm 2022-05-24 10:24:15 +08:00
Benau
92accb352e Convert spm to GE spm 2022-05-23 13:46:03 +08:00
David CARLIER
096b408b9c BSD build warning little fixes, implicit cast. 2022-05-22 11:20:38 +01:00
Benau
e666e08f2d Add GE spm code 2022-05-22 11:53:02 +08:00
Benau
350773d316 Add temporary code for GE spm 2022-05-21 08:55:59 +08:00
Benau
3b0df18167 Fix crash when rubber band hits its owner 2022-05-20 08:17:15 +08:00
Benau
f61dcb2ec3 Allow reading spm vertices in physics 2022-05-19 15:53:05 +08:00
David Carlier
db8fdb9ccf illumos/solaris build fix 2022-05-14 11:31:51 +01:00
Benau
b50e977cfe Add llvm mingw building instructions 2022-05-10 13:16:30 +08:00
Benau
c004588654 Allow llvm mingw toolchain to be used in windows 2022-05-10 10:05:01 +08:00
Benau
9c9f69856f Enable maximum parallelization by making vkWaitForFences closer 2022-05-05 09:30:29 +08:00
Benau
d2da2e22e1 Avoid address sanitizer error 2022-05-04 10:42:16 +08:00
Benau
281ddb1b17 Fix #4772 2022-05-03 09:32:14 +08:00
Benau
c739aeb758 Disable mipmap generation for too small textures 2022-05-02 10:42:32 +08:00
Benau
db4329cebf Remove unwanted architectures in apk properly 2022-05-01 09:55:06 +08:00
Benau
ac140c9cf2 Fix #4770 2022-05-01 08:36:56 +08:00
Benau
63e1afb835 Fix camera rotation angle for all platforms 2022-04-30 12:29:25 +08:00
Benau
ed14ab5091 Fix possible exit crash 2022-04-30 11:55:47 +08:00
Benau
ae2cfb4162 Fix gyroscope on walldriving surface properly 2022-04-30 10:45:33 +08:00
Benau
98eb912a76 Use simde on graphics_utils 2022-04-29 11:28:47 +08:00
Benau
383bd93261 Add simde 2022-04-29 11:02:25 +08:00
Benau
0f2b3da37e Fix sometimes missing overworld background music 2022-04-28 14:30:53 +08:00
Benau
ed6d7578a5 Avoid queue size race condition 2022-04-27 11:01:53 +08:00
Benau
96cd140c62 Avoid getListenerPos race condition 2022-04-26 12:42:11 +08:00
Benau
68240b5d2d Avoid getWorld race condition 2022-04-26 12:26:29 +08:00
Benau
fddc19225c Use array list for scene nodes 2022-04-26 10:55:24 +08:00
Deve
98763a10eb Use new build options for freetype in linux build script 2022-04-24 08:54:02 +02:00
Benau
972c719392 Add triangle fan 2d drawing for vulkan driver 2022-04-20 08:19:53 +08:00
Benau
1b92e99cfe Use a new sampler for 2d rendering 2022-04-19 13:18:59 +08:00
Benau
26bd8a5b8b Add mipmap generation for GEVulkanTexture 2022-04-19 12:49:05 +08:00
Benau
b0421569d0 Fix validation warnings when running vkDeviceWaitIdle 2022-04-18 13:46:59 +08:00
Benau
5d23d8d790 Add multithreading GEVulkanTexture loading 2022-04-18 12:16:27 +08:00
Benau
059fc9ebfd Add GE::getResizedImage using IReadFile 2022-04-18 10:46:23 +08:00
Markus Reitboeck
2876032630 Fix logical error in libraqm implementation
the first two conditions made the whole if condition
always true

I've copied the fix from the current implementation in
libraqm
https://raw.githubusercontent.com/HOST-Oman/libraqm/master/src/raqm.c
2022-04-17 14:23:52 +02:00
Benau
3d6c86d04e Clean up properly in case constructor throws 2022-04-17 14:42:36 +08:00
Benau
22f658239f Use GEVulkanCommandLoader for all 2022-04-17 14:37:52 +08:00
Benau
da665fc4fd Add GEVulkanCommandLoader with multithreading support 2022-04-17 14:08:29 +08:00
Benau
993073b7dc Update download assets size 2022-04-16 13:16:44 +08:00
Benau
5f9db20b4f Add IFileSystem::existFileOnly (not including directory) 2022-04-16 12:08:57 +08:00
Benau
57a9a8a2aa Add getTextureData for GEVulkanTexture 2022-04-16 11:31:09 +08:00
Benau
0dbbf1a6e6 Fix bluetooth mouse in iOS
See 19c129faba
2022-04-15 17:37:08 +08:00
Benau
99f1a2e03f Add moltenvk argument buffers support 2022-04-15 17:05:38 +08:00
Benau
a469d501f9 Fix gyroscope behaviour on walldriving surface, see #4750 2022-04-15 12:48:09 +08:00
Benau
b359c9548c Update build scripts for curl 7.81 and later 2022-04-14 10:29:05 +08:00
Benau
ae8df366fc Fix convertBGRA order in GEVulkanTexture::reloadInternal
Image manipulator should work on original color data
2022-04-13 10:04:28 +08:00
Benau
3fe53751c4 Move BGRA conversion out of upload in GEVulkanTexture 2022-04-12 15:16:26 +08:00
Benau
661a57b5fc Add a way to acquire file archives mutex 2022-04-11 14:32:36 +08:00
Benau
8df6bdf7c8 Move file system mutex to irrlicht 2022-04-11 13:57:06 +08:00
Benau
efe1070be7 Fix validation warning when using VK_SHARING_MODE_CONCURRENT 2022-04-10 10:56:04 +08:00
Benau
de09566b4a Avoid configurations xml lost if having disk space issue, see #4709 2022-04-09 14:59:57 +08:00
Benau
d6a3e48d03 Fix compiler warnings in MinGW 2022-04-09 12:53:20 +08:00
Benau
8bbb142394 Fix #4745 2022-04-09 10:43:30 +08:00
Markus Reitboeck
2c7cb7fa67 ReplayRecorder: write correct number of transformation into "size"
fixes #4758
2022-04-08 22:22:24 +02:00
Benau
d60a3a7c0c Add loadingFailed function for ITexture 2022-04-08 14:56:24 +08:00
Benau
d6db020bfe Add thread-safe existFile in IFileSystem 2022-04-08 14:35:04 +08:00
Mary Strodl
878f064ecf CImageLoaderSVG: don't rescale on server 2022-04-07 14:21:00 -04:00
Benau
4c4daf9698 Move screen height detection inside CImageLoaderSVG::loadImage 2022-04-07 08:51:25 +08:00
Benau
1655c243b7 Batch upload image command buffer 2022-04-06 11:35:22 +08:00
Benau
159cdcd06b Save max texture size before calling image manipulator 2022-04-06 10:17:49 +08:00
Benau
e6684040ba Fallback to VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR if needed 2022-04-05 10:43:23 +08:00
Benau
fb9d8f21ce Deactivate unusable settings in non-gl3 renderers 2022-04-04 08:50:46 +08:00
Benau
f2cc51a602 Fix mismatched max size for background.jpg when reloading 2022-04-03 10:54:27 +08:00
Benau
b6b565aabb Fix validation warning when reloading textures 2022-04-03 10:21:48 +08:00
Benau
24a9c99e03 Fix one validation warning 2022-04-03 09:55:17 +08:00
Benau
a98a470ea8 Implement live updating swap interval value for vulkan 2022-04-02 14:17:27 +08:00
Benau
3994ce5666 Add workaround for https://gitlab.freedesktop.org/mesa/mesa/-/issues/5516 2022-04-02 13:41:52 +08:00
Benau
067ac4fe01 Implement resume behaviour for mobile stk 2022-04-02 13:33:08 +08:00
Benau
4d2c65ade9 Add render driver switch in lobby command 2022-04-01 12:19:21 +08:00
Benau
6c7e4f25ea Quit the app if vkQueueSubmit with fence fails
It prevents infinitive vkWaitForFences later
2022-04-01 10:16:28 +08:00
Benau
601511e7f4 Split device polling out of renderLoading 2022-04-01 09:59:46 +08:00
Benau
1c99ba2562 Fix clang warnings 2022-03-31 11:55:23 +08:00
Benau
9c7fb99e53 Fix one validation warning 2022-03-31 11:34:47 +08:00
David Carlier
4f4fb01ed7 upstreaming change for settings paths for haiku.
original author @threedeyes slighty adapted.
2022-03-29 22:28:23 +00:00
Benau
cd9e2f0adf Remove always exiting behaviour when pausing vulkan enabled stk 2022-03-28 15:30:42 +08:00
Panagiotis "Ivory" Vasilopoulos
0c147c0a0b Fix URLs on Haiku
My general strategy of getting ports to work on Haiku is to just take advantage
of whatever makes things work on FreeBSD by adding an additional condition and
then fixing up things later once it compiles successfully. This generally
works, as Haiku contains FreeBSD headers for compatibility and code that
takes other operating systems into account other than Windows, Linux and OS X
and has a higher degree of POSIX compatibility tends to work on FreeBSD and
Haiku. This strategy is not perfect, and this commit proves it.

Haiku is the successor of BeOS, which, in turn, shows similarities to macOS
every now and then, as the company almost acquired Be, Inc., but later chose to
acquired NeXT, Inc. instead.

`xdg-open` is not available on Haiku by default the same way it is on
FreeBSD and Linux. With that in mind, this should fix URLs, which do
not not work properly on Haiku. Actually, nevermind, I forgot that there
is actually a package available that adds support for them. But still.
The less dependencies, the better, probably. This is also how other
packages with ports available on Haiku solve this problem.
2022-03-27 21:22:48 +02:00
David Carlier
37a57d0011 Fix build for Haiku and a handful of other oses with the spirv-tools dependency. 2022-03-26 15:05:08 +00:00
Benau
bed91e67a0 Handle device orientation with vulkan pre-rotation 2022-03-26 00:19:09 +08:00
Benau
3d92730a82 Fix incorrect android screen rotation with vulkan 2022-03-25 09:04:08 +08:00
Benau
68eb70e7e6 Use dynamic viewport for GEVulkan2dRenderer 2022-03-24 16:37:34 +08:00
Benau
23cd67f45c Implement draw2DRectangle for GEVulkanDriver 2022-03-23 10:53:00 +08:00
Benau
9e50c8a71f Remove unneeded files, fix #4751 2022-03-22 07:51:45 +08:00
Benau
3e2ff91654 Add dynamic scissor support 2022-03-21 11:54:28 +08:00
Benau
ea1733ed08 Add drawing code for devices with low sampler images 2022-03-20 13:35:22 +08:00
Benau
bb6551fdf6 Add drawing code for devices without descriptor indexing 2022-03-19 16:09:32 +08:00
Benau
1cf2c0c5bf Add initial 2D vulkan rendering 2022-03-19 15:14:55 +08:00
Benau
cb607a16ff Add GEVulkanShaderManager 2022-03-18 16:24:33 +08:00
Benau
89afd214e8 Require shaderSampledImageArrayDynamicIndexing for vulkan 2022-03-18 09:24:55 +08:00
Benau
1d0d2ebb75 Fix windows xp support 2022-03-17 15:12:08 +08:00
Benau
5128fc3a88 Add link to download python for windows 2022-03-17 14:30:21 +08:00
Benau
77ca4625c1 Add shaderc for android 2022-03-17 14:25:11 +08:00
Benau
9ea2f3ff8c Fix cctools build 2022-03-17 14:06:27 +08:00
Benau
38a553513c Fix switch build 2022-03-17 13:52:46 +08:00
Benau
f01959de8b Disable documentation generation for shaderc 2022-03-17 13:36:27 +08:00
Benau
2bc31f1518 Disable shared libraries manually for shaderc 2022-03-17 13:12:55 +08:00
Benau
bc1d885bd1 Add shaderc v2022.1 for GLSL to SPIR-V shaders
Ran ./utils/git-sync-deps already, removed some unneeded files
2022-03-17 12:21:20 +08:00
Benau
c19327aaeb Fix vsync disabled 2022-03-16 15:43:26 +08:00
Benau
a7994c02d8 Fix command buffers size 2022-03-16 12:37:18 +08:00
Benau
d6265f3bf7 Handle possible error from createTextureImage 2022-03-15 14:04:36 +08:00
Benau
4b28f5b9af Wait queue to become idle before deleting texture 2022-03-15 12:42:31 +08:00
Benau
ea275ae798 Use a correct layout during updateTexture 2022-03-14 09:43:22 +08:00
Benau
f35f402edf Fix VkDeviceQueueCreateInfo warning 2022-03-13 10:54:35 +08:00
Benau
4a93bea962 Fix MSVC 2015 build 2022-03-12 16:43:32 +08:00
David Carlier
9fb568eaa7 widening a bit smart pointers usage considering xml data. 2022-03-12 07:43:13 +00:00
David Carlier
18018a5cc1 scoped deref mem utils intro proposal.
trying out in two cases for now.
2022-03-06 19:02:15 +00:00
Benau
854c31be9d Update CREDITS 2022-03-05 08:57:39 +08:00
Benau
d2b2e80faa Fix #4737 2022-03-03 14:39:45 +08:00
Benau
8a5ecc458f Fix apple build 2022-03-01 16:25:25 +08:00
Benau
7bccb0b779 Remove build cache for msvc 2022-03-01 16:06:48 +08:00
Benau
17a899aa2c Fix exit crash 2022-03-01 15:59:48 +08:00
Benau
8b68f52e57 Add GEVulkanTexture 2022-03-01 13:22:20 +08:00
David Carlier
fcf7cf953f http curl client favoured new progress api if supported.
suppress openssl warning with openssl 3.0
2022-02-26 11:49:44 +00:00
Benau
c63faf395f Remove unneeded character saving, we always get it from translated string if needed
It causes undefined behavior in C++20, see #4735
2022-02-25 11:20:52 +08:00
Benau
dcdc66b8f5 Fix undefined behavior in C++20, see #4735 2022-02-25 11:13:27 +08:00
Benau
09e7a38c52 Update for windows-latest 2022-02-18 15:04:00 +08:00
luffah
bd1b20ad35 Minimap and powerup icon settings in user settings
- add size and display settings for powerup icon in user settings
 - move minimap display settings in user settings
 - fix some comments in stk_config.xml
2022-02-13 22:36:20 +01:00
tippfehlr
9a3c51815a Add DisplayVersion to Windows registry on install (+typo) (#4730)
Winget relies on this value to get the version of a program.
If it's missing winget will just download the newest version even if the program is up to date.
See https://github.com/microsoft/winget-cli/issues/1255
2022-02-13 11:30:56 +08:00
David CARLIER
1f0ea77f80 illumos port. (#4732)
overcoming sun constant defined in this platform.
forcing 64 bits build as angelscript assembly is incorrect for 32 bits.
2022-02-13 00:31:14 +08:00
Michael Cochez
eb7a5b2ee6 m_gravity was set on the line above, so the condition will always be false. 2022-02-12 00:39:45 +01:00
Benau
c3b2eaf3e2 Allow adding players when using enter server dialog 2022-02-04 13:47:41 +08:00
Benau
b411f8c60d Remove unneeded sprintf 2022-02-03 10:51:15 +08:00
Kuba
65afb72c98 Fix assertion failed introduced in #4723 (#4728) 2022-01-28 09:56:00 +08:00
Benau
6e347ae517 Fix #4726 2022-01-27 07:18:45 +08:00
Semphris
fa442aacce Ignore clangd files 2022-01-26 11:57:46 -05:00
mrkubax10
b80df76116 Fix wrong lap count in GP result 2022-01-26 12:37:13 +01:00
Semphriss
01a78ba594 Improved code quality in item.cpp (#4722)
Fixes bug where a bubblegum shield popping/bursting will leave an invisible gum object behind
2022-01-26 09:13:51 +08:00
Lois Doyenard
3d4cb58af5 Accept emails with format e.email (from #4718) 2022-01-25 10:48:38 +01:00
Lois Doyenard
b66e0d0d0d More precise error message for online unsername (2 & 3 from #3599) 2022-01-25 10:04:44 +01:00
Semphriss
96c0d167bf Items animation (#4713) 2022-01-25 13:07:04 +08:00
Benau
3ccdfaf70d Add createSamplers for GEVulkanDriver 2022-01-23 16:43:33 +08:00
Benau
8e64c69c5d Add command creation for GEVulkanDriver 2022-01-22 00:41:24 +08:00
Benau
2f4093516a Add createSyncObjects for GEVulkanDriver 2022-01-22 00:18:42 +08:00
Benau
9e321d804e Fix #4711 2022-01-11 09:24:01 +08:00
Semphris
9b6347d62d Added animation to stars 2022-01-09 23:49:24 -05:00
Deve
5999ff94ab Use more cores for package compression 2022-01-05 23:50:12 +01:00
Deve
364d387aa1 Remove rpath after compilation 2022-01-05 23:34:13 +01:00
ldoyenard
886783db31 Add left side ghost replay difficulties (#4707) 2022-01-05 10:16:23 +08:00
Benau
d4ed01b467 Disable accelerometer or gyroscope control if gamepad events trigger, fixed #4705 2022-01-04 09:37:59 +08:00
Benau
76a08d9f30 Remove hardcoded android build settings and update to latest gradle 2022-01-03 11:04:55 +08:00
Benau
f0f498d53f Add createSwapChain for GEVulkanDriver 2021-12-28 13:51:03 +08:00
Benau
3f99d279a7 Update for SDL 2.0.18 2021-12-24 10:57:13 +08:00
Benau
baeafd9f7d Fix missing ime candidate window using SDL2 hint 2021-12-24 09:43:06 +08:00
Benau
7dc8f3e958 Fix order of ghost replay difficulties depending on race result 2021-12-23 00:47:57 +08:00
STK-Waldlaubsaengernest
c09305b236 Fix #4698 2021-12-22 12:14:33 +01:00
Stanislas Dolcini
0a99c667ef Request AMD GPU on Enduro Devices
It seems AMD provides an equivalent to `NvOptimusEnablement` called `AmdPowerXpressRequestHighPerformance`

See https://gpuopen.com/learn/amdpowerxpressrequesthighperformance/
2021-12-12 22:35:57 +01:00
Benau
ccf6ff2686 Fix possible incorrect difficulty shown in result screen when watching single replay 2021-12-09 12:39:57 +08:00
Lois Doyenard
be16d24170 Fix #3849 2021-12-08 11:28:28 +01:00
Benau
087892e183 Fix compiler warnings 2021-12-07 09:33:26 +08:00
STK-Waldlaubsaengernest
a0cc6c95c2 Update player list if state changes to WAITING_FOR_START_GAME (#4685) 2021-12-06 23:21:50 +01:00
STK-Waldlaubsaengernest
97eb45b93b Make limit of players in game configurable (#4685) 2021-12-05 16:46:49 +01:00
Benau
d8af4bc17e Fix #4675 2021-12-03 14:06:40 +08:00
Benau
75a5f81578 Fix valgrind errors 2021-12-03 13:41:02 +08:00
Benau
4a72a79582 Fix #3849 2021-12-03 11:04:43 +08:00
Benau
b286ee9195 Fix #4687 2021-12-03 10:23:31 +08:00
Benau
d1c0acac83 Fix #4653 2021-12-03 10:16:30 +08:00
Benau
ea5aabde0d Fix server name missing in title when leaving live join kart selection screen 2021-11-29 00:59:56 +08:00
Benau
b4411b11fe Fix #4677 2021-11-26 18:29:22 +08:00
Varro33
6b022368cf Fix irrlicht error indent (#4676) 2021-11-22 21:49:15 +08:00
Benau
38425305a5 Remove useless translation po files 2021-11-15 11:16:53 +08:00
Benau
571366a461 Add missing country code to language selection 2021-11-15 11:05:44 +08:00
Benau
33e6110737 Update localized language names and use tsv file for them 2021-11-15 10:58:48 +08:00
Benau
d064f8d96e Update translation source 2021-11-14 16:20:08 +08:00
Benau
844d97ed52 Improve description for lap trial mode 2021-11-14 16:17:02 +08:00
Benau
dfd1912c33 Add track searching to network track screen 2021-11-14 16:11:21 +08:00
Benau
c26b3c989b Fix #4671 2021-11-14 15:31:41 +08:00
이경로
1a11da01bc Revised email issue and some kr translation (#4673) 2021-11-14 15:20:15 +08:00
Benau
7582a00b91 Update target SDK to 30 due to google play requirement 2021-11-12 12:24:42 +08:00
Benau
712822a5f5 Update download assets size 2021-11-12 10:23:41 +08:00
Benau
4d08ea2335 Update Noto Emoji to support Unicode 14 2021-11-11 17:07:51 +08:00
Bryan Quigley
bee1c222af Always AS_MAX_PORTABILITY on AArch 2021-11-07 23:43:05 -08:00
Bryan Quigley
b710fab5c8 STK modifications to angelscript to let Windows/Apple builds
(and 3 forgotten source files)
2021-11-06 10:12:01 -07:00
Bryan Quigley
73c94f571d Update Angelscript from 2.32.0 to 2.35.1
Didn't require any changes except dos2unix.
2021-11-04 17:59:10 -07:00
Kuba
0d8b01b08b Lap Trial improvements (#4664) 2021-11-03 09:39:22 +08:00
Kuba
3623fa8f5f Add Lap Trial mode (#4663) 2021-11-02 03:02:16 +08:00
QwertyChouskie
8b5b68585c Allow specifying a base skin
Anything not provided or defined by a skin will be used from the defined base skin, if specified.

For example, if a skin provides a base_theme of "cartoon", any icons/buttons/etc. not provided by the skin will be pulled from "cartoon".
2021-11-01 00:11:31 +08:00
QwertyChouskie
aee11c6de6 Use getThemedIcon instead of duplicated code 2021-11-01 00:11:31 +08:00
QwertyChouskie
14c1f7b344 Remove dead code block
The way this code was written, it would never be triggered in any real scenario (confirmed by running STK with a Log::fatal before the return)
2021-11-01 00:11:31 +08:00
QwertyChouskie
9ca2c2eddc Remove ugly font/skin loading hack
font_manager->loadFonts() needs data from the GUI skin.  Move this initialization to after we naturally have the data, instead of doing an extra dummy initialization just to get this data.
2021-11-01 00:11:31 +08:00
Benau
1470eb3939 Fix possible crash in discord rpc 2021-10-30 10:04:17 +08:00
lokpro
1fd18c8d88 add UserConfigParams: m_gp_reverse, random-gp-num-tracks for GPInfoScreen (#4656) 2021-10-28 10:15:26 +08:00
QwertyChouskie
ce19c9396e Delete implementation.txt
I didn't realize this file still existed, looks like all this is from the TuxKart days (2000-2004) and has no relevancy anymore.
2021-10-27 12:37:11 -07:00
fmesnier
8f79b24f49 correction of the implementation.txt file (#4655) 2021-10-28 00:58:26 +08:00
Heuchi
e110948eb5 add configuration for item return times in stk_config.xml 2021-10-24 10:02:05 +02:00
lokpro
550458bebd fix 1734d74c6b - only use ranks in GP, else use row number. 2021-10-23 00:03:54 +08:00
lokpro
1734d74c6b fix race_result_gui's GP ranks after RR_RESORT_TABLE 2021-10-22 01:22:25 +08:00
Benau
6809c9585d Add don't show again button to driver dialogs, fix #4645 2021-10-10 16:43:49 +08:00
Benau
786dc6b08f Fix broken recording saving with unicode path in windows 2021-10-08 15:49:53 +08:00
Benau
1c983f7090 Remove 1.3-rc1 in AppData
Also update translation source
2021-10-08 11:36:05 +08:00
Mary
b2e9033998 SDLController: Drop support for SDL 1.x (#4644) 2021-10-08 11:19:42 +08:00
Benau
1cce43b2fa Fix MIPS compilation 2021-10-07 16:30:32 +08:00
Kalev Lember
164c51cb2e Always build tinygettext as a static library
Explicitly pass STATIC to tinygettext add_library() call to make sure
it's always built as static, even when distro's cmake is configured to
build libs shared by default.
2021-10-07 00:52:32 +02:00
Benau
501d8b55ab Fix some typos 2021-10-06 15:22:32 +08:00
Benau
e8074fa392 Update debian build instruction 2021-10-06 13:54:11 +08:00
Mary
fe7dd8af14 Allow setting auto-center property for racing wheels (closes #4636) (#4641) 2021-10-06 13:24:27 +08:00
Benau
013b065f2c Allow disabling loading of addon karts or tracks, fix #4637 2021-10-05 11:58:23 +08:00
Benau
39f7e6441a Fix random player position in FTL 2021-10-05 11:34:51 +08:00
Benau
6f7c8c3dd8 Exit if make_deps.sh failed in android_builder.sh 2021-10-05 10:00:38 +08:00
Benau
835154bde2 Handle SDL_RENDER_DEVICE_RESET event 2021-10-04 21:16:26 +08:00
Benau
9b25557e6e Remove restriction for android screen keyboard after using SDL2 2021-10-04 20:17:27 +08:00
Benau
b518d73417 Synchronize AndroidManifest.xml with upstream SDL2 2021-10-04 20:16:05 +08:00
Benau
3d575a50a7 Get rid of the exit(0) at the end of android_main() function
After NDK r22 it longer crashes after dlclose, see:
https://github.com/android/ndk/issues/1200

Fix #3000
2021-10-04 20:10:41 +08:00
Benau
75db65d43a Build with NDK r22, disable NEON on 32-bit ARM to support more devices 2021-10-04 18:15:21 +08:00
Benau
17329a1b29 Register native functions in SDL_main 2021-10-04 13:01:00 +08:00
Benau
4db68a3f10 Build SDL2 and hidapi as shared library 2021-10-04 11:41:04 +08:00
Benau
db03304cf1 Sign MacOS bundle with Ad Hoc (required by arm64) 2021-10-04 00:32:43 +08:00
Benau
9bf537ab35 Update cacert.pem and remove expired DST Root CA X3 certificate 2021-10-03 01:39:50 +08:00
Benau
87fd3f221a Make /installaddon possible to upgrade addon 2021-10-01 14:23:47 +08:00
Benau
fa1ddbd839 Remove compiler warning 2021-10-01 12:57:07 +08:00
Benau
93ab5a75c1 Only handle enter key after buttons are shown in race result screen 2021-10-01 12:54:54 +08:00
Kuba
ca04106253 Fix wrong win message in races only with 1 kart (#4632) 2021-10-01 01:57:45 +08:00
Richard Qian
d5f8496abc Enable grand prix races in high score dialog (#4626) 2021-09-30 09:57:59 +08:00
iwoithe
95de01a8fb Add a user config option to randomize the player position at the start (#4627) 2021-09-29 11:40:14 +08:00
Benau
d0f4c8ffee Update download assets size 2021-09-28 15:48:26 +08:00
Benau
e59f1c316f Update mrkubax10 name 2021-09-28 15:47:08 +08:00
Benau
fd7564d508 Update translation and AppData 2021-09-28 15:04:56 +08:00
Benau
2d1f8d5698 Update changelog 2021-09-28 14:34:22 +08:00
Benau
73064a341a Fix missing dSYMs in Xcode archive 2021-09-28 13:49:46 +08:00
Benau
31ce998cda Fix error during Xcode archive 2021-09-28 13:00:25 +08:00
BryanQuigley
781273b472 Add releases bit to appstream xml. (#4624)
Noticed this was added to the flatpak here: https://github.com/flathub/net.supertuxkart.SuperTuxKart/blob/master/fix-AppData-file.patch
2021-09-27 10:11:34 +08:00
Benau
1afffee635 Update android_builder.sh for latest changes 2021-09-25 16:20:09 +08:00
Benau
78c00723af Build apk and aab with gradle 2021-09-25 15:19:21 +08:00
Benau
42cc2ab239 Allow make.sh to compile multiple architectures apk file 2021-09-25 14:57:03 +08:00
Benau
731ed0b16e Add make_deps.sh to build android deps for all architectures 2021-09-25 14:38:11 +08:00
Alayan-stk-2
e4ffc949ac Partial 1.3 changelog update
Changes from August onwards are still to review
2021-09-25 03:19:23 +02:00
Benau
48cc830372 Add command to check addon revision 2021-09-24 12:46:10 +08:00
Benau
daf1dcfb6b Make AI / grand prix option in create server screen configurable 2021-09-24 11:29:41 +08:00
Benau
2257b50aef Make sure pointer is not NULL 2021-09-23 16:43:17 +08:00
Benau
031c798d8e Make continue button in GP result screen appear quicker 2021-09-23 16:26:22 +08:00
Benau
7c9a58c844 Proper fix for #4604
Take allowing to get a lower-tier cup in GPs when not first into
account
2021-09-23 16:13:05 +08:00
Benau
de52f2ae92 Fix uninitialized reverse type 2021-09-23 16:08:06 +08:00
Benau
70070b3077 Wait for user input in GP before scrapping the race results
Fix #2775
2021-09-22 15:52:01 +08:00
Benau
9b05ac6252 Revert "Fix #4610"
This reverts commit 789885c546.
2021-09-22 09:09:28 +08:00
Benau
dab4486465 Implement proper fix for #2776
Doing computeGPRanks in race result screen will make sorting
animation disappear
2021-09-21 16:32:53 +08:00
Kuba
6ee1b398e9 Save minor mode in GP highscores (#4620) 2021-09-21 10:06:09 +08:00
Benau
61f513e200 Display hour in high score dialog if needed 2021-09-19 09:10:30 +08:00
Benau
94cffbeb73 Fix swap interval mismatch when changing activity 2021-09-19 08:44:47 +08:00
Benau
bc7e6de55b Fix uninitialized track pointer 2021-09-19 08:13:25 +08:00
Benau
b773c009cb Fix memory leak if deleting kart with swatter on 2021-09-19 07:55:06 +08:00
mrkubax10
26db54c90f Don't save highscore when player skipped track 2021-09-18 11:21:04 +02:00
Benau
789885c546 Fix #4610 2021-09-17 12:18:28 +08:00
Benau
45cf40e493 Fix #4604 2021-09-17 12:02:36 +08:00
Daniel Garcia
1fff48ea61 Fix incorrect comment in grand_prix_manager.hpp 2021-09-16 11:04:20 -05:00
Kuba
0b5eda8ef9 Save more detailed informations about reverse mode in GP highscores (#4616) 2021-09-14 16:22:29 +08:00
Benau
c4fdf9c8ac Fix memory leak 2021-09-14 13:01:33 +08:00
Benau
216ac8b988 Fix missing text if it starts with newline 2021-09-14 10:21:49 +08:00
Benau
a96763cd1d Make sure starting position is valid for spare tire karts
Fix #4615
2021-09-13 16:54:29 +08:00
Benau
4470eabeb2 Split findGround function for more usage later 2021-09-13 15:09:00 +08:00
Benau
9221d39e6e Don't show kart rank in free for all battle, fix #4607 2021-09-12 08:24:01 +08:00
Kuba
0d54c3d60b Only save GP highscores for normal race and time trial (#4613) 2021-09-11 21:16:51 +08:00
Robin Pesl
7aeb0b0edf Fix missing argument in warning
Add tag name to log message.
2021-09-11 02:25:28 +02:00
Benau
df97d76bd7 Fix #4601 2021-09-10 17:11:15 +08:00
Benau
e74c198301 Fix uninitialized m_curr_time 2021-09-10 15:56:10 +08:00
Benau
b1670b7a34 Update ncipollo/release-action to its latest version 2021-09-10 12:03:50 +08:00
Benau
b3c3b4c729 Remove unused code 2021-09-10 11:19:24 +08:00
Benau
0fc1bd961f Fix OS string in Switch Homebrew 2021-09-10 10:46:21 +08:00
Alayan
79965ef462 Fix & Improve the remaining-time alert
- Fix a bug that prevented the alert sound from playing in timed Story Mode challenges.
- Extend the visual alert (colored time) to the last 15 seconds (previously 5). The sound alert remains limited to the last 5 seconds.
- Switch from yellow to orange for the timer when 5 seconds are left and the sound alert starts playing.
- Significant code simplification (tested for non-regression in soccer, FFA, story mode timed challenge)
2021-09-09 21:06:02 +02:00
Benau
9a4fe66dc7 Fix strings 2021-09-10 01:10:30 +08:00
Alayan-stk-2
394c2c9e82 Partial changelog update for 1.3 2021-09-09 17:15:39 +02:00
Benau
5902a146a6 Dont re-highlight if addon name starts with http link 2021-09-09 16:52:16 +08:00
Benau
c9f1c0c866 Cancel download if uninstalling during updating addon 2021-09-09 15:52:39 +08:00
Benau
e51f68d764 Don't open link on shrinked text in bubble widget 2021-09-09 15:42:23 +08:00
Benau
307791beda Highlight URLs or addon names from /installaddon in lobby 2021-09-09 09:57:35 +08:00
Benau
4e770cdd61 Remove URL highlighting on music description 2021-09-08 23:31:18 +08:00
Alayan
f80d499982 Tweak the highscore info dialog to display more without scrolling with large fonts. 2021-09-08 15:42:46 +02:00
Benau
38cfd912bd Add extractURLFromGlyphLayouts which handles RTL layout properly 2021-09-08 14:58:35 +08:00
Benau
a4015beb29 Update URLs to allow clicking 2021-09-08 13:48:20 +08:00
Benau
e85b82001f Fix invalid URL in line breaking 2021-09-08 13:27:09 +08:00
Benau
0c20dda1da Remove SF_DISABLE_URL_HIGHLIGHT flag to avoid conflicts with cache
Manually remove the URL highlighting if needed
2021-09-08 09:38:30 +08:00
Alayan-stk-2
03d1aa1916 Fix #4598 2021-09-08 01:06:45 +02:00
Benau
88d8799498 Fix incorrect getChecklineTriggering on CheckCannon after using 3D check planes 2021-09-07 11:04:33 +08:00
Heuchi
a699982bfa Keep showing arrow on addons widget in main menu
when there are updates for installed addons.
2021-09-06 16:00:11 +02:00
Benau
8c3bacf769 Only save original string in GlyphLayout if needed 2021-09-06 14:51:45 +08:00
Benau
5d5292787e Disable URL highlight on some widgets and screens 2021-09-06 14:33:23 +08:00
Benau
ae98b0cf9b Use LinkHelper::openURL on highlighted URL 2021-09-06 14:19:39 +08:00
Benau
f5f821c925 Use SDL_OpenURL when possible 2021-09-06 11:13:46 +08:00
Benau
280d8fc114 Highlight URL with skin marked text color 2021-09-06 11:05:24 +08:00
Benau
8f41b721ed Share FontWithFace render code with getCluster for more functionality 2021-09-05 08:41:46 +08:00
Benau
4deeac7dc8 Move getCluster code to a dedicated function for later usage 2021-09-05 00:54:52 +08:00
Benau
fe5b49e63a Remove more from server name as seen in server.cpp:247 2021-09-04 13:27:34 +08:00
Benau
3f2e011f11 Skip specific control characters like in the past 2021-09-04 13:13:19 +08:00
Benau
e2118c89c3 Save scrollbar position when opening server info dialog 2021-09-03 22:02:54 +08:00
Benau
b6ca771a0e Fix AI headless instance crash 2021-09-03 20:08:17 +08:00
Benau
5a585b85fb Add basic text handling to lobby chat
Allow opening addons downloading dialog when click url / addon id
after /installaddon and copying text
2021-09-03 19:47:23 +08:00
Benau
c76d41c903 Add callback to IGUIStaticText to allow text handling 2021-09-03 18:25:47 +08:00
Benau
33a4369a71 Store shared original string to glyph layouts directly 2021-09-03 13:09:42 +08:00
Benau
474e2e025a Make glyph clusters follow input text 2021-09-03 11:24:41 +08:00
Benau
9f62ca8802 Move server name to lobby header, scroll it if too long 2021-09-02 16:18:24 +08:00
Benau
1a9090c52c Allow saving multiple rtt dump files 2021-09-01 11:25:02 +08:00
Benau
e3a88c71e2 Allow using shift-f11 in kart selection screen 2021-09-01 11:17:07 +08:00
1666 changed files with 312459 additions and 95692 deletions

View File

@@ -32,8 +32,9 @@ jobs:
- name: Download cctools
run: |
cd /opt
wget https://github.com/supertuxkart/dependencies/releases/download/preview/cctools.tar.xz
tar xf cctools.tar.xz
wget https://github.com/supertuxkart/dependencies/releases/download/cctools/cctools-14.1.tar.xz
tar xf cctools-14.1.tar.xz
rm cctools-14.1.tar.xz
- name: Restore timestamps
run: |
wget https://github.com/MestreLion/git-tools/archive/refs/heads/main.zip
@@ -131,15 +132,26 @@ jobs:
echo "${{ env.release_pre }}"
- name: Download binaries
uses: actions/download-artifact@v2
- name: Run dylibbundler and archive
- name: Mask developer name
run: |
echo "::add-mask::${{ secrets.MAC_DEVELOPER_NAME }}"
- name: Import certificates
if: ${{ env.release_tag != '' }}
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MAC_DEVELOPER_ID_P12_FILE }}
p12-password: ${{ secrets.MAC_DEVELOPER_ID_P12_PASSWORD }}
- name: Run dylibbundler and sign STK
if: ${{ env.release_tag != '' }}
env:
developer_id: "Developer ID Application: ${{ secrets.MAC_DEVELOPER_NAME }} (${{ secrets.MAC_DEVELOPER_TEAM }})"
run: |
wget https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-macosx.tar.xz
tar xf dependencies-macosx.tar.xz
HOMEBREW_NO_AUTO_UPDATE=1 brew install dylibbundler
lipo -create ./macosx-x86_64/supertuxkart.app/Contents/MacOS/supertuxkart ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -output ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart
chmod 755 ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart
dylibbundler -od -b -x ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -d ./macosx-arm64/supertuxkart.app/Contents/libs/ -p @executable_path/../libs/ -s dependencies-macosx/lib
dylibbundler -od -b -x ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -d ./macosx-arm64/supertuxkart.app/Contents/libs/ -p @executable_path/../libs/ -s dependencies-macosx/lib -ns
# We use SDL_Vulkan_LoadLibrary for 10.9 compatibility, so otool -L supertuxkart has no libMoltenVK.dylib
cp ./dependencies-macosx/lib/libMoltenVK.dylib ./macosx-arm64/supertuxkart.app/Contents/libs/
cd ./macosx-arm64/supertuxkart.app/Contents/Resources/data
@@ -148,10 +160,23 @@ jobs:
rm stk-assets-full.zip
cd ../../../../..
mv ./macosx-arm64/supertuxkart.app SuperTuxKart.app
zip -r SuperTuxKart-${{ env.release_tag }}-mac.zip SuperTuxKart.app
codesign --force --sign "$developer_id" SuperTuxKart.app/Contents/libs/*.dylib
codesign --force --options=runtime --deep --sign "$developer_id" SuperTuxKart.app
- name: "Notarize release build"
if: ${{ env.release_tag != '' && github.ref != 'refs/heads/master' }}
run: |
ditto -c -k --sequesterRsrc --keepParent SuperTuxKart.app tmp.zip
xcrun notarytool submit tmp.zip --apple-id ${{ secrets.STK_NOTARIZATION_USERNAME }} \
--password ${{ secrets.STK_NOTARIZATION_PASSWORD }} \
--team-id ${{ secrets.MAC_DEVELOPER_TEAM }} --wait
xcrun stapler staple SuperTuxKart.app
- name: Archive
if: ${{ env.release_tag != '' }}
run: |
ditto -c -k --sequesterRsrc --keepParent SuperTuxKart.app SuperTuxKart-${{ env.release_tag }}-mac.zip
- name: Create release
if: ${{ env.release_tag != '' }}
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1.8.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "SuperTuxKart*.zip"

View File

@@ -126,7 +126,7 @@ jobs:
$CXX --version
mkdir "build"
cd "build"
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off;
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off -DNO_SHADERC=on;
- name: Configure bulid (macos)
if: ${{ matrix.os == 'macos-latest' }}
env:

View File

@@ -101,7 +101,7 @@ jobs:
cd stk-code/switch
PROJECT_VERSION="${{ env.release_tag }}" ./make.sh
- name: Create release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1.8.8
if: ${{ env.release_tag != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
arch: [i686, x86_64, aarch64]
arch: [i686, x86_64, armv7, aarch64]
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
@@ -26,11 +26,13 @@ jobs:
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "wget=C:\msys64\usr\bin\wget.exe" >> $GITHUB_ENV
echo "unzip=C:\msys64\usr\bin\unzip.exe" >> $GITHUB_ENV
echo "unzip=unzip" >> $GITHUB_ENV
if [ ${{ matrix.arch }} = "i686" ]; then
echo "cmake_arch=Win32" >> $GITHUB_ENV
elif [ ${{ matrix.arch }} = "x86_64" ]; then
echo "cmake_arch=x64" >> $GITHUB_ENV
elif [ ${{ matrix.arch }} = "armv7" ]; then
echo "cmake_arch=ARM" >> $GITHUB_ENV
else
echo "cmake_arch=ARM64" >> $GITHUB_ENV
fi
@@ -83,8 +85,10 @@ jobs:
sudo wget https://github.com/supertuxkart/dependencies/releases/download/preview/mxe_static_mingw.zip
sudo unzip mxe_static_mingw.zip
sudo rm mxe_static_mingw.zip
- name: Install MinGW for aarch64
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64' }}
# For libfl.so.2
sudo apt install -y libfl-dev
- name: Install MinGW for armv7 or aarch64
if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'armv7' || matrix.arch == 'aarch64' ) }}
run: |
cd /
sudo wget https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz
@@ -118,19 +122,19 @@ jobs:
run: |
mkdir -Force build
cd build
cmake .. -G "Visual Studio 16 2019" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -A ${{ env.cmake_arch }} -DCHECK_ASSETS=OFF
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -A ${{ env.cmake_arch }} -DCHECK_ASSETS=OFF
- name: Configure bulid for MinGW (i686 or x86_64)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch != 'aarch64' }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch != 'armv7' && matrix.arch != 'aarch64' }}
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON
- name: Configure bulid for MinGW (aarch64)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64' }}
- name: Configure bulid for MinGW (armv7 or aarch64)
if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'armv7' || matrix.arch == 'aarch64' ) }}
run: |
mkdir -p build
cd build
cmake .. -DLLVM_ARCH=aarch64 -DLLVM_PREFIX=/llvm-mingw -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON
cmake .. -DLLVM_ARCH=${{ matrix.arch }} -DLLVM_PREFIX=/llvm-mingw -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON
- name: Build for MSVC
if: ${{ matrix.os == 'windows-latest' }}
working-directory: build
@@ -213,7 +217,8 @@ jobs:
- name: Generate .pdb files
if: ${{ env.release_tag != '' }}
run: |
C:\msys64\usr\bin\wget.exe https://github.com/supertuxkart/dependencies/releases/download/preview/cv2pdb.exe
C:\msys64\usr\bin\wget.exe https://github.com/rainers/cv2pdb/releases/download/v0.50/cv2pdb-0.50.zip
unzip cv2pdb-0.50.zip
cd i686
..\cv2pdb.exe supertuxkart.exe
cd ..
@@ -237,16 +242,19 @@ jobs:
mv tools/run_game.bat SuperTuxKart-${{ env.release_tag }}-win
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-i686
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-x86_64
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7
mkdir SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64
mv i686 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-i686/bin
mv x86_64 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-x86_64/bin
mv armv7 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7/bin
mv aarch64 SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64/bin
# libwinpthread-1.dll is useless because we statically link
rm -f SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-armv7/bin/libwinpthread-1.dll
rm -f SuperTuxKart-${{ env.release_tag }}-win/stk-code/build-aarch64/bin/libwinpthread-1.dll
- name: Start packaging STK
if: ${{ env.release_tag != '' }}
run: |
C:\msys64\usr\bin\zip.exe -r SuperTuxKart-${{ env.release_tag }}-win.zip SuperTuxKart-${{ env.release_tag }}-win
Compress-Archive -LiteralPath SuperTuxKart-${{ env.release_tag }}-win -DestinationPath SuperTuxKart-${{ env.release_tag }}-win.zip
- name: Configure NSIS script
shell : bash
if: ${{ env.release_tag != '' && startsWith(github.ref, 'refs/tags/') }}
@@ -258,11 +266,12 @@ jobs:
cp supertuxkart-github-actions.nsi $arch.nsi
sed -i "s/define APPNAMEANDVERSION \"\"/define APPNAMEANDVERSION \"SuperTuxKart ${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/define ARCH \"\"/define ARCH \"$arch\"/g" $arch.nsi
sed -i "s/define VERSION \"\"/define VERSION \"${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/OutFile \"\"/OutFile \"SuperTuxKart-${{ env.release_tag }}-installer-$arch.exe\"/g" $arch.nsi
for filename in $(ls ../../build-$arch/bin)
do
file="\\\\$filename"
sed -i "286a\ DELETE /REBOOTOK \"\$INSTDIR$file\"" $arch.nsi
sed -i "288a\ DELETE /REBOOTOK \"\$INSTDIR$file\"" $arch.nsi
done
# Print result
#cat $arch.nsi
@@ -273,13 +282,13 @@ jobs:
run: |
cd SuperTuxKart-${{ env.release_tag }}-win\stk-code\tools\windows_installer
C:\msys64\usr\bin\wget.exe https://nsis.sourceforge.io/mediawiki/images/6/6c/Shelllink.zip
C:\msys64\usr\bin\unzip.exe Shelllink.zip
unzip Shelllink.zip
Move-Item Unicode\Plugins\ShellLink.dll .
& "C:\Program Files (x86)\NSIS\makensis.exe" i686.nsi
& "C:\Program Files (x86)\NSIS\makensis.exe" x86_64.nsi
& "C:\Program Files (x86)\NSIS\makensis.exe" aarch64.nsi
- name: Create release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1.8.8
if: ${{ env.release_tag != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}

8
.gitignore vendored
View File

@@ -8,6 +8,10 @@ stk-editor/
.vscode/
tags.*
# clangd
.cache/
compile_commands.json
.config/
supertuxkart-64
make*.bat
@@ -60,10 +64,12 @@ android/android-sdk*
android/assets
android/bin
android/build
android/deps-*
android/libs
android/obj
android/res
android/.gradle
android/.cxx
android/src/main/java/HID*
android/src/main/java/SDL*
android-*
@@ -83,5 +89,7 @@ lib/openssl
lib/harfbuzz
lib/sdl2
lib/mbedtls
lib/astc-encoder
lib/shaderc
.DS_Store

View File

@@ -1,24 +1,132 @@
# 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.
It should be kept in mind that some versions have a less complete changelog than others, and that this changelog does not list the details of the many small bugfixes and improvements which together make a significant part of the progress between releases.
For similar reasons, and because some features are vastly more complex than others, attributions of main changes should not be taken as a shortcut for overall contribution.
## SuperTuxKart 1.3
## SuperTuxKart 1.5 (TBD, still unfinished)
### Networking
* Server bookmarks by Benau
* Improve track-voting logic when no majority is achieved, by kimden
### General
* Switch port by Mary
* Gamepad force feedback support by Mary
* Highscore screen by RQWorldblender
* Improved screen space reflection by QwertyChouskie
* Render resolution changing by Deve and QwertyChouskie
* Make the game's window resizable in all the screens, by CodingJellyfish (previously, most UI screens did not support resizing)
* New benchmark mode, by Alayan:
- Can be run with a few clicks, allowing to easily test the performance of various settings or to compare different systems
- Robust performance metrics that better reflect the impact of varying frametimes than Average FPS and 1% Lows.
* Fix incorrect unlock information in Story Mode after a Grand Prix, by CodingJellyfish
* Make the progression of audio levels geometrical and increase default steps, allowing to set lower audio levels and better accuracy for low audio levels (especially useful for headphone users), by Alayan
* Fix drive-on sound from materials being played when the game is paused, by Alayan
* Fix a crash trying to read replays when the random starting position setting is enabled, by Alayan
* Handle track names with spaces in the replay reader, by Alayan
* Various tweaks, bugfixes and code-quality improvements
### Graphics
* Improve the accuracy of the framerate limiter, by Benau
* Add more maximum framerate options to the built-in framerate limiter, by Benau (this does not affect physics, which run at 120FPs independetly of graphical FPS)
* Add some graphical effects for legacy video drivers, by Benau
* Ensure fragment shaders use high precision, to avoid rendering issues with some drivers, by zmike
* Fix a related precision issue causing black artifacts with GL_ES, by CodingJellyfish
* Fix other shader issues that could produce black artifacts in specific situations, by CodingJellyfish
* Various improvements to the automatic computations of Level of Detail (LoD) distances, by Alayan
* Improve draw call performance in some situations, by CodingJellyfish
* Enable new higher LoD and shadows settings, by Alayan
* Integrate LoD (Geometry Detail) settings in the graphics presets, by Alayan
* Prefer displaying a lower quality LoD model over switching to a higher quality one when too close, by Alayan
### User Interface
* Add a new Display tab in the Settings, by Alayan
* Allow to rate addons with a keyboard or a controller, and notify when trying to rate an addon while not logged in, by CodingJellyfish
* Fix an issue that prevented to go up with a scrollbar using a trackpad, by CodingJellyfish
* Improve the typing bars, especially for the coal theme, by Alayan
* Greatly improve UI layout for 'tall' resolutions (greater height than width), by CodingJellyfish
* Improve font scaling, by CodingJellyfish
* Various enhancements, by Qwertychouskie and others
### Mobile
* Don't keep the rescue button active after it stops being touched, when the finger keeps touching the screen (e. g. to handle the steering wheel), by S0nter
## SuperTuxKart 1.4 (31. October 2022)
### General
* Lap trial mode, by mrkubax10
* Fix parachute powerup, by heuchi
* Fix gyroscope on walldriving surface, by Benau
* Enable ARMv7 build for Windows, by Benau
* Restore macOS <= 10.14 support, by Benau
* Avoid triggering other goal lines when the goal is already scored, by kimden
### Graphics
* Items and stars animation, by Semphris
* LOD optimization, by Benau
* Implement HiDPI support in SDL2 properly, by Benau
* Beta Vulkan renderer, by Benau
* Make sky particle always fall vertically, by Benau
### Tracks and modeling
* Alien Signal by Samuncle
* Ancient Colosseum Labyrinth by Typhon306
* New Pepper kart by McRavenINDo
* Improved kart Adiumy, Emule, GNU and Sara by McRavenINDo
* Updated Konqi, by ZAQraven99
* New Godette kart, by ZAQraven99
* Updated Battle Island and Cave X, by Typhon306
* Fix broken invisible wall in Antediluvian Abyss, by Benau
* New textures in Shifting Sands, by KartOym
* Balanced starting positions in all official soccer fields, by Crystal
### Networking
* Add track searching to network track screen, by Benau
* Make limit of players in game configurable, by Waldlaubsaengernest
* Allow using real addon karts (same hitbox and kart type as in local game), by Benau
### User Interface
* Add left side ghost replay difficulties, by ldoyenard
## SuperTuxKart 1.3 (28. September 2021)
### Networking
* Server bookmarks, by Benau
* Background download of addon packs, by Benau
### Graphics
* Introduce render resolution scaling for the modern renderer, by QwertyChouskie and Deve. For users with limited GPU power, this allows to get significant performance (FPS) gains at the cost of image quality. It can also allow additional graphics effects at the same performance. This is especially useful for users with high-resolution and high-DPI screens. The scaling only affects the 3D scene, the UI remains crisp at full-resolution.
* Simplification through removal of unused deprecated graphical effects, by Samuncle
* Many updates to texture-related code, by Benau
* Auto-compute Level of Detail distances for 3D models set to use LOD depending on track complexity, by Samuncle. The geometry level parameter allows partial control over the drawing distances.
* Improved screen space reflection, by QwertyChouskie
### General
* Switch port, by Mary
* Gamepad force feedback support, by Mary
* Highscore screen, by RQWorldblender
* Grand Prix highscores, by mrkubax10
* Updates to the bundled tinygettext library, by Benau
* Enable custom skidding sounds for karts, by Benau
* Greatly sped up loading of tracks with many checklines through optimization, by heuchi
* And many bugfixes and enhancements too small or specific to be detailed
### User Interface
* Display the skin-appropriate iconset without having to restart, by Benau
* Fix some issues with the options menu when used during a pause, by Benau
* Add a confirmation dialog before closing the game through the "go back" key/button, by Benau
* In the result screen, display the race position with a number with 10 karts or more, by mrkubax10
* In the result screen, display the challenge result and the requirements met or failed, by CodingJellyFish
* Many small menu and dialogs improvements, by RQWorldblender and others
* Usability and functionality improvements to the debug menu, by RQWorldblender
* Clickable URLs in text, by Benau
* Add a rainbow background to the color picker, making it more intuitive, by riso
#### In-race UI
* Add visual and sound feedback when a timed challenge or timed game is about to end, by mrkubax10 and Alayan
### Mobile
* Fix a precision issue that caused artefacted shadows, by icecream95 and Benau
#### iOS
* Use MojoAL instead of OpenAL, which iOS currently has issues with, by Benau
### Tracks and modeling
* Alien Signal, by Samuncle
* Ancient Colosseum Labyrinth, by Typhon306
* Improved Las Dunas Soccer, by Benau
* Add lap line extensions to Hacienda, Old Mine, Ravenbridge Mansion and Shifting Sands, by Benau
* New Pepper kart, by ZAQraven99
* Improved Adiumy, Emule, GNU and Sara karts, by ZAQraven99
## SuperTuxKart 1.2 (27. August 2020)
@@ -69,7 +177,7 @@ For similar reasons, and because some features are vastly more complex than othe
### Tracks and modeling
#### Karts
* New version of Kiki, by Typhon306 and McRavenINDo
* New version of Kiki, by Typhon306 and ZAQraven99
* Improved karts, by Crystal
* Pidgin, Puffy
* Improved beastie animation, by D_ft Kid
@@ -143,24 +251,24 @@ For similar reasons, and because some features are vastly more complex than othe
* Several changes or fixes to ensure proper behavior (input, screen-scaling, and more)
### User Interface
* Show tips for players when loading and after race ends, by dumaosen
* Better scaling of many many UI elements to large resolutions, by dumaosen and others
* Show tips for players when loading and after race ends, by CodingJellyfish
* Better scaling of many many UI elements to large resolutions, by CodingJellyfish and others
* Show country flags for servers and players in online multiplayer, by Benau
* Add a new option to change font size on the fly, by Benau and deveee
* Add icons for the available options in the race result screens, by dumaosen
* Add icons for the available options in the race result screens, by CodingJellyfish
* Make the highscore list scrollable, by deveee
* Display all the relevant info in the challenge dialog in Story Mode, by Alayan
* New challenge selection interface, by dumaosen
* New challenge selection interface, by CodingJellyfish
* Show the number of ranking points won or lost after a ranked race, by Benau
* Separate blurring visual effects from the main graphics presets, by Alayan
* Fix incorrect text resizing in the help menu, by Benau
* Make the custom random GP option more prominent in the track selection screen, by dumaosen
* Make the custom random GP option more prominent in the track selection screen, by CodingJellyfish
* Improvements to the scrollbars, by QwertyChouskie
* Allow sorting lists with the keyboard, by Benau
* Allow tooltip drawing outside of menus, by deveee
* Prevent some font scaling blur caused by non-integer offsets, by Benau
* Add a (configurable) limit to chat message frequency, by GuillaumeBft and Benau
* Allow to explicitly set the flip direction of tabs, by dumaosen
* Allow to explicitly set the flip direction of tabs, by CodingJellyfish
* Allow to download addons from the server lobby interface, by Benau
* Allow to filter installed and non-installed addons in the addons screen, by Alayan
* Many minor tweaks and bugfixes

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.4)
cmake_minimum_required(VERSION 3.6.0)
# root CMakeLists for the SuperTuxKart project
project(SuperTuxKart)
@@ -6,10 +6,6 @@ set(PROJECT_VERSION "git")
add_definitions( -DSUPERTUXKART_VERSION="${PROJECT_VERSION}" )
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)
@@ -58,6 +54,10 @@ if((UNIX AND NOT APPLE) OR NINTENDO_SWITCH)
include(FindPkgConfig)
endif()
if(IOS)
include(cmake/XcodeHelper.cmake)
endif()
if(APPLE AND NOT IOS)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
set(ARCHFLAGS "arm64")
@@ -85,7 +85,8 @@ endif()
if((UNIX AND NOT APPLE) AND NOT SERVER_ONLY)
if((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") OR
(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") OR
(${CMAKE_SYSTEM_PROCESSOR} MATCHES "riscv64"))
option(USE_GLES2 "Use OpenGL ES2 renderer" ON)
else()
option(USE_GLES2 "Use OpenGL ES2 renderer" OFF)
@@ -110,6 +111,7 @@ endif()
if(UNIX AND NOT APPLE)
option(USE_ASAN "Build with Leak/Address sanitizer" OFF)
option(USE_TSAN "Build with Thread sanitizer" OFF)
option(USE_USAN "Build with Undefined Behaviour sanitizer" OFF)
option(USE_LIBBFD "Use libbfd for crash reporting and leak check" OFF)
endif()
@@ -121,10 +123,18 @@ if(USE_TSAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
endif()
if(USE_USAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-omit-frame-pointer")
endif()
set(STK_SOURCE_DIR "src")
set(STK_DATA_DIR "${PROJECT_SOURCE_DIR}/data")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
# CMAKE_RUNTIME_OUTPUT_DIRECTORY removes dSYMs in Xcode archive
if(NOT CMAKE_GENERATOR MATCHES "Xcode")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
endif()
# Define install paths
set(STK_INSTALL_BINARY_DIR "bin" CACHE
@@ -140,6 +150,8 @@ if (CMAKE_GENERATOR_PLATFORM)
endif()
if(arch_lower MATCHES "arm64" OR arch_lower MATCHES "aarch64" OR ${CMAKE_GENERATOR} MATCHES "(ARM64)" OR ${BUILD_ARCH} MATCHES "(ARM64)")
set(DEPENDENCIES "dependencies-win-aarch64")
elseif(arch_lower MATCHES "armv7" OR arch_lower MATCHES "armv7" OR ${CMAKE_GENERATOR} MATCHES "(ARM)" OR ${BUILD_ARCH} MATCHES "(ARM)")
set(DEPENDENCIES "dependencies-win-armv7")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DEPENDENCIES "dependencies-win-x86_64")
else()
@@ -188,7 +200,7 @@ if(UNIX OR MINGW)
endif()
endif()
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
find_package(PkgConfig REQUIRED)
if(NOT PKGCONFIG_FOUND)
@@ -234,10 +246,44 @@ else()
endif()
if(NOT SERVER_ONLY)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/graphics_engine")
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
if(USE_SYSTEM_SQUISH)
find_library(SQUISH_LIBRARY NAMES squish libsquish)
find_path(SQUISH_INCLUDEDIR NAMES squish.h PATHS)
endif()
if (NOT SQUISH_LIBRARY OR NOT SQUISH_INCLUDEDIR)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libsquish")
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/libsquish")
SET(SQUISH_LIBRARY squish)
else()
include_directories("${SQUISH_INCLUDEDIR}")
MESSAGE(STATUS "Use system libsquish: ${SQUISH_LIBRARY}")
endif()
endif()
if(NOT SERVER_ONLY)
if (IOS)
find_library(SHADERC_LIBRARY NAMES shaderc_combined libshaderc_combined)
else()
find_library(SHADERC_LIBRARY NAMES shaderc_shared libshaderc_shared shaderc libshaderc)
endif()
find_path(SHADERC_INCLUDEDIR NAMES shaderc/shaderc.hpp PATHS)
if (NOT SHADERC_LIBRARY OR NOT SHADERC_INCLUDEDIR)
if (NOT NO_SHADERC)
message(FATAL_ERROR "Please install shaderc from your distribution or disable vulkan support with -DNO_SHADERC=on")
endif()
else()
include_directories("${SHADERC_INCLUDEDIR}")
MESSAGE(STATUS "Use system shaderc: ${SHADERC_LIBRARY}")
endif()
if (NO_SHADERC)
add_definitions(-DDISABLE_SHADERC)
endif()
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/graphics_engine")
endif()
# MiniGLM is there
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
if (NOT SERVER_ONLY)
# Add jpeg library
find_package(JPEG REQUIRED)
@@ -285,21 +331,6 @@ else()
MESSAGE(STATUS "Use system libmcpp: ${MCPP_LIBRARY}")
endif()
if(NOT SERVER_ONLY)
if(USE_SYSTEM_SQUISH)
find_library(SQUISH_LIBRARY NAMES squish libsquish)
find_path(SQUISH_INCLUDEDIR NAMES squish.h PATHS)
endif()
if (NOT SQUISH_LIBRARY OR NOT SQUISH_INCLUDEDIR)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libsquish")
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/libsquish")
SET(SQUISH_LIBRARY squish)
else()
include_directories("${SQUISH_INCLUDEDIR}")
MESSAGE(STATUS "Use system libsquish: ${SQUISH_LIBRARY}")
endif()
endif()
if (NOT SERVER_ONLY)
# SDL2
find_library(SDL2_LIBRARY NAMES SDL2 libSDL2)
@@ -340,7 +371,7 @@ if(USE_WIIUSE)
if(WIIUSE_BUILD)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse")
endif()
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/wiiuse/src")
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/wiiuse/src/include")
set(WIIUSE_LIBRARIES "wiiuse" "bluetooth")
endif()
endif()
@@ -355,6 +386,11 @@ elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOs")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
endif()
# Build the angelscript library if not in system
if(USE_SYSTEM_ANGELSCRIPT)
@@ -488,6 +524,7 @@ endif()
if(MSVC)
# VS will automatically add NDEBUG for release mode, but only _DEBUG in debug mode.
# Since STK uses DEBUG, this is added for debug compilation only:
cmake_policy(SET CMP0043 OLD)
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
else()
# All non VS generators used create only a single compile mode, so
@@ -534,7 +571,7 @@ if(APPLE AND NOT IOS)
if(CMAKE_GENERATOR MATCHES "Xcode")
add_custom_command(TARGET supertuxkart POST_BUILD
COMMAND ln -f -s ${PROJECT_SOURCE_DIR}/data ${CMAKE_BINARY_DIR}/bin/\${CONFIGURATION}/supertuxkart.app/Contents/Resources)
COMMAND ln -f -s ${PROJECT_SOURCE_DIR}/data ${CMAKE_BINARY_DIR}/\${CONFIGURATION}/supertuxkart.app/Contents/Resources)
else()
add_custom_command(TARGET supertuxkart POST_BUILD
COMMAND ln -f -s ${PROJECT_SOURCE_DIR}/data ${CMAKE_BINARY_DIR}/bin/supertuxkart.app/Contents/Resources)
@@ -568,6 +605,15 @@ else()
XCODE_ATTRIBUTE_INSTALL_PATH /Applications
XCODE_ATTRIBUTE_SKIP_INSTALL No
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
if(CMAKE_GENERATOR MATCHES "Xcode")
get_all_targets(supertuxkart_targets ${CMAKE_CURRENT_LIST_DIR})
foreach(target IN LISTS supertuxkart_targets)
if (NOT target MATCHES "supertuxkart")
set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib$(EFFECTIVE_PLATFORM_NAME)/${target})
endif()
configure_xcode_defaults(${target})
endforeach()
endif()
else()
add_executable(supertuxkart ${STK_SOURCES} ${STK_RESOURCES} ${STK_HEADERS})
endif()
@@ -669,6 +715,14 @@ if(NOT SERVER_ONLY)
endif()
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(supertuxkart nsl socket vorbisfile)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
target_link_libraries(supertuxkart be network vorbisfile)
endif()
if (USE_DNS_C)
target_link_libraries(supertuxkart dnsc)
else()
@@ -714,6 +768,9 @@ if(NOT SERVER_ONLY)
graphics_engine
${SDL2_LIBRARY}
tinygettext)
if (NOT NO_SHADERC)
target_link_libraries(supertuxkart ${SHADERC_LIBRARY})
endif()
endif()
if(UNIX AND NOT APPLE)
@@ -729,6 +786,9 @@ if(UNIX AND NOT APPLE)
if(USE_TSAN)
target_link_libraries(supertuxkart "-fsanitize=thread")
endif()
if(USE_USAN)
target_link_libraries(supertuxkart "-fsanitize=undefined")
endif()
endif()
if(BUILD_RECORDER)
@@ -740,6 +800,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()
if(HAIKU)
target_link_libraries(supertuxkart -lbe -lnetwork)
endif()
# Wiiuse
# ------
if(USE_WIIUSE)

View File

@@ -63,7 +63,7 @@ Debian-based Distributions command:
sudo apt-get install build-essential cmake libbluetooth-dev libsdl2-dev \
libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev \
libjpeg-dev libogg-dev libopenal-dev libpng-dev \
libssl-dev libvorbis-dev nettle-dev pkg-config zlib1g-dev
libssl-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev
```
Solus command:
@@ -79,6 +79,10 @@ To build the in-game recorder for STK, you have to install
libopenglrecorder from your distribution, or compile it yourself from [here](https://github.com/Benau/libopenglrecorder).
Compilation instruction is explained there. If you don't need this feature, pass `-DBUILD_RECORDER=off` to cmake.
### Shaderc for Vulkan support
You need to compile [Shaderc](https://github.com/google/shaderc) for vulkan support in SuperTuxKart if you are not building for Windows or macOS. If you don't need this feature, pass `-DNO_SHADERC=on` to cmake.
### Compiling
To compile SuperTuxKart, run the following commands inside `stk-code` directory
@@ -137,7 +141,7 @@ location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.:
## Building SuperTuxKart on Windows
To Build SuperTuxKart on Windows, follow these instructions:
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.
@@ -150,7 +154,7 @@ Open your file browser and find somewhere you want to put the development versio
4. If you got the stable version, download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies Releases](https://github.com/supertuxkart/dependencies/releases), find the stk-code version there and download the `dependencies(arch).zip` as needed and unpack the archive into the `stk-code` directory.
5. If you got the development version go to SuperTuxKart-dev in your file browser, then visit [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64 and `aarch64` for ARM64.
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64, `armv7` for ARM and `aarch64` for ARM64.
6. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point 'Where to build the binaries' to a new directory called `build` or `bld` inside the stk-code directory.
@@ -180,7 +184,7 @@ Visual Studio 2013| 13
2. Download a source package from either [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory, `stk-assets` is not needed if you download the full source tarball `(SuperTuxKart-version-src.tar.xz)`.
3. Download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64 and `aarch64` for ARM64.
and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64, `armv7` for ARM and `aarch64` for ARM64.
4. Download CMake from here: [CMake - download page](https://cmake.org/download/); and install it. Navigate to the `stk-code` directory; and create an directory called "build":
```cmd
@@ -196,12 +200,34 @@ and unpack the archive into the `stk-code` directory. Download `i686` if you use
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
```
```cmd
msbuild.exe SuperTuxKart.sln
```
SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe`
## Building SuperTuxKart on Windows using LLVM MinGW
1. Get the LLVM Mingw archive [here](https://github.com/mstorsjo/llvm-mingw/releases/latest), get the `*-msvcrt-i686.zip or` `*-msvcrt-x86_64.zip` depending on whether you have an Intel / AMD 32 or 64-bit Windows. If you are using ARM64 Windows get the `*-msvcrt-i686.zip` should be fine (untested). After downloading extract it as `C:\llvm-mingw` so `C:\llvm-mingw` contains `bin`, `include`, `lib`, etc.
2. Get Ninja [here](https://github.com/ninja-build/ninja/releases/latest), download the `ninja-win.zip` and extract the `ninja.exe` from the archive to `C:\llvm-mingw`. If you are not using Intel / AMD 64-bit Windows use [this link](https://packages.msys2.org/package/mingw-w64-i686-ninja) and extract `mingw32\bin\ninja.exe` inside the `tar.zst`.
3. Download a source package from either [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory, `stk-assets` is not needed if you download the full source tarball `(SuperTuxKart-version-src.tar.xz)`. Also make sure they lie within the C drive.
4. Download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview)
and unpack the archive into the `stk-code` directory. Download `i686` if you compile for Intel / AMD 32-bit, `x86_64` for Intel / AMD 64-bit, `armv7` for ARM 32-bit and `aarch64` for ARM 64-bit version of Windows.
6. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point 'Where to build the binaries' to a new directory called `build` inside the stk-code directory.
7. Press the `Add Entry` button and add the values below:
* Name: `LLVM_ARCH` Type: `STRING` Value: `i686`, `x86_64`, `armv7` or `aarch64`
* Name: `LLVM_PREFIX` Type: `STRING` Value: `C:/llvm-mingw`
* Name: `CMAKE_MAKE_PROGRAM` Type: `STRING` Value: `C:/llvm-mingw/ninja.exe`
* Name: `USE_WIIUSE` Type: `BOOL` Value: `Empty (unchecked)`
8. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. Choose `Ninja` from `Specify the generator for this project`, choose `Specify toolchain file for cross-compiling` then press `Next`. Specify the toolchain file which is located in `stk-code\cmake\Toolchain-llvm-mingw.cmake` and press `Finish`. If no error appears then press 'Generate'
9. Once inside the build directory using command line `cmd.exe` or PowerShell:
```cmd
C:\llvm-mingw\ninja.exe
```
SuperTuxKart can now be run as `bin\supertuxkart.exe`.
## Building SuperTuxKart on macOS
### Getting Started
@@ -227,7 +253,9 @@ Add ` -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9` for 10.9 compatibility.
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/
dylibbundler -od -b -x ./bin/SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./bin/SuperTuxKart.app/Contents/libs/ -p @executable_path/../libs/ -s ../dependencies-macosx/lib
```
Add `-ns` to disable ad-hoc codesigning
Afterwards, copy the contents of `stk-assets` into `/SuperTuxKart.app/Contents/Resources/data`.

26
README.cat Normal file
View File

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

View File

@@ -5,6 +5,8 @@
[![Switch build status](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml)
[![#supertuxkart on the libera IRC network](https://img.shields.io/badge/libera-%23supertuxkart-brightgreen.svg)](https://web.libera.chat/?channels=#supertuxkart)
# See [`README.cat`](README.cat)
SuperTuxKart is a free kart racing game. It focuses on fun and not on realistic kart physics. Instructions can be found on the in-game help page.
The SuperTuxKart homepage can be found at <https://supertuxkart.net/>. There is also our [FAQ](https://supertuxkart.net/FAQ) and information on how get in touch with the [community](https://supertuxkart.net/Community).
@@ -22,7 +24,7 @@ To run SuperTuxKart, make sure that your computer's specifications are equal or
* Ideally, you'll want a joystick with at least 6 buttons.
## License
The software is released under the GNU General Public License (GPL) which can be found in the file [`COPYING`](/COPYING) in the same directory as this file. Information about the licenses for the artwork is contained in `data/licenses`.
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.
---
@@ -37,4 +39,4 @@ The export utilities perform the needed transformation, so in Blender you just
## Building from source
Building instructions can be found in [`INSTALL.md`](/INSTALL.md)
Building instructions can be found in [`INSTALL.md`](INSTALL.md)

View File

@@ -4,91 +4,112 @@ include $(CLEAR_VARS)
# OpenAL
LOCAL_MODULE := openal
LOCAL_SRC_FILES := obj/openal/libopenal.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/openal/libopenal.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# OGG
LOCAL_MODULE := ogg
LOCAL_SRC_FILES := obj/libogg/libogg.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libogg/libogg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbis
LOCAL_MODULE := vorbis
LOCAL_SRC_FILES := obj/libvorbis/lib/libvorbis.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libvorbis/lib/libvorbis.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Vorbisfile
LOCAL_MODULE := vorbisfile
LOCAL_SRC_FILES := obj/libvorbis/lib/libvorbisfile.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libvorbis/lib/libvorbisfile.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# CURL
LOCAL_MODULE := curl
LOCAL_SRC_FILES := obj/curl/lib/libcurl.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/curl/lib/libcurl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedtls
LOCAL_MODULE := libmbedtls
LOCAL_SRC_FILES := obj/mbedtls/library/libmbedtls.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedtls.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedcrypto
LOCAL_MODULE := libmbedcrypto
LOCAL_SRC_FILES := obj/mbedtls/library/libmbedcrypto.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libmbedx509
LOCAL_MODULE := libmbedx509
LOCAL_SRC_FILES := obj/mbedtls/library/libmbedx509.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/mbedtls/library/libmbedx509.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# JPEG
LOCAL_MODULE := libjpeg
LOCAL_SRC_FILES := obj/libjpeg/libjpeg.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libjpeg/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# zlib
LOCAL_MODULE := zlib
LOCAL_SRC_FILES := obj/zlib/libz.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/zlib/libz.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# PNG
LOCAL_MODULE := png
LOCAL_SRC_FILES := obj/libpng/libpng.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libpng/libpng.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Freetype
LOCAL_MODULE := freetype
LOCAL_SRC_FILES := obj/freetype/build/libfreetype.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/freetype/build/libfreetype.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Harfbuzz
LOCAL_MODULE := harfbuzz
LOCAL_SRC_FILES := obj/harfbuzz/build/libharfbuzz.a
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/harfbuzz/build/libharfbuzz.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# shaderc
LOCAL_MODULE := shaderc
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/shaderc/libshaderc/libshaderc_combined.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# libsquish
LOCAL_MODULE := libsquish
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libsquish/libsquish.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# astc-encoder
LOCAL_MODULE := libastcenc
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/astc-encoder/Source/libastcenc.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -98,6 +119,11 @@ LOCAL_MODULE := ifaddrs
LOCAL_PATH := .
LOCAL_SRC_FILES := ../lib/ifaddrs/ifaddrs.c
LOCAL_CFLAGS := -I../lib/ifaddrs
# Starting NDK21 it enables NEON by default on 32-bit ARM target
# Disable it to support more phones
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -109,6 +135,9 @@ LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/angelscript/source/*.S) \
$(wildcard ../lib/angelscript/source/*.cpp)
LOCAL_CFLAGS := -I../lib/angelscript/source/
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -119,6 +148,9 @@ LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/enet/*.c)
LOCAL_CFLAGS := -I../lib/enet/include/ -DHAS_SOCKLEN_T -DENABLE_IPV6
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -130,6 +162,9 @@ LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/bullet/src/*/*.cpp) \
$(wildcard ../lib/bullet/src/*/*/*.cpp)
LOCAL_CFLAGS := -I../lib/bullet/src/
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -139,7 +174,11 @@ LOCAL_MODULE := graphics_utils
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_utils/mipmap/*.c)
LOCAL_CFLAGS := -I../lib/graphics_utils/mipmap
LOCAL_CFLAGS := -I../lib/graphics_utils/mipmap \
-I../lib/simd_wrapper
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -150,9 +189,19 @@ LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_engine/src/*.c) \
$(wildcard ../lib/graphics_engine/src/*.cpp)
LOCAL_CFLAGS := -I../lib/graphics_engine/include \
-I../lib/sdl2/include/ \
-I../lib/irrlicht/include/
LOCAL_CFLAGS := -DENABLE_LIBASTCENC \
-I../lib/graphics_engine/include \
-I../lib/graphics_utils \
-I../lib/sdl2/include/ \
-I../lib/bullet/src/ \
-I../lib/irrlicht/include/ \
-I../lib/shaderc/libshaderc/include \
-I../lib/libsquish \
-Ideps-$(TARGET_ARCH_ABI)/astc-encoder/Source
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
LOCAL_STATIC_LIBRARIES := shaderc libsquish libastcenc
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -163,6 +212,9 @@ LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/mcpp/*.c)
LOCAL_CFLAGS := -DMCPP_LIB -DHAVE_CONFIG_H
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -173,6 +225,9 @@ LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/sheenbidi/Source/*.c)
LOCAL_CFLAGS := -I../lib/sheenbidi/Headers
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -183,6 +238,9 @@ LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../lib/tinygettext/src/*.cpp)
LOCAL_CFLAGS := -I../lib/tinygettext/include -DDISABLE_ICONV
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -195,27 +253,33 @@ LOCAL_SRC_FILES := $(wildcard ../lib/irrlicht/source/Irrlicht/*.cpp)
LOCAL_CFLAGS := -I../lib/irrlicht/source/Irrlicht/ \
-I../lib/irrlicht/include/ \
-I../src \
-Iobj/libjpeg/ \
-Iobj/libpng/ \
-Iobj/zlib/ \
-Ideps-$(TARGET_ARCH_ABI)/libjpeg/ \
-Ideps-$(TARGET_ARCH_ABI)/libpng/ \
-Ideps-$(TARGET_ARCH_ABI)/zlib/ \
-I../lib/sdl2/include/ \
-I../lib/graphics_engine/include \
-DMOBILE_STK \
-DANDROID_PACKAGE_CALLBACK_NAME=$(PACKAGE_CALLBACK_NAME)
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := libjpeg png zlib
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# SDL2
LOCAL_MODULE := SDL2
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/sdl2/src/*.c) \
$(wildcard ../lib/sdl2/src/audio/*.c) \
$(wildcard ../lib/sdl2/src/audio/android/*.c) \
$(wildcard ../lib/sdl2/src/audio/dummy/*.c) \
$(wildcard ../lib/sdl2/src/audio/aaudio/*.c) \
$(wildcard ../lib/sdl2/src/audio/openslES/*.c) \
../lib/sdl2/src/atomic/SDL_atomic.c.arm \
../lib/sdl2/src/atomic/SDL_spinlock.c.arm \
$(wildcard ../lib/sdl2/src/core/android/*.c) \
$(wildcard ../lib/sdl2/src/cpuinfo/*.c) \
$(wildcard ../lib/sdl2/src/dynapi/*.c) \
@@ -223,13 +287,15 @@ LOCAL_SRC_FILES := $(wildcard ../lib/sdl2/src/*.c) \
$(wildcard ../lib/sdl2/src/file/*.c) \
$(wildcard ../lib/sdl2/src/haptic/*.c) \
$(wildcard ../lib/sdl2/src/haptic/android/*.c) \
$(wildcard ../lib/sdl2/src/hidapi/*.c) \
$(wildcard ../lib/sdl2/src/hidapi/android/*.cpp) \
$(wildcard ../lib/sdl2/src/joystick/*.c) \
$(wildcard ../lib/sdl2/src/joystick/android/*.c) \
$(wildcard ../lib/sdl2/src/joystick/hidapi/*.c) \
$(wildcard ../lib/sdl2/src/joystick/virtual/*.c) \
$(wildcard ../lib/sdl2/src/loadso/dlopen/*.c) \
$(wildcard ../lib/sdl2/src/locale/android/*.c) \
$(wildcard ../lib/sdl2/src/locale/*.c) \
$(wildcard ../lib/sdl2/src/loadso/dlopen/*.c) \
$(wildcard ../lib/sdl2/src/misc/*.c) \
$(wildcard ../lib/sdl2/src/misc/android/*.c) \
$(wildcard ../lib/sdl2/src/power/*.c) \
@@ -246,15 +312,15 @@ LOCAL_SRC_FILES := $(wildcard ../lib/sdl2/src/*.c) \
$(wildcard ../lib/sdl2/src/timer/unix/*.c) \
$(wildcard ../lib/sdl2/src/video/*.c) \
$(wildcard ../lib/sdl2/src/video/android/*.c) \
$(wildcard ../lib/sdl2/src/video/yuv2rgb/*.c) \
../lib/sdl2/src/atomic/SDL_atomic.c.arm \
../lib/sdl2/src/atomic/SDL_spinlock.c.arm \
../lib/sdl2/src/hidapi/android/hid.cpp
$(wildcard ../lib/sdl2/src/video/yuv2rgb/*.c)
LOCAL_CFLAGS := -I../lib/sdl2/include/ -DGL_GLEXT_PROTOTYPES
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_STATIC_LIBRARY)
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
# STK
@@ -264,7 +330,7 @@ LOCAL_CPP_FEATURES += rtti exceptions
LOCAL_SRC_FILES := $(wildcard ../src/*.cpp) \
$(wildcard ../src/*/*.cpp) \
$(wildcard ../src/*/*/*.cpp)
LOCAL_LDLIBS := -llog -landroid -lGLESv1_CM -lGLESv2 -lOpenSLES -ldl -lm
LOCAL_LDLIBS := -llog -lm -lOpenSLES
LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/bullet/src \
-I../lib/sheenbidi/Headers \
@@ -277,25 +343,26 @@ LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/mcpp \
-I../lib/sdl2/include \
-I../lib/tinygettext/include \
-I../lib/libsquish \
-I../src \
-Iobj/curl/include \
-Iobj/freetype/include \
-Iobj/harfbuzz/include \
-Iobj/libogg/include \
-Iobj/libvorbis/include \
-Iobj/openal/include \
-Iobj/mbedtls/include \
-Ideps-$(TARGET_ARCH_ABI)/curl/include \
-Ideps-$(TARGET_ARCH_ABI)/freetype/include \
-Ideps-$(TARGET_ARCH_ABI)/harfbuzz/include \
-Ideps-$(TARGET_ARCH_ABI)/libogg/include \
-Ideps-$(TARGET_ARCH_ABI)/libvorbis/include \
-Ideps-$(TARGET_ARCH_ABI)/openal/include \
-Ideps-$(TARGET_ARCH_ABI)/mbedtls/include \
-DUSE_GLES2 \
-DMOBILE_STK \
-DENABLE_SOUND \
-DENABLE_IPV6 \
-DENABLE_CRYPTO_MBEDTLS \
-DENABLE_CRYPTO_MBEDTLS \
-DNDEBUG \
-DDISABLE_ICONV \
-DANDROID_PACKAGE_NAME=\"$(PACKAGE_NAME)\" \
-DANDROID_APP_DIR_NAME=\"$(APP_DIR_NAME)\" \
-DSUPERTUXKART_VERSION=\"$(PROJECT_VERSION)\" \
-DANDROID_PACKAGE_CALLBACK_NAME=$(PACKAGE_CALLBACK_NAME)
-DANDROID_PACKAGE_CLASS_NAME=\"$(PACKAGE_CLASS_NAME)\"
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := irrlicht bullet enet ifaddrs angelscript mcpp SDL2 \
@@ -304,6 +371,9 @@ LOCAL_STATIC_LIBRARIES := irrlicht bullet enet ifaddrs angelscript mcpp SDL2 \
harfbuzz freetype tinygettext graphics_utils \
graphics_engine
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false
endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
$(call import-module, android/cpufeatures)

View File

@@ -1,8 +1,5 @@
<?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">
<application android:label="@string/app_name"
@@ -18,28 +15,53 @@
android:label="@string/app_name"
android:launchMode="singleTask"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|uiMode"
android:screenOrientation="sensorLandscape">
android:screenOrientation="sensorLandscape"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<!-- Let Android know that we can handle some USB devices and should receive this event -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="29" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.software.input_methods" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.gamepad" android:required="false" />
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
<uses-feature android:name="android.hardware.usb.host" android:required="false" />
<!-- Touchscreen support -->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.gamepad"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events -->
<uses-feature
android:name="android.hardware.type.pc"
android:required="false" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Allow access to Bluetooth devices -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>

View File

@@ -13,9 +13,9 @@
To run SuperTuxKart on Android, you need a device that meets following
requirements:
- Android 4.4 or later
- Android 4.1 or later
- Processor compatible with armv7 or x86
- GPU that supports OpenGL ES 3.0
- GPU that supports OpenGL ES 2.0
- 1 GB RAM (STK uses ~150 MB in minimal configuration)
- 300 MB of free space on internal storage
- Touch screen or external keyboard
@@ -62,9 +62,10 @@ directory will have following structure:
> src
> ...
You need also Android SDK for android-19 platform (the API for Android 4.4) and
Android NDK. Version r20 is recommended, because it's known that it works
without issues.
You also need Android SDK for android-26 platform or later (SDL2 requirement) and
Android NDK. Version r23 is recommended, because it's known that it works
without issues. r24 or later is not compatible because it removes Android 4.1
support (https://github.com/android/ndk/wiki/Changelog-r23#announcements)
You need to create proper "android-sdk" and "android-ndk" symlinks in the
directory with Android project, so that the compilation script will have access
@@ -90,10 +91,18 @@ to just run:
export SDK_PATH=/path/to/your/android/sdk
export NDK_PATH=/path/to/your/android/ndk
# Optional for STK_MIN_ANDROID_SDK, STK_TARGET_ANDROID_SDK and STK_NDK_VERSION
# If unset it will use the below values
export STK_MIN_ANDROID_SDK=16
export STK_TARGET_ANDROID_SDK=30
export STK_NDK_VERSION=23.1.7779620
./generate_assets.sh
./make.sh -j5
./make_deps.sh
./make.sh
You may need to add org.gradle.jvmargs=-XX:MaxHeapSize=2048m -Xmx2048m to
.gradle/gradle.properties if you see java.lang.OutOfMemoryError / Java heap
space execption error.
--------------------------------------------------------------------------------
ENVIRONMENT VARIABLES
@@ -101,8 +110,8 @@ to just run:
COMPILE_ARCH - Allows one to choose CPU architecture for which the package will
be compiled.
Possible values: armv7, aarch64, x86, x86_64.
Default is: armv7.
Possible values: all, armv7, aarch64, x86, x86_64.
Default is: all.
BUILD_TYPE - Allows one to set build type.
Possible values: debug, release, beta.
@@ -112,7 +121,8 @@ BUILD_TOOLS_VER - Allows to override the SDK build-tools version.
SDK_PATH - Path to SDK directory
NDK_PATH - Path to NDK directory
NDK_PATH - Path to NDK directory, it should include a list of installed
NDK version folders
PROJECT_VERSION - Set Supertuxkart version number, for example "0.9.3" or
"git20170409" or whatever. The version must match with file
@@ -152,4 +162,5 @@ variables, so that the apk files can be signed.
and then you make standard compilation with:
./generate_assets.sh
./make.sh -j $(($(nproc) + 1))
./make_deps.sh
./make.sh

View File

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

View File

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

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#Mon Oct 23 13:51:26 PDT 2017
#Sun Dec 03 18:24:53 EET 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

304
android/gradlew vendored
View File

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

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# (C) 2016-2017 Dawid Gan, under the GPLv3
#
@@ -10,48 +10,26 @@ 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 NDK_CCACHE=ccache
export NDK_CPPFLAGS="-O3 -g"
export CPU_CORE="-j$(($(nproc) + 1))"
export NDK_ABI_ARMV7=armeabi-v7a
export ARCH_ARMV7=arm
export HOST_ARMV7=arm-linux-androideabi
export NDK_PLATFORM_ARMV7=android-16
export MIN_SDK_VERSION_ARMV7=16
export TARGET_SDK_VERSION_ARMV7=29
export COMPILE_SDK_VERSION_ARMV7=29
if [ -z "$STK_MIN_ANDROID_SDK" ]; then
export STK_MIN_ANDROID_SDK=16
fi
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=29
export COMPILE_SDK_VERSION_AARCH64=29
if [ -z "$STK_TARGET_ANDROID_SDK" ]; then
export STK_TARGET_ANDROID_SDK=34
fi
export NDK_ABI_X86=x86
export ARCH_X86=x86
export HOST_X86=i686-linux-android
export NDK_PLATFORM_X86=android-16
export MIN_SDK_VERSION_X86=16
export TARGET_SDK_VERSION_X86=29
export COMPILE_SDK_VERSION_X86=29
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=29
export COMPILE_SDK_VERSION_X86_64=29
if [ -z "$STK_NDK_VERSION" ]; then
export STK_NDK_VERSION=23.1.7779620
fi
export APP_NAME_RELEASE="SuperTuxKart"
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
export PACKAGE_CALLBACK_NAME_RELEASE="org_supertuxkart_stk"
export PACKAGE_CLASS_NAME_RELEASE="org/supertuxkart/stk"
export APP_DIR_NAME_RELEASE="supertuxkart"
export APP_ICON_RELEASE="$DIRNAME/icon.png"
export APP_ICON_ADAPTIVE_BG_RELEASE="$DIRNAME/icon_adaptive_bg.png"
@@ -59,7 +37,7 @@ export APP_ICON_ADAPTIVE_FG_RELEASE="$DIRNAME/icon_adaptive_fg.png"
export APP_NAME_BETA="SuperTuxKart Beta"
export PACKAGE_NAME_BETA="org.supertuxkart.stk_beta"
export PACKAGE_CALLBACK_NAME_BETA="org_supertuxkart_stk_1beta"
export PACKAGE_CLASS_NAME_BETA="org/supertuxkart/stk_beta"
export APP_DIR_NAME_BETA="supertuxkart-beta"
export APP_ICON_BETA="$DIRNAME/icon-dbg.png"
export APP_ICON_ADAPTIVE_BG_BETA="$DIRNAME/icon_adaptive_bg-dbg.png"
@@ -67,7 +45,7 @@ export APP_ICON_ADAPTIVE_FG_BETA="$DIRNAME/icon_adaptive_fg-dbg.png"
export APP_NAME_DEBUG="SuperTuxKart Debug"
export PACKAGE_NAME_DEBUG="org.supertuxkart.stk_dbg"
export PACKAGE_CALLBACK_NAME_DEBUG="org_supertuxkart_stk_1dbg"
export PACKAGE_CLASS_NAME_DEBUG="org/supertuxkart/stk_dbg"
export APP_DIR_NAME_DEBUG="supertuxkart-dbg"
export APP_ICON_DEBUG="$DIRNAME/icon-dbg.png"
export APP_ICON_ADAPTIVE_BG_DEBUG="$DIRNAME/icon_adaptive_bg-dbg.png"
@@ -91,63 +69,23 @@ if [ ! -z "$1" ] && [ "$1" = "clean" ]; then
rm -rf "$DIRNAME/obj"
rm -rf "$DIRNAME/res"
rm -rf "$DIRNAME/.gradle"
rm -rf "$DIRNAME/.cxx"
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"
COMPILE_ARCH="all"
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
COMPILE_ARCH="armeabi-v7a"
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"
COMPILE_ARCH="arm64-v8a"
elif [ "$COMPILE_ARCH" != "x86" ] && [ "$COMPILE_ARCH" != "x86_64" ] && \
[ "$COMPILE_ARCH" != "all" ]; then
echo "Unknown COMPILE_ARCH: $COMPILE_ARCH. Possible values are:" \
"all, armv7, aarch64, x86, x86_64"
exit
fi
@@ -161,7 +99,7 @@ if [ "$BUILD_TYPE" = "debug" ] || [ "$BUILD_TYPE" = "Debug" ]; then
export IS_DEBUG_BUILD=1
export APP_NAME="$APP_NAME_DEBUG"
export PACKAGE_NAME="$PACKAGE_NAME_DEBUG"
export PACKAGE_CALLBACK_NAME="$PACKAGE_CALLBACK_NAME_DEBUG"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_DEBUG"
export APP_DIR_NAME="$APP_DIR_NAME_DEBUG"
export APP_ICON="$APP_ICON_DEBUG"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_DEBUG"
@@ -171,7 +109,7 @@ elif [ "$BUILD_TYPE" = "release" ] || [ "$BUILD_TYPE" = "Release" ]; then
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_RELEASE"
export PACKAGE_NAME="$PACKAGE_NAME_RELEASE"
export PACKAGE_CALLBACK_NAME="$PACKAGE_CALLBACK_NAME_RELEASE"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_RELEASE"
export APP_DIR_NAME="$APP_DIR_NAME_RELEASE"
export APP_ICON="$APP_ICON_RELEASE"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_RELEASE"
@@ -181,7 +119,7 @@ elif [ "$BUILD_TYPE" = "beta" ] || [ "$BUILD_TYPE" = "Beta" ]; then
export IS_DEBUG_BUILD=0
export APP_NAME="$APP_NAME_BETA"
export PACKAGE_NAME="$PACKAGE_NAME_BETA"
export PACKAGE_CALLBACK_NAME="$PACKAGE_CALLBACK_NAME_BETA"
export PACKAGE_CLASS_NAME="$PACKAGE_CLASS_NAME_BETA"
export APP_DIR_NAME="$APP_DIR_NAME_BETA"
export APP_ICON="$APP_ICON_BETA"
export APP_ICON_ADAPTIVE_BG="$APP_ICON_ADAPTIVE_BG_BETA"
@@ -201,7 +139,7 @@ if [ -z "$SDK_PATH" ]; then
export SDK_PATH="$SDK_PATH_DEFAULT"
fi
NDK_PATH=$(realpath "$NDK_PATH")
NDK_PATH="$(realpath "$NDK_PATH")/${STK_NDK_VERSION}"
SDK_PATH=$(realpath "$SDK_PATH")
if [ ! -d "$NDK_PATH" ]; then
@@ -262,10 +200,13 @@ if [ -z "$BUILD_TOOLS_VER" ] || [ ! -d "$SDK_PATH/build-tools/$BUILD_TOOLS_VER"
exit
fi
BUILD_TOOLS_FULL=(${BUILD_TOOLS_VER//./ })
export COMPILE_SDK_VERSION="${BUILD_TOOLS_FULL[0]}"
# Set project version and code
if [ -f "$DIRNAME/obj/project_version" ]; then
PROJECT_VERSION_PREV=$(cat "$DIRNAME/obj/project_version")
if [ -z "$PROJECT_VERSION" ]; then
export PROJECT_VERSION="$PROJECT_VERSION_PREV"
elif [ "$PROJECT_VERSION" != "$PROJECT_VERSION_PREV" ]; then
@@ -305,242 +246,12 @@ fi
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
mkdir "$DIRNAME/obj"
touch "$DIRNAME/obj/make_standalone_toolchain.stamp"
echo $COMPILE_ARCH > "$DIRNAME/obj/compile_arch"
fi
# Last ndk supporting android 14 is 17c which has gcc-4.9, and most
# dependencies require clang to build
if [ -f "$DIRNAME/obj/bin/$HOST-gcc-4.9" ]; then
cp "$DIRNAME/obj/bin/clang" "$DIRNAME/obj/bin/$HOST-gcc"
cp "$DIRNAME/obj/bin/clang++" "$DIRNAME/obj/bin/$HOST-g++"
fi
echo "$PROJECT_VERSION" > "$DIRNAME/obj/project_version"
# 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 -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic" &&
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"
MLIBRARY="$DIRNAME/obj/sysroot/usr/lib/$HOST/libm.a"
# For ndk 17c
if [ ! -f "$MLIBRARY" ]; then
MLIBRARY="$DIRNAME/obj/sysroot/usr/lib/libm.a"
fi
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/obj/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/obj/zlib/" \
-DM_LIBRARY="$MLIBRARY" \
-DPNG_TESTS=0 -DCMAKE_C_FLAGS="-fpic" &&
make $@
check_error
touch "$DIRNAME/obj/libpng.stamp"
fi
# Freetype bootstrap
if [ ! -f "$DIRNAME/obj/freetype_bootstrap.stamp" ]; then
echo "Compiling freetype bootstrap"
mkdir -p "$DIRNAME/obj/freetype/build"
cp -a -f "$DIRNAME/../lib/freetype/"* "$DIRNAME/obj/freetype"
cd "$DIRNAME/obj/freetype/build"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/obj/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/obj/zlib/" \
-DPNG_LIBRARY="$DIRNAME/obj/libpng/libpng.a" \
-DPNG_PNG_INCLUDE_DIR="$DIRNAME/obj/libpng/" \
-DFT_WITH_HARFBUZZ=OFF -DFT_WITH_BZIP2=OFF \
-DFT_WITH_BROTLI=OFF -DFT_WITH_ZLIB=ON -DFT_WITH_PNG=ON \
-DCMAKE_C_FLAGS="-fpic" &&
make $@
check_error
# We need to rebuild freetype after harfbuzz is compiled
touch "$DIRNAME/obj/freetype_bootstrap.stamp"
fi
# Harfbuzz
if [ ! -f "$DIRNAME/obj/harfbuzz.stamp" ]; then
echo "Compiling harfbuzz"
mkdir -p "$DIRNAME/obj/harfbuzz/build"
cp -a -f "$DIRNAME/../lib/harfbuzz/"* "$DIRNAME/obj/harfbuzz"
cd "$DIRNAME/obj/harfbuzz/build"
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DFREETYPE_LIBRARY="$DIRNAME/obj/freetype/build/libfreetype.a $DIRNAME/obj/libpng/libpng.a $DIRNAME/obj/zlib/libz.a" \
-DFREETYPE_INCLUDE_DIRS="$DIRNAME/obj/freetype/include/" \
-DHB_HAVE_GLIB=OFF -DHB_HAVE_GOBJECT=OFF -DHB_HAVE_ICU=OFF \
-DHB_HAVE_FREETYPE=ON -DHB_BUILD_SUBSET=OFF \
-DCMAKE_C_FLAGS="-fpic" -DCMAKE_CXX_FLAGS="-std=gnu++0x -fpic" &&
make $@
check_error
mkdir -p "$DIRNAME/obj/harfbuzz/include/harfbuzz"
cp $DIRNAME/obj/harfbuzz/src/*.h "$DIRNAME/obj/harfbuzz/include/harfbuzz"
touch "$DIRNAME/obj/harfbuzz.stamp"
fi
# Freetype
if [ ! -f "$DIRNAME/obj/freetype.stamp" ]; then
echo "Compiling freetype"
cd "$DIRNAME/obj/freetype/build"
rm -rf *
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH \
-DZLIB_LIBRARY="$DIRNAME/obj/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/obj/zlib/" \
-DPNG_LIBRARY="$DIRNAME/obj/libpng/libpng.a" \
-DPNG_PNG_INCLUDE_DIR="$DIRNAME/obj/libpng/" \
-DHarfBuzz_LIBRARY="$DIRNAME/obj/harfbuzz/build/libharfbuzz.a" \
-DHarfBuzz_INCLUDE_DIR="$DIRNAME/obj/harfbuzz/src/" \
-DFT_WITH_HARFBUZZ=ON -DFT_WITH_BZIP2=OFF \
-DFT_WITH_BROTLI=OFF -DFT_WITH_ZLIB=ON -DFT_WITH_PNG=ON \
-DCMAKE_C_FLAGS="-fpic" &&
make $@
check_error
touch "$DIRNAME/obj/freetype.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 -DARCH=$ARCH -DALSOFT_UTILS=0 -DALSOFT_EXAMPLES=0 \
-DLIBTYPE=STATIC -DOPENSL_LIBRARY="-lOpenSLES" \
-DOPENSL_INCLUDE_DIR="$DIRNAME/obj/sysroot/usr/include/SLES/" \
-DOPENSL_ANDROID_INCLUDE_DIR="$DIRNAME/obj/sysroot/usr/include/SLES/" \
-DCMAKE_C_FLAGS="-fpic" -DCMAKE_CXX_FLAGS="-fpic" &&
make $@
check_error
touch "$DIRNAME/obj/openal.stamp"
fi
# MbedTLS
if [ ! -f "$DIRNAME/obj/mbedtls.stamp" ]; then
echo "Compiling mbedtls"
mkdir -p "$DIRNAME/obj/mbedtls"
cp -a -f "$DIRNAME/../lib/mbedtls/"* "$DIRNAME/obj/mbedtls"
cd "$DIRNAME/obj/mbedtls"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF \
-DCMAKE_C_FLAGS="-fpic" &&
make $@
check_error
touch "$DIRNAME/obj/mbedtls.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"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DBUILD_SHARED_LIBS=OFF \
-DZLIB_LIBRARY="$DIRNAME/obj/zlib/libz.a" \
-DZLIB_INCLUDE_DIR="$DIRNAME/obj/zlib/" \
-DMBEDCRYPTO_LIBRARY="$DIRNAME/obj/mbedtls/library/libmbedcrypto.a" \
-DMBEDTLS_LIBRARY="$DIRNAME/obj/mbedtls/library/libmbedtls.a" \
-DMBEDX509_LIBRARY="$DIRNAME/obj/mbedtls/library/libmbedx509.a" \
-DMBEDTLS_INCLUDE_DIRS="$DIRNAME/obj/mbedtls/include/" \
-DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF \
-DCMAKE_USE_MBEDTLS=ON -DUSE_ZLIB=ON -DCMAKE_USE_OPENSSL=OFF \
-DCMAKE_USE_LIBSSH=OFF -DCMAKE_USE_LIBSSH2=OFF \
-DCMAKE_USE_GSSAPI=OFF -DUSE_NGHTTP2=OFF -DUSE_QUICHE=OFF \
-DHTTP_ONLY=ON -DCURL_CA_BUNDLE=none -DCURL_CA_PATH=none \
-DENABLE_THREADED_RESOLVER=ON &&
make $@
check_error
touch "$DIRNAME/obj/curl.stamp"
fi
# Libjpeg
if [ ! -f "$DIRNAME/obj/libjpeg.stamp" ]; then
echo "Compiling libjpeg"
mkdir -p "$DIRNAME/obj/libjpeg"
cp -a -f "$DIRNAME/../lib/libjpeg/"* "$DIRNAME/obj/libjpeg"
cd "$DIRNAME/obj/libjpeg"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic" &&
make $@
check_error
touch "$DIRNAME/obj/libjpeg.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"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic" &&
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"
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic" \
-DOGG_LIBRARY="$DIRNAME/obj/libogg/libogg.a" \
-DOGG_INCLUDE_DIR="$DIRNAME/obj/libogg/include" &&
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=c++_static \
NDK_DEBUG=$IS_DEBUG_BUILD
check_error
# Build apk
echo "Building APK"
@@ -602,7 +313,7 @@ create_translation()
CUR_LANG=$(basename -- "$PO" | cut -f 1 -d '.')
# Skip english po file
if [ "$CUR_LANG" = "en" ]; then
continue
return
fi
# Fix some difference in language code
if [ "$CUR_LANG" = "he" ]; then
@@ -647,7 +358,7 @@ create_translation()
fi
}
find "$DIRNAME/assets/data/po" -type f -name '*.po' | while read f; do create_translation "$f"; done
find "$DIRNAME/assets/data/po" -type f -name '*.po' | while read -r f; do create_translation "$f"; done
ADAPTIVE_ICON_FILE="$DIRNAME/res/drawable-anydpi-v26/icon.xml"
@@ -658,15 +369,6 @@ echo " <background android:drawable=\"@drawable/icon_bg\" />" >> "$ADAP
echo " <foreground android:drawable=\"@drawable/icon_fg\" />" >> "$ADAPTIVE_ICON_FILE"
echo "</adaptive-icon>" >> "$ADAPTIVE_ICON_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/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
"$DIRNAME/src/main/java/STKEditText.java"
@@ -685,12 +387,6 @@ sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
sed -i "s/import org.supertuxkart.*/import $PACKAGE_NAME.STKEditText;/g" \
"$DIRNAME/src/main/java/SuperTuxKartActivity.java"
sed -i "s/versionName=\".*\"/versionName=\"$PROJECT_VERSION\"/g" \
"$DIRNAME/AndroidManifest.xml"
sed -i "s/versionCode=\".*\"/versionCode=\"$PROJECT_CODE\"/g" \
"$DIRNAME/AndroidManifest.xml"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java" \
@@ -707,6 +403,8 @@ cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDL
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDL.java" \
"$DIRNAME/src/main/java/"
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java" \
"$DIRNAME/src/main/java/"
cp "banner.png" "$DIRNAME/res/drawable/banner.png"
cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png"
@@ -734,25 +432,34 @@ convert -scale 216x216 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xhdpi/icon
convert -scale 324x324 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxhdpi/icon_fg.png"
convert -scale 432x432 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png"
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
export ANDROID_HOME="$SDK_PATH"
./gradlew -Pcompile_sdk_version=$COMPILE_SDK_VERSION \
-Pbuild_tools_ver="$BUILD_TOOLS_VER" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \
-Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \
-Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
-Pndk_version="$STK_NDK_VERSION" \
-Pcompile_arch="$COMPILE_ARCH" \
-Pcpu_core="$CPU_CORE" \
-Ppackage_name="$PACKAGE_NAME" \
-Pversion_name="$PROJECT_VERSION" \
-Pversion_code="$PROJECT_CODE" \
$GRADLE_BUILD_TYPE
if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then
./gradlew -Pcompile_sdk_version=$COMPILE_SDK_VERSION \
-Pbuild_tools_ver="$BUILD_TOOLS_VER" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \
-Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \
-Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \
-Pstorepass="$STK_STOREPASS" \
-Pkeystore="$STK_KEYSTORE" \
-Palias="$STK_ALIAS" \
-Pndk_version="$STK_NDK_VERSION" \
-Pcompile_arch="$COMPILE_ARCH" \
-Pcpu_core="$CPU_CORE" \
-Ppackage_name="$PACKAGE_NAME" \
-Pversion_name="$PROJECT_VERSION" \
-Pversion_code="$PROJECT_CODE" \
"bundleRelease"
fi

374
android/make_deps.sh Executable file
View File

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