-
Notifications
You must be signed in to change notification settings - Fork 18
NAM 50 release preparation #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6b4373d
Merge pull request #457 from NAMTeam/staging
TarkusSC4 35b6193
remove gitlocalize references from readmes
jflann 91c6193
Merge pull request #502 from NAMTeam/staging
TarkusSC4 1443af9
Merge pull request #503 from NAMTeam/staging
TarkusSC4 4c97c3d
remove low-RAM variants of the controller
memo33 c1c3160
add script for building NAM 50 jar installer
memo33 04a547a
Merge branch 'staging' into nam50-prep
memo33 1864267
add read-first document from NAM 49
memo33 0aac4c7
embed namdoc.css and readmebanner.svg in read-first html
memo33 ef5be67
revisions of read-first document for NAM 50
memo33 349bc5b
incorporate feedback for read-first document
memo33 c76b06f
Merge branch 'staging' into nam50-prep
memo33 b98a063
Merge remote-tracking branch 'origin/master' into nam50-prep
memo33 e39c962
update changelog for build 7
memo33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| #!/bin/bash | ||
| # Builds a release-ready jar installer, taking as input: | ||
| # --version <version> (preferably no spaces) | ||
| # --data <installation-dir> (path to dat files) | ||
| # --sidebar <png> (installer sidebar image file) | ||
| # --splash <jpg> (installer splash image file) | ||
| # --output <dir> (optional output folder, defaults to `target/installer`) | ||
| # | ||
| # Example: | ||
| # ./src/scripts/build-installer-jar.sh --version 50.rc1 --data "installation" --sidebar "sidebar.png" --splash "splash.jpg" | ||
|
|
||
| set -e | ||
|
|
||
| if [ ! -e "Controller" ] | ||
| then | ||
| echo "Error: Call this script from the root directory of the Network-Addon-Mod repository." | ||
| exit 2 | ||
| fi | ||
|
|
||
| # Initialize variables | ||
| version="" | ||
| data_dir="" | ||
| sidebar_image="" | ||
| splash_image="" | ||
| license_file="src/scripts/installer-resources/license.txt" | ||
| settings_file="src/scripts/installer-resources/settings.txt" | ||
| output_dir="" | ||
|
|
||
| # Function to display usage | ||
| usage() { | ||
| echo "Usage: $(basename "$0") --version <version> --data <installation-dir> --sidebar <png> --splash <jpg> [--output <dir>]" | ||
| exit 2 | ||
| } | ||
|
|
||
| # Parse arguments | ||
| while [[ $# -gt 0 ]]; do | ||
| case "$1" in | ||
| --version|--data|--sidebar|--splash|--output) | ||
| option_name="$1" | ||
| shift | ||
| if [[ -z "$1" ]]; then | ||
| echo "Error: $1 requires a value" | ||
| usage | ||
| fi | ||
| case "$option_name" in | ||
| --version) version="$1" ;; | ||
| --data) data_dir="$1" ;; | ||
| --sidebar) sidebar_image="$1" ;; | ||
| --splash) splash_image="$1" ;; | ||
| --output) output_dir="$1" ;; | ||
| esac | ||
| shift | ||
| ;; | ||
| *) | ||
| echo "Unknown argument: $1" | ||
| usage | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| # Check for missing mandatory arguments | ||
| if [[ -z "$version" || -z "$data_dir" || -z "$sidebar_image" || -z "$splash_image" ]]; then | ||
| echo "Error: Missing required arguments." | ||
| usage | ||
| fi | ||
|
|
||
| if [[ "$sidebar_image" != *.png || "$splash_image" != *.jpg ]] | ||
| then | ||
| echo "Error: sidebar image should be png, splash image jpg: $sidebar_image, $splash_image" | ||
| exit 2 | ||
| fi | ||
|
|
||
| check_exists() { | ||
| if [ ! -e "$1" ] | ||
| then | ||
| echo "Error: file/directory does not exist: $1" | ||
| exit 2 | ||
| fi | ||
| } | ||
|
|
||
| # Check existence of files | ||
| for f in "$data_dir" "$sidebar_image" "$splash_image" "$license_file" "$settings_file" | ||
| do | ||
| check_exists "$f" | ||
| done | ||
|
|
||
| if [[ -z "$output_dir" ]]; then | ||
| output_dir="target/installer" | ||
| fi | ||
|
|
||
| INSTALLER_URL="https://github.com/NAMTeam/nam-installer/releases/download/47.0.4/NAM-installer-version47.0.4.jar" | ||
| INSTALLER_ARCHIVE="target/NAM-installer-version47.0.4.jar" | ||
|
|
||
| if [ ! -e "$INSTALLER_ARCHIVE" ] | ||
| then | ||
| # download installer if it does not yet exist | ||
| curl -L --output "$INSTALLER_ARCHIVE" "$INSTALLER_URL" | ||
| fi | ||
| echo "a447a06a759dccf13bbb6fce2657317a326035419dab74029e395a11a99cc8b6 $INSTALLER_ARCHIVE" | sha256sum --check | ||
|
|
||
| TEMP="target/installer/temp" | ||
| rm -rf "$TEMP" | ||
| mkdir -p "$TEMP" | ||
| unzip -q -d "$TEMP/jar" "$INSTALLER_ARCHIVE" | ||
| rm -rf "$TEMP/jar/installation" | ||
|
|
||
| cp "$splash_image" "$TEMP/jar/splash.jpg" | ||
| cp "$sidebar_image" "$TEMP/jar/sidebar.png" | ||
| sed "s/__NAMVERSION__/$version/g" "$license_file" > "$TEMP/jar/license.txt" | ||
| sed "s/__NAMVERSION__/$version/g" "$settings_file" > "$TEMP/jar/settings.txt" | ||
|
|
||
| mkdir -p "$output_dir" | ||
| out_jar="$output_dir/NetworkAddonMod_Setup_Version$version.jar" | ||
| jar cfm "$out_jar" "$TEMP/jar/META-INF/MANIFEST.MF" -C "$TEMP/jar" . | ||
| # add dat files to jar (without copying them into the TEMP folder as intermediate step) | ||
| ln -s "$(realpath "$data_dir")" "$TEMP/installation" | ||
| jar uf "$out_jar" -C "$TEMP" "installation" | ||
|
|
||
| rm -rf "$TEMP" | ||
| echo "Jar installer has been created: $out_jar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| Welcome to the ${appname} installer application! | ||
|
|
||
| Please read the following carefully, then select "I agree with these conditions" to continue. | ||
|
|
||
| --------------------------------------------------------------------------------------------- | ||
|
|
||
| Network Addon Mod is compatible with the following versions of SimCity 4.exe: | ||
|
|
||
| 1.1.641 | ||
|
|
||
| The following versions are unsupported: | ||
|
|
||
| 1.1.640, 1.1.638, 1.1.613, 1.1.610, and all macOS versions | ||
|
|
||
| See the read-first-nam-__NAMVERSION__.html document for more details. | ||
|
|
||
| --------------------------------------------------------------------------------------------- | ||
|
|
||
| Please observe the following instructions when installing or upgrading the NAM: | ||
|
|
||
| - Manually copy the NAM.dll into the root of your Plugins folder. | ||
|
|
||
| - If upgrading, remove the previous installation in its entirety before running the installer. | ||
|
|
||
| Previous versions are not removed automatically and may conflict with this version. | ||
|
|
||
| - Consider applying the 4GB Patch to SimCity 4.exe if you have not already done so (recommended, but optional). | ||
|
|
||
| --------------------------------------------------------------------------------------------- | ||
|
|
||
| Users download, install, and run this software completely and solely at their own risk. | ||
| Maxis, Electronic Arts, the creators, and its individual contributors are not responsible for | ||
| any errors, crashes, problems, or any other issue that you may have if you have downloaded and | ||
| applied this software to your game. The use of this software, the information within, and the | ||
| Network Addon Mod is conditional upon the acceptance of this disclaimer and all that is within | ||
| this software. | ||
|
|
||
| --------------------------------------------------------------------------------------------- |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.