Added --bin-only option

master
Yevgen Muntyan 2006-11-12 13:10:12 -06:00
parent ed9bfad154
commit 8e1213f354
1 changed files with 23 additions and 14 deletions

37
makewin
View File

@ -9,20 +9,23 @@ builddir = dir
moo_windir = "/usr/local/win/medit"
strip = "i586-mingw32msvc-strip"
do_strip = True
bin_only = False
installer = None
def usage():
print "Usage:", sys.argv[0], "[--no-strip] [build_dir] [gtk-runtime]"
print "Usage:", sys.argv[0], "[--no-strip] [--bin-only] [build_dir] [gtk-runtime]"
sys.exit(2)
try:
opts, args = getopt.getopt(sys.argv[1:], "", ["no-strip"])
opts, args = getopt.getopt(sys.argv[1:], "", ["no-strip", "bin-only"])
except getopt.GetoptError:
usage()
for o, a in opts:
if o == "--no-strip":
do_strip = False
if o == "--bin-only":
bin_only = True
if args[2:]:
usage()
if args:
@ -32,7 +35,7 @@ else:
if args[1:]:
runtime = os.path.abspath(args[1])
else:
runtime = builddir + "/gtk-runtime"
runtime = None
installdir = dir + "/inst_"
@ -52,25 +55,31 @@ def do_cmd(cmd):
raise Error(status)
def copy_files():
do_cmd("cp -r %s/* %s/" % (runtime, moo_windir))
do_cmd("mkdir -p %s/lib/moo" % (moo_windir,))
if runtime is not None:
do_cmd("cp -r %s/* %s/" % (runtime, moo_windir))
do_cmd("mkdir -p %s/bin" % (moo_windir,))
do_cmd("cp -r %s/usr/local/bin/medit.exe %s/bin/" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/bin/libmoo.dll %s/bin/" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/share/moo %s/share/" % (installdir, moo_windir))
if not bin_only:
do_cmd("mkdir -p %s/share" % (moo_windir,))
do_cmd("mkdir -p %s/lib/moo" % (moo_windir,))
do_cmd("cp -r %s/usr/local/lib/moo/plugins %s/lib/moo/" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/lib/moo/projects %s/lib/moo/" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/share/moo %s/share/" % (installdir, moo_windir))
do_cmd("mkdir -p %s/lib/moo/plugins/pymoo25 %s/lib/moo/plugins/pymoo24" % (moo_windir, moo_windir))
do_cmd("cp %s/usr/local/lib/pymoo25.dll %s/lib/moo/plugins/pymoo25/pymoo.dll" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/moo25.dll %s/lib/moo/plugins/pymoo25/moo.pyd" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/pymoo24.dll %s/lib/moo/plugins/pymoo24/pymoo.dll" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/moo24.dll %s/lib/moo/plugins/pymoo24/moo.pyd" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/lib/moo/plugins %s/lib/moo/" % (installdir, moo_windir))
do_cmd("cp -r %s/usr/local/lib/moo/projects %s/lib/moo/" % (installdir, moo_windir))
do_cmd("mkdir -p %s/lib/moo/plugins/pymoo25 %s/lib/moo/plugins/pymoo24" % (moo_windir, moo_windir))
do_cmd("cp %s/usr/local/lib/pymoo25.dll %s/lib/moo/plugins/pymoo25/pymoo.dll" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/moo25.dll %s/lib/moo/plugins/pymoo25/moo.pyd" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/pymoo24.dll %s/lib/moo/plugins/pymoo24/pymoo.dll" % (installdir, moo_windir))
do_cmd("cp %s/usr/local/lib/moo24.dll %s/lib/moo/plugins/pymoo24/moo.pyd" % (installdir, moo_windir))
if do_strip:
do_cmd("%s %s/lib/moo/plugins/*/*.dll" % (strip, moo_windir))
if not bin_only:
do_cmd("%s %s/lib/moo/plugins/*/*.dll" % (strip, moo_windir))
do_cmd("%s %s/bin/medit.exe %s/bin/libmoo.dll" % (strip, moo_windir, moo_windir))
def get_version():