diff --git a/README.md b/README.md index 97b61cb9..bd96ad59 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Maven Central](http://img.shields.io/maven-central/v/io.github.fvarrui/javapackager)](https://search.maven.org/artifact/io.github.fvarrui/javapackager) [![GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-%250778B9.svg)](https://www.gnu.org/licenses/gpl-3.0.html) -JavaPackager is a hybrid plugin for **Maven** and **Gradle** which provides an easy way to package Java applications in native Windows, Mac OS X or GNU/Linux executables, and generate installers for them. +JavaPackager is a hybrid plugin for **Maven** and **Gradle** which provides an easy way to package Java applications in native Windows, MacOS or GNU/Linux executables, and generate installers for them. > SNAPSHOT version is not released to Maven Central, so you have to [install it manually](#how-to-build-and-install-the-plugin). @@ -132,8 +132,8 @@ By default it will generate next artifacts in `${outputDirectory} ` folder: | `${name}_${version}.exe` | Setup file. | Windows | [Inno Setup](http://www.jrsoftware.org/isinfo.php) | | `${name}_${version}.msi` | MSI installer file. | Windows | [WiX Toolset](https://wixtoolset.org/) | | `${name}_${version}.msm` | MSI merge module file. | Windows | [WiX Toolset](https://wixtoolset.org/) | -| `${name}_${version}.dmg` | Disk image file (uses **hdiutil**). | Mac OS | | -| `${name}_${version}.pkg` | PKG installer file (uses **pkgbuild**). | Mac OS | | +| `${name}_${version}.dmg` | Disk image file (uses **hdiutil**). | MacOS | | +| `${name}_${version}.pkg` | PKG installer file (uses **pkgbuild**). | MacOS | | | `${name}-${version}-${platform}.zip` | Zipball containing generated directory `${name}`. | All | | | `${name}-${version}-${platform}.tar.gz` | Compressed tarball containing generated directory `${name}`. | All | | | `assets` | Directory with all intermediate files generated by JavaPackager. | All | | @@ -157,7 +157,7 @@ By default it will generate next artifacts in `${outputDirectory} ` folder: | `customizedJre` | :x: | `true` | Generates a customized JRE, including only identified or specified modules. Otherwise, all modules will be included. | | `description` | :x: | `${project.description}` or `${displayName}` | Project description. | | `displayName` | :x: | `${project.name}` or `${name}` | App name to show. | -| `envPath` | :x: | | Defines PATH environment variable in GNU/Linux and Mac OS X startup scripts. | +| `envPath` | :x: | | Defines PATH environment variable in GNU/Linux and MacOS startup scripts. | | `extra` | :x: | | Map with extra properties to be used in customized Velocity templates, accesible through `$info.extra` variable. | | `fileAssociations` | :x: | [`FileAssociation[]`](https://github.com/fvarrui/JavaPackager/blob/master/src/main/java/io/github/fvarrui/javapackager/model/FileAssociation.java) | Associate file extensions or MIME types to the app. | | `forceInstaller` | :x: | `false` | If `true`, skips operating system check when generating installers. | @@ -180,7 +180,7 @@ By default it will generate next artifacts in `${outputDirectory} ` folder: | `runnableJar` | :x: | | Defines your own JAR file to be bundled. If it's ommited, the plugin packages your code in a runnable JAR and bundle it with the app. | | `scripts` | :x: | | Specify bootstrap script. **Pre and post-install scripts comming soon!** | | `url` | :x: | | App website URL. | -| `useResourcesAsWorkingDir` | :x: | `true` | Uses app resources folder as default working directory (always `true` on Mac OS). | +| `useResourcesAsWorkingDir` | :x: | `true` | Uses app resources folder as default working directory (always `true` on MacOS). | | `version` | :x: | `${project.version}` | App version. | | `vmArgs` | :x: | `[]` | VM arguments. | @@ -191,7 +191,7 @@ By default it will generate next artifacts in `${outputDirectory} ` folder: | Property | Mandatory | Description | | ------------- | --------- | ------------------------------------------------------------------- | | `linuxConfig` | :x: | [GNU/Linux specific properties](docs/linux-specific-properties.md). | -| `macConfig` | :x: | [Mac OS X specific properties](docs/macosx-specific-properties.md). | +| `macConfig` | :x: | [MacOS specific properties](docs/macosx-specific-properties.md). | | `winConfig` | :x: | [Windows specific properties](docs/windows-specific-properties.md). | > :warning: Be careful when using the `platform` property if your project uses platform dependent libraries, so the libraries of the current platform will be copied, not those required for the target platform. You can solve this problem using `classifiers`. @@ -216,7 +216,7 @@ ${assetsDir}/ ├── linux/ │ └── ${name}.png # on GNU/Linux it has to be a PNG file ├── mac/ -│ └── ${name}.icns # on Mac OS X it has to be a ICNS file +│ └── ${name}.icns # on MacOS it has to be a ICNS file └── windows/ └── ${name}.ico # on Windows it has to be a ICO file ``` @@ -239,7 +239,7 @@ ${assetsDir}/ | ├── mime.xml.vtl # MIME.XML template │ └── startup.sh.vtl # Startup script template ├── mac/ -| ├── assembly.xml.vtl # maven-assembly-plugin template to generate ZIP/TGZ bundles for Mac OS X +| ├── assembly.xml.vtl # maven-assembly-plugin template to generate ZIP/TGZ bundles for MacOS | ├── customize-dmg.applescript.vtl # DMG customization Applescript template | ├── Info.plist.vtl # Info.plist template │ └── startup.vtl # Startup script template @@ -262,7 +262,7 @@ You can use [default templates](https://github.com/fvarrui/JavaPackager/tree/mas When you build your app, all configuration details are hardcoded into the executable and cannot be changed without recreating it or hacking with a resource editor. JavaPackager introduces a feature that allows to pass additional JVM options at runtime from an `.l4j.ini` file (like [Launch4j](http://launch4j.sourceforge.net/docs.html) does, but available for all platforms in the same way). So, you can specify these options in the packager's configuration (packaging time), in INI file (runtime) or in both. -The INI file's name must correspond to `${name}.l4j.ini` and it has to be located next to the executable on Windows and GNU/Linux, and in `Resources` folder on Mac OS X. +The INI file's name must correspond to `${name}.l4j.ini` and it has to be located next to the executable on Windows and GNU/Linux, and in `Resources` folder on MacOS. The options should be separated with spaces or new lines: diff --git a/build.gradle b/build.gradle index e5657191..fe5b7e9a 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ gradlePlugin { pluginBundle { website = 'http://github.com/fvarrui/JavaPackager' vcsUrl = 'http://github.com/fvarrui/JavaPackager.git' - description = 'Packages Java applications as native Windows, Mac OS X or GNU/Linux executables and creates installers for them' + description = 'Packages Java applications as native Windows, MacOS or GNU/Linux executables and creates installers for them' tags = ['java', 'packager', 'gradle-plugin', 'maven-plugin', 'native', 'installer', 'debian-packages', 'rpm-packages', 'dmg', 'maven', 'gradle', 'distribution', 'javapackager', 'linux-executables', 'deb', 'rpm', 'native-windows', 'java-applications', 'pkg', 'msi'] plugins { javaPackagerPlugin { @@ -243,4 +243,3 @@ task updateUniversalJavaApplicationStub(type : Download) { dest file('src/main/resources/mac') overwrite true } - diff --git a/docs/gradle/plugin-configuration-samples.md b/docs/gradle/plugin-configuration-samples.md index 65aa30c8..60411c08 100644 --- a/docs/gradle/plugin-configuration-samples.md +++ b/docs/gradle/plugin-configuration-samples.md @@ -120,7 +120,7 @@ task packageMyApp(dependsOn: [ 'packageMyAppForLinux', 'packageMyAppForMac', 'pa E.g. on Windows, running `packageMyApp` task will generate next artifacts: * `${name}_${version}-linux.tar.gz` with the GNU/Linux application including a customized JRE. -* `${name}_${version}-mac.tar.gz` with the Mac OS X application including a customized JRE. +* `${name}_${version}-mac.tar.gz` with the MacOS application including a customized JRE. * `${name}_${version}-windows.zip` with the Windows application including a customized JRE. -As last sample is running on Windows, it's not necessary to specify a JDK when bundling for Windows (it uses current JDK by default). Otherwise, if running on GNU/Linux or Mac OS X, you have to specify a JDK for Windows. +As last sample is running on Windows, it's not necessary to specify a JDK when bundling for Windows (it uses current JDK by default). Otherwise, if running on GNU/Linux or MacOS, you have to specify a JDK for Windows. diff --git a/docs/macosx-specific-properties.md b/docs/macosx-specific-properties.md index f0059c9c..a4fc6ce3 100644 --- a/docs/macosx-specific-properties.md +++ b/docs/macosx-specific-properties.md @@ -1,4 +1,4 @@ -# Mac OS X specific properties +# MacOS specific properties ```xml @@ -64,7 +64,7 @@ | `developerId` | :x: | | Signing identity. | | `entitlements` | :x: | | Path to [entitlements](https://developer.apple.com/documentation/bundleresources/entitlements) file. | | `codesignApp` | :x: | `true` | If it is set to `false`, generated app will not be codesigned. | -| `hardenedCodesign` | :x: | `true` | If it is set to `true`, enable [hardened runtime](https://developer.apple.com/documentation/security/hardened_runtime) if Mac OS version >= 10.13.6. | +| `hardenedCodesign` | :x: | `true` | If it is set to `true`, enable [hardened runtime](https://developer.apple.com/documentation/security/hardened_runtime) if MacOS version >= 10.13.6. | | `macStartup` | :x: | `SCRIPT` | App startup type, using a `SCRIPT` or a binary (compiled version of the script: `UNIVERSAL`, `X86_64` or `ARM64`). | ## DMG generation properties diff --git a/docs/maven/plugin-configuration-samples.md b/docs/maven/plugin-configuration-samples.md index fc4a1cfd..db759041 100644 --- a/docs/maven/plugin-configuration-samples.md +++ b/docs/maven/plugin-configuration-samples.md @@ -221,7 +221,7 @@ E.g. on Windows, last configuration will generate next artifacts: E.g. on Windows, last configuration will generate next artifacts: * `${name}_${version}-linux.tar.gz` with the GNU/Linux application including a customized JRE. -* `${name}_${version}-mac.tar.gz` with the Mac OS X application including a customized JRE. +* `${name}_${version}-mac.tar.gz` with the MacOS application including a customized JRE. * `${name}_${version}-windows.zip` with the Windows application including a customized JRE. -As last sample is running on Windows, it's not necessary to specify a JDK when bundling for Windows (it uses current JDK by default). Otherwise, if running on GNU/Linux or Mac OS X, you have to specify a JDK for Windows. \ No newline at end of file +As last sample is running on Windows, it's not necessary to specify a JDK when bundling for Windows (it uses current JDK by default). Otherwise, if running on GNU/Linux or MacOS, you have to specify a JDK for Windows. diff --git a/src/main/java/io/github/fvarrui/javapackager/gradle/AbstractPackageTask.java b/src/main/java/io/github/fvarrui/javapackager/gradle/AbstractPackageTask.java index 5cf1bc8a..e8f94a8e 100644 --- a/src/main/java/io/github/fvarrui/javapackager/gradle/AbstractPackageTask.java +++ b/src/main/java/io/github/fvarrui/javapackager/gradle/AbstractPackageTask.java @@ -28,7 +28,7 @@ public List getOutputFiles() { public AbstractPackageTask() { super(); setGroup(PackagePlugin.GROUP_NAME); - setDescription("Packages the application as a native Windows, Mac OS X or GNU/Linux executable and creates an installer"); + setDescription("Packages the application as a native Windows, MacOS or GNU/Linux executable and creates an installer"); getOutputs().upToDateWhen(o -> false); } diff --git a/src/main/java/io/github/fvarrui/javapackager/maven/PackageMojo.java b/src/main/java/io/github/fvarrui/javapackager/maven/PackageMojo.java index ab46e81e..9a97bba3 100644 --- a/src/main/java/io/github/fvarrui/javapackager/maven/PackageMojo.java +++ b/src/main/java/io/github/fvarrui/javapackager/maven/PackageMojo.java @@ -194,7 +194,7 @@ public class PackageMojo extends AbstractMojo { private Platform platform; /** - * Defines PATH environment variable in GNU/Linux and Mac OS X startup scripts. + * Defines PATH environment variable in GNU/Linux and MacOS startup scripts. */ @Parameter(property = "envPath", required = false) private String envPath; @@ -232,7 +232,7 @@ public class PackageMojo extends AbstractMojo { private LinuxConfig linuxConfig; /** - * Mac OS X specific config + * MacOS specific config */ @Parameter(property = "macConfig", required = false) private MacConfig macConfig; diff --git a/src/main/java/io/github/fvarrui/javapackager/model/MacConfig.java b/src/main/java/io/github/fvarrui/javapackager/model/MacConfig.java index 96e4010a..f6d8fbc1 100644 --- a/src/main/java/io/github/fvarrui/javapackager/model/MacConfig.java +++ b/src/main/java/io/github/fvarrui/javapackager/model/MacConfig.java @@ -8,7 +8,7 @@ import io.github.fvarrui.javapackager.packagers.Packager; /** - * JavaPackager Mac OS specific configuration + * JavaPackager MacOS specific configuration */ public class MacConfig implements Serializable { private static final long serialVersionUID = -2268944961932941577L; @@ -270,7 +270,7 @@ public String toString() { } /** - * Tests Mac OS X specific config and set defaults if not specified + * Tests MacOS specific config and set defaults if not specified * * @param packager Packager */ diff --git a/src/main/java/io/github/fvarrui/javapackager/packagers/BundleJre.java b/src/main/java/io/github/fvarrui/javapackager/packagers/BundleJre.java index b649623d..b5f413b2 100644 --- a/src/main/java/io/github/fvarrui/javapackager/packagers/BundleJre.java +++ b/src/main/java/io/github/fvarrui/javapackager/packagers/BundleJre.java @@ -145,13 +145,13 @@ protected File doApply(Packager packager) throws Exception { } - // removes jre/legal folder as it causes problems when codesigning from Mac OS + // removes jre/legal folder as it causes problems when codesigning from MacOS File legalFolder = new File(destinationFolder, "legal"); if (legalFolder.exists()) { FileUtils.removeFolder(legalFolder); } - // removes jre/man folder as it causes problems when codesigning from Mac OS + // removes jre/man folder as it causes problems when codesigning from MacOS File manFolder = new File(destinationFolder, "man"); if (manFolder.exists()) { FileUtils.removeFolder(manFolder); diff --git a/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java b/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java index e7da3a5d..46f060eb 100644 --- a/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java +++ b/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java @@ -19,7 +19,7 @@ import io.github.fvarrui.javapackager.utils.XMLUtils; /** - * Packager for Mac OS X + * Packager for MacOS */ public class MacPackager extends Packager { @@ -38,12 +38,12 @@ public void doInit() throws Exception { this.macConfig.setDefaults(this); - // FIX useResourcesAsWorkingDir=false doesn't work fine on Mac OS (option + // FIX useResourcesAsWorkingDir=false doesn't work fine on MacOS (option // disabled) if (!this.isUseResourcesAsWorkingDir()) { this.useResourcesAsWorkingDir = true; Logger.warn( - "'useResourcesAsWorkingDir' property disabled on Mac OS (useResourcesAsWorkingDir is always true)"); + "'useResourcesAsWorkingDir' property disabled on MacOS (useResourcesAsWorkingDir is always true)"); } } @@ -204,9 +204,9 @@ private void codesign(String developerId, File entitlements, File appFile) throw List flags = new ArrayList<>(); if (macConfig.isHardenedCodesign()) { if (VersionUtils.compareVersions("10.13.6", SystemUtils.OS_VERSION) >= 0) { - flags.add("runtime"); // enable hardened runtime if Mac OS version >= 10.13.6 + flags.add("runtime"); // enable hardened runtime if MacOS version >= 10.13.6 } else { - Logger.warn("Mac OS version detected: " + SystemUtils.OS_VERSION + " ... hardened runtime disabled!"); + Logger.warn("MacOS version detected: " + SystemUtils.OS_VERSION + " ... hardened runtime disabled!"); } } diff --git a/src/main/java/io/github/fvarrui/javapackager/packagers/PackagerSettings.java b/src/main/java/io/github/fvarrui/javapackager/packagers/PackagerSettings.java index fd5f8554..4623bb16 100644 --- a/src/main/java/io/github/fvarrui/javapackager/packagers/PackagerSettings.java +++ b/src/main/java/io/github/fvarrui/javapackager/packagers/PackagerSettings.java @@ -314,8 +314,8 @@ public LinuxConfig getLinuxConfig() { } /** - * Get Mac OS config - * @return Mac OS config + * Get MacOS config + * @return MacOS config */ public MacConfig getMacConfig() { return macConfig; @@ -722,8 +722,8 @@ public PackagerSettings linuxConfig(LinuxConfig linuxConfig) { } /** - * Set Mac OS specific configuration - * @param macConfig Mac OS specific configuration + * Set MacOS specific configuration + * @param macConfig MacOS specific configuration * @return Packager settings */ public PackagerSettings macConfig(MacConfig macConfig) { diff --git a/src/main/resources/mac/startup.vtl b/src/main/resources/mac/startup.vtl index bf236910..a3d76c93 100644 --- a/src/main/resources/mac/startup.vtl +++ b/src/main/resources/mac/startup.vtl @@ -1,4 +1,4 @@ #!/bin/bash -# Mac OS X startup script generated by JavaPackager plugin -SCRIPTPATH=$(cd "$(dirname "$0")" || return 1; pwd) +# MacOS startup script generated by JavaPackager plugin +SCRIPTPATH=`cd "$(dirname "$0")" ; pwd` osascript -e "do shell script quoted form of \"$SCRIPTPATH\" & \"/universalJavaApplicationStub $@\" with administrator privileges" & \ No newline at end of file diff --git a/src/main/resources/mac/universalJavaApplicationStub.sh b/src/main/resources/mac/universalJavaApplicationStub.sh index 1bb3bb7e..c6513467 100644 --- a/src/main/resources/mac/universalJavaApplicationStub.sh +++ b/src/main/resources/mac/universalJavaApplicationStub.sh @@ -3,7 +3,7 @@ # # # universalJavaApplicationStub # # # -# A BASH based JavaApplicationStub for Java Apps on Mac OS X # +# A BASH based JavaApplicationStub for Java Apps on MacOS # # that works with both Apple's and Oracle's plist format. # # # # Inspired by Ian Roberts stackoverflow answer #