adding shortcuts items and making it so an /etc/init.d/felix script is not installed ... installer then does not need to be root
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@383594 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/installers/pom.xml b/installers/pom.xml
index c675275..849b777 100644
--- a/installers/pom.xml
+++ b/installers/pom.xml
@@ -154,6 +154,9 @@
<izPackInstallFile>
src/main/installers/izpack-unix.xml
</izPackInstallFile>
+ <izPackShortcutsUnixFile>
+ src/main/installers/unix_shortcuts.xml
+ </izPackShortcutsUnixFile>
<finalName>
felix-${pom.version}-linux-i386-setup.jar
</finalName>
@@ -170,6 +173,9 @@
<izPackInstallFile>
src/main/installers/izpack-unix.xml
</izPackInstallFile>
+ <izPackShortcutsUnixFile>
+ src/main/installers/unix_shortcuts.xml
+ </izPackShortcutsUnixFile>
<osName>sunos</osName>
<osFamily>unix</osFamily>
<osArch>sparc</osArch>
@@ -180,6 +186,9 @@
<izPackInstallFile>
src/main/installers/izpack-unix.xml
</izPackInstallFile>
+ <izPackShortcutsUnixFile>
+ src/main/installers/unix_shortcuts.xml
+ </izPackShortcutsUnixFile>
<finalName>
felix-${pom.version}-solaris-i386-setup.jar
</finalName>
@@ -193,6 +202,9 @@
<izPackInstallFile>
src/main/installers/izpack-mac.xml
</izPackInstallFile>
+ <izPackShortcutsUnixFile>
+ src/main/installers/unix_shortcuts.xml
+ </izPackShortcutsUnixFile>
<finalName>
felix-${pom.version}-macosx-ppc-setup.jar
</finalName>
diff --git a/installers/src/main/installers/izpack-mac.xml b/installers/src/main/installers/izpack-mac.xml
index 6b958e0..7b41d29 100644
--- a/installers/src/main/installers/izpack-mac.xml
+++ b/installers/src/main/installers/izpack-mac.xml
@@ -77,10 +77,7 @@
</fileset>
<executable os="unix" targetfile="$INSTALL_PATH/bin/${app}" stage="never" keep="true" />
- <singlefile os="unix" src="bin/${server.init}" target="/etc/init.d/${app}" />
<parsable os="unix" targetfile="$INSTALL_PATH/bin/${server.init}" type="shell" />
- <parsable os="unix" targetfile="/etc/init.d/${app}" type="shell" />
- <executable os="unix" targetfile="/etc/init.d/${app}" stage="never" keep="true" />
<executable os="unix" targetfile="$INSTALL_PATH/bin/${server.init}" stage="never" keep="true" />
</pack>
</packs>
diff --git a/installers/src/main/installers/izpack-unix.xml b/installers/src/main/installers/izpack-unix.xml
index bbf4ffa..3388fad 100644
--- a/installers/src/main/installers/izpack-unix.xml
+++ b/installers/src/main/installers/izpack-unix.xml
@@ -77,11 +77,8 @@
</fileset>
<executable os="unix" targetfile="$INSTALL_PATH/bin/${app}" stage="never" keep="true" />
- <singlefile os="unix" src="bin/${server.init}" target="/etc/init.d/${app}" />
<parsable os="unix" targetfile="$INSTALL_PATH/bin/${server.init}" type="shell" />
<parsable os="unix" targetfile="$INSTALL_PATH/conf/config.properties" type="shell" />
- <parsable os="unix" targetfile="/etc/init.d/${app}" type="shell" />
- <executable os="unix" targetfile="/etc/init.d/${app}" stage="never" keep="true" />
<executable os="unix" targetfile="$INSTALL_PATH/bin/${server.init}" stage="never" keep="true" />
<executable os="unix" targetfile="$INSTALL_PATH/bin/felix.jar" stage="never" keep="true" />
</pack>
diff --git a/installers/src/main/installers/unix_shortcuts.xml b/installers/src/main/installers/unix_shortcuts.xml
new file mode 100644
index 0000000..8f96c1b
--- /dev/null
+++ b/installers/src/main/installers/unix_shortcuts.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+ This script has been generated by the daemon installer plugin and was not
+ supplied by the application.
+
+ -->
+
+<shortcuts>
+ <programGroup defaultName="${app}" location="applications"/>
+
+ <shortcut
+ name="Start ${app} Server"
+ programGroup="yes"
+ desktop="yes"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="sh"
+ workingDirectory="$INSTALL_PATH/bin"
+ commandLine="$INSTALL_PATH/bin/${server.init} start"
+ iconFile="$INSTALL_PATH/${app.icon}"
+ type="Application"
+ encoding="UTF-8"
+ description="Start ${app} Server">
+ <createForPack name="Binaries"/>
+ </shortcut>
+
+ <shortcut
+ name="Stop ${app} Server"
+ programGroup="yes"
+ desktop="yes"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="sh"
+ workingDirectory="$INSTALL_PATH/bin"
+ commandLine="$INSTALL_PATH/bin/${server.init} stop"
+ iconFile="$INSTALL_PATH/${app.icon}"
+ type="Application"
+ encoding="UTF-8"
+ description="Start ${app} Server">
+ <createForPack name="Binaries"/>
+ </shortcut>
+
+ <shortcut
+ name="Debug ${app} Server"
+ programGroup="yes"
+ desktop="yes"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="sh"
+ workingDirectory="$INSTALL_PATH/bin"
+ commandLine="$INSTALL_PATH/bin/${server.init} debug"
+ iconFile="$INSTALL_PATH/${app.icon}"
+ type="Application"
+ encoding="UTF-8"
+ description="Start ${app} Server">
+ <createForPack name="Binaries"/>
+ </shortcut>
+
+ <shortcut
+ name="Uninstaller"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="java"
+ commandLine="java -jar "$INSTALL_PATH/Uninstaller/uninstaller.jar""
+ initialState="noShow"
+ iconFile="trashcan_full"
+ iconIndex="0"
+ workingDirectory=""
+ type="Application"
+ encoding="UTF-8"
+ description="Uninstall ${app} Server">
+ <createForPack name="Binaries" />
+ </shortcut>
+</shortcuts>