Various improvements and code cleanup.

This commit is contained in:
Norberto Lopez
2013-04-04 20:58:02 +00:00
parent 8539589a23
commit 14406b2813
3 changed files with 13 additions and 12 deletions

View File

@@ -147,10 +147,11 @@ def buildDistTree(buildPath, rootPath, args, isStaticRelease):
dstPath = os.path.join(rootPath, appName + '.app', 'Contents', 'MacOS')
shutil.copy(srcPath, dstPath)
# Copy over the PkgInfo file
srcPath = os.path.join(appTemplatePath, 'apple', 'PkgInfo')
dstPath = os.path.join(rootPath, appName + '.app', 'Contents')
shutil.copy(srcPath, dstPath)
# Write out the PkgInfo file
dstPath = os.path.join(rootPath, appName + '.app', 'Contents', "PkgInfo")
f = open(dstPath, 'wb')
f.write('APPL????')
f.close()
# Determine the payloadPath for where to store the appLauncher
payloadPath = os.path.join(rootPath, appName + '.app', 'Contents')
@@ -298,7 +299,7 @@ def buildPListInfoShared(destFile, args):
tupList = []
tupList.append(('JVMVersion', '1.6+'))
tupList.append(('MainClass', 'appLauncher.AppLauncher'))
tupList.append(('WorkingDirectory', '$APP_PACKAGE/Contents/Resources/Java'))
tupList.append(('WorkingDirectory', '$APP_PACKAGE/Contents/Resources/app'))
tupList.append(('ClassPath', classPathStr))
tupList.append(('VMOptions', jvmArgsStr))
@@ -306,7 +307,6 @@ def buildPListInfoShared(destFile, args):
writeln(f, 3, '<key>' + key + '</key>')
writeln(f, 3, '<string>' + str(val) + '</string>')
writeln(f, 3, '<key>Arguments</key>')
writeln(f, 3, '<array>')
# for aStr in args.appArgs:
@@ -386,7 +386,8 @@ def buildPListInfoStatic(destFile, args):
tupList = []
# tupList.append(('JVMVersion', '1.6+'))
# tupList.append(('MainClass', args.mainClass))
# tupList.append(('WorkingDirectory', '$APP_PACKAGE/Contents/Resources/Java'))
tupList.append(('WorkingDirectory', '$APP_PACKAGE/Contents/app'))
tupList.append(('ClassPath', classPathStr))
for (key,val) in tupList:

View File

@@ -97,13 +97,13 @@ def buildBashScript(destFile, args, isStaticRelease):
f.write('installPath=$(readlink -f "$BASH_SOURCE")\n')
f.write('installPath=$(dirname "$installPath")\n\n')
f.write('# Change the working directory to the installation path\n')
f.write('cd "$installPath"\n\n')
f.write('# Change the working directory to the app folder in the installation path\n')
f.write('cd "$installPath"/app\n\n')
exeCmd = 'java ' + jvmArgsStr
if isStaticRelease == True:
exeCmd = jreRelease + '/bin/java ' + jvmArgsStr
exeCmd = exeCmd + ' -Djava.system.class.loader=appLauncher.RootClassLoader -cp launcher/appLauncher.jar appLauncher.AppLauncher app/app.cfg'
exeCmd = '../' + jreRelease + '/bin/java ' + jvmArgsStr
exeCmd = exeCmd + ' -Djava.system.class.loader=appLauncher.RootClassLoader -cp ../launcher/appLauncher.jar appLauncher.AppLauncher app.cfg'
f.write('# Run the application\n')
f.write(exeCmd + '\n')

View File

@@ -116,7 +116,7 @@ def buildLaunch4JConfig(destFile, args, isStaticRelease, iconFile):
# writeln(f, 1, "<supportUrl>url</supportUrl>");
writeln(f, 1, "<cmdLine>app/app.cfg</cmdLine>");
writeln(f, 1, "<chdir>.</chdir>");
writeln(f, 1, "<chdir>app/</chdir>");
writeln(f, 1, "<priority>normal</priority>");
writeln(f, 1, "<customProcName>true</customProcName>");
writeln(f, 1, "<stayAlive>false</stayAlive>");