Let's pray it all works
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2019
|
||||||
|
|
||||||
platform: x64
|
platform: x64
|
||||||
configuration: Debug
|
configuration: Debug
|
||||||
@@ -12,10 +12,9 @@ build:
|
|||||||
before_build:
|
before_build:
|
||||||
- cmd: py -3 -m pip install --user requests
|
- cmd: py -3 -m pip install --user requests
|
||||||
- cmd: py -3 RUN_THIS.py --no-prompt
|
- cmd: py -3 RUN_THIS.py --no-prompt
|
||||||
- cmd: nuget restore SpaceStation14.sln
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- ps: msbuild SpaceStation14.sln /v:m /nologo /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Platform=x64 /p:Configuration=Debug /p:AppVeyor=yes
|
- ps: dotnet build SpaceStation14.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:AppVeyor=yes
|
||||||
|
|
||||||
test:
|
test:
|
||||||
assemblies:
|
assemblies:
|
||||||
|
|||||||
10
.travis.yml
10
.travis.yml
@@ -2,6 +2,8 @@ language: csharp
|
|||||||
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: false
|
sudo: false
|
||||||
|
mono: none
|
||||||
|
# dotnet: 3.1.100 # Travis is shitting itself right now and it can't locate .NET Core packages.
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
@@ -20,7 +22,9 @@ cache:
|
|||||||
directories:
|
directories:
|
||||||
- packages/
|
- packages/
|
||||||
- RobustToolbox/Dependencies/
|
- RobustToolbox/Dependencies/
|
||||||
- RobustToolbox/SS14.Client.Godot/.mono/assemblies/
|
|
||||||
|
install:
|
||||||
|
- curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 3.1.100
|
||||||
|
|
||||||
#before_install:
|
#before_install:
|
||||||
# - if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew upgrade python; fi
|
# - if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew upgrade python; fi
|
||||||
@@ -28,11 +32,9 @@ cache:
|
|||||||
before_script:
|
before_script:
|
||||||
#- "if [ $TRAVIS_OS_NAME = linux ]; then pyenv shell 3.6; fi"
|
#- "if [ $TRAVIS_OS_NAME = linux ]; then pyenv shell 3.6; fi"
|
||||||
- "python3.5 -m pip install --user requests"
|
- "python3.5 -m pip install --user requests"
|
||||||
- "nuget restore SpaceStation14.sln"
|
|
||||||
- "python3.5 RUN_THIS.py --no-prompt"
|
- "python3.5 RUN_THIS.py --no-prompt"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- "msbuild /p:Configuration=Debug /p:Platform=x64 /nologo /m SpaceStation14.sln /p:Python=python3.5"
|
- "Tools/run_travis.sh"
|
||||||
- "mono packages/nunit.consolerunner/3.10.0/tools/nunit3-console.exe bin/Content.Tests/Content.Tests.dll bin/Content.IntegrationTests/Content.IntegrationTests.dll"
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
exec mono bin/SS14.Launcher.exe
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>SS14L</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>Space Station 14 Launcher</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>SS14</string>
|
|
||||||
<!--
|
|
||||||
Just a note about this icon.
|
|
||||||
MacOS seems REALLY iffy about this and even when the file is correct,
|
|
||||||
it can take forever before it decides to actually update it and display it.
|
|
||||||
TL;DR Apple is stupid.
|
|
||||||
-->
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>ss14</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/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
|
|
||||||
Binary file not shown.
@@ -5,4 +5,4 @@ BASEDIR=$(dirname "$0")
|
|||||||
echo "$BASEDIR"
|
echo "$BASEDIR"
|
||||||
cd "$BASEDIR"
|
cd "$BASEDIR"
|
||||||
|
|
||||||
exec /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono ../Resources/Robust.Client.exe
|
exec ../Resources/Robust.Client "$@"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
call bin\SS14.Launcher.exe
|
|
||||||
@@ -29,7 +29,4 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
|
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Reference Condition="'$(UseNetCore)' != 'true'" Include="System.Net.Http" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -5,7 +5,6 @@ pipeline {
|
|||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps {
|
steps {
|
||||||
sh 'git submodule update --init --recursive'
|
sh 'git submodule update --init --recursive'
|
||||||
sh 'TMP=~/.cache/NuGet/ nuget restore'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
|||||||
Submodule RobustToolbox updated: f6b894f274...58dcea5bda
@@ -18,10 +18,6 @@
|
|||||||
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
|
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
|
||||||
<ProjectReference Include="..\RobustToolbox\Robust.Lite\Robust.Lite.csproj" />
|
<ProjectReference Include="..\RobustToolbox\Robust.Lite\Robust.Lite.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Reference Condition="'$(UseNetCore)' != 'true'" Include="System.IO.Compression" />
|
|
||||||
<Reference Condition="'$(UseNetCore)' != 'true'" Include="System.Net.Http" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="..\RobustToolbox\MSBuild\Robust.Engine.targets" />
|
<Import Project="..\RobustToolbox\MSBuild\Robust.Engine.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RobustToolsPath>..\RobustToolbox\Tools\</RobustToolsPath>
|
<RobustToolsPath>..\RobustToolbox\Tools\</RobustToolsPath>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import sys
|
|||||||
import zipfile
|
import zipfile
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
from typing import List, Optional
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from colorama import init, Fore, Style
|
from colorama import init, Fore, Style
|
||||||
init()
|
init()
|
||||||
@@ -21,8 +23,13 @@ except ImportError:
|
|||||||
Fore = ColorDummy()
|
Fore = ColorDummy()
|
||||||
Style = ColorDummy()
|
Style = ColorDummy()
|
||||||
|
|
||||||
|
|
||||||
p = os.path.join
|
p = os.path.join
|
||||||
|
|
||||||
|
PLATFORM_WINDOWS = "windows"
|
||||||
|
PLATFORM_LINUX = "linux"
|
||||||
|
PLATFORM_MACOS = "mac"
|
||||||
|
|
||||||
SHARED_IGNORED_RESOURCES = {
|
SHARED_IGNORED_RESOURCES = {
|
||||||
"ss13model.7z",
|
"ss13model.7z",
|
||||||
"ResourcePack.zip",
|
"ResourcePack.zip",
|
||||||
@@ -49,23 +56,37 @@ LAUNCHER_RESOURCES = {
|
|||||||
"Fonts",
|
"Fonts",
|
||||||
}
|
}
|
||||||
|
|
||||||
def main():
|
WINDOWS_NATIVES = {
|
||||||
|
"freetype6.dll",
|
||||||
|
"openal32.dll",
|
||||||
|
"swnfd.dll",
|
||||||
|
"glfw3.dll"
|
||||||
|
}
|
||||||
|
|
||||||
|
LINUX_NATIVES = {
|
||||||
|
"libglfw.so.3",
|
||||||
|
"libswnfd.so"
|
||||||
|
}
|
||||||
|
|
||||||
|
MAC_NATIVES = {
|
||||||
|
"libglfw.3.dylib",
|
||||||
|
"libswnfd.dylib"
|
||||||
|
}
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Packages the SS14 content repo for release on all platforms.")
|
description="Packages the SS14 content repo for release on all platforms.")
|
||||||
parser.add_argument("--platform",
|
parser.add_argument("--platform",
|
||||||
"-p",
|
"-p",
|
||||||
action="store",
|
action="store",
|
||||||
choices=["windows", "mac", "linux"],
|
choices=[PLATFORM_WINDOWS, PLATFORM_MACOS, PLATFORM_LINUX],
|
||||||
nargs="*",
|
nargs="*",
|
||||||
help="Which platform to build for. If not provided, all platforms will be built")
|
help="Which platform to build for. If not provided, all platforms will be built")
|
||||||
|
|
||||||
parser.add_argument("--core", action="store_true", help="Build with .NET Core instead.")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
platforms = args.platform
|
platforms = args.platform
|
||||||
core = args.core
|
|
||||||
if not platforms:
|
if not platforms:
|
||||||
platforms = ["windows", "mac", "linux"]
|
platforms = [PLATFORM_WINDOWS, PLATFORM_MACOS, PLATFORM_LINUX]
|
||||||
|
|
||||||
if os.path.exists("release"):
|
if os.path.exists("release"):
|
||||||
print(Fore.BLUE + Style.DIM +
|
print(Fore.BLUE + Style.DIM +
|
||||||
@@ -74,17 +95,17 @@ def main():
|
|||||||
|
|
||||||
os.mkdir("release")
|
os.mkdir("release")
|
||||||
|
|
||||||
if "windows" in platforms:
|
if PLATFORM_WINDOWS in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_windows(core)
|
build_windows()
|
||||||
|
|
||||||
if "linux" in platforms:
|
if PLATFORM_LINUX in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_linux(core)
|
build_linux()
|
||||||
|
|
||||||
if "mac" in platforms:
|
if PLATFORM_MACOS in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_macos(core)
|
build_macos()
|
||||||
|
|
||||||
|
|
||||||
def wipe_bin():
|
def wipe_bin():
|
||||||
@@ -97,25 +118,23 @@ def wipe_bin():
|
|||||||
shutil.rmtree("bin")
|
shutil.rmtree("bin")
|
||||||
|
|
||||||
|
|
||||||
def build_windows(core): # type: (bool) -> None
|
def build_windows(): # type: () -> None
|
||||||
# Run a full build.
|
# Run a full build.
|
||||||
print(Fore.GREEN + "Building project for Windows x64..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Building project for Windows x64..." + Style.RESET_ALL)
|
||||||
command = ["msbuild",
|
|
||||||
|
subprocess.run([
|
||||||
|
"dotnet",
|
||||||
|
"build",
|
||||||
"SpaceStation14.sln",
|
"SpaceStation14.sln",
|
||||||
"/m",
|
"-c", "Release",
|
||||||
"/p:Configuration=Release",
|
"--nologo",
|
||||||
"/p:Platform=x64",
|
|
||||||
"/nologo",
|
|
||||||
"/v:m",
|
"/v:m",
|
||||||
"/p:TargetOS=Windows",
|
"/p:TargetOS=Windows",
|
||||||
"/t:Rebuild",
|
"/t:Rebuild",
|
||||||
"/p:FullRelease=True"
|
"/p:FullRelease=True"
|
||||||
]
|
], check=True)
|
||||||
|
|
||||||
if core:
|
publish_client_server("win-x64", "Windows")
|
||||||
command = ["dotnet"] + command + ["/p:UseNetCore=true"]
|
|
||||||
|
|
||||||
subprocess.run(command, check=True)
|
|
||||||
|
|
||||||
print(Fore.GREEN + "Packaging Windows x64 client..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging Windows x64 client..." + Style.RESET_ALL)
|
||||||
|
|
||||||
@@ -123,7 +142,8 @@ def build_windows(core): # type: (bool) -> None
|
|||||||
p("release", "SS14.Client_Windows_x64.zip"), "w",
|
p("release", "SS14.Client_Windows_x64.zip"), "w",
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
compression=zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Client"), "", client_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Client", "win-x64", "publish"), "", client_zip)
|
||||||
|
copy_client_natives(WINDOWS_NATIVES, client_zip, "")
|
||||||
copy_resources("Resources", client_zip, server=False)
|
copy_resources("Resources", client_zip, server=False)
|
||||||
copy_content_assemblies(p("Resources", "Assemblies"), client_zip, server=False)
|
copy_content_assemblies(p("Resources", "Assemblies"), client_zip, server=False)
|
||||||
# Cool we're done.
|
# Cool we're done.
|
||||||
@@ -132,39 +152,27 @@ def build_windows(core): # type: (bool) -> None
|
|||||||
print(Fore.GREEN + "Packaging Windows x64 server..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging Windows x64 server..." + Style.RESET_ALL)
|
||||||
server_zip = zipfile.ZipFile(p("release", "SS14.Server_Windows_x64.zip"), "w",
|
server_zip = zipfile.ZipFile(p("release", "SS14.Server_Windows_x64.zip"), "w",
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
compression=zipfile.ZIP_DEFLATED)
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Server"), "", server_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Server", "win-x64", "publish"), "", server_zip)
|
||||||
copy_resources(p("Resources"), server_zip, server=True)
|
copy_resources(p("Resources"), server_zip, server=True)
|
||||||
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
||||||
server_zip.close()
|
server_zip.close()
|
||||||
|
|
||||||
print(Fore.GREEN + "Packaging Windows x64 launcher..." + Style.RESET_ALL)
|
def build_macos() -> None:
|
||||||
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(core): # type: (bool) -> None
|
|
||||||
print(Fore.GREEN + "Building project for macOS x64..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Building project for macOS x64..." + Style.RESET_ALL)
|
||||||
command = ["msbuild",
|
|
||||||
|
subprocess.run([
|
||||||
|
"dotnet",
|
||||||
|
"build",
|
||||||
"SpaceStation14.sln",
|
"SpaceStation14.sln",
|
||||||
"/m",
|
"-c", "Release",
|
||||||
"/p:Configuration=Release",
|
"--nologo",
|
||||||
"/p:Platform=x64",
|
|
||||||
"/nologo",
|
|
||||||
"/v:m",
|
"/v:m",
|
||||||
"/p:TargetOS=MacOS",
|
"/p:TargetOS=MacOS",
|
||||||
"/t:Rebuild",
|
"/t:Rebuild",
|
||||||
"/p:FullRelease=True"
|
"/p:FullRelease=True"
|
||||||
]
|
], check=True)
|
||||||
|
|
||||||
if core:
|
publish_client_server("osx-x64", "MacOS")
|
||||||
command = ["dotnet"] + command + ["/p:UseNetCore=true"]
|
|
||||||
|
|
||||||
subprocess.run(command, check=True)
|
|
||||||
|
|
||||||
print(Fore.GREEN + "Packaging macOS x64 client..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging macOS x64 client..." + Style.RESET_ALL)
|
||||||
# Client has to go in an app bundle.
|
# Client has to go in an app bundle.
|
||||||
@@ -173,8 +181,8 @@ def build_macos(core): # type: (bool) -> None
|
|||||||
|
|
||||||
contents = p("Space Station 14.app", "Contents", "Resources")
|
contents = p("Space Station 14.app", "Contents", "Resources")
|
||||||
copy_dir_into_zip(p("BuildFiles", "Mac", "Space Station 14.app"), "Space Station 14.app", client_zip)
|
copy_dir_into_zip(p("BuildFiles", "Mac", "Space Station 14.app"), "Space Station 14.app", client_zip)
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Client"), contents, client_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Client", "osx-x64", "publish"), contents, client_zip)
|
||||||
|
copy_client_natives(MAC_NATIVES, client_zip, contents)
|
||||||
copy_resources(p(contents, "Resources"), client_zip, server=False)
|
copy_resources(p(contents, "Resources"), client_zip, server=False)
|
||||||
copy_content_assemblies(p(contents, "Resources", "Assemblies"), client_zip, server=False)
|
copy_content_assemblies(p(contents, "Resources", "Assemblies"), client_zip, server=False)
|
||||||
client_zip.close()
|
client_zip.close()
|
||||||
@@ -182,42 +190,29 @@ def build_macos(core): # type: (bool) -> None
|
|||||||
print(Fore.GREEN + "Packaging macOS x64 server..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging macOS x64 server..." + Style.RESET_ALL)
|
||||||
server_zip = zipfile.ZipFile(p("release", "SS14.Server_macOS_x64.zip"), "w",
|
server_zip = zipfile.ZipFile(p("release", "SS14.Server_macOS_x64.zip"), "w",
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
compression=zipfile.ZIP_DEFLATED)
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Server"), "", server_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Server", "osx-x64", "publish"), "", server_zip)
|
||||||
copy_resources(p("Resources"), server_zip, server=True)
|
copy_resources(p("Resources"), server_zip, server=True)
|
||||||
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
||||||
server_zip.close()
|
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")
|
def build_linux() -> None:
|
||||||
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(core): # type: (bool) -> None
|
|
||||||
# Run a full build.
|
# Run a full build.
|
||||||
print(Fore.GREEN + "Building project for Linux x64..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Building project for Linux x64..." + Style.RESET_ALL)
|
||||||
command = ["msbuild",
|
|
||||||
|
subprocess.run([
|
||||||
|
"dotnet",
|
||||||
|
"build",
|
||||||
"SpaceStation14.sln",
|
"SpaceStation14.sln",
|
||||||
"/m",
|
"-c", "Release",
|
||||||
"/p:Configuration=Release",
|
"--nologo",
|
||||||
"/p:Platform=x64",
|
|
||||||
"/nologo",
|
|
||||||
"/v:m",
|
"/v:m",
|
||||||
"/p:TargetOS=Linux",
|
"/p:TargetOS=Linux",
|
||||||
"/t:Rebuild",
|
"/t:Rebuild",
|
||||||
"/p:FullRelease=True"
|
"/p:FullRelease=True"
|
||||||
]
|
], check=True)
|
||||||
|
|
||||||
if core:
|
publish_client_server("linux-x64", "Linux")
|
||||||
command = ["dotnet"] + command + ["/p:UseNetCore=true"]
|
|
||||||
|
|
||||||
subprocess.run(command, check=True)
|
|
||||||
|
|
||||||
print(Fore.GREEN + "Packaging Linux x64 client..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging Linux x64 client..." + Style.RESET_ALL)
|
||||||
|
|
||||||
@@ -225,8 +220,9 @@ def build_linux(core): # type: (bool) -> None
|
|||||||
p("release", "SS14.Client_Linux_x64.zip"), "w",
|
p("release", "SS14.Client_Linux_x64.zip"), "w",
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
compression=zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Client"), "", client_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Client", "linux-x64", "publish"), "", client_zip)
|
||||||
copy_resources("Resources", client_zip, server=False)
|
copy_resources("Resources", client_zip, server=False)
|
||||||
|
copy_client_natives(LINUX_NATIVES, client_zip, "")
|
||||||
copy_content_assemblies(p("Resources", "Assemblies"), client_zip, server=False)
|
copy_content_assemblies(p("Resources", "Assemblies"), client_zip, server=False)
|
||||||
# Cool we're done.
|
# Cool we're done.
|
||||||
client_zip.close()
|
client_zip.close()
|
||||||
@@ -234,19 +230,24 @@ def build_linux(core): # type: (bool) -> None
|
|||||||
print(Fore.GREEN + "Packaging Linux x64 server..." + Style.RESET_ALL)
|
print(Fore.GREEN + "Packaging Linux x64 server..." + Style.RESET_ALL)
|
||||||
server_zip = zipfile.ZipFile(p("release", "SS14.Server_Linux_x64.zip"), "w",
|
server_zip = zipfile.ZipFile(p("release", "SS14.Server_Linux_x64.zip"), "w",
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
compression=zipfile.ZIP_DEFLATED)
|
||||||
copy_dir_into_zip(p("RobustToolbox", "bin", "Server"), "", server_zip)
|
copy_dir_into_zip(p("RobustToolbox", "bin", "Server", "linux-x64", "publish"), "", server_zip)
|
||||||
copy_resources(p("Resources"), server_zip, server=True)
|
copy_resources(p("Resources"), server_zip, server=True)
|
||||||
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
copy_content_assemblies(p("Resources", "Assemblies"), server_zip, server=True)
|
||||||
server_zip.close()
|
server_zip.close()
|
||||||
|
|
||||||
print(Fore.GREEN + "Packaging Linux x64 launcher..." + Style.RESET_ALL)
|
def publish_client_server(runtime: str, target_os: str) -> None:
|
||||||
launcher_zip = zipfile.ZipFile(p("release", "SS14.Launcher_Linux_x64.zip"), "w",
|
# Runs dotnet publish on client and server.
|
||||||
compression=zipfile.ZIP_DEFLATED)
|
base = [
|
||||||
|
"dotnet", "publish",
|
||||||
|
"--runtime", runtime,
|
||||||
|
"--no-self-contained",
|
||||||
|
"-c", "Release",
|
||||||
|
f"/p:TargetOS={str}",
|
||||||
|
"/p:FullRelease=True",
|
||||||
|
]
|
||||||
|
|
||||||
copy_dir_into_zip(p("bin", "SS14.Launcher"), "bin", launcher_zip)
|
subprocess.run(base + ["RobustToolbox/Robust.Client/Robust.Client.csproj"], check=True)
|
||||||
copy_launcher_resources(p("bin", "Resources"), launcher_zip)
|
subprocess.run(base + ["RobustToolbox/Robust.Server/Robust.Server.csproj"], check=True)
|
||||||
launcher_zip.write(p("BuildFiles", "Linux", "SS14.Launcher"), "SS14.Launcher")
|
|
||||||
launcher_zip.close()
|
|
||||||
|
|
||||||
def copy_resources(target, zipf, server):
|
def copy_resources(target, zipf, server):
|
||||||
# Content repo goes FIRST so that it won't override engine files as that's forbidden.
|
# Content repo goes FIRST so that it won't override engine files as that's forbidden.
|
||||||
@@ -331,7 +332,7 @@ def copy_content_assemblies(target, zipf, server):
|
|||||||
zipf.write(p(source_dir, x), p(target, x))
|
zipf.write(p(source_dir, x), p(target, x))
|
||||||
|
|
||||||
|
|
||||||
def copy_dir_or_file(src, dst):
|
def copy_dir_or_file(src: str, dst: str):
|
||||||
"""
|
"""
|
||||||
Just something from src to dst. If src is a dir it gets copied recursively.
|
Just something from src to dst. If src is a dir it gets copied recursively.
|
||||||
"""
|
"""
|
||||||
@@ -345,6 +346,10 @@ def copy_dir_or_file(src, dst):
|
|||||||
else:
|
else:
|
||||||
raise IOError("{} is neither file nor directory. Can't copy.".format(src))
|
raise IOError("{} is neither file nor directory. Can't copy.".format(src))
|
||||||
|
|
||||||
|
def copy_client_natives(fileNames: List[str], zipf: zipfile.ZipFile, zipPath: str):
|
||||||
|
for fileName in fileNames:
|
||||||
|
zipf.write(p("RobustToolbox", "bin", "Client", fileName), p(zipPath, fileName))
|
||||||
|
print(f"writing native {fileName}")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
11
Tools/run_travis.sh
Executable file
11
Tools/run_travis.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Use manually installed .NET.
|
||||||
|
# Travis is shitting itself. Wonderful.
|
||||||
|
PATH="~/.dotnet:$PATH"
|
||||||
|
|
||||||
|
dotnet build SpaceStation14.sln /p:Python=python3.5
|
||||||
|
dotnet test Content.Tests/Content.Tests.csproj
|
||||||
|
dotnet test Content.IntegrationTests/Content.IntegrationTests.csproj
|
||||||
Reference in New Issue
Block a user