forked from theyamo/CheeseCutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci_package.py
31 lines (25 loc) · 1.36 KB
/
ci_package.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
if __name__ == "__main__":
import os, shutil, sys
if os.path.exists("CheeseCutter"):
shutil.rmtree("CheeseCutter")
os.mkdir("CheeseCutter")
shutil.copy("README.md", "CheeseCutter")
shutil.copy("LICENSE.md", "CheeseCutter")
shutil.copy("AUTHORS", "CheeseCutter")
shutil.copytree("tunes", "CheeseCutter/tunes")
if os.name == "nt":
shutil.copy("build/ccutter.exe", "CheeseCutter")
shutil.copy("build/ct2util.exe", "CheeseCutter")
shutil.copy("build/SDL.dll", "CheeseCutter")
elif sys.platform == "darwin":
os.makedirs("CheeseCutter/CheeseCutter.app/Contents/MacOS")
os.makedirs("CheeseCutter/CheeseCutter.app/Contents/Frameworks")
shutil.copy("arch/MacOS/Contents/Info.plist", "CheeseCutter/CheeseCutter.app/Contents")
shutil.copytree("arch/MacOS/Contents/Resources", "CheeseCutter/CheeseCutter.app/Contents/Resources")
shutil.copy("build/ccutter", "CheeseCutter/CheeseCutter.app/Contents/MacOS");
shutil.copy("build/ct2util", "CheeseCutter/CheeseCutter.app/Contents/MacOS");
shutil.copytree("arch/MacOS/SDL.framework", "CheeseCutter/CheeseCutter.app/Contents/Frameworks/SDL.framework");
else:
shutil.copy("build/ccutter", "CheeseCutter")
shutil.copy("build/ct2util", "CheeseCutter")
shutil.make_archive(sys.argv[1], "zip", "CheeseCutter")