diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 560b6abef1f..00000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,53 +0,0 @@ - -## Description - - - - -## Steps to reproduce - - - - -## Configuration - - -STK release version: - - -STK Source (PPA, distribution package, official binary, etc.): - -System: - -Graphics card: - -CPU: - -Gamepads/keyboards models if related to the issue: - -## Additional information - -stdout.log: -``` - -``` - - -input.xml: -```xml - -``` - - -Error message: -``` - -``` diff --git a/.github/ISSUE_TEMPLATE/defect.yml b/.github/ISSUE_TEMPLATE/defect.yml new file mode 100644 index 00000000000..5768550d535 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/defect.yml @@ -0,0 +1,89 @@ +name: Defect +description: Report bugs, crashes, or unintended behavior +labels: ['T: bug'] + +body: + + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise explanation of the problem encountered. + validations: + required: true + + - type: textarea + id: to_reproduce + attributes: + label: Steps to reproduce + description: Outline the exact sequence of actions required to reproduce the issue. + placeholder: | + 1. Launch SuperTuxKart + 2. Navigate to [specific menu/location] + 3. Perform [specific action] + 4. Observe unexpected behavior + validations: + required: true + + - type: textarea + id: config + attributes: + label: Configuration + description: | + Include the following details to help us diagnose the issue: + - SuperTuxKart version (visible in the "About" menu) + - Installation source (official website, package manager, etc.) + - Operating system and version + - CPU/GPU specifications + - Controller/keyboard type (if relevant) + placeholder: | + SuperTuxKart version: 1.4 + Installation source: Official repository + OS: Ubuntu 24.04 + CPU: i5-10400 + GPU: RX 580 + Input device: USB keyboard + validations: + required: true + + - type: textarea + id: error_msg + attributes: + label: Error message + description: | + If an error message was shown, please paste the complete error message, or a screenshot of it. + value: | + ``` + [Paste error message here] + ``` + + - type: textarea + id: stdout + attributes: + label: Log File (stdout.log) + description: | + Attach the log file (stdout.log) from your latest session where the issue occurred. + File locations: + - Windows: %appdata%\supertuxkart\config-0.10\stdout.log + - macOS: ~/Library/Application Support/supertuxkart/config-0.10/stdout.log + - Linux and other Unix-based systems: + $XDG_CONFIG_HOME/supertuxkart/config-0.10/stdout.log + or ~/.config/supertuxkart/config-0.10/stdout.log + value: | + ``` + [Paste contents of stdout.log here] + ``` + + - type: textarea + id: input + attributes: + label: Input Configuration (input.xml) + description: | + If your issue is related to the input config (gamepads, keyboards), + please provide your file input.xml located in the same directory as stdout.log. + value: | + ``` + [Paste contents of input.xml here] + ``` + + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 00000000000..c54790cf7f7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,13 @@ +name: Enhancement +description: Request for new features +labels: ['T: Suggestion'] + +body: + - type: textarea + id: description + attributes: + label: Description + description: | + If applicable, add screenshots or mockups to help explain your request. + validations: + required: true \ No newline at end of file diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 46c2477efb2..2e72e8683ba 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -29,12 +29,15 @@ jobs: uses: ASzc/change-string-case-action@v1 with: string: ${{ matrix.platform }} - - name: Download cctools + - name: Download cctools and ISPC run: | cd /opt - wget https://github.com/supertuxkart/dependencies/releases/download/cctools/cctools-14.1.tar.xz + wget https://github.com/kimden/stk-dependencies/releases/download/cctools/cctools-14.1.tar.xz tar xf cctools-14.1.tar.xz rm cctools-14.1.tar.xz + wget https://github.com/supertuxkart/dependencies/releases/download/preview/ispc-cross-1.26.0.tar.xz + tar xf ispc-cross-1.26.0.tar.xz + rm ispc-cross-1.26.0.tar.xz - name: Restore timestamps run: | wget https://github.com/MestreLion/git-tools/archive/refs/heads/main.zip @@ -49,7 +52,7 @@ jobs: echo "cache_$number=apple-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.platform }}-$id" >> $GITHUB_ENV done - name: Handle build cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | build @@ -66,7 +69,7 @@ jobs: ${{ env.cache_9 }} - name: Download dependencies run: | - wget https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-${{ steps.sysroot.outputs.lowercase }}.tar.xz + wget https://github.com/kimden/stk-dependencies/releases/download/preview/dependencies-${{ steps.sysroot.outputs.lowercase }}.tar.xz tar xf dependencies-${{ steps.sysroot.outputs.lowercase }}.tar.xz - name: Configure clang runtime name run: | @@ -86,14 +89,15 @@ jobs: mkdir -p build cd build cmake .. -DCCTOOLS_PREFIX=/opt/cctools -DCCTOOLS_ARCH=${{ matrix.arch }} -DCCTOOLS_PLATFORM=${{ matrix.platform }} \ - -DRT=/opt/cctools/darwin/libclang_rt.${{ env.rt }}.a -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cctools.cmake -DCHECK_ASSETS=OFF + -DRT=/opt/cctools/darwin/libclang_rt.${{ env.rt }}.a -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cctools.cmake -DCHECK_ASSETS=OFF \ + -DBC7_ISPC=ON -DCMAKE_ISPC_COMPILER=/opt/ispc/bin/ispc - name: Build run: | cd build make -j4 mv bin ../${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }} - name: Upload binaries - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }} path: ${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }} @@ -113,7 +117,7 @@ jobs: echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV - name: Configure packaging name for non-releasing branch - if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }} + if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) }} run: | echo "release_tag=" >> $GITHUB_ENV echo "release_name=" >> $GITHUB_ENV @@ -131,27 +135,29 @@ jobs: echo "${{ env.release_name }}" echo "${{ env.release_pre }}" - name: Download binaries - uses: actions/download-artifact@v2 - - name: Mask developer name - run: | - echo "::add-mask::${{ secrets.MAC_DEVELOPER_NAME }}" - - name: Import certificates - if: ${{ env.release_tag != '' }} - uses: apple-actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.MAC_DEVELOPER_ID_P12_FILE }} - p12-password: ${{ secrets.MAC_DEVELOPER_ID_P12_PASSWORD }} + uses: actions/download-artifact@v4 + #- 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 }})" + # 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 + wget https://github.com/kimden/stk-dependencies/releases/download/preview/dependencies-macosx.tar.xz tar xf dependencies-macosx.tar.xz HOMEBREW_NO_AUTO_UPDATE=1 brew install dylibbundler lipo -create ./macosx-x86_64/supertuxkart.app/Contents/MacOS/supertuxkart ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -output ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart chmod 755 ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart - dylibbundler -od -b -x ./macosx-arm64/supertuxkart.app/Contents/MacOS/supertuxkart -d ./macosx-arm64/supertuxkart.app/Contents/libs/ -p @executable_path/../libs/ -s dependencies-macosx/lib -ns + install_name_tool -delete_rpath @loader_path/Frameworks ./dependencies-macosx/lib/libSDL2.dylib + install_name_tool -delete_rpath @executable_path/Frameworks ./dependencies-macosx/lib/libSDL2.dylib + 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 @@ -160,16 +166,19 @@ jobs: rm stk-assets-full.zip cd ../../../../.. mv ./macosx-arm64/supertuxkart.app SuperTuxKart.app - codesign --force --sign "$developer_id" SuperTuxKart.app/Contents/libs/*.dylib - codesign --force --options=runtime --deep --sign "$developer_id" SuperTuxKart.app - - name: "Notarize release build" - if: ${{ env.release_tag != '' && github.ref != 'refs/heads/master' }} - run: | - ditto -c -k --sequesterRsrc --keepParent SuperTuxKart.app tmp.zip - xcrun notarytool submit tmp.zip --apple-id ${{ secrets.STK_NOTARIZATION_USERNAME }} \ - --password ${{ secrets.STK_NOTARIZATION_PASSWORD }} \ - --team-id ${{ secrets.MAC_DEVELOPER_TEAM }} --wait - xcrun stapler staple SuperTuxKart.app + # Use Ad Hoc certificate for now, previous certificate has been expired. + codesign --force -s - SuperTuxKart.app/Contents/libs/*.dylib + codesign --force --deep -s - 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: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 94e573a44d4..add1375097c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,7 +28,7 @@ jobs: matrix: os: [ubuntu-latest] compiler: [gcc, clang] - build_type: [Debug, Release] + build_type: [Debug, RelWithDebInfo, Release] server_only: [ON, OFF] exclude: - os: macos-latest @@ -56,8 +56,7 @@ jobs: echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV - name: Configure packaging name for non-releasing branch if: ${{ matrix.build_type != 'Release' || matrix.server_only != 'OFF' || - !(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) || - github.repository_owner != 'supertuxkart' }} + !(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }} run: | echo "release_tag=" >> $GITHUB_ENV echo "release_name=" >> $GITHUB_ENV @@ -137,7 +136,7 @@ jobs: $CXX --version mkdir "build" cd "build" - CFLAGS="-mmacosx-version-min=10.9" CXXFLAGS="-mmacosx-version-min=10.9" LINKFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" /usr/local/opt/cmake/bin/cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; + CFLAGS="-mmacosx-version-min=10.13" CXXFLAGS="-mmacosx-version-min=10.13" LINKFLAGS="-mmacosx-version-min=10.13" LDFLAGS="-mmacosx-version-min=10.13" /usr/local/opt/cmake/bin/cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; - name: Build and install working-directory: build run: | diff --git a/.github/workflows/switch.yml b/.github/workflows/switch.yml index 311d6c86b97..372f0db9453 100644 --- a/.github/workflows/switch.yml +++ b/.github/workflows/switch.yml @@ -45,7 +45,7 @@ jobs: echo "release_tag=`basename $GITHUB_REF`" >> $GITHUB_ENV echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV - name: Configure packaging name for non-releasing branch - if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }} + if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) }} run: | echo "release_tag=" >> $GITHUB_ENV echo "release_name=" >> $GITHUB_ENV @@ -72,7 +72,7 @@ jobs: echo "cache_$number=switch-${{ github.ref }}-$id" >> $GITHUB_ENV done - name: Handle build cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: # This is unnecessarily verbose and might break, but again ! seems broken # See: https://github.com/Mstrodl/stk-code/runs/2333673736?check_suite_focus=true#step:16:34 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index cc5ca86f8c5..f1aa25cd0ea 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -15,6 +15,9 @@ jobs: matrix: arch: [i686, x86_64, armv7, aarch64] os: [windows-latest, ubuntu-latest] + exclude: + - arch: armv7 + os: windows-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -56,7 +59,7 @@ jobs: echo "cache_$number=windows-${{ github.ref }}-${{ matrix.arch }}-${{ matrix.os }}-$id" >> $GITHUB_ENV done - name: Handle build cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | build @@ -73,8 +76,15 @@ jobs: ${{ env.cache_9 }} - name: Download dependencies run: | - ${{ env.wget }} https://github.com/supertuxkart/dependencies/releases/download/preview/dependencies-win-${{ matrix.arch }}.zip + ${{ env.wget }} https://github.com/kimden/stk-dependencies/releases/download/preview/dependencies-win-${{ matrix.arch }}.zip ${{ env.unzip }} dependencies-win-${{ matrix.arch }}.zip + - name: Download ISPC for MinGW + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + cd /opt + wget https://github.com/supertuxkart/dependencies/releases/download/preview/ispc-cross-1.26.0.tar.xz + tar xf ispc-cross-1.26.0.tar.xz + rm ispc-cross-1.26.0.tar.xz - name: Install MinGW for i686 or x86_64 if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'i686' || matrix.arch == 'x86_64' ) }} run: | @@ -82,7 +92,7 @@ jobs: sudo mkdir -p /data/mxe/usr cd /data/mxe/usr # It's compiled from https://github.com/mxe/mxe - sudo wget https://github.com/supertuxkart/dependencies/releases/download/preview/mxe_static_mingw.zip + sudo wget https://github.com/kimden/stk-dependencies/releases/download/preview/mxe_static_mingw.zip sudo unzip mxe_static_mingw.zip sudo rm mxe_static_mingw.zip # For libfl.so.2 @@ -101,10 +111,11 @@ jobs: echo "SET(CMAKE_C_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-gcc)" >> toolchain.cmake echo "SET(CMAKE_CXX_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-g++)" >> toolchain.cmake echo "SET(CMAKE_RC_COMPILER /data/mxe/usr/bin/i686-w64-mingw32.static.posix.dw2-windres)" >> toolchain.cmake - echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-i686 /data/mxe/usr/i686-w64-mingw32.static.posix.dw2/ /data/mxe/usr/lib/gcc/i686-w64-mingw32.static.posix.dw2/5.5.0/)" >> toolchain.cmake + echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-i686 /data/mxe/usr/i686-w64-mingw32.static.posix.dw2/ /data/mxe/usr/lib/gcc/i686-w64-mingw32.static.posix.dw2/11.5.0/)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake + echo 'set(ISPC_ARCH "x86")' >> toolchain.cmake - name: Set up MinGW Toolchain for x86_64 if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' }} run: | @@ -112,29 +123,30 @@ jobs: echo "SET(CMAKE_C_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-gcc)" >> toolchain.cmake echo "SET(CMAKE_CXX_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-g++)" >> toolchain.cmake echo "SET(CMAKE_RC_COMPILER /data/mxe/usr/bin/x86_64-w64-mingw32.static.posix.seh-windres)" >> toolchain.cmake - echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-x86_64 /data/mxe/usr/x86_64-w64-mingw32.static.posix.seh/ /data/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.posix.seh/5.5.0/)" >> toolchain.cmake + echo "SET(CMAKE_FIND_ROOT_PATH \${PROJECT_SOURCE_DIR}/dependencies-win-x86_64 /data/mxe/usr/x86_64-w64-mingw32.static.posix.seh/ /data/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.posix.seh/11.5.0/)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)" >> toolchain.cmake echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake + echo 'set(ISPC_ARCH "x86-64")' >> toolchain.cmake # Manually specify CMAKE_SYSTEM_PROCESSOR, it can only be set together with -DDCMAKE_SYSTEM_NAME - - name: Configure bulid for MSVC + - name: Configure build for MSVC if: ${{ matrix.os == 'windows-latest' }} run: | mkdir -Force build cd build cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -A ${{ env.cmake_arch }} -DCHECK_ASSETS=OFF - - name: Configure bulid for MinGW (i686 or x86_64) + - name: Configure build for MinGW (i686 or x86_64) if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch != 'armv7' && matrix.arch != 'aarch64' }} run: | mkdir -p build cd build - cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON - - name: Configure bulid for MinGW (armv7 or aarch64) + cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON -DBC7_ISPC=ON -DCMAKE_ISPC_COMPILER=/opt/ispc/bin/ispc + - name: Configure build for MinGW (armv7 or aarch64) if: ${{ matrix.os == 'ubuntu-latest' && ( matrix.arch == 'armv7' || matrix.arch == 'aarch64' ) }} run: | mkdir -p build cd build - cmake .. -DLLVM_ARCH=${{ matrix.arch }} -DLLVM_PREFIX=/llvm-mingw -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON + cmake .. -DLLVM_ARCH=${{ matrix.arch }} -DLLVM_PREFIX=/llvm-mingw -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw.cmake -DCHECK_ASSETS=OFF -DUSE_DIRECTX=ON -DBC7_ISPC=ON -DCMAKE_ISPC_COMPILER=/opt/ispc/bin/ispc - name: Build for MSVC if: ${{ matrix.os == 'windows-latest' }} working-directory: build @@ -149,21 +161,21 @@ jobs: mv COPYING tools - name: Upload binaries of MinGW if: ${{ matrix.os == 'ubuntu-latest' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.arch }} path: build/bin/* - name: Upload stk-code/data # We only need to upload stk-code/data once if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'i686'}} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: data path: data - name: Upload stk-code/tools # We only need to upload stk-code/tools once if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'i686'}} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: tools path: tools @@ -192,7 +204,7 @@ jobs: echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV - name: Configure packaging name for non-releasing branch shell : bash - if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) || github.repository_owner != 'supertuxkart' }} + if: ${{ (github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')) }} run: | echo "release_tag=" >> $GITHUB_ENV echo "release_name=" >> $GITHUB_ENV @@ -213,7 +225,7 @@ jobs: echo "${{ env.release_name }}" echo "${{ env.release_pre }}" - name: Download MinGW binaries and data - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 - name: Generate .pdb files if: ${{ env.release_tag != '' }} run: | diff --git a/.gitignore b/.gitignore index 70be3aea0af..878d94847fd 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,6 @@ lib/astc-encoder lib/shaderc .DS_Store + +# Auto-generated files +src/utils/version.hpp diff --git a/ANTI_TROLL.md b/ANTI_TROLL.md new file mode 100644 index 00000000000..45a5b21ccda --- /dev/null +++ b/ANTI_TROLL.md @@ -0,0 +1,40 @@ +## Info on experimental anti-troll system +If activated, a timer is kept for all players. System can be activated in xml config or in the lobby with command: +/troll [0,1] + +Timer is increased by the amount of time when +* a player drives in the wrong way +* a player moves below a given speed (troll-max-stop-speed) + +Timer is not increased when the player is hit or rescued (during animation). + +It is decreased (not below 0 obviously) when a player drives in correct direction with at least given speed (troll-min-normal-speed). + +If a player's timer exceeds the warning level (troll-warning-time), they get a warning (troll-warn-message). After that the timer is reset. +If a player got a warning and their timer exceeds the kick level (troll-kick-time), they get kicked. +Warnings and Kicks are logged. + +Config can be controlled in xml file like this: + + + + + + + + + + + + + + + +### Things to note +* The system can be fooled of course, but it should be a lot harder to troll. Testing would be necessary. However, when I set up a test server, most players coming by just wanted to play normally... +* The system should not warn or kick weak players who get lost or stuck on obstacles (too quickly). The current configuration values are most probably not yet perfect. +* Players should probably be informed about the system, because waiting for others (like some pros do when giving weaker players some advice or driving lessons) would be punished, so the system should not be activated in those cases. +* If a player presses UP-key early, the timer is increased during time punishment at the beginning of the race (1 sec). I don't know how to find out if a player is in that state. +* **There may still be bugs** (of course)... ;) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d345e02b5..1ddc92df90c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,37 +5,158 @@ It should be kept in mind that some versions have a less complete changelog than For similar reasons, and because some features are vastly more complex than others, attributions of main changes should not be taken as a shortcut for overall contribution. +## SuperTuxKart 1.5 + +### Networking +* Improve the track-voting logic when no majority is achieved, by kimden +* Prevent tracks missed by spectators from limiting the choice of active players, by kimden +* Make bot indices start from one, by JipFr +* Various bugfixes, by kimden + +### Gameplay +* Fix start positions for negative sideward distances, by kimden +* Make the rescue bird place the kart towards the ball in soccer mode, by Snoker101 +* Fix a very rare bug where the anchor slowdown was ignored if triggering an instant speed boost on the same physics frame, by Alayan + +### General +* Make the game's window resizable in all menu screens, by Benau and CodingJellyfish +* 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. +- Results are displayed along the active graphics settings, and detailed results can be saved to file +* Add the benchmark mode to commandline options, by ektor5 +* 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 +* Make the switch powerup sound effect global, 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 +* Enable smooth scrolling for Irrlicht, by CodingJellyfish +* Add launchable tag and use rDNS format for AppData file, by AsciiWolf +* Fix the last lap music sometimes failing to play, and improvements in the last lap music transition, by Alayan +* Tweaks to the camera, by CodingJellyfish +* Various build system updates, by deveee, tobbi, ognevny and others +* Various compiler fixes, by heirecka, limburgher, nyllet and others +* Substantial changes improving code quality, by Alayan and kimden +* Ensure proper compilation with newer build environments, especially with cmake 4.0, by deveee +* Update Wiiuse library to 0.15.6, SIMD-e to 0.8.2, MojoAL to latest (a9e2f30) +* 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 +* Add some graphical effects for legacy video drivers, by Benau +* Improved animations for the parachute and bubblegum shield, by Semphris +* Add spotlights, by CodingJellyfish +* Replace inaccurate normal compression algorithm with Octahedron Normal Vector, by CodingJellyfish +* Fix the Screen-Space Reflection shader, by CodingJellyfish +* Fix and improve the Screen-Space Ambiant Occlusion shader, by CodingJellyfish +* Implement Percentage-Closer Soft Shadows, by CodingJellyfish +* Guarantee an overall bone limit of 2048 for skinned mesh (up from 1024), by CodingJellyfish +* Improve Cascaded Shadow Mapping, by CodingJellyfish +* Improve the performance of scene node iteration, by CodingJellyfish +* Various improvements to the automatic computations of Level of Detail (LoD) distances, by Alayan +* Enable new higher LoD and shadows settings, by Alayan +* Integrate LoD (Geometry Detail) settings in the graphics presets, and add a 7th graphics preset, by Alayan +* Prefer displaying a lower quality LoD model over switching to a higher quality one when too close, by Alayan +* Allow to run the game's render resolution at higher than native (up to 200%), by Alayan +* Remove the distance limit on the display of on-track items (such as gift boxes), by Alayan +* Improve image quality on low and medium presets with better anisotropic filtering, by Alayan +* Various bugfixes and improvements, by zmike, Icenowy and others + +### User Interface +* Allow users to select favorite karts/tracks/arenas, by Alayan and CodingJellyfish +* Five new skin variants for Cartoon, and a new Desert skin variant for Classic, by Alayan and CrystalDaEevee +* Allow displaying more elements in kart and track selection, and ensure there is no need to scroll to pick a game mode, by Alayan +* Improve the skin selection UX by separating "base theme" and "skin variant" selection, by Alayan +* Add a new Display tab in the Settings, by Alayan +* Allow users to search karts/arenas, by CodingJellyfish +* Allow users to group karts by kart classes, by CodingJellyfish +* Allow to rate addons with a keyboard or a controller, and notify when trying to rate an addon while not logged in, by CodingJellyfish +* Improve the typing bars, especially for the coal theme, by Alayan +* Implement a blog announcement system in the Online screen, by CodingJellyfish +* Various UI layout improvements (especially for 'tall' resolutions), by CodingJellyfish +* Improve the spinner, label and icon-button text-sizing logic to avoid overflows with some language/font size combinations, by Alayan +* Add an always visible random track button in track selection, by Hanuko33 and Alayan +* Generate higher resolution texture for scalable fonts, by CodingJellyfish +* Fix for multiple keyboard navigation issues, by Alayan +* Various enhancements, by QwertyChouskie, Nomagno, Nstelt and others + +#### In-race UI +* Add color and sound indicators when an elimination is about to happen in Follow-The-Leader, by Alayan +* Correctly display the remaining time in FtL when extra-time is added, by Alayan +* Show score with color on the center of speedometer in battles, by CodingJellyfish +* Display correctly themed attachment icons if the base theme has been changed before the last restart, by CodingJellyfish + +### 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 + +### Tracks and modeling +* Visually improved overworld, by Sven Andreas Belting + +#### Tracks +* Fix Northern Resort skybox, by CrystalDaEevee +* Various cut/checkline fixes, by CrystalDaEevee +* Fix a cut in Hacienda, by Sven Andreas Belting +* Add egg hunts for Black Forest, Gran Paradisio Island and Old Mine, by Sven Andreas Belting and Alayan + +#### Karts +* Update Godette face texture, by ZAQraven99 +* Update karts with headlights to use spotlights, by Benau and CodingJellyfish + +#### Arenas +* XR-4R3N4 (soccer field), by CrystalDaEevee +* Hole Drop (soccer field), by CrystalDaEevee, music by DernisNW +* Oasis (soccer field), by CrystalDaEevee +* New music for Las Dunas Arena/Las Dunas Soccer, by ALBatross + + ## 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 +* Allow setting the auto-center behavior of steering wheels, by Mstrodl +* Simplify making derivative UI skins by allowing to specify a base theme, by qwertychouskie +* Make sure old save data is only removed after new save data is written, to avoid data losses on full drives, by Benau +* Fixed camera rotation when using the gyroscope and driving on vertical surfaces, by Benau +* Lap trial mode, by mrkubax10 +* Fix a parachute powerup bug, whereby karts behind the user would still lose their shield, by heuchi +* Add an option to randomize the player starting position, by Iwoithe * Avoid triggering other goal lines when the goal is already scored, by kimden +* And some other minor bugfixes and enhancements too small or specific to be detailed ### Graphics -* Items and stars animation, by Semphris +* Beta Vulkan renderer, by Benau +* Add an animation to the stars displayed after a kart gets hit, by Semphris +* Add intuitive animations for the respawn of on-track items (such as gift boxes), 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 +* Increase the use of on-demand loading for textures, by Benau +* Make sky particle always fall vertically (instead of perpendicularly to the player camera), by Benau + +### Networking +* Make the in-server and in-game player limits independent, allowing extra slots for spectators, by Waldlaubsaengernest +* Allow using real addon karts (same hitbox and kart type as in local game), by Benau +* Sort the server list by number of real players in servers (ignoring AIs), by Benau + +### User Interface +* Display per-kart difficulty in the end-screen for replays, by ldoyenard +* Add track searching to the network track screen, by Benau +* Minor enhancements and fixes in the end race screen ### Tracks and modeling -* Updated Konqi, by ZAQraven99 -* New Godette kart, by ZAQraven99 -* Updated Battle Island and Cave X, by Typhon306 +#### Tracks * 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 +#### Karts +* Updated Konqi, by ZAQraven99 +* Godette kart (replaces Beastie), by ZAQraven99 + +#### Arenas +* Balanced starting positions in all official soccer fields, by CrystalDaEevee +* Updated Battle Island and Cave X, by Typhon306 -### User Interface -* Add left side ghost replay difficulties, by ldoyenard ## SuperTuxKart 1.3 (28. September 2021) ### Networking @@ -79,12 +200,18 @@ For similar reasons, and because some features are vastly more complex than othe * Use MojoAL instead of OpenAL, which iOS currently has issues with, by Benau ### Tracks and modeling +#### Tracks +* Add lap line extensions to Hacienda, Old Mine, Ravenbridge Mansion and Shifting Sands, by Benau + +#### Karts +* Pepper (replaces Sara the Wizard), by ZAQraven99 +* Improved Adiumy, Emule, GNU and Sara karts, by ZAQraven99 + +#### Arenas * 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) @@ -136,9 +263,10 @@ For similar reasons, and because some features are vastly more complex than othe ### Tracks and modeling #### Karts * New version of Kiki, by Typhon306 and ZAQraven99 -* Improved karts, by Crystal +* Improved karts, by CrystalDaEevee * Pidgin, Puffy -* Improved beastie animation, by D_ft Kid +* Improved Beastie animation, by D_ft Kid + ## SuperTuxKart 1.1 (4. January 2020) @@ -209,24 +337,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 @@ -242,6 +370,7 @@ For similar reasons, and because some features are vastly more complex than othe #### Arenas * Pumpkin Park, by samuncle + ## SuperTuxKart 1.0 (20. April 2019) ### Networking * Networking support for normal race, time trial, free for all, capture the flag and soccer by Benau and hiker : @@ -335,6 +464,7 @@ For similar reasons, and because some features are vastly more complex than othe * New version of Beastie by Jymis * New version of Kiki by Benau + ## SuperTuxKart 0.9.3 (28. October 2017) * Reduced RAM and VRAM usage, reducing load times by Auria and Benau * New mesh format optimized for space and hardware skinning @@ -349,6 +479,7 @@ For similar reasons, and because some features are vastly more complex than othe * 3 Strikes Battles : added spare tire karts * Visual representation of the start line in all tracks * Various improvements (starting boost effect, wall driving fixes, parachutes, GP points, help page for bananas, cannon fixes, colorization shader) + ### Tracks and modeling #### Karts * Kiki by Benau @@ -356,10 +487,11 @@ For similar reasons, and because some features are vastly more complex than othe * New version of Konqi by Benau #### Tracks * All tracks drivable in reverse, with arrows pointing in the correct direction -* Candela City by samuncle (replace Shiny Suburbs) -* Cornfield Crossing by samuncle (replace Bovine Barnyard) +* Candela City by samuncle (replaces Shiny Suburbs) +* Cornfield Crossing by samuncle (replaces Bovine Barnyard) * New battle track Las Dunas Arena by samuncle + ## SuperTuxKart 0.9.2 (1. July 2016) * Ghost replay races by Benau * Battle mode AI by Benau @@ -372,27 +504,31 @@ For similar reasons, and because some features are vastly more complex than othe * Tweak to challenges * New farm track song by 0zone0ne and Krobonil * Bugfixes + ### Tracks and modeling #### Tracks -* Antediluvian Abysses by samuncle (replace Subsea) +* Antediluvian Abysses by samuncle (replaces Subsea) * Volcano Island by Ponzino * New icy soccer field by samuncle and Benau + ## SuperTuxKart 0.9.1 (17. October 2015) * Many bug fixes * Started to use scripting in tracks * Significant audio performance improvements * Tweak to challenges + ### Tracks and modeling #### Tracks * Better support for driving tracks in reverse +* New track layout and improved graphics for Oliver's Math Class, by samuncle * Smaller tweaks and improvements to several tracks including - * Math class * XR591 * Fort Magma * Gran Paradiso Island * Subsea + ## SupertTuxKart 0.9 (24. April 2015) * Fully shader-based rendering engine * Online login which allows to: @@ -401,15 +537,17 @@ For similar reasons, and because some features are vastly more complex than othe * collect online achievements * Grand Prix editor, including creation of random GPs * Different kart physics + ### Tracks and modeling #### Karts * New karts Amanda and Gavroche by XGhost * New and improved Tux, Adiumy, Sara the Wizard and the Racer, Xue #### Tracks -* Cocoa Temple by samuncle (replace Amazonian Journey) -* Gran Paradiso Island by samuncle (replace The Island) +* Cocoa Temple by samuncle (replaces Amazonian Journey) +* Gran Paradiso Island by samuncle (replaces The Island) * Graphical improvements to many other tracks + ## SuperTuxKart 0.8.1 (26. November 2013) * New Soccer mode * New Egg Hunt mode @@ -421,19 +559,22 @@ For similar reasons, and because some features are vastly more complex than othe * Add ability to save and resume Grand Prix * Improve skid marks and nitro effects * Wiimote support + ### Tracks and modeling #### Karts * New karts Xue and Sara * Updated Beastie kart #### Tracks -* STK Enterprise by Rubberduck (replace Star Track) +* STK Enterprise by Rubberduck (replaces Star Track) +* Redesign of Minigolf, by Rubberduck +* New longer track layout and improved graphics for Lighthouse, by samuncle * Gameplay and graphical updates to several tracks : * The Old Mine - * Lighthouse * Zen Garden #### Miscellaneous * Updated nitro models + ## SuperTuxKart 0.8 (11. December 2012) * Story mode and new challenge set * Improved AI @@ -441,15 +582,17 @@ For similar reasons, and because some features are vastly more complex than othe * Reverse mode * Updated menus * New music + ### Tracks and modeling +* New overworld for the Story Mode by Auria #### Tracks -* Green Valley by Wolfs (replace Tux Tollway) -* Blackhill Mansion by samuncle (replace Crescent Crossing) +* Green Valley by Wolfs (replaces Tux Tollway) +* Blackhill Mansion by samuncle (replaces Crescent Crossing) +* New track layout and improved graphics for Shifting Sands (formerly Sand) * Gameplay and graphical updates to several tracks : * XR591 * Fort Magma * Jungle - * Sand ## SuperTuxKart 0.7.3 (2. November 2011) @@ -463,22 +606,26 @@ For similar reasons, and because some features are vastly more complex than othe * Improved kart control at high speeds * Better placement of rescued karts * Transition track-making to blender 2.5/2.6 + ### Tracks and modeling #### Karts * New Suzanne kart #### Tracks -* Zen Garden by samuncle (replace Secret Garden) +* Zen Garden by samuncle (replaces Secret Garden) +* Minigolf, by Mac * New Subsea * New Island battle arena #### Miscellaneous * Added Thunderbird as race referee + ## SuperTuxKart 0.7.2 (15. July 2011) * Added in-game addon manager * Fixed major memory leaks * Show when you get a highscore * Improve gamepad configuration under Windows (add ability to tell gamepads apart) * Various other tweaks done and glitches fixed + ### Tracks and modeling #### Karts * New Beastie kart. @@ -486,10 +633,12 @@ For similar reasons, and because some features are vastly more complex than othe * Improved Snow Peak by samuncle * Improved Star Track UFO by Rudy + ## SuperTuxKart 0.7.1b (21. April 2011) * Fix circular dependency in challenges * Updated translations + ## SuperTuxKart 0.7.1 (15. April 2011) * Particle (smoke, splash, fire) and weather effects * Added internet news @@ -506,6 +655,7 @@ For similar reasons, and because some features are vastly more complex than othe * Fixed character names that contain non-ASCII characters * Full RTL (right to left) support * Various other tweaks done and glitches fixed + ### Tracks and modeling #### Karts * New Beagle kart by wolterh @@ -513,6 +663,7 @@ For similar reasons, and because some features are vastly more complex than othe * New Fort Magma by samuncle * New Shiny Suburbs by Horace + ## SuperTuxKart 0.7 (December 2010) Too many to list them all. Main points: @@ -524,17 +675,20 @@ Too many to list them all. Main points: * Other improvements - Allowed alternative ways/shortcuts in tracks - New item 'switch' + ### Tracks and modeling #### Tracks - Farm -- Hacienda by samuncle (replace Beach) +- Hacienda by samuncle (replaces Beach) - Scotland by Canis Lupus - Secret Garden + ## SuperTuxKart 0.6.2a (October 2009) * Bugfix: STK would crash while trying to save the config file on Windows Vista. + ## SuperTuxKart 0.6.2 (July 2009) * Bugfix: Game could crash in rare circumstances. * Bugfix: Restarting a GP (with the in-race menu ESC) would not subtract already allocated points. @@ -545,9 +699,11 @@ Too many to list them all. Main points: * Bugfix: GP result showed kart identifier instead of name. * Improvement: there is now 1 1 sec. wait period for the race result screen, avoiding the problem that someone presses space/enter at the end of a race, immediately quitting the menu before it can be read. + ## SuperTuxKart 0.6.1a (February 2009) * Bugfix: battle mode would not display track groups. + ## SuperTuxKart 0.6.1 (February 2009) * New music for Snow Mountain. * Fixed bug in track selection screen that could cause a crash when track groups were used. @@ -557,6 +713,7 @@ Too many to list them all. Main points: * A plunger in the face is now removed when restarting. * Added slow-down for karts driving backwards. * Somewhat reduced 'shaking' of AI driven karts. + ### Tracks and modeling #### Karts - New Puffy kart @@ -600,6 +757,7 @@ Too many to list them all. Main points: * Improved track : * Star track + ## SuperTuxKart 0.5 (May 2008) * Complete Challenges to unlock game modes, new tracks and a skidding preview * New Follow the Leader game mode @@ -621,6 +779,7 @@ Too many to list them all. Main points: * BSODs Battlements renamed to Fort Magma * Improved Crescent Crossing, Fort Magma, and Star Track + ## SuperTuxKart 0.4 (February 2008) * New physics handling using the bullet physics engine * Improved AI @@ -630,11 +789,12 @@ Too many to list them all. Main points: * Additional music and main theme ### Tracks and modeling #### Karts -* New kart: wilber +* New kart: Wilber #### Tracks * Improved 'Shifting Sands' and 'Lighthouse' - + + ## SuperTuxKart 0.3 (May 2007) * Highscore lists * Shortcut detection @@ -665,6 +825,7 @@ Too many to list them all. Main points: - Fixed keyboard keys unable to work on the first key press bug - And others + ## SuperTuxKart 0.2 (22. Sep 2006) * Significant performance improvement by using display lists * Improved AI @@ -683,6 +844,7 @@ Too many to list them all. Main points: * Added help and about screens, added credits to track designer * Items were added to all tracks + ## SuperTuxKart 0.1 (04. May 2006) (not officially released) * Significant speedup by using a new HOT and collision algorithm --> all tracks are now playable * Removed all SDL dependencies, only plib is needed @@ -691,12 +853,14 @@ Too many to list them all. Main points: * Some bug fixes and small improvements * Added profile option to support automatic profiling + ## SuperTuxKart 0.0.0 (22. Dec 2004) * new tracks * new characters and karts * new user-interface * some additional effects (skid-marks, smoke) + ##TuxKart v0.4.0 (March 19th 2004) * Changes for compatibility with PLIB 1.8.0 and later. * Removed some features that were only there to support diff --git a/CMakeLists.txt b/CMakeLists.txt index 25f70747117..51c59bd044d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,29 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.12...4.0) + +execute_process( + COMMAND git rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +# Get the latest abbreviated commit hash of the working branch +execute_process( + COMMAND git --no-pager describe --tags --always --exclude "preview" --exclude "ign-*" --dirty + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +message(STATUS "Configuring file from: ${CMAKE_SOURCE_DIR}/src/utils/version.hpp.in") +message(STATUS "Output file: ${CMAKE_SOURCE_DIR}/src/utils/version.hpp") + +configure_file( + ${CMAKE_SOURCE_DIR}/src/utils/version.hpp.in + ${CMAKE_SOURCE_DIR}/src/utils/version.hpp + @ONLY) + +include_directories(${CMAKE_BINARY_DIR}/generated) # root CMakeLists for the SuperTuxKart project project(SuperTuxKart) @@ -6,10 +31,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) @@ -29,11 +50,14 @@ option(SERVER_ONLY "Create a server only (i.e. no graphics or sound)" OFF) option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON) option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF) option(USE_SYSTEM_ENET "Use system ENet instead of the built-in version, when available." ON) +option(USE_SYSTEM_MCPP "Use system mcpp instead of the built-in version, when available." ON) CMAKE_DEPENDENT_OPTION(USE_IPV6 "Allow create or connect to game server with IPv6 address, system enet will not be used." ON "NOT USE_SWITCH" OFF) option(USE_SYSTEM_WIIUSE "Use system WiiUse instead of the built-in version, when available." OFF) option(USE_SQLITE3 "Use sqlite to manage server stats and ban list." ON) +option(FATAL_WHEN_OLD_RECORDS "Fatal error if the results table is old" ON) + if(APPLE) CMAKE_DEPENDENT_OPTION(DLOPEN_MOLTENVK "Use dlopen to load MoltenVK for Apple." ON "NOT IOS;NOT SERVER_ONLY" OFF) @@ -115,17 +139,23 @@ 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() if(USE_ASAN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer") + ADD_DEFINITIONS(-DASAN_STK) endif() 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") @@ -318,8 +348,10 @@ if(NOT SERVER_ONLY) endif() # Libmcpp -find_library(MCPP_LIBRARY NAMES mcpp libmcpp) -find_path(MCPP_INCLUDEDIR NAMES mcpp_lib.h PATHS) +if (USE_SYSTEM_MCPP) + find_library(MCPP_LIBRARY NAMES mcpp libmcpp) + find_path(MCPP_INCLUDEDIR NAMES mcpp_lib.h PATHS) +endif() if (NOT MCPP_LIBRARY OR NOT MCPP_INCLUDEDIR) add_subdirectory("${PROJECT_SOURCE_DIR}/lib/mcpp") include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/mcpp") @@ -497,12 +529,25 @@ if(USE_SQLITE3) endif() endif() +# Error if the records table is too old +if(FATAL_WHEN_OLD_RECORDS) + add_definitions(-DENABLE_FATAL_WHEN_OLD_RECORDS) +endif() + # Set some compiler options if(UNIX OR MINGW) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-function") endif() +if(MINGW) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") +endif() + +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") +endif() + if(MINGW AND CMAKE_BUILD_TYPE MATCHES Release) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows") endif() @@ -523,7 +568,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: - set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG) + add_compile_definitions($<$:DEBUG>) else() # All non VS generators used create only a single compile mode, so # compile flags can be simplye be added @@ -599,7 +644,7 @@ else() add_executable(supertuxkart ${STK_SOURCES} ${STK_RESOURCES} ${STK_HEADERS} ${IOS_ASSETS_FILES}) set_target_properties(supertuxkart PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/data/SuperTuxKart-Info-iOS.plist - XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 9.0 + XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 10.0 XCODE_ATTRIBUTE_INSTALL_PATH /Applications XCODE_ATTRIBUTE_SKIP_INSTALL No XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon") @@ -784,6 +829,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) @@ -820,6 +868,7 @@ if(USE_WIIUSE) endif() if(MSVC OR MINGW) + add_definitions(-DWIN_BUILD) target_link_libraries(supertuxkart iphlpapi.lib) add_custom_command(TARGET supertuxkart POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory @@ -828,20 +877,34 @@ if(MSVC OR MINGW) add_custom_target(stkshaders SOURCES ${STK_SHADERS}) endif() +if(MSVC) + SET(CMAKE_SHARED_LINKER_FLAGS /MANIFEST:NO) + add_custom_command( + TARGET supertuxkart POST_BUILD COMMAND "mt.exe" + -manifest \"${PROJECT_SOURCE_DIR}\\windows\\dpi_aware.manifest\" + -inputresource:\"$\"\;\#1 + -outputresource:\"$\"\;\#1) +endif() + +if(MINGW) + SET(CMAKE_SHARED_LINKER_FLAGS /MANIFEST:NO) + target_sources(supertuxkart PRIVATE windows/windows_config.rc) +endif() + if(MINGW) target_link_libraries(supertuxkart -ldxguid -ldnsapi) if (NOT CMAKE_BUILD_TYPE MATCHES Debug) target_link_libraries(supertuxkart -mwindows) endif() - find_library(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" "libgcc_s_seh-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) + find_file(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" "libgcc_s_seh-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) if (LIBGCC) file(COPY ${LIBGCC} DESTINATION ${CMAKE_BINARY_DIR}/bin/) endif() - find_library(LIBSTDCPP NAMES "libstdc++-6.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) + find_file(LIBSTDCPP NAMES "libstdc++-6.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) if (LIBSTDCPP) file(COPY ${LIBSTDCPP} DESTINATION ${CMAKE_BINARY_DIR}/bin/) endif() - find_library(LIBPTHREAD NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) + find_file(LIBPTHREAD NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll" PATHS ${CMAKE_FIND_ROOT_PATH}) if(LIBPTHREAD) file(COPY ${LIBPTHREAD} DESTINATION ${CMAKE_BINARY_DIR}/bin/) endif() @@ -905,7 +968,7 @@ install(FILES data/supertuxkart_128.png DESTINATION share/icons/hicolor/128x128/ install(FILES data/supertuxkart_256.png DESTINATION share/icons/hicolor/256x256/apps RENAME supertuxkart.png) install(FILES data/supertuxkart_512.png DESTINATION share/icons/hicolor/512x512/apps RENAME supertuxkart.png) install(FILES data/supertuxkart_1024.png DESTINATION share/icons/hicolor/1024x1024/apps RENAME supertuxkart.png) -install(FILES data/supertuxkart.appdata.xml DESTINATION share/metainfo) +install(FILES data/net.supertuxkart.SuperTuxKart.metainfo.xml DESTINATION share/metainfo) if(MINGW) install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION ${STK_INSTALL_BINARY_DIR} diff --git a/FORK_CHANGES.md b/FORK_CHANGES.md new file mode 100644 index 00000000000..b283b45e83a --- /dev/null +++ b/FORK_CHANGES.md @@ -0,0 +1,124 @@ +This page lists the major changes of this repository compared to standard STK code, as of July 2025. Most changes (sadly, not all of them) here are implemented as options, that is, you can disable them and return to standard behaviour. + +You can find more information such as explanations and minor details in [wiki](https://github.com/kimden/stk-code/wiki/). It will be probably filled with even more data in the future. + +## Improved Grand Prix mode + +* Server doesn't become private +* Players can pick karts, join or leave +* Custom scoring systems +* Custom teams (up to 9) +* Standings ingame (short) and in the lobby (longer), including teams +* Anti-troll and team hit punishment systems, by Heuchi1 +* Allows to shuffle the starting grid every race + +## Records, replays and stats + +* Game results for **all** modes can be saved to the database, together with game settings and kart statistics. +* Public or private record tables can be created using that information +* Ghost replays can be recorded on servers if set if the config +* Players who beat server records can be notified (includes separation of times set with different config files) +* Maximum replay size is increased to allow recording long games with many players + +## Chat + +* Private chat with an arbitrary set of players +* Teamchat during CTF and soccer which works both ingame and in the lobby +* Messages are **never** logged, even by the bots (though they pass through the server code) + +## Game configuration, available maps and karts, playing restrictions + +* Game length can be set to a fixed value, or to a certain multiple of default lap number, or to be chosen ingame +* Game direction can be set to forward or reverse, or to be chosen ingame +* For karts and maps, the next game can be customized so that the set of karts/maps available for choice is fixed, or defined by a certain algorithm (including "you have to play this track", "select from $N$ random maps from this set", "you can choose either Adiumy, or whatever is given to you by random of Suzanne and Konqi") +* The same is true for any number of next games, and the server can be set to repeat the customization every number of games + +All of the above settings can be changed arbitrarily when the server already runs, or in the config before the server starts. + +* Servers can be started with other powerup.xml or kart_characteristics.xml files being specified +* It's possible for a server to force certain maps for players to join the server or to join the game, or vice versa, disable certain maps (or all but a certain set of maps). There are various commands to find out which addons you (or other players) have or don't have, to make it easy to deal with the above +* The default setting of number of playable slots (playable places on the server) can be changed with a command +* If the player is unable to play due to imposed restrictions (lacking maps, being out of playable slots), that player doesn't affect the set of available maps, and is given the hourglass icon. + +## Command manager + +Command manager is an entity made to manipulate all existing server commands easier. It supports: + +* commands with voting +* text commands / commands reading external files +* auth commands, which allow to authenticate on other sites using STK accounts +* setting permissions for commands depending on server, without recompiling the code +* subcommands and different permissions for them +* fixing errors in arguments (usernames, map names) +* showing available commands depending on permissions +* documentation for all commands via `/help` +* huge number of new commands + +All the commands and their descriptions are available in `data/commands.xml`. This file is also used to generate output for `/commands` and `/help`. + +## Moderation and permissions + +* It's possible to disable kicks attempted by the crowned player +* If a player kicks another player, the fact of the kick can be stored in the database table with reports +* Inactive players can be kicked automatically from the lobby too, not only from the game +* A hammer mode is added: if a player has a password from the config, or if a player is specified in it, they can get a 'hammer' and change server settings and kick players +* There are commands to ban (or unban) a player temporary from a single server by username, as opposed to standard bans which are applied to all servers using the same database, and are usually banning by online id or IP address +* Players are allowed to report something to server owner without reporting other people +* Starting the game can be allowed or forbidden using a command, or before the server start using config + +## Game modes and their improvements + +These are not implemented as separate modes, but are rather additions to functionality of existing modes: + +* **Soccer tournament** mode: for hosting matches of several soccer games. The rules, the number of games and their duration, allowed arenas, tournament teams can be loaded from a config file. Referees have multiple commands to control the game flow +* **Gnu Elimination** mode: every race, the last (or quitting) non-eliminated player gets eliminated, and eliminated players use the same kart chosen in advance. The last standing player wins + +Separate changes for modes: + +* Soccer games produce a log of all goals / actions that happened (originally made for tournament mode, but can be used without it too), if the score is edited using tournament commands, the game shows it as a message after each goal and at the end. (This is, however, slightly deprecated by the new database features that allow storing all game results.) +* FFA and CTF scores are preserved per username during the game, so that leaving the game is not punished + +## Other features + +* You can allow only the crowned player to play (speedrun server), or no one at all (chat server) +* Minor `/spectate` changes (you can invoke it ingame, game doesn't start with everyone spectating, you can choose to stay in lobby without watching the game) +* For a configurable server, you can specify which exact difficulties and modes are allowed +* Players can send a message to the server owner (without reporting anyone else), and the server owner can send one-time messages to specific players +* For private servers, players can be whitelisted so that they can enter any password to join +* Different strategies to determine who scored a goal (allowing or forbidding own goals) +* `max-moveable-objects` is changed to 30 to allow tracks like `addon_bowling` to work +* Server can be customized to reset or preserve many settings like game mode, game length, ..., when everyone leaves it +* Server git version and whether it's modified is shown in `/version` +* Server console allows sending arbitrary messages to players +* Supported player categories aka sets of players (for now only displaying their names, and some minor usage) +* Minor additions in StringUtils used in typo fixing and string parsing + +## Better code and future plans + +Since 2025, my approach for developing the code in this repository has changed, as I stopped believing I should do everything in the same way as the developers of the main game, and stopped being afraid of merge conflicts. After all, I even submitted a couple of big patches into the official repository that way, and it was fine... + +That's why the big restructurization of the code started in 2025 (and is still underway). + +* One of the biggest and most complicated files in STK, `server_lobby.cpp`, that is also responsible for a lot of server-side logic, got split into several files so that each file contains methods about the area it corresponds to. + +For comparison, in this fork `server_lobby.cpp` now has 4.5k lines — less than in official code (4.8k) or a few other forks (7.3k, 12.1k). + +* To allow using modern code practices, the code and most of its required dependencies are now built using C++17. + +Even if not directly noticeable for general playing public, those changes will allow adding features in a simpler way in the future. The large sized planned changes alone include: + +* Clean (and after that, modifiable) network protocol +* Further server lobby splitting +* Advanced competition formats support + +## Designed for you, too! + +This fork also offers: + +* No proprietary scripts that are hardcoded inside to be unusable by others +* No hidden anti-features such as secretly logged 'private' chats +* Contributors to the fork are credited with `git blame` correctly + +It ain't much, but it's honest work. (Sadly, somehow it's not even a frequent offer in the world of STK.) + +Your feedback (especially constructive one) will be appreciated, together with that of quite a few people who hosted their own servers (or even clients) using this fork. Contributing to this repo is also possible — however, we have quite high standards for contributors. \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index caa0317cda5..abad7088c56 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -26,6 +26,15 @@ To build SuperTuxKart from source, you'll need to install the following packages * jpeg (libjpeg-turbo-devel) * SDL2 (libsdl2-devel) +Debian-based Distributions command: + +```bash +sudo apt-get install build-essential cmake libbluetooth-dev libsdl2-dev \ +libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev \ +libjpeg-dev libogg-dev libopenal-dev libpng-dev \ +libssl-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev +``` + Fedora command: ```bash @@ -39,13 +48,12 @@ libogg-devel openssl-devel pkgconf \ wiiuse-devel zlib-devel ``` -Mageia 6 command: +Arch-based Distributions command: ```bash -su -c 'urpmi gcc-c++ cmake openssl-devel libcurl-devel freetype-devel harfbuzz-devel \ -libjpeg-turbo-devel libogg-devel openal-soft-devel SDL2-devel \ -libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion \ -libbluez-devel libfreetype6-devel +sudo pacman -S openal libogg libvorbis freetype2 harfbuzz curl \ +bluez-libs openssl libpng zlib libjpeg-turbo sdl2 gcc cmake \ +pkgconf make git subversion ``` openSUSE command: @@ -57,13 +65,13 @@ libvorbis-devel pkgconf zlib-devel enet-devel \ libjpeg-devel bluez-devel freetype2-devel ``` -Debian-based Distributions command: +Mageia 6 command: ```bash -sudo apt-get install build-essential cmake libbluetooth-dev libsdl2-dev \ -libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev \ -libjpeg-dev libogg-dev libopenal-dev libpng-dev \ -libssl-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev +su -c 'urpmi gcc-c++ cmake openssl-devel libcurl-devel freetype-devel harfbuzz-devel \ +libjpeg-turbo-devel libogg-devel openal-soft-devel SDL2-devel \ +libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion \ +libbluez-devel libfreetype6-devel ``` Solus command: @@ -73,19 +81,19 @@ harfbuzz-devel curl-devel bluez-devel openssl-devel libpng-devel zlib-devel \ libjpeg-turbo-devel sdl2-devel enet-devel libjpeg-turbo-devel bluez-devel curl-devel ``` -### In-game recorder +#### In-game recorder To build the in-game recorder for STK, you have to install -libopenglrecorder from your distribution, or compile it yourself from [here](https://github.com/Benau/libopenglrecorder). -Compilation instruction is explained there. If you don't need this feature, pass `-DBUILD_RECORDER=off` to cmake. +`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 +#### 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. +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 +To compile SuperTuxKart, run the following commands inside the `stk-code` directory: ```bash # go into the stk-code directory @@ -102,7 +110,7 @@ cmake .. make -j$(nproc) ``` -STK can then be run from the build directory with `bin/supertuxkart` +STK can then be run from the build directory with `bin/supertuxkart`. #### Keeping your build up to date @@ -115,11 +123,11 @@ cmake .. make -j$(nproc) ``` -##### Build Speed Optimization +#### Build Speed Optimization -"-j$(nproc)" is an example, for a faster build, use "-jx" instead, where "x" is the amount of CPU threads you have, minus one. +The `-j$(nproc)` option is an example. For a faster build, use `-jx` instead, where "x" is the amount of CPU threads you have, minus one. -### Further options +#### Further options To create a debug version of STK, run: @@ -134,21 +142,21 @@ sudo make install ``` The default install location is `/usr/local`, i.e. the data files will -be written to `/usr/local/share/games/supertuxkart`, the executable +be written to `/usr/local/share/games/supertuxkart` and the executable will be copied to `/usr/local/bin`. To change the default installation -location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.: -`cmake .. -DCMAKE_INSTALL_PREFIX=/opt/stk` +location, specify `CMAKE_INSTALL_PREFIX` when running CMake, e.g.: +`cmake .. -DCMAKE_INSTALL_PREFIX=/opt/stk`. ## Building SuperTuxKart on Windows -To Build SuperTuxKart on Windows follow these instructions: +To Build SuperTuxKart on Windows, follow these instructions: 1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/). The free Visual Studio Community edition works fine. Remember to select "Desktop development with C++" in the installer. -2. If you want the stable version, download the SuperTuxKart source package from the latest stable version [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) and unpack it. +2. If you want the stable version, download the SuperTuxKart source package from the latest stable version of [SuperTuxKart on GitHub](https://github.com/supertuxkart/stk-code/releases) and unpack it. -3. If you want the development version, you will need a Git client and a SVN client. More information can be found here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). -Open your file browser and find somewhere you want to put the development version of SuperTuxKart. For example in C:\Users\ as the Git and SVN clients will have write permissions there, and you should create its own directory, for example SuperTuxKart-dev. Enter that directory, and create a directory inside called stk-assets, and enter it. If you installed TortoiseSVN, right-click, select TortoiseSVN -> Checkout... and paste the corresponding URL found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). While it is downloading the game assets, go back to your file browser and one level up. Right-click again somewhere empty and select "Git clone..." and paste the corresponding link found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). +3. If you want the development version, you will need a Git client and an SVN client. More information can be found here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). +Open your file browser and find somewhere you want to put the development version of SuperTuxKart. For example in C:\\Users\\\ as the Git and SVN clients will have write permissions there, and you should create its own directory, for example "SuperTuxKart-dev". Enter that directory, and create a directory inside called "stk-assets", and enter it. If you installed TortoiseSVN, right-click, select TortoiseSVN -> Checkout... and paste the corresponding URL found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). While it is downloading the game assets, go back to your file browser and move one level up (if you followed the example that directory would be named "SuperTuxKart-dev"). Right-click again somewhere empty and select "Git clone..." and paste the corresponding link found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). *Note: Both `stk-code` and `stk-assets` **must** be in the same directory, otherwise the build will likely fail!* 4. If you got the stable version, download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies Releases](https://github.com/supertuxkart/dependencies/releases), find the stk-code version there and download the `dependencies(arch).zip` as needed and unpack the archive into the `stk-code` directory. @@ -160,7 +168,7 @@ and unpack the archive into the `stk-code` directory. Download `i686` if you use 7. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. CMake will then ask you about your version of Visual Studio. - Confirm your selection; *Please look at the table below to avoid confusion between version numbers and releases of Visual Studio*; CMake will begin creating the required files for the build in the directory. If you want to do a 64-bit build, select the version of Visual Studio you installed with "Win64" appended. Press 'Generate' button. + Confirm your selection; *Please look at the table below to avoid confusion between version numbers and releases of Visual Studio*; CMake will begin creating the required files for the build in the directory. If you want to do a 64-bit build, select the version of Visual Studio you installed with "Win64" appended. Press the 'Generate' button. 8. Navigate to your build directory and open the `SuperTuxKart.sln` file; Visual Studio will now load the solution. @@ -170,12 +178,12 @@ and unpack the archive into the `stk-code` directory. Download `i686` if you use *Note: To avoid confusion between releases and versions, refer to this table:* -Visual Studio Release | Version -----------------------|------------ -Visual Studio 2019| 16 -Visual Studio 2017| 15 -Visual Studio 2015| 14 -Visual Studio 2013| 13 +| Visual Studio Release | Version | +| --------------------- | ------- | +| Visual Studio 2019 | 16 | +| Visual Studio 2017 | 15 | +| Visual Studio 2015 | 14 | +| Visual Studio 2013 | 13 | ## Building SuperTuxKart on Windows (from PowerShell/Command line) @@ -185,7 +193,7 @@ Visual Studio 2013| 13 NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory, `stk-assets` is not needed if you download the full source tarball `(SuperTuxKart-version-src.tar.xz)`. 3. Download the Windows dependencies package from [SuperTuxKart on GitHub - Dependencies latest preview release](https://github.com/supertuxkart/dependencies/releases/tag/preview) and unpack the archive into the `stk-code` directory. Download `i686` if you use Win32 generator of MSVC, `x86_64` for x64, `armv7` for ARM and `aarch64` for ARM64. -4. Download CMake from here: [CMake - download page](https://cmake.org/download/); and install it. Navigate to the `stk-code` directory; and create an directory called "build": +4. Download CMake from here: [CMake - download page](https://cmake.org/download/); and install it. Navigate to the `stk-code` directory, and create a directory called "build": ```cmd mkdir build @@ -204,7 +212,7 @@ and unpack the archive into the `stk-code` directory. Download `i686` if you use msbuild.exe SuperTuxKart.sln ``` -SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe` +SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe`. ## Building SuperTuxKart on Windows using LLVM MinGW @@ -214,14 +222,28 @@ SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supe 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: +5. 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. +### For cmake-gui +6. 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: +7. 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' +8. Once inside the build directory, run the build command using command line `cmd.exe` or PowerShell: + ```cmd + C:\llvm-mingw\ninja.exe + ``` +SuperTuxKart can now be run as `bin\supertuxkart.exe`. + +### For PowerShell/Command Prompt +6. Once inside the build directory, run the CMake command using command line `cmd.exe` or PowerShell: + + ```cmd + cmake .. -G Ninja -DLLVM_ARCH="x86_64" -DLLVM_PREFIX=C:\llvm-mingw -DCMAKE_MAKE_PROGRAM=C:\llvm-mingw\ninja.exe -DUSE_WIIUSE=OFF -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-llvm-mingw.cmake" + ``` +7. Run the build command in the same directory: + ```cmd C:\llvm-mingw\ninja.exe ``` @@ -234,9 +256,9 @@ SuperTuxKart can now be run as `bin\supertuxkart.exe`. Install the developer tools, either from the OS X Install DVD or from Apple's website. -Download `dependencies-macosx.tar.xz` from `Assets` section [here](https://github.com/supertuxkart/dependencies/releases) and extract it inside stk-code directory, use `preview` version for git stk-code. +Download `dependencies-macosx.tar.xz` from the `Assets` section [here](https://github.com/supertuxkart/dependencies/releases) and extract it inside the `stk-code` directory, use the `preview` version for git stk-code. -Build STK +Build STK: ```bash cd /path/to/stk-code @@ -256,6 +278,6 @@ By default, the executable that is produced is not ready for distribution. Insta 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 +Add `-ns` to disable ad-hoc codesigning. Afterwards, copy the contents of `stk-assets` into `/SuperTuxKart.app/Contents/Resources/data`. diff --git a/NETWORKING.md b/NETWORKING.md index 97ad3dc34ee..db98d3bc752 100644 --- a/NETWORKING.md +++ b/NETWORKING.md @@ -1,7 +1,17 @@ # Online networking games for STK +A reminder: you are looking at NETWORKING.md of the fork, not the one of the standard code. + ## Hosting server -First of all, you can compile STK with `-DSERVER_ONLY=ON` which will produce a GUI-less STK binary optimized for size and memory usage, useful for situation like in VPS. +You **should** compile STK with `-DSERVER_ONLY=ON`. This option produces a GUI-less STK binary optimized for size and memory usage, useful for situation like in VPS. As this fork is server-side (at least for now), this option is enabled **always** during the testing. You can compile the code without this option, and most likely nothing bad will happen, but it's not an intended way to run this fork. + +The other option(s) you should consider using are `-DUSE_SQLITE3=ON`, if you want to use a database for storing data. + +A typical cmake command looks like +```bash +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSERVER_ONLY=ON -DUSE_SQLITE3=ON +``` + The dependencies for RHEL/CentOS 7 are installed with: ```bash yum install wget; cd /tmp; wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm; rpm -Uvh epel-release*rpm @@ -25,7 +35,10 @@ Than you can just run: It will create that xml configuration file if not found in current directory, you can type `quit` in terminal, than you can edit that file for further configuration as required. ` --network-console` should not be used if you run supertuxkart server later with systemd service, see issue [#4299](https://github.com/supertuxkart/stk-code/issues/4299). -The current server configuration xml looks like this: +#### Server configuration + +A typical current server configuration xml that fits the current code version is provided below. The values listed allow to create a "generic" server (and so, they are not always corresponding to the default values), that is, you can safely use them — but at the same time, the config below doesn't provide an example how to use some advanced settings. + ```xml @@ -36,33 +49,39 @@ The current server configuration xml looks like this: - + - + - + - + + + + - + + + + @@ -90,20 +109,98 @@ The current server configuration xml looks like this: - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -115,11 +212,17 @@ The current server configuration xml looks like this: - + + + + + + + @@ -156,6 +259,9 @@ The current server configuration xml looks like this: + + + @@ -181,7 +287,7 @@ The current server configuration xml looks like this: - + @@ -190,21 +296,159 @@ The current server configuration xml looks like this: - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +If you use a single configuration file for a server (like the one above), it will be overridden by the game when you close the server. Edit your config file only when your server is down. + +#### Nested server configuration + +Alternatively, you can use one configuration file as base configuration, and another one to override the base settings with individual server settings. This is useful when you run several servers and don't want to clone the same values everywhere. The base configuration file has the same format as in single file configuration case, and the individual configuration file can include only those settings you need to change for that specific server, plus the `external-config` setting as shown below in an example of individual config file: + +```xml + + + + + + + + + + + + + + + + + ``` +Note, however, that your configuration files will **not** be overridden if you use this kind of nested configuration, as there's no code to overwrite a file with only certain settings. It can also be more convenient to be able to edit files for the next server restart while the server is still running. On the other hand, if you need to format the base configuration properly, you can just run STK once on it. + +#### Ports and STUN + At the moment STK has a list of STUN servers for NAT penetration which allows players or servers behind a firewall or router to be able to connect to each other, but in case it doesn't work, you have to manually disable the firewall or port forward the port(s) used by STK. -By default STK servers use port `2759`. For example, in Ubuntu based distributions, run the following command to disable the firewall on that port: +By default STK servers use port `2759` (UDP). For example, in Ubuntu based distributions, run the following command to disable the firewall on that port: `sudo ufw allow 2759` -You may also need to handle the server discovery port `2757` for connecting your WAN server in LAN / localhost. +You may also need to handle the server discovery port `2757` (UDP) for connecting your WAN server in LAN / localhost. Notice: You don't need to make any firewall or router configuration changes if you connect to the recommended servers (marked with ☆★STK★☆). @@ -229,7 +473,7 @@ There is a network AI tester in STK which can use AI on player controller for se `supertuxkart --connect-now=x.x.x.x:y --network-ai=n --no-graphics` -Remove `--no-graphics` if you want to see the AI racing. You can also run network AI tester in server-only build of STK. +Here, `x.x.x.x` is IP address, `y` is port, and `n` is the number of AIs to connect. Remove `--no-graphics` if you want to see the AI racing. You can also run network AI tester in server-only build of STK. With the network AI tester, it's easier to for example simulate high-loaded servers or bad networks (ones with high ping and/or packet loss). @@ -246,10 +490,11 @@ Currently STK uses sqlite (if building with sqlite3 on) for server management wi 2. IP / online ID ban list 3. Player reports 4. IPv4 and IPv6 geolocation +5. Record tables (if enabled) -You need to create a database in sqlite first, run `sqlite3 stkservers.db` in the folder where (all) your server_config.xml(s) located. +You need to create a database in sqlite first, run `sqlite3 stkservers.db` in the folder where (all) your server_config.xml(s) located. If that alone doesn't create the database, you might need to do some actions, for example, `CREATE TABLE a(b);`, then `DROP TABLE a;`, so that database is formed correctly. -A table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_stats` will also be created in your database if one does not exist.: +A table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_stats` will also be created in your database if one does not exist: ```sql CREATE TABLE IF NOT EXISTS (table name above) ( @@ -265,9 +510,15 @@ CREATE TABLE IF NOT EXISTS (table name above) os TEXT NOT NULL, -- Operating system of the host connected_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Time when connected disconnected_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Time when disconnected (saved when disconnected) - ping INTEGER UNSIGNED NOT NULL DEFAULT 0 -- Ping of the host + ping INTEGER UNSIGNED NOT NULL DEFAULT 0, -- Ping of the host + packet_loss INTEGER NOT NULL DEFAULT 0, -- Mean packet loss count from ENet (saved when disconnected) + addon_karts_count INTEGER UNSIGNED NOT NULL DEFAULT -1, -- Number of addon karts of the host + addon_tracks_count INTEGER UNSIGNED NOT NULL DEFAULT -1, -- Number of addon tracks of the host + addon_arenas_count INTEGER UNSIGNED NOT NULL DEFAULT -1, -- Number of addon arenas of the host + addon_soccers_count INTEGER UNSIGNED NOT NULL DEFAULT -1 -- Number of addon soccers of the host ) WITHOUT ROWID; ``` +Note that unlike in the standard code, there are four additional columns for addon numbers. STK will also create the following default views from the stats table: @@ -281,7 +532,11 @@ Current players in server with ip in human readable format and time played of ea All players with online id and username with their time played stats in this server since creation of this database. If sqlite supports window functions (since 3.25), it will include last session player info (ip, country, ping...). -A empty table named `v(server database version)_countries` will also be created in your database if not exists: +If `store-results` is enabled in server configuration file, a table named `v(server database version)_(your_server_config_filename_without_.xml_extension)_results` will be created to store the results of the games. Check [this page](doc/fork/Database specifications.md) for the exact structure of this database. The structure was last updated in August 2024, so you might need to update your database for that, the page also has the instructions how to do it. + +If you had a database with a table of results of an old format and attempt to run latest code, the code will not allow the server to start. That is done intentionally, so that server owners are aware of updates and edit the database themselves, as opposed to silently crashing something with the new code. You can disable it with `-DFATAL_WHEN_OLD_RECORDS=OFF`. + +An empty table named `v(server database version)_countries` will also be created in your database if not exists: ```sql CREATE TABLE IF NOT EXISTS (table name above) ( @@ -293,7 +548,7 @@ CREATE TABLE IF NOT EXISTS (table name above) If you want to see flags and readable names of countries in the above views, you need to initialize `v(server database version)_countries` table, check [this script](tools/generate-countries-table.py). -For IPv4 and online ID ban list, player reports or IP mapping, you need to create one yourself: +For IPv4 and online ID ban list, player reports or IP mapping (in case your server doesn't communicate with STK addons server, which can do IP mapping instead of your server), you need to create one yourself: ```sql CREATE TABLE ip_ban ( @@ -360,7 +615,7 @@ CREATE TABLE ipv6_mapping latitude REAL NOT NULL, -- Latitude of this IP range longitude REAL NOT NULL, -- Longitude of this IP range country_code TEXT NOT NULL -- 2-letter country code -) +); ``` For initialization of `ip_mapping` table, check [this script](tools/generate-ip-mappings.py). diff --git a/README.md b/README.md index a29e33b138e..4ea49ab1a0a 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,40 @@ -# SuperTuxKart -[![Linux build status](https://github.com/supertuxkart/stk-code/actions/workflows/linux.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/linux.yml) -[![Apple build status](https://github.com/supertuxkart/stk-code/actions/workflows/apple.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/apple.yml) -[![Windows build status](https://github.com/supertuxkart/stk-code/actions/workflows/windows.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/windows.yml) -[![Switch build status](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml/badge.svg)](https://github.com/supertuxkart/stk-code/actions/workflows/switch.yml) -[![#supertuxkart on the libera IRC network](https://img.shields.io/badge/libera-%23supertuxkart-brightgreen.svg)](https://web.libera.chat/?channels=#supertuxkart) +[![Linux build status](https://github.com/kimden/stk-code/actions/workflows/linux.yml/badge.svg)](https://github.com/kimden/stk-code/actions/workflows/linux.yml) +[![Apple build status](https://github.com/kimden/stk-code/actions/workflows/apple.yml/badge.svg)](https://github.com/kimden/stk-code/actions/workflows/apple.yml) +[![Windows build status](https://github.com/kimden/stk-code/actions/workflows/windows.yml/badge.svg)](https://github.com/kimden/stk-code/actions/workflows/windows.yml) +[![Switch build status](https://github.com/kimden/stk-code/actions/workflows/switch.yml/badge.svg)](https://github.com/kimden/stk-code/actions/workflows/switch.yml) -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. +This repository contains a **modified** version of SuperTuxKart (STK), mainly intended for server-side usage, but you can also use it as a client. -The SuperTuxKart homepage can be found at . There is also our [FAQ](https://supertuxkart.net/FAQ) and information on how get in touch with the [community](https://supertuxkart.net/Community). +Most important changes are listed [here](/FORK_CHANGES.md). Standard version of STK can be found [here](https://github.com/supertuxkart/stk-code/), and the changes between it and latest commits of this repo can be found [here](https://github.com/supertuxkart/stk-code/compare/master...kimden:stk-code:master). -Latest release binaries can be found [here](https://github.com/supertuxkart/stk-code/releases/latest), and preview release [here](https://github.com/supertuxkart/stk-code/releases/preview). +## Important branches -## Hardware Requirements -To run SuperTuxKart, make sure that your computer's specifications are equal or higher than the following specifications: +* [master](https://github.com/kimden/stk-code/): contains the latest version. For a few years, it contained old commits, while new commits were on `command-manager-prototype` branch. Use this branch if you want to deploy your own server. -* A graphics card capable of 3D rendering - NVIDIA GeForce 470 GTX, AMD Radeon 6870 HD series card or Intel HD Graphics 4000 and newer. OpenGL >= 3.3 -* You should have a dual-core CPU that's running at 1 GHz or faster. -* You'll need at least 512 MB of free VRAM (video memory). -* System memory: 1 GB -* Minimum disk space: 700 MB -* Ideally, you'll want a joystick with at least 6 buttons. +* [command-manager-2x](https://github.com/kimden/stk-code/tree/command-manager-2x): the branch combining `command-manager-prototype` and [BalanceSTK2](https://github.com/Alayan-stk-2/stk-code/tree/BalanceSTK2), which is currently the source code of 2.X development version. This branch might not have the latest commits, its purpose is to store game results while testing 2.X version. It will be changed to have commits from `master` instead of `command-manager-prototype`, which is now deprecated. -## 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. +* [local-client](https://github.com/kimden/stk-code/tree/local-client): the version of client with some optimizations and edits, used by kimden. For now, this is the only branch of this repo that is really intended for client-side usage. + +There are also several less important branches. + +[Tyre Mod Edition](https://github.com/Nomagno/stk-code/tree/tyre2X) by Nomagno is also using branches of this repository for both server and client updates. --- -## 3D coordinates -A reminder for those who are looking at the code and 3D models: +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. + +Building instructions can be found in [`INSTALL.md`](/INSTALL.md). + +Info on experimental anti-troll system can be found in [`ANTI_TROLL.md`](/ANTI_TROLL.md). + +--- -SuperTuxKart: X right, Y up, Z forwards +## About SuperTuxKart -Blender: X right, Y forwards, Z up +[![#supertuxkart on the libera IRC network](https://img.shields.io/badge/libera-%23supertuxkart-brightgreen.svg)](https://web.libera.chat/?channels=#supertuxkart) -The export utilities perform the needed transformation, so in Blender you just work with the XY plane as ground, and things will appear fine in STK (using XZ as ground in the code, obviously). +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. -## Building from source +The SuperTuxKart homepage can be found at . There is also our [FAQ](https://supertuxkart.net/FAQ) and information on how get in touch with the [community](https://supertuxkart.net/Community). -Building instructions can be found in [`INSTALL.md`](/INSTALL.md) +Latest release binaries can be found [here](https://github.com/supertuxkart/stk-code/releases/latest), and preview release [here](https://github.com/supertuxkart/stk-code/releases/preview). diff --git a/android/Android.mk b/android/Android.mk index f0bcdd0c172..3fe29a77060 100644 --- a/android/Android.mk +++ b/android/Android.mk @@ -260,7 +260,7 @@ LOCAL_CFLAGS := -I../lib/irrlicht/source/Irrlicht/ \ -I../lib/graphics_engine/include \ -DMOBILE_STK \ -DANDROID_PACKAGE_CALLBACK_NAME=$(PACKAGE_CALLBACK_NAME) -LOCAL_CPPFLAGS := -std=gnu++0x +LOCAL_CPPFLAGS := -std=gnu++17 LOCAL_STATIC_LIBRARIES := libjpeg png zlib ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) LOCAL_ARM_NEON := false @@ -363,7 +363,7 @@ LOCAL_CFLAGS := -I../lib/angelscript/include \ -DANDROID_APP_DIR_NAME=\"$(APP_DIR_NAME)\" \ -DSUPERTUXKART_VERSION=\"$(PROJECT_VERSION)\" \ -DANDROID_PACKAGE_CLASS_NAME=\"$(PACKAGE_CLASS_NAME)\" -LOCAL_CPPFLAGS := -std=gnu++0x +LOCAL_CPPFLAGS := -std=gnu++17 LOCAL_STATIC_LIBRARIES := irrlicht bullet enet ifaddrs angelscript mcpp SDL2 \ vorbisfile vorbis ogg openal curl libmbedtls \ diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index dab237cb3a0..6554a0b5239 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -4,6 +4,8 @@ diff --git a/android/build.gradle b/android/build.gradle index c0a5ec91c08..a5b94f88e23 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,7 +11,7 @@ buildscript // 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:7.3.0' + classpath 'com.android.tools.build:gradle:8.7.3' } } @@ -48,6 +48,7 @@ android versionCode project.getProperty('version_code').toInteger() versionName project.getProperty('version_name') minSdkVersion min_sdk_version.toInteger() + compileSdkVersion compile_sdk_version.toInteger() targetSdkVersion target_sdk_version.toInteger() externalNativeBuild { diff --git a/android/generate_assets.sh b/android/generate_assets.sh index a45a3a4f4d9..f3743dd94ae 100755 --- a/android/generate_assets.sh +++ b/android/generate_assets.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # (C) 2016-2017 Dawid Gan, under the GPLv3 # @@ -57,6 +57,7 @@ export BLACKLIST_FILES="data/supertuxkart.icns \ ################################################################################ +export OS_NAME="`uname -s`" export LANG=C cd "`dirname "$0"`" @@ -141,6 +142,12 @@ if [ ! -d "../data" ]; then exit 1 fi +# Use `magick` when it's available +if command -v magick > /dev/null; then + MAGICK='magick' +else + MAGICK='convert' +fi # Clear previous assets directory echo "Clear previous assets directory" @@ -270,7 +277,7 @@ convert_image() QUALITY_CMD="-quality $PNG_QUALITY" fi - convert $SCALE_CMD $QUALITY_CMD "$FILE" "tmp.$FILE_TYPE" + $MAGICK "$FILE" $SCALE_CMD $QUALITY_CMD "tmp.$FILE_TYPE" if [ -s "tmp.$FILE_TYPE" ]; then SIZE_OLD=`du -k "$FILE" | cut -f1` @@ -411,7 +418,7 @@ convert_to_jpg() return fi - NEW_FILE="`echo $FILE | head -c -5`.jpg" + NEW_FILE="`echo $FILE | rev | cut -c 5- | rev`.jpg" if [ -f "$NEW_FILE" ]; then #echo " There is already a file with .jpg extension. Ignore..." @@ -419,7 +426,7 @@ convert_to_jpg() fi # We can check if new file is smaller - convert -quality $JPEG_QUALITY "$FILE" "$NEW_FILE" + $MAGICK "$FILE" -quality $JPEG_QUALITY "$NEW_FILE" rm -f "$FILE" echo "$FILE" >> "./converted_textures" @@ -441,9 +448,13 @@ convert_to_jpg_extract_b3dz() rm -f "$FILE" TEXNAME="`basename "$FILE"`" - NEWNAME="`echo $TEXNAME | head -c -6`.b3d" + NEWNAME="`echo $TEXNAME | rev | cut -c 6- | rev`.b3d" - sed -i "s/\"$TEXNAME\"/\"$NEWNAME\"/g" "$DIRNAME/kart.xml" + if [ "$OS_NAME" = "Darwin" ]; then + sed -i "" "s/\"$TEXNAME\"/\"$NEWNAME\"/g" "$DIRNAME/kart.xml" + else + sed -i "s/\"$TEXNAME\"/\"$NEWNAME\"/g" "$DIRNAME/kart.xml" + fi } convert_to_jpg_update_b3d() @@ -617,10 +628,15 @@ convert_to_jpg_update_xml() continue; fi - TEXNAME="`basename "$CONVERTED_TEXTURE" | head -c -5`" + TEXNAME="`basename "$CONVERTED_TEXTURE" | rev | cut -c 5- | rev`" - sed -i "s/\"$TEXNAME.[pP][nN][gG]/\"$TEXNAME.jpg/g" "$FILE" - sed -i "s/ $TEXNAME.[pP][nN][gG]/ $TEXNAME.jpg/g" "$FILE" + if [ "$OS_NAME" = "Darwin" ]; then + sed -i "" "s/\"$TEXNAME.[pP][nN][gG]/\"$TEXNAME.jpg/g" "$FILE" + sed -i "" "s/ $TEXNAME.[pP][nN][gG]/ $TEXNAME.jpg/g" "$FILE" + else + sed -i "s/\"$TEXNAME.[pP][nN][gG]/\"$TEXNAME.jpg/g" "$FILE" + sed -i "s/ $TEXNAME.[pP][nN][gG]/ $TEXNAME.jpg/g" "$FILE" + fi done < "./converted_textures" } @@ -679,12 +695,21 @@ fi # Generate files list echo "Generate files list" find "$OUTPUT_PATH"/* -type d| sort > tmp1.txt -sed -i 's/$/\//' tmp1.txt +if [ "$OS_NAME" = "Darwin" ]; then + sed -i "" 's/$/\//' tmp1.txt +else + sed -i 's/$/\//' tmp1.txt +fi find "$OUTPUT_PATH"/* -type f| sort > tmp2.txt cat tmp1.txt tmp2.txt | sort > "$OUTPUT_PATH/files.txt" rm tmp1.txt tmp2.txt -sed -i s/".\/$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" -sed -i s/"$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" +if [ "$OS_NAME" = "Darwin" ]; then + sed -i "" s/".\/$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" + sed -i "" s/"$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" +else + sed -i s/".\/$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" + sed -i s/"$OUTPUT_PATH\/"// "$OUTPUT_PATH/files.txt" +fi # A file that can be used to check if apk has assets echo "has_assets" > "$OUTPUT_PATH/has_assets.txt" diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 00000000000..939ff1a8d7b --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index 13372aef5e2..e6441136f3d 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 8d3f2ab2b75..09523c0e549 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Mon Oct 23 13:51:26 PDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip diff --git a/android/gradlew b/android/gradlew index 9d82f789151..b740cf13397 100755 --- a/android/gradlew +++ b/android/gradlew @@ -1,74 +1,127 @@ -#!/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/HEAD/platforms/jvm/plugins-application/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_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # 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,84 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi 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 +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac 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 +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# 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\"" + 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 - i=$((i+1)) + # 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 - 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" ;; - 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" -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +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" "$@" diff --git a/android/make.sh b/android/make.sh index 3d5b6150cc3..4ae559ad4ba 100755 --- a/android/make.sh +++ b/android/make.sh @@ -20,7 +20,7 @@ if [ -z "$STK_MIN_ANDROID_SDK" ]; then fi if [ -z "$STK_TARGET_ANDROID_SDK" ]; then - export STK_TARGET_ANDROID_SDK=33 + export STK_TARGET_ANDROID_SDK=35 fi if [ -z "$STK_NDK_VERSION" ]; then @@ -242,6 +242,13 @@ if [ -d "$DIRNAME/assets/data" ]; then fi fi +# Use `magick` when it's available +if command -v magick > /dev/null; then + MAGICK='magick' +else + MAGICK='convert' +fi + # Standalone toolchain if [ ! -f "$DIRNAME/obj/make_standalone_toolchain.stamp" ]; then echo "Creating standalone toolchain" @@ -408,33 +415,34 @@ cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDL cp "banner.png" "$DIRNAME/res/drawable/banner.png" cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png" -convert -scale 48x48 "$APP_ICON" "$DIRNAME/res/drawable-mdpi/icon.png" -convert -scale 72x72 "$APP_ICON" "$DIRNAME/res/drawable-hdpi/icon.png" -convert -scale 96x96 "$APP_ICON" "$DIRNAME/res/drawable-xhdpi/icon.png" -convert -scale 144x144 "$APP_ICON" "$DIRNAME/res/drawable-xxhdpi/icon.png" -convert -scale 192x192 "$APP_ICON" "$DIRNAME/res/drawable-xxxhdpi/icon.png" - -#convert -scale 108x108 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-mdpi/icon_bg.png" -#convert -scale 162x162 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-hdpi/icon_bg.png" -#convert -scale 216x216 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xhdpi/icon_bg.png" -#convert -scale 324x324 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png" -#convert -scale 432x432 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png" - -convert -scale 108x108 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-mdpi/icon_bg.png" -convert -scale 162x162 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-hdpi/icon_bg.png" -convert -scale 216x216 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xhdpi/icon_bg.png" -convert -scale 324x324 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png" -convert -scale 432x432 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png" - -convert -scale 108x108 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-mdpi/icon_fg.png" -convert -scale 162x162 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-hdpi/icon_fg.png" -convert -scale 216x216 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xhdpi/icon_fg.png" -convert -scale 324x324 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxhdpi/icon_fg.png" -convert -scale 432x432 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png" +$MAGICK "$APP_ICON" -scale 48x48 "$DIRNAME/res/drawable-mdpi/icon.png" +$MAGICK "$APP_ICON" -scale 72x72 "$DIRNAME/res/drawable-hdpi/icon.png" +$MAGICK "$APP_ICON" -scale 96x96 "$DIRNAME/res/drawable-xhdpi/icon.png" +$MAGICK "$APP_ICON" -scale 144x144 "$DIRNAME/res/drawable-xxhdpi/icon.png" +$MAGICK "$APP_ICON" -scale 192x192 "$DIRNAME/res/drawable-xxxhdpi/icon.png" + +#$MAGICK "$APP_ICON_ADAPTIVE_BG" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_bg.png" +#$MAGICK "$APP_ICON_ADAPTIVE_BG" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_bg.png" +#$MAGICK "$APP_ICON_ADAPTIVE_BG" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_bg.png" +#$MAGICK "$APP_ICON_ADAPTIVE_BG" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_bg.png" +#$MAGICK "$APP_ICON_ADAPTIVE_BG" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png" + +$MAGICK xc:"rgba(255,255,255,255)" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_bg.png" +$MAGICK xc:"rgba(255,255,255,255)" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_bg.png" +$MAGICK xc:"rgba(255,255,255,255)" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_bg.png" +$MAGICK xc:"rgba(255,255,255,255)" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_bg.png" +$MAGICK xc:"rgba(255,255,255,255)" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png" + +$MAGICK "$APP_ICON_ADAPTIVE_FG" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_fg.png" +$MAGICK "$APP_ICON_ADAPTIVE_FG" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_fg.png" +$MAGICK "$APP_ICON_ADAPTIVE_FG" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_fg.png" +$MAGICK "$APP_ICON_ADAPTIVE_FG" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_fg.png" +$MAGICK "$APP_ICON_ADAPTIVE_FG" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png" export ANDROID_HOME="$SDK_PATH" ./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \ -Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \ + -Pcompile_sdk_version="$STK_TARGET_ANDROID_SDK"\ -Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \ -Pstorepass="$STK_STOREPASS" \ -Pkeystore="$STK_KEYSTORE" \ @@ -450,6 +458,7 @@ export ANDROID_HOME="$SDK_PATH" if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then ./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \ -Pmin_sdk_version="$STK_MIN_ANDROID_SDK" \ + -Pcompile_sdk_version="$STK_TARGET_ANDROID_SDK"\ -Ptarget_sdk_version="$STK_TARGET_ANDROID_SDK" \ -Pstorepass="$STK_STOREPASS" \ -Pkeystore="$STK_KEYSTORE" \ diff --git a/android/make_deps.sh b/android/make_deps.sh index 6d89eb07a25..3af6c601c4a 100755 --- a/android/make_deps.sh +++ b/android/make_deps.sh @@ -151,7 +151,7 @@ build_deps() -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" && + -DCMAKE_C_FLAGS="-fpic -O3 -g" -DCMAKE_CXX_FLAGS="-std=gnu++17 -fpic -O3 -g" && make -j $(($(nproc) + 1)) check_error mkdir -p "$DIRNAME/deps-$ARCH_OPTION/harfbuzz/include/harfbuzz" @@ -291,6 +291,13 @@ build_deps() cp -a -f "$DIRNAME/../lib/shaderc/"* "$DIRNAME/deps-$ARCH_OPTION/shaderc" cd "$DIRNAME/deps-$ARCH_OPTION/shaderc" + + if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/shaderc-deps.stamp" ]; then + ./utils/git-sync-deps + check_error + touch "$DIRNAME/deps-$ARCH_OPTION/shaderc-deps.stamp" + fi + cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \ -DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3" \ -DCMAKE_CXX_FLAGS="-fpic -O3" -DSHADERC_SKIP_INSTALL=1 \ diff --git a/cmake/Toolchain-cctools.cmake b/cmake/Toolchain-cctools.cmake index 7f6c430946c..0a1767242f9 100644 --- a/cmake/Toolchain-cctools.cmake +++ b/cmake/Toolchain-cctools.cmake @@ -1,7 +1,7 @@ # Usage: # cmake .. -DCCTOOLS_PREFIX=/path/to/cctools -DCCTOOLS_ARCH=arch -DCCTOOLS_PLATFORM=platform \ # -DRT=/path/to/cctools/darwin/libclang_rt.{ios, iossim, osx, tvos, tvossim}.a -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cctools.cmake -# Download precompiled cctools at https://github.com/supertuxkart/dependencies/releases/download/preview/cctools.tar.xz +# Download precompiled cctools at https://github.com/kimden/stk-dependencies/releases/download/preview/cctools.tar.xz # Compiled in Ubuntu 18.04 # the name of the target operating system @@ -46,3 +46,11 @@ set(USE_WIIUSE FALSE CACHE BOOL "") set(USE_SQLITE3 FALSE CACHE BOOL "") set(IOS TRUE CACHE BOOL "") endif() + +if(CCTOOLS_ARCH MATCHES "x86_64") + set(ISPC_ARCH "x86-64") +elseif(CCTOOLS_ARCH MATCHES "arm64") + set(ISPC_ARCH "aarch64") +else() + set(ISPC_ARCH unknown) +endif() diff --git a/cmake/Toolchain-ios-xcode.cmake b/cmake/Toolchain-ios-xcode.cmake index 25e52c030e6..f9b247616ef 100644 --- a/cmake/Toolchain-ios-xcode.cmake +++ b/cmake/Toolchain-ios-xcode.cmake @@ -111,8 +111,8 @@ set(USE_SQLITE3 FALSE CACHE BOOL "") set(USE_CRYPTO_OPENSSL FALSE CACHE BOOL "") set(IOS_LAUNCHSCREEN ${DEPS_PATH}/ios-icon/launch_screen.storyboard) set(IOS_IMAGES_XCASSETS ${DEPS_PATH}/ios-icon/Images.xcassets) -set(SDK_NAME_VERSION_FLAGS "-miphoneos-version-min=9.0") -set(CMAKE_OSX_DEPLOYMENT_TARGET 9.0 CACHE STRING "Set CMake deployment target" FORCE) +set(SDK_NAME_VERSION_FLAGS "-miphoneos-version-min=10.0") +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Set CMake deployment target" FORCE) set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64") set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64") diff --git a/cmake/Toolchain-llvm-mingw.cmake b/cmake/Toolchain-llvm-mingw.cmake index 9fea7488fe1..cdd17b57dff 100644 --- a/cmake/Toolchain-llvm-mingw.cmake +++ b/cmake/Toolchain-llvm-mingw.cmake @@ -26,3 +26,14 @@ SET(CMAKE_FIND_ROOT_PATH ${LLVM_PREFIX}/generic-w64-mingw32 ${LLVM_PREFIX}/${LLV set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +if(LLVM_ARCH MATCHES "i686") + set(ISPC_ARCH x86) +elseif(LLVM_ARCH MATCHES "x86_64") + set(ISPC_ARCH "x86-64") +elseif(LLVM_ARCH MATCHES "armv7") + # ISPC doesn't support armv7 windows + set(ISPC_ARCH unknown) +else() + set(ISPC_ARCH ${LLVM_ARCH}) +endif() diff --git a/cmake/Toolchain-mingw-64bit.cmake b/cmake/Toolchain-mingw-64bit.cmake index c0be9b5ed49..9248a2a7896 100644 --- a/cmake/Toolchain-mingw-64bit.cmake +++ b/cmake/Toolchain-mingw-64bit.cmake @@ -13,7 +13,7 @@ SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) execute_process(COMMAND sh -c "ls /usr/lib/gcc/x86_64-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER) # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-x86_64) +SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/x86_64-w64-mingw32/lib /usr/lib/gcc/x86_64-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-x86_64) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search @@ -21,3 +21,5 @@ SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(ISPC_ARCH "x86-64") diff --git a/cmake/Toolchain-mingw.cmake b/cmake/Toolchain-mingw.cmake index 6184ba7e1ed..1d464ea6924 100644 --- a/cmake/Toolchain-mingw.cmake +++ b/cmake/Toolchain-mingw.cmake @@ -13,7 +13,7 @@ SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) execute_process(COMMAND sh -c "ls /usr/lib/gcc/i686-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER) # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-i686) +SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/i686-w64-mingw32/lib /usr/lib/gcc/i686-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies-win-i686) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search @@ -21,3 +21,5 @@ SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/${M set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(ISPC_ARCH "x86") diff --git a/data/CREDITS b/data/CREDITS index 5ac49789115..18de01cdbf0 100644 --- a/data/CREDITS +++ b/data/CREDITS @@ -14,15 +14,6 @@ Former project leader - A lot of bugfixes and enhancements - Windows packaging -= Marianne Gagnon (Auria) = - -Developer -- Former lead programmer -- Mac OS X Packager -- Among too many things to list: -- GUI engine and user interface -- A lot of bugfixes and enhancements - = Benau = Lead developer, modeller & animator @@ -31,15 +22,18 @@ Lead developer, modeller & animator - A lot of networking code - Other graphical improvements to karts and tracks -= Dawid Gan (deveee) = += Marianne Gagnon (Auria) = Developer -- Android port -- General improvements and many many bugfixes +- Former lead programmer +- Mac OS X Packager +- Among too many things to list: +- GUI engine and user interface +- A lot of bugfixes and enhancements = Jean-Manuel Clémençon (Samuncle) = -Lead graphical artist +Former lead graphical artist - Art work: - Cocoa temple, Grand Paradiso Island, Old Mine - Ravenbridge Mansion, Hacienda, Fort Magma, XR591 @@ -54,31 +48,49 @@ Lead developer - AI improvements - General improvements and bugfixes += Dawid Gan (deveee) = + +Developer +- Android port +- General improvements and many many bugfixes + += CodingJellyfish = + +Developer +- Many UI tweaks and improvements +- Shader fixes and improvements + = Online = Add-ons website - Daniel Butum (leyyin) - Stephen Just - = Additional Programming = Significant bug fixes & misc. contributions for 1.0 and 1.1 - Ben Krajancic - QwertyChouskie -- Dumaosen -- Luffah - Mrxx99 - Pelya - Riso +Significant bug fixes & misc. contributions for 1.2 to 1.5 +- QwertyChouskie +- Mary +- Luffah +- CodedOre +- Riso +- mrkubax10 +- Kimden + = Visual art = Tracks -- Sven Andreas Belting : Black Forest -- Mac_DMH : Minigolf -- Rubberduck : STK Enterprise -- Ponzino : Volcan Island +- Sven Andreas Belting : 'Black Forest' & Overworld improvements +- Mac_DMH : 'Minigolf' +- Rubberduck : 'STK Enterprise' +- Ponzino : 'Volcan Island' Tracks - Canis Lupus : Original 'Northern Resort' & 'Scotland' @@ -88,6 +100,7 @@ Tracks Tracks - Typhon306 : 'Ancient Colosseum Labyrinth', updated 'Battle Island' & 'Cave X' +- CrystalDaEvee: 'Oasis', 'Hole Drop' and 'XR-4R3N4' soccer fields Karts - JunglePenguin : Xue @@ -105,6 +118,10 @@ Karts Objects - GeekPenguinBR, TuxKartDriver : Models from Las Dunas Stadium +Semphris +- Item respawn animations, +- Improved spawn animations for the bubble gum shields and parachutes + Jymis - Karts and icons @@ -200,7 +217,7 @@ Packaging - hiker: Windows - Dawid Gan: Linux and Android packages -Testing for 1.0 and 1.1 +Testing for 1.0 to 1.5 - Alayan - deveee - Wuzzy @@ -216,23 +233,26 @@ Development Babies Software used - Irrlicht - Bullet +- SDL2 +- Blender - enet - curl -- freetype2 -- OpenAL + Software used +- OpenAL - ogg - vorbis - SheenBidi -- blender +- freetype2 - wiiuse -- harfbuzz Software used +- harfbuzz - sqlite - openssl - mcpp +- MojoAL = Previous contributors = diff --git a/data/SuperTuxKart-Info.plist b/data/SuperTuxKart-Info.plist index 97841eeb1b8..357ba8ddde8 100644 --- a/data/SuperTuxKart-Info.plist +++ b/data/SuperTuxKart-Info.plist @@ -25,7 +25,7 @@ CSResourcesFileMapped LSMinimumSystemVersion - 10.9 + 10.13 NSHighResolutionCapable diff --git a/data/commands.xml b/data/commands.xml new file mode 100644 index 00000000000..1fad48ca6c2 --- /dev/null +++ b/data/commands.xml @@ -0,0 +1,1299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/graphical_restrictions.xml b/data/graphical_restrictions.xml index 01b268b7e79..b3ade708cd8 100644 --- a/data/graphical_restrictions.xml +++ b/data/graphical_restrictions.xml @@ -34,8 +34,6 @@ - - diff --git a/data/gui/dialogs/android/multitouch_settings.stkgui b/data/gui/dialogs/android/multitouch_settings.stkgui index 91350dd1e75..9a3ed81cd72 100644 --- a/data/gui/dialogs/android/multitouch_settings.stkgui +++ b/data/gui/dialogs/android/multitouch_settings.stkgui @@ -1,6 +1,6 @@ -
+
diff --git a/data/gui/dialogs/custom_camera_settings.stkgui b/data/gui/dialogs/custom_camera_settings.stkgui index e0e12f1cbac..e8ea769967f 100644 --- a/data/gui/dialogs/custom_camera_settings.stkgui +++ b/data/gui/dialogs/custom_camera_settings.stkgui @@ -39,19 +39,21 @@ +
- +
-
+ \ No newline at end of file diff --git a/data/gui/dialogs/custom_video_settings.stkgui b/data/gui/dialogs/custom_video_settings.stkgui index 7986d810934..840890f479a 100644 --- a/data/gui/dialogs/custom_video_settings.stkgui +++ b/data/gui/dialogs/custom_video_settings.stkgui @@ -1,6 +1,6 @@ -
+
@@ -29,7 +29,7 @@
@@ -39,17 +39,17 @@
- + -
- + -
@@ -59,17 +59,17 @@
- + -
- + -
@@ -77,19 +77,19 @@
- +
- + -
- + -
@@ -97,19 +97,11 @@
- -
- - -
- -
- + -
@@ -117,11 +109,19 @@
- +
- + -
+ + + +
+ + +
@@ -156,7 +156,7 @@
@@ -164,14 +164,10 @@
- - -