Skip to content

Commit

Permalink
headshotbox.bat doesn't spawn a window
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdone committed Jul 16, 2016
1 parent ef89e82 commit a034c24
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@
os.mkdir(dir_name)
shutil.copytree(demoinfogo, path)
shutil.copy('target/' + jar, path)
with open(path + '/headshotbox.' + ('bat' if os_name == 'win' else 'sh'), 'w') as f:
f.write('java -jar %s --port 4000' % jar)

def write_launcher(filename, content):
with open(path + '/' + filename, 'w') as f:
f.write(content % jar)

if os_name == 'win':
write_launcher('headshotbox.bat', 'start javaw -jar %s --port 4000 --systray')
write_launcher('headshotbox_console.bat', 'java -jar %s --port 4000')
else:
write_launcher('headshotbox.sh', 'java -jar %s --port 4000')
if os_name == 'linux':
os.system('chmod +x %s/headshotbox.sh' % path)

Expand Down

0 comments on commit a034c24

Please sign in to comment.