Skip to content

Commit

Permalink
Load-ARMS compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Rynchodon committed Jan 5, 2017
1 parent 3a674e3 commit 9e210c1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 40 deletions.
90 changes: 51 additions & 39 deletions .build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,37 +120,37 @@ def copyWithExtension(l_from, l_to, l_ext, log):

build = sys.argv[1]
logging.info("Build is " + build)
source = cSharp + 'bin/x64/' + build + '/ARMS.dll'
if (not os.path.exists(source)):
logging.error("Build not found")
sys.exit(13)

target = SpaceEngineers + '/Bin64'
if (not os.path.exists(target)):
logging.error("Not path to Space Engineers: " + SpaceEngineers)
sys.exit(14)
shutil.copy2(source, target)
logging.info("Copied dll to " + target)

target += '/ARMS - Release Notes.txt'
notes = "Unoffical build: " + sys.argv[1] + "\nBuilt: " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n"
notes += "Commit: " + gitCommit + "\n"

file = open(target, "w")
file.write(notes)
file.close()

target = SpaceEngineers + '/DedicatedServer64'
if (not os.path.exists(target)):
logging.error("Not path to Space Engineers: " + SpaceEngineers)
sys.exit(15)
shutil.copy2(source, target)
logging.info("Copied dll to " + target)

target += '/ARMS - Release Notes.txt'
file = open(target, "w")
file.write(notes)
file.close()
#source = cSharp + 'bin/x64/' + build + '/ARMS.dll'
#if (not os.path.exists(source)):
# logging.error("Build not found")
# sys.exit(13)

#target = SpaceEngineers + '/Bin64'
#if (not os.path.exists(target)):
# logging.error("Not path to Space Engineers: " + SpaceEngineers)
# sys.exit(14)
#shutil.copy2(source, target)
#logging.info("Copied dll to " + target)

#target += '/ARMS - Release Notes.txt'
#notes = "Unoffical build: " + sys.argv[1] + "\nBuilt: " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n"
#notes += "Commit: " + gitCommit + "\n"

#file = open(target, "w")
#file.write(notes)
#file.close()

#target = SpaceEngineers + '/DedicatedServer64'
#if (not os.path.exists(target)):
# logging.error("Not path to Space Engineers: " + SpaceEngineers)
# sys.exit(15)
#shutil.copy2(source, target)
#logging.info("Copied dll to " + target)

#target += '/ARMS - Release Notes.txt'
#file = open(target, "w")
#file.write(notes)
#file.close()

createDir(finalDir)

Expand Down Expand Up @@ -178,14 +178,26 @@ def copyWithExtension(l_from, l_to, l_ext, log):
for module in modules[:]:
archiveScripts(module)

pathPublish = os.path.split(startDir)[0] + "\\PublishARMS\\PublishARMS\\bin\\x64\\Release\\PublishARMS.exe"
if "release" in str.lower(build) and os.path.isfile(pathPublish):
# git tests moved to Publisher.cs
os.system('start /wait cmd /c "' + pathPublish + '" ' + build)
else:
Path = SpaceEngineers + '\Bin64'
LoadArms = Path + '\LoadARMS.exe'
os.system('start /D ' + Path + ' cmd /c"' + LoadArms)
#pathPublish = os.path.split(startDir)[0] + "\\PublishARMS\\PublishARMS\\bin\\x64\\Release\\PublishARMS.exe"
#if "release" in str.lower(build) and os.path.isfile(pathPublish):
# git tests moved to Publisher.cs
# os.system('start /wait cmd /c "' + pathPublish + '" ' + build)
#else:


SpaceBin = SpaceEngineers + '\Bin64'
LoadArmsExe = SpaceBin + '\LoadARMS.exe'

source = cSharp + 'bin/x64/' + build
command = '""' + LoadArmsExe + '" --author=Rynchodon --repo=ARMS'
if "release" in str.lower(build):
command = command + ' --publish '
command = command + 'ARMS.dll ..\..\..\..\Readme.md"'
logging.info(command)
os.system('start /D "' + source + '" cmd.exe /C ' + command)

#SpaceEngineers = SpaceBin + '\SpaceEngineers.exe'
#os.system('start /D ' + SpaceBin + ' cmd /c"' + SpaceEngineers)

# Pack Archive

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Properties/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
//
// Major, Minor, and Build should be set in VersionInfo.cs not VersionInfo - User.cs
// Revision is set by pre-build.py
[assembly: AssemblyVersion("1.79.0.0")]
[assembly: AssemblyVersion("1.79.1.0")]

0 comments on commit 9e210c1

Please sign in to comment.