Commit 4df1fc89 authored by Just van Rossum's avatar Just van Rossum

Forgot to do os.path.basename() on mainprogram: a nonworking app was built if...

Forgot to do os.path.basename() on mainprogram: a nonworking app was built if the mainprogram wan't in the current directory. Fixed.
parent dac41879
...@@ -350,16 +350,15 @@ class AppBuilder(BundleBuilder): ...@@ -350,16 +350,15 @@ class AppBuilder(BundleBuilder):
self.execpath = execpath self.execpath = execpath
if self.mainprogram is not None: if self.mainprogram is not None:
mainname = os.path.basename(self.mainprogram) mainprogram = os.path.basename(self.mainprogram)
self.files.append((self.mainprogram, pathjoin(resdir, mainname))) self.files.append((self.mainprogram, pathjoin(resdir, mainprogram)))
# Create execve wrapper # Write bootstrap script
mainprogram = self.mainprogram # XXX for locals() call
executable = os.path.basename(self.executable) executable = os.path.basename(self.executable)
execdir = pathjoin(self.bundlepath, self.execdir) execdir = pathjoin(self.bundlepath, self.execdir)
mainwrapperpath = pathjoin(execdir, self.name) bootstrappath = pathjoin(execdir, self.name)
makedirs(execdir) makedirs(execdir)
open(mainwrapperpath, "w").write(BOOTSTRAP_SCRIPT % locals()) open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
os.chmod(mainwrapperpath, 0775) os.chmod(bootstrappath, 0775)
def postProcess(self): def postProcess(self):
self.addPythonModules() self.addPythonModules()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment