-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrelease.py
34 lines (26 loc) · 1.27 KB
/
release.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os, sys, shutil, subprocess, time
with open('version.txt', 'r') as f:
version = f.read()
installName = 'Hover Practice'
# target is where we assemble our final install.
if os.path.isdir('target/'):
shutil.rmtree('target/')
time.sleep(0.3)
installDir = 'target/' + installName + '/'
os.mkdir('target/')
#os.mkdir(installDir)
os.chdir("src_bootstrapper")
subprocess.call("cxfreeze.py bootstrapper.py --base-name=Win32GUI --target-dir dist --icon ../boots.ico", shell=True, stdout=sys.stdout, stderr=sys.stderr)
os.chdir("..")
shutil.move('src_bootstrapper/dist/bootstrapper.exe', 'src_bootstrapper/dist/Hover Practice.exe') # Move the dist files to our target directory
shutil.move('src_bootstrapper/dist/', installDir)
os.chdir("src")
subprocess.call("cxfreeze.py hoverpractice.py --base-name=Win32GUI --target-dir dist --icon ../boots.ico", shell=True, stdout=sys.stdout, stderr=sys.stderr)
os.chdir("..")
shutil.copy('boots.png', 'src/dist/boots.png')
shutil.copytree('images/', 'src/dist/images/')
shutil.move('src/dist/', installDir + 'hover-lib/')
shutil.copy('LICENSE.txt', installDir)
shutil.copy('version.txt', installDir)
shutil.copy('README.md', installDir + 'README.txt')
shutil.make_archive("target/" + installName + "-" + version, "zip", 'target', installName + "/")