OpenRCT2/scripts/setenv

73 lines
2.3 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env bash
set -e
2021-04-15 00:34:52 +02:00
# This sets up more environment variables using the existing environment
# It should be dot sourced into your environment
if [[ "$GITHUB_ACTIONS" != "true" ]]; then
export OPENRCT2_BUILD_SERVER=$(hostname)
Release v0.4.9 - Feature: [#20376] Add Ukrainian language. - Feature: [#20709] [Plugin] Plugins can now check metadata from all registered plugins. - Feature: [#21376] Add option to reload an object (for object developers). - Feature: [#21413, OpenSFX#19] Add log flume lift sound effect (when “chainlift” is enabled). - Feature: [#21455] Add option to control hidden scenery. - Feature: [objects#282] Added RCT1 beta terrains. - Improved: [#20093] Use new colours for guests’ clothing when they spawn. - Improved: [#21356] Resize the title bar when moving between displays with different scaling factors on Windows systems. - Improved: [#21388] Tooltips will now show even when an error message is present. - Improved: [#21423] Add mechanism to allow building partly underground. - Improved: [objects#272, objects#276, objects#277, objects#278, objects#279, objects#280, objects#281] Add most remaining ports of RCT1 ride and vehicle objects (for import only). - Improved: [objects#275, objects#284, objects#286] Add remaining RCT1 walls (for import only). - Change: [#21350] Group Dodgems and Flying Saucers vehicles. - Change: [#21453] Reintroduce lost RCT1 Jet skis colour presets to the boat hire. - Change: [objects#285] Mark old reversed train objects as compatibility objects. - Fix: [#17610] Some scenery items are unavailable in RCT1 scenarios. - Fix: [#18963] Research table in parks from Loopy Landscapes is imported incorrectly. - Fix: [#20164] Grass and Rock terrain objects cannot be de-selected. - Fix: [#20907] RCT1/AA scenarios use the 4-across train for the Inverted Roller Coaster. - Fix: [#21037] Map animations in the title sequence are stuck. - Fix: [#21208] Error message will stay open only for a brief moment when the game has been running a while. - Fix: [#21220] When creating a new park from a SC4 file, the localised park name is not applied. - Fix: [#21286] Cannot build unbanking turns with RCT1 vehicles. - Fix: [#21288] Text overlaps in the “About ‘OpenRCT2’” window for Arabic, Chinese, Japanese, Korean and Vietnamese. - Fix: [#21310] Some half loop elements require more clearance than their upward/downward counterparts. - Fix: [#21318] Virtual Floor for building scenery is not properly invalidated. - Fix: [#21330] Tooltips from dropdown widgets have the wrong position. - Fix: [#21332] Mini Helicopters and Monorail Cycles ride types are swapped in research within RCT1 scenarios. - Fix: [#21343] “Pause” and “Build Path” hotkeys do not work if top toolbar is hidden. - Fix: [#21347] Too many options are hidden if the platform has no file picker. - Fix: [#21350] Maze and Mini Golf track designs from RCT1 not shown in track designs list. - Fix: [#21425] Additional missing/misplaced land & construction rights tiles in Japanese Coastal Reclaim. - Fix: [#21484] Upkeep costs for some rides/facilities/shops are not calculated correctly. - Fix: [#21498] Crash when the size of text can’t be determined. - Fix: [objects#262, objects#263, objects#265, objects#266, objects#267, objects#268, objects#270, objects#271, objects#283] Various errors in expansion pack objects (original bug). - Fix: [OpenSFX#18] B&M Roar sound effect not looping correctly.
2024-03-02 21:26:41 +01:00
export OPENRCT2_VERSION=0.4.9
GITHUB_REF=$(git rev-parse --symbolic-full-name HEAD)
GITHUB_SHA=$(git rev-parse HEAD)
fi
echo -e "\033[0;36mSetting up environment for OpenRCT2...\033[0m"
# Get the build number (number of commits since last tag)
get_build_number()
{
local pattern='.+-([0-9]+)-.+'
[[ $OPENRCT2_DESCRIBE =~ $pattern ]]
echo "${BASH_REMATCH[1]}"
}
export OPENRCT2_BUILD=$(get_build_number)
# Get the name of the branch and decide whether we should push the build to openrct2.org
unset OPENRCT2_TAG
unset OPENRCT2_PUSH
if [[ $GITHUB_REF == refs/tags/* ]]; then
unset OPENRCT2_BRANCH
export OPENRCT2_TAG=true
export OPENRCT2_PUSH=true
else
export OPENRCT2_BRANCH=${GITHUB_REF#refs/heads/}
if [[ "$OPENRCT2_BRANCH" =~ ^(develop|push/) ]]; then
export OPENRCT2_PUSH=true
fi
fi
if [[ -z "$OPENRCT2_ORG_TOKEN" ]]; then
unset OPENRCT2_PUSH
fi
# Get the short SHA1
export OPENRCT2_SHA1=$GITHUB_SHA
2022-03-11 12:31:07 +01:00
export OPENRCT2_SHA1_SHORT=${OPENRCT2_SHA1::7}
unset OPENRCT2_VERSION_EXTRA
if [[ "$OPENRCT2_TAG" != "true" ]]; then
export OPENRCT2_VERSION_EXTRA=$OPENRCT2_BRANCH-$OPENRCT2_SHA1_SHORT
fi
# Add scripts directory to PATH
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$(pwd)/${1#./}"
}
scriptsdir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
export PATH="$scriptsdir:$PATH"
2021-02-10 22:35:04 +01:00
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# Output all the variables
if [[ "$1" != "-q" ]]; then
echo "----------------------------------------------"
echo "OPENRCT2_BUILD_SERVER: $OPENRCT2_BUILD_SERVER"
echo "OPENRCT2_TAG: $OPENRCT2_TAG"
echo "OPENRCT2_BRANCH: $OPENRCT2_BRANCH"
echo "OPENRCT2_VERSION: $OPENRCT2_VERSION"
echo "OPENRCT2_VERSION_EXTRA: $OPENRCT2_VERSION_EXTRA"
echo "OPENRCT2_BUILD: $OPENRCT2_BUILD"
echo "OPENRCT2_DESCRIBE: $OPENRCT2_DESCRIBE"
echo "OPENRCT2_PUSH: $OPENRCT2_PUSH"
echo "OPENRCT2_SHA1: $OPENRCT2_SHA1"
echo "OPENRCT2_SHA1_SHORT: $OPENRCT2_SHA1_SHORT"
echo "----------------------------------------------"
fi