From 77b682571f80b0aec9a16182600678a1b553a4bb Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 9 Aug 2010 17:44:03 +0000 Subject: deploy.py: Figure installer filename from NSIS script. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27764 a1c6a512-1295-4272-9138-f99709370657 --- utils/common/deploy-themeeditor.py | 1 - utils/common/deploy.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/common/deploy-themeeditor.py b/utils/common/deploy-themeeditor.py index 566c04d68d..c769d924fa 100755 --- a/utils/common/deploy-themeeditor.py +++ b/utils/common/deploy-themeeditor.py @@ -48,7 +48,6 @@ else: # (zip on w32, tar.bz2 on Linux). Does not apply on Mac which uses dmg. deploy.programfiles = [ deploy.progexe ] deploy.nsisscript = "utils/themeeditor/themeeditor.nsi" -deploy.nsissetup = "utils/themeeditor/rbthemeeditor-setup.exe" deploy.deploy() diff --git a/utils/common/deploy.py b/utils/common/deploy.py index ae3817f284..662a104e34 100755 --- a/utils/common/deploy.py +++ b/utils/common/deploy.py @@ -70,7 +70,6 @@ progexe = "" make = "make" programfiles = [] nsisscript = "" -nsissetup = "" svnserver = "" # Paths and files to retrieve from svn when creating a tarball. @@ -257,7 +256,15 @@ def runnsis(versionstring, nsis, srcfolder): print "NSIS failed!" return -1 setupfile = program + "-" + versionstring + "-setup.exe" - shutil.copy(srcfolder + "/" + nsissetup, setupfile) + # find output filename in nsis script file + nsissetup = "" + for line in open(srcfolder + "/" + nsisscript): + if re.match(r'^[^;]*OutFile\s+', line) != None: + nsissetup = re.sub(r'^[^;]*OutFile\s+"(.+)"', r'\1', line).rstrip() + if nsissetup == "": + print "Could not retrieve output file name!" + return -1 + shutil.copy(srcfolder + "/" + os.path.dirname(nsisscript) + "/" + nsissetup, setupfile) return 0 -- cgit v1.2.3