diff --git a/BuildFiles/Linux/SS14.Launcher b/BuildFiles/Linux/SS14.Launcher new file mode 100755 index 0000000000..96d0722021 --- /dev/null +++ b/BuildFiles/Linux/SS14.Launcher @@ -0,0 +1,5 @@ +#!/bin/bash + +cd "$(dirname "$0")" + +exec mono bin/SS14.Launcher.exe diff --git a/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Info.plist b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Info.plist new file mode 100644 index 0000000000..d5e34b0787 --- /dev/null +++ b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleName + SS14L + CFBundleDisplayName + Space Station 14 Launcher + CFBundleExecutable + SS14 + + CFBundleIconFile + ss14 + + diff --git a/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/MacOS/SS14 b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/MacOS/SS14 new file mode 100755 index 0000000000..57abef5dc5 --- /dev/null +++ b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/MacOS/SS14 @@ -0,0 +1,8 @@ +#!/bin/sh + +# cd to file containing script or something? +BASEDIR=$(dirname "$0") +echo "$BASEDIR" +cd "$BASEDIR" + +exec /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono ../Resources/SS14.Launcher.exe diff --git a/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Resources/ss14.icns b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Resources/ss14.icns new file mode 100644 index 0000000000..ea22dc64c7 Binary files /dev/null and b/BuildFiles/Mac/Space Station 14 Launcher.app/Contents/Resources/ss14.icns differ diff --git a/BuildFiles/Windows/launch.bat b/BuildFiles/Windows/launch.bat deleted file mode 100644 index 12fea13879..0000000000 --- a/BuildFiles/Windows/launch.bat +++ /dev/null @@ -1 +0,0 @@ -call Godot\godot.windows.tools.64.mono.exe --path SS14.Client.Godot diff --git a/BuildFiles/Windows/run_me.bat b/BuildFiles/Windows/run_me.bat new file mode 100644 index 0000000000..83d3eb16b1 --- /dev/null +++ b/BuildFiles/Windows/run_me.bat @@ -0,0 +1 @@ +call bin/SS14.Launcher.exe diff --git a/Tools/package_release_build.py b/Tools/package_release_build.py index 560d8980c0..e73c9e7cbc 100755 --- a/Tools/package_release_build.py +++ b/Tools/package_release_build.py @@ -44,8 +44,12 @@ SERVER_IGNORED_RESOURCES = { "Shaders", } +LAUNCHER_RESOURCES = { + "Nano", + "Fonts", +} + def main(): - global GODOT parser = argparse.ArgumentParser( description="Packages the SS14 content repo for release on all platforms.") parser.add_argument("--platform", @@ -72,7 +76,7 @@ def main(): build_windows() if "linux" in platforms: - wipe_bin() + #wipe_bin() build_linux() if "mac" in platforms: @@ -125,6 +129,15 @@ def build_windows(): copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True) server_zip.close() + print(Fore.GREEN + "Packaging Windows x64 launcher..." + Style.RESET_ALL) + launcher_zip = zipfile.ZipFile(p("release", "SS14.Launcher_Windows_x64.zip"), "w", + compression=zipfile.ZIP_DEFLATED) + + copy_dir_into_zip(p("bin", "SS14.Launcher"), "bin", launcher_zip) + copy_launcher_resources(p("bin", "Resources"), launcher_zip) + launcher_zip.write(p("BuildFiles", "Windows", "run_me.bat"), "run_me.bat") + launcher_zip.close() + def build_macos(): print(Fore.GREEN + "Building project for macOS x64..." + Style.RESET_ALL) @@ -161,6 +174,17 @@ def build_macos(): copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True) server_zip.close() + print(Fore.GREEN + "Packaging macOS x64 launcher..." + Style.RESET_ALL) + launcher_zip = zipfile.ZipFile(p("release", "SS14.Launcher_macOS_x64.zip"), "w", + compression=zipfile.ZIP_DEFLATED) + + contents = p("Space Station 14 Launcher.app", "Contents", "Resources") + copy_dir_into_zip(p("BuildFiles", "Mac", "Space Station 14 Launcher.app"), "Space Station 14 Launcher.app", launcher_zip) + copy_dir_into_zip(p("bin", "SS14.Launcher"), contents, launcher_zip) + + copy_launcher_resources(p(contents, "Resources"), launcher_zip) + launcher_zip.close() + def build_linux(): # Run a full build. @@ -197,21 +221,37 @@ def build_linux(): copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True) server_zip.close() + print(Fore.GREEN + "Packaging Linux x64 launcher..." + Style.RESET_ALL) + launcher_zip = zipfile.ZipFile(p("release", "SS14.Launcher_Linux_x64.zip"), "w", + compression=zipfile.ZIP_DEFLATED) + + copy_dir_into_zip(p("bin", "SS14.Launcher"), "bin", launcher_zip) + copy_launcher_resources(p("bin", "Resources"), launcher_zip) + launcher_zip.write(p("BuildFiles", "Linux", "SS14.Launcher"), "SS14.Launcher") + launcher_zip.close() def copy_resources(target, zipf, server): # Content repo goes FIRST so that it won't override engine files as that's forbidden. - do_resource_copy(target, "Resources", zipf, server) - do_resource_copy(target, p("RobustToolbox", "Resources"), zipf, server) + ignore_set = SHARED_IGNORED_RESOURCES + if server: + ignore_set = ignore_set.union(SERVER_IGNORED_RESOURCES) + else: + ignore_set = ignore_set.union(CLIENT_IGNORED_RESOURCES) + + do_resource_copy(target, "Resources", zipf, ignore_set) + do_resource_copy(target, p("RobustToolbox", "Resources"), zipf, ignore_set) -def do_resource_copy(target, source, zipf, server): +def copy_launcher_resources(target, zipf): + # Copy all engine resources, since those are stripped down enough now. + do_resource_copy(target, p("RobustToolbox", "Resources"), zipf, SHARED_IGNORED_RESOURCES) + for folder in LAUNCHER_RESOURCES: + copy_dir_into_zip(p("Resources", folder), p(target, folder), zipf) + + +def do_resource_copy(target, source, zipf, ignore_set): for filename in os.listdir(source): - if filename in SHARED_IGNORED_RESOURCES \ - or filename in (SERVER_IGNORED_RESOURCES if server else CLIENT_IGNORED_RESOURCES): - continue - - # Get rid of Godot .import files, thanks. - if filename.endswith(".import"): + if filename in ignore_set: continue path = p(source, filename)