summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-20 11:06:34 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-20 11:08:21 +0100
commit7f39622c23001b975efb6f61359d380c1f3f7984 (patch)
tree9120a70a23994c611d63eec449dbc53feee40415
parent230afc786fb86a53f938843a5a9ddfc6e4198974 (diff)
downloadastra-7f39622c23001b975efb6f61359d380c1f3f7984.tar.gz
astra-7f39622c23001b975efb6f61359d380c1f3f7984.tar.bz2
astra-7f39622c23001b975efb6f61359d380c1f3f7984.tar.xz
astra-7f39622c23001b975efb6f61359d380c1f3f7984.zip
Add command line option to generate vc09/vc11/all files
-rw-r--r--build/msvc/gen.py57
1 files changed, 33 insertions, 24 deletions
diff --git a/build/msvc/gen.py b/build/msvc/gen.py
index 0eb306e..c770641 100644
--- a/build/msvc/gen.py
+++ b/build/msvc/gen.py
@@ -1051,6 +1051,14 @@ def write_mex_project09(P):
print('\t</Globals>', file=F)
print('</VisualStudioProject>', file=F)
+
+
+if (len(sys.argv) != 2) or (sys.argv[1] not in ["vc09", "vc11", "all"]):
+ print("Usage: python gen.py [vc09|vc11|all]", file=sys.stderr)
+ sys.exit(1)
+
+
+
try:
open("../../src/AstraObjectManager.cpp", "r")
except IOError:
@@ -1060,29 +1068,30 @@ except IOError:
# Change directory to main dir
os.chdir("../..")
+if sys.argv[1] in ["vc11", "all"]:
+ # HACK
+ P_astra["name"] = "astra_vc11"
+ write_sln(11)
+ write_main_project11()
+ write_main_filters11()
+ write_mex_project11(P0)
+ write_mex_project11(P1)
+ write_mex_project11(P2)
+ write_mex_project11(P3)
+ write_mex_project11(P4)
+ write_mex_project11(P5)
+ write_mex_project11(P6)
-# HACK
-P_astra["name"] = "astra_vc11"
-write_sln(11)
-write_main_project11()
-write_main_filters11()
-write_mex_project11(P0)
-write_mex_project11(P1)
-write_mex_project11(P2)
-write_mex_project11(P3)
-write_mex_project11(P4)
-write_mex_project11(P5)
-write_mex_project11(P6)
-
-# HACK
-P_astra["name"] = "astra"
+if sys.argv[1] in ["vc09", "all"]:
+ # HACK
+ P_astra["name"] = "astra"
-write_sln(9)
-write_main_project09()
-write_mex_project09(P0)
-write_mex_project09(P1)
-write_mex_project09(P2)
-write_mex_project09(P3)
-write_mex_project09(P4)
-write_mex_project09(P5)
-write_mex_project09(P6)
+ write_sln(9)
+ write_main_project09()
+ write_mex_project09(P0)
+ write_mex_project09(P1)
+ write_mex_project09(P2)
+ write_mex_project09(P3)
+ write_mex_project09(P4)
+ write_mex_project09(P5)
+ write_mex_project09(P6)