|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.denova.runtime.MacOS
Manage Mac OS X "app" directories and desktop.
| Field Summary | |
static java.lang.String |
ArrayTemplate
|
static java.lang.String |
ClasspathTemplate
|
static java.lang.String |
ContentsDirName
|
static java.lang.String |
DictTemplate
|
static java.lang.String |
EndArrayTemplate
|
static java.lang.String |
EndDictTemplate
|
static java.lang.String |
EndKeyTemplate
|
static java.lang.String |
EndStringTemplate
|
static java.lang.String |
InfoAppTemplateFilename
|
static java.lang.String |
InfoJavaTemplateFilename
|
static java.lang.String |
InfoPropertyFilename
|
static java.lang.String |
JavaDirName
|
static java.lang.String |
KeyTemplate
|
static java.lang.String |
LaunchScriptExtension
|
static java.lang.String |
MacAppDir
|
static java.lang.String |
MacAppDirExtension
|
static java.lang.String |
MacAppVariable
|
static java.lang.String |
MacOsDirName
|
static java.lang.String |
MacOSLogFilename
|
static java.lang.String |
PackageIconFilename
|
static java.lang.String |
PackageInfoFilename
|
static java.lang.String |
ResourcesDirName
|
static java.lang.String |
StringIndent
|
static java.lang.String |
StringTemplate
|
| Constructor Summary | |
MacOS()
Contructor must be called before accessing any MacOS methods. |
|
MacOS(com.denova.io.Log parentsLog)
Contructor must be called before accessing any MacOS methods. |
|
| Method Summary | |
java.lang.String |
addLaunchScript()
Add Unix style launch script with the command extension so it can be launched from Finder. |
java.lang.String |
addLaunchScript(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
boolean addDesktopIcon)
Add Unix style launch script with the command extension so it can be launched from Finder. |
java.lang.String |
addMacLauncher(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy)
Add a Unix style launch script, a desktop icon, or a Java app bundle if useJavaCommandPrefix is true. |
java.lang.String |
addMacLauncher(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy,
boolean addDesktopIcon)
Add a Unix style launch script or a Java app bundle if useJavaCommandPrefix is true. |
java.io.File |
buildAppDirTree(java.lang.String bundleName)
Build the directory structure for an app bundle. |
static void |
clearError()
Clears the last error message from memory. |
java.lang.String |
createAppLauncher(java.lang.String executable,
java.lang.String appVersion,
java.lang.String appInfo,
boolean addDesktopIcon)
Create app launcher. |
java.lang.String |
createJavaAppLauncher(java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy,
boolean addDesktopIcon)
Create Java app launcher. |
void |
deleteLaunchScript(java.lang.String scriptName)
Delete launch script. |
java.util.List |
getCreatedDirs()
Get the list of any newly created dirs while creating menu. |
static java.lang.String |
getDesktopDirectory()
Get the full path to the current user's desktop directory. |
static java.lang.String |
getLastError()
Get the last error message. |
static java.lang.Exception |
getLastException()
Returns the last exception detected. |
static boolean |
isError()
Returns true if there was an error during the last operation. |
void |
setCommandLineArguments(java.lang.String newCommandLineArguments)
Set the command line arguments for the menu. |
void |
setExecutableFile(java.lang.String newExecutableFile)
Set the executable file for the menu. |
void |
setIconFilename(java.lang.String newIconFilename)
Set the icon filename for the menu. |
void |
setInstallDir(java.lang.String newInstallDir)
Set the install directory for the menu. |
void |
setLaunchDirName(java.lang.String dirName)
Set the directory where launch scripts are created. |
void |
setLongName(java.lang.String newLongName)
Set the desktop name for the menu. |
void |
setShortName(java.lang.String newShortName)
Set the launch script name for the menu. |
void |
setSubmenu(java.lang.String newSubmenu)
Set the submenu name for the menu. |
void |
setWorkingDir(java.lang.String newWorkingDir)
Set the workingDir for the menu. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MacAppDir
public static final java.lang.String MacOSLogFilename
public static final java.lang.String LaunchScriptExtension
public static final java.lang.String MacAppDirExtension
public static final java.lang.String MacAppVariable
public static final java.lang.String ContentsDirName
public static final java.lang.String MacOsDirName
public static final java.lang.String ResourcesDirName
public static final java.lang.String JavaDirName
public static final java.lang.String InfoPropertyFilename
public static final java.lang.String PackageIconFilename
public static final java.lang.String InfoJavaTemplateFilename
public static final java.lang.String InfoAppTemplateFilename
public static final java.lang.String PackageInfoFilename
public static final java.lang.String ClasspathTemplate
public static final java.lang.String KeyTemplate
public static final java.lang.String EndKeyTemplate
public static final java.lang.String ArrayTemplate
public static final java.lang.String EndArrayTemplate
public static final java.lang.String StringTemplate
public static final java.lang.String EndStringTemplate
public static final java.lang.String DictTemplate
public static final java.lang.String EndDictTemplate
public static final java.lang.String StringIndent
| Constructor Detail |
public MacOS()
public MacOS(com.denova.io.Log parentsLog)
parentsLog - | Method Detail |
public static java.lang.String getDesktopDirectory()
Returns: the fullpath to the user's desktop directory
public static boolean isError()
public static java.lang.Exception getLastException()
public static java.lang.String getLastError()
public static void clearError()
public void setSubmenu(java.lang.String newSubmenu)
newSubmenu - the menu's folderpublic void setInstallDir(java.lang.String newInstallDir)
newInstallDir - the directory where the executbable file ispublic void setWorkingDir(java.lang.String newWorkingDir)
newWorkingDir - the working directory where the program runs.public void setLaunchDirName(java.lang.String dirName)
dirName - directory where launch scripts are createdpublic void setLongName(java.lang.String newLongName)
newLongName - name for desktoppublic void setShortName(java.lang.String newShortName)
newShortName - name for the launch scriptpublic void setExecutableFile(java.lang.String newExecutableFile)
newExecutableFile - command (without the path) to
launch when itemName selected.public void setCommandLineArguments(java.lang.String newCommandLineArguments)
newCommandLineArguments - any additional arguments needed for the executableFilepublic void setIconFilename(java.lang.String newIconFilename)
newIconFilename - the full path to the iconpublic java.lang.String addLaunchScript()
public java.lang.String addLaunchScript(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
boolean addDesktopIcon)
returns name of the launch script
useJavaCommandPrefix - if true, then the javaCommandPrefix
and the runtime classpath are prepended to the executableFileuseJavaConsole - if true, then use jre instead of jrew on Windows machinesjavaCommandPrefix - prefix for the JVMaddDesktopIcon - true, if desktop icon should be added
public java.lang.String addMacLauncher(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy)
useJavaCommandPrefix - if true, then the javaCommandPrefix
and the runtime classpath are prepended to the executableFileuseJavaConsole - if true, then use jre instead of jrew on Windows machinesjavaCommandPrefix - prefix for the JVMappVersion - application's version numberclasspath - classpath for the Java app; if null, classpath is set to $APP_PACKAGEextraJvmParameters - switches for the JVM; if null, no extra JVM parameters setjvmVersion - version of JVM app requires; must not include subversion, e.g., _01;
include + if this is min version; include * if any variant of this major version is okappInfo - information about the application (e.g., name, copyright, etc.)
public java.lang.String addMacLauncher(boolean useJavaCommandPrefix,
boolean useJavaConsole,
java.lang.String javaCommandPrefix,
java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy,
boolean addDesktopIcon)
useJavaCommandPrefix - if true, then the javaCommandPrefix
and the runtime classpath are prepended to the executableFileuseJavaConsole - if true, then use jre instead of jrew on Windows machinesjavaCommandPrefix - prefix for the JVMappVersion - application's version numberclasspath - classpath for the Java app; if null, classpath is set to $APP_PACKAGEextraJvmParameters - switches for the JVM; if null, no extra JVM parameters setjvmVersion - version of JVM app requires; must not include subversion, e.g., _01;
include + if this is min version; include * if any variant of this major version is okappInfo - information about the application (e.g., name, copyright, etc.)addDesktopIcon - true, if desktop icon should be added
public java.lang.String createJavaAppLauncher(java.lang.String appVersion,
java.lang.String classpath,
java.lang.String extraJvmParameters,
java.lang.String jvmVersion,
java.lang.String appInfo,
java.lang.String installedBy,
boolean addDesktopIcon)
appVersion - application's version numberclasspath - classpath for the Java app; if null, classpath is set to $APP_PACKAGEextraJvmParameters - switches for the JVM; if null, no extra JVM parameters setjvmVersion - version of JVM app requires; must not include subversion, e.g., _01;
include + if this is min version; include * if any variant of this major version is okappInfo - information about the application (e.g., name, copyright, etc.)installedBy - the program that installed the app.addDesktopIcon - true, if desktop icon should be added
public java.lang.String createAppLauncher(java.lang.String executable,
java.lang.String appVersion,
java.lang.String appInfo,
boolean addDesktopIcon)
appVersion - application's version numberappInfo - information about the application (e.g., name, copyright, etc.)addDesktopIcon - true, if desktop icon should be added
public java.io.File buildAppDirTree(java.lang.String bundleName)
bundleName - name for the .app bundle
public void deleteLaunchScript(java.lang.String scriptName)
scriptName - the fullpath to the launch scriptpublic java.util.List getCreatedDirs()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||