8223211 : Remove old code from service support JDK-8200758-branch
authorherrick
Fri, 06 Sep 2019 17:42:06 -0400
branchJDK-8200758-branch
changeset 58037 c127c766fe8e
parent 58036 f7f10023f7c0
child 58113 885b0543f6e4
8223211 : Remove old code from service support Submitted-by: almatvee Reviewed-by: herrick, asemenyuk
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec
src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/launchd.plist.template
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec	Fri Sep 06 17:31:56 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec	Fri Sep 06 17:42:06 2019 -0400
@@ -6,7 +6,7 @@
 Vendor: APPLICATION_VENDOR
 Prefix: INSTALLATION_DIRECTORY
 Provides: APPLICATION_PACKAGE
-%if "xAPPLICATION_GROUP" != x 
+%if "xAPPLICATION_GROUP" != x
 Group: APPLICATION_GROUP
 %endif
 
@@ -18,7 +18,7 @@
 %define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
 
 #comment line below to enable effective jar compression
-#it could easily get your package size from 40 to 15Mb but 
+#it could easily get your package size from 40 to 15Mb but
 #build time will substantially increase and it may require unpack200/system java to install
 %define __jar_repack %{nil}
 
@@ -38,10 +38,10 @@
   install -d -m 755 %{buildroot}%{dirname:%{license_install_file}}
   install -m 644 APPLICATION_LICENSE_FILE %{buildroot}%{license_install_file}
 %endif
- 
+
 %files
 %{?license_install_file:%license %{license_install_file}}
-# If installation directory for the application is /a/b/c, we want only root 
+# If installation directory for the application is /a/b/c, we want only root
 # component of the path (/a) in the spec file to make sure all subdirectories
 # are owned by the package.
 %(echo INSTALLATION_DIRECTORY/APPLICATION_FS_NAME | sed -e "s|\(^/[^/]\{1,\}\).*$|\1|")
@@ -59,14 +59,5 @@
     xdg-desktop-menu uninstall --novendor INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop
 FILE_ASSOCIATION_REMOVE
 fi
-if [ "SERVICE_HINT" = "true" ]; then
-    if [ -x "/etc/init.d/APPLICATION_PACKAGE" ]; then
-        if [ "STOP_ON_UNINSTALL" = "true" ]; then
-            /etc/init.d/APPLICATION_PACKAGE stop
-        fi
-        /sbin/chkconfig --del APPLICATION_PACKAGE
-        rm -f /etc/init.d/APPLICATION_PACKAGE
-    fi
-fi
 
 %clean
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java	Fri Sep 06 17:31:56 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java	Fri Sep 06 17:42:06 2019 -0400
@@ -165,11 +165,6 @@
                 APP_NAME.fetchFrom(params) + "-app.pkg");
     }
 
-    private File getPackages_DaemonPackage(Map<String, ? super Object> params) {
-        return new File(PACKAGES_ROOT.fetchFrom(params),
-                APP_NAME.fetchFrom(params) + "-daemon.pkg");
-    }
-
     private File getConfig_DistributionXMLFile(
             Map<String, ? super Object> params) {
         return new File(CONFIG_ROOT.fetchFrom(params), "distribution.dist");
@@ -193,10 +188,6 @@
         return IDENTIFIER.fetchFrom(params);
     }
 
-    private String getDaemonIdentifier(Map<String, ? super Object> params) {
-        return IDENTIFIER.fetchFrom(params) + ".daemon";
-    }
-
     private void preparePackageScripts(Map<String, ? super Object> params)
             throws IOException {
         Log.verbose(I18N.getString("message.preparing-scripts"));
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/launchd.plist.template	Fri Sep 06 17:31:56 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-    <key>Label</key>
-    <string>DEPLOY_DAEMON_IDENTIFIER</string>
-    <key>ProgramArguments</key>
-    <array>
-        <string>DEPLOY_DAEMON_LAUNCHER_PATH</string>
-    </array>
-    <key>RunAtLoad</key><DEPLOY_RUN_AT_LOAD/>
-    <key>KeepAlive</key><DEPLOY_KEEP_ALIVE/>
-</dict>
-</plist>
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss	Fri Sep 06 17:31:56 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-;This file will be executed next to the application bundle image
-;I.e. current directory will contain folder INSTALLER_NAME with application files
-[Setup]
-AppId=PRODUCT_APP_IDENTIFIER
-AppName=INSTALLER_NAME
-AppVersion=APPLICATION_VERSION
-AppVerName=INSTALLER_NAME APPLICATION_VERSION
-AppPublisher=APPLICATION_VENDOR
-AppComments=APPLICATION_DESCRIPTION
-AppCopyright=APPLICATION_COPYRIGHT
-VersionInfoVersion=APPLICATION_VERSION
-VersionInfoDescription=APPLICATION_DESCRIPTION
-DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALL_DIR
-DisableStartupPrompt=Yes
-DisableDirPage=DISABLE_DIR_PAGE
-DisableProgramGroupPage=Yes
-DisableReadyPage=Yes
-DisableFinishedPage=Yes
-DisableWelcomePage=Yes
-DefaultGroupName=APPLICATION_GROUP
-;Optional License
-LicenseFile=APPLICATION_LICENSE_FILE
-;WinXP or above
-MinVersion=0,5.1
-OutputBaseFilename=INSTALLER_FILE_NAME
-Compression=lzma
-SolidCompression=yes
-PrivilegesRequired=APPLICATION_INSTALL_PRIVILEGE
-SetupIconFile=INSTALLER_NAME\LAUNCHER_NAME.ico
-UninstallDisplayIcon={app}\LAUNCHER_NAME.ico
-UninstallDisplayName=INSTALLER_NAME
-WizardImageStretch=No
-WizardSmallImageFile=INSTALLER_NAME-setup-icon.bmp
-ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
-FILE_ASSOCIATIONS
-
-[Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
-
-[Files]
-Source: "INSTALLER_NAME\LAUNCHER_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "INSTALLER_NAME\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
-
-[Icons]
-Name: "{group}\INSTALLER_NAME"; Filename: "{app}\LAUNCHER_NAME.exe"; IconFilename: "{app}\LAUNCHER_NAME.ico"; Check: APPLICATION_MENU_SHORTCUT()
-Name: "{commondesktop}\INSTALLER_NAME"; Filename: "{app}\LAUNCHER_NAME.exe";  IconFilename: "{app}\LAUNCHER_NAME.ico"; Check: APPLICATION_DESKTOP_SHORTCUT()
-ADD_LAUNCHERS
-
-[Run]
-Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS_INSTALL()
-Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,INSTALLER_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
-Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-install -svcName ""INSTALLER_NAME"" -svcDesc ""APPLICATION_DESCRIPTION"" -mainExe ""APPLICATION_LAUNCHER_FILENAME"" START_ON_INSTALL RUN_AT_STARTUP"; Check: APPLICATION_SERVICE()
-
-[UninstallRun]
-Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName INSTALLER_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
-
-[Code]
-function returnTrue(): Boolean;
-begin
-  Result := True;
-end;
-
-function returnFalse(): Boolean;
-begin
-  Result := False;
-end;
-
-function InitializeSetup(): Boolean;
-begin
-// Possible future improvements:
-//   if version less or same => just launch app
-//   if upgrade => check if same app is running and wait for it to exit
-  Result := True;
-end;
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss	Fri Sep 06 17:31:56 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-;This file will be executed next to the application bundle image
-;I.e. current directory will contain folder INSTALLER_NAME with application files
-[Setup]
-AppId=PRODUCT_APP_IDENTIFIER
-AppName=INSTALLER_NAME
-AppVersion=APPLICATION_VERSION
-AppVerName=INSTALLER_NAME APPLICATION_VERSION
-AppPublisher=APPLICATION_VENDOR
-AppComments=APPLICATION_DESCRIPTION
-AppCopyright=APPLICATION_COPYRIGHT
-VersionInfoVersion=APPLICATION_VERSION
-VersionInfoDescription=APPLICATION_DESCRIPTION
-DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALLER_NAME
-DisableStartupPrompt=Yes
-DisableDirPage=DISABLE_DIR_PAGE
-DisableProgramGroupPage=Yes
-DisableReadyPage=Yes
-DisableFinishedPage=Yes
-DisableWelcomePage=Yes
-DefaultGroupName=APPLICATION_GROUP
-;Optional License
-LicenseFile=APPLICATION_LICENSE_FILE
-;WinXP or above
-MinVersion=0,5.1
-OutputBaseFilename=INSTALLER_FILE_NAME
-Compression=lzma
-SolidCompression=yes
-PrivilegesRequired=APPLICATION_INSTALL_PRIVILEGE
-SetupIconFile=
-UninstallDisplayIcon=
-UninstallDisplayName=INSTALLER_NAME
-WizardImageStretch=No
-WizardSmallImageFile=INSTALLER_NAME-setup-icon.bmp
-ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
-FILE_ASSOCIATIONS
-
-[Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
-
-[Files]
-Source: "APPLICATION_IMAGE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
-
-[Code]
-function returnTrue(): Boolean;
-begin
-  Result := True;
-end;
-
-function returnFalse(): Boolean;
-begin
-  Result := False;
-end;
-
-function InitializeSetup(): Boolean;
-begin
-  Result := True;
-end;