First commit
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sourceforge.subsonic</groupId>
|
||||
<artifactId>subsonic-installer-windows</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Subsonic Installer for Windows</name>
|
||||
|
||||
<parent>
|
||||
<groupId>net.sourceforge.subsonic</groupId>
|
||||
<artifactId>subsonic</artifactId>
|
||||
<version>5.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<exe4j.home>c:/Program Files/exe4j</exe4j.home>
|
||||
<nsis.home>c:/Program Files (x86)/NSIS</nsis.home>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.subsonic</groupId>
|
||||
<artifactId>subsonic-main</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.subsonic</groupId>
|
||||
<artifactId>subsonic-booter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>windows</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>windows</family>
|
||||
</os>
|
||||
</activation>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>exe4j</id>
|
||||
<phase>compile</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<echo>Compiling exe4j...</echo>
|
||||
<copy file="${basedir}/src/main/exe4j/subsonic-agent.exe.vmoptions" todir="${project.build.directory}"/>
|
||||
<copy file="${basedir}/src/main/exe4j/subsonic-agent-elevated.exe.vmoptions" todir="${project.build.directory}"/>
|
||||
<copy file="${basedir}/src/main/exe4j/subsonic-service.exe.vmoptions" todir="${project.build.directory}"/>
|
||||
<exec executable="${exe4j.home}/bin/exe4jc">
|
||||
<arg value="--license=L-SINDRE_MEHUS#14926715500010001-1ty7dbe11l10ll#140"/>
|
||||
</exec>
|
||||
<exec executable="${exe4j.home}/bin/exe4jc">
|
||||
<arg value="${basedir}/src/main/exe4j/subsonic-agent.exe4j"/>
|
||||
</exec>
|
||||
<exec executable="${exe4j.home}/bin/exe4jc">
|
||||
<arg value="${basedir}/src/main/exe4j/subsonic-agent-elevated.exe4j"/>
|
||||
</exec>
|
||||
<exec executable="${exe4j.home}/bin/exe4jc">
|
||||
<arg value="${basedir}/src/main/exe4j/subsonic-service.exe4j"/>
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>nsis</id>
|
||||
<phase>compile</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<echo>Compiling NSIS script...</echo>
|
||||
<mkdir dir="${project.build.directory}"/>
|
||||
<exec executable="${nsis.home}/makensis">
|
||||
<arg value="${basedir}/src/main/nsis/subsonic.nsi"/>
|
||||
<arg value="-XOutFile ${project.build.directory}/subsonic-${project.version}-setup.exe"/>
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
-Xmx16m
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<exe4j version="4.4.4" transformSequenceNumber="1">
|
||||
<directoryPresets config="." />
|
||||
<application name="Subsonic" distributionSourceDir="../../../target">
|
||||
<languages>
|
||||
<principalLanguage id="en" customLocalizationFile="" />
|
||||
</languages>
|
||||
</application>
|
||||
<executable name="subsonic-agent-elevated" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="requireAdministrator" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
|
||||
<messageSet>
|
||||
<message id="NoJvmFound" text="Java was not found on your system. Please download Java from www.java.com." />
|
||||
</messageSet>
|
||||
<versionInfo include="false" fileVersion="" fileDescription="" legalCopyright="" internalName="" productName="" companyName="" productVersion="" />
|
||||
</executable>
|
||||
<splashScreen show="false" autoOff="false" alwaysOnTop="false" width="-1" height="-1" bitmapFile="" java6SplashScreen="false">
|
||||
<text>
|
||||
<statusLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
</text>
|
||||
</splashScreen>
|
||||
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="" arguments="-agent -elevated" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false">
|
||||
<searchSequence>
|
||||
<registry />
|
||||
<envVar name="JAVA_HOME" />
|
||||
<envVar name="JDK_HOME" />
|
||||
</searchSequence>
|
||||
<classPath>
|
||||
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" />
|
||||
</classPath>
|
||||
<nativeLibraryDirectories />
|
||||
</java>
|
||||
<includedFiles />
|
||||
<unextractableFiles />
|
||||
</exe4j>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-Xmx16m
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<exe4j version="4.5.1" transformSequenceNumber="1">
|
||||
<directoryPresets config="." />
|
||||
<application name="Subsonic" distributionSourceDir="../../../target">
|
||||
<languages>
|
||||
<principalLanguage id="en" customLocalizationFile="" />
|
||||
</languages>
|
||||
</application>
|
||||
<executable name="subsonic-agent" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
|
||||
<messageSet>
|
||||
<message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="NoJvmFound3264" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmInPath3264" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath32" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath64" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
</messageSet>
|
||||
<versionInfo include="false" fileVersion="" fileDescription="" legalCopyright="" internalName="" productName="" companyName="" productVersion="" />
|
||||
</executable>
|
||||
<splashScreen show="false" autoOff="false" alwaysOnTop="false" width="-1" height="-1" bitmapFile="" java6SplashScreen="false">
|
||||
<text>
|
||||
<statusLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
</text>
|
||||
</splashScreen>
|
||||
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="" arguments="-agent" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false">
|
||||
<searchSequence>
|
||||
<registry />
|
||||
<envVar name="JAVA_HOME" />
|
||||
<envVar name="JDK_HOME" />
|
||||
</searchSequence>
|
||||
<classPath>
|
||||
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" />
|
||||
</classPath>
|
||||
<nativeLibraryDirectories />
|
||||
</java>
|
||||
<includedFiles />
|
||||
<unextractableFiles />
|
||||
</exe4j>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
-Xmx150m
|
||||
-verbose:gc
|
||||
-Dsubsonic.host=0.0.0.0
|
||||
-Dsubsonic.port=4040
|
||||
-Dsubsonic.httpsPort=0
|
||||
-Dsubsonic.contextPath=/
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<exe4j version="4.5.1" transformSequenceNumber="1">
|
||||
<directoryPresets config="." />
|
||||
<application name="Subsonic" distributionSourceDir="../../../target">
|
||||
<languages>
|
||||
<principalLanguage id="en" customLocalizationFile="" />
|
||||
</languages>
|
||||
</application>
|
||||
<executable name="subsonic-service" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-service.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="3" changeWorkingDirectory="true" workingDirectory="." singleInstance="true" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
|
||||
<messageSet>
|
||||
<message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="NoJvmFound3264" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmInPath3264" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath32" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
<message id="JvmDefinedPath64" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
|
||||
</messageSet>
|
||||
<versionInfo include="false" fileVersion="" fileDescription="" legalCopyright="" internalName="" productName="" companyName="" productVersion="" />
|
||||
</executable>
|
||||
<splashScreen show="false" autoOff="false" alwaysOnTop="false" width="-1" height="-1" bitmapFile="" java6SplashScreen="false">
|
||||
<text>
|
||||
<statusLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
|
||||
</text>
|
||||
</splashScreen>
|
||||
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="-Dsubsonic.createLinkFile=true -Dsubsonic.windowsInstall=true" arguments="" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.5" maxVersion="" allowBetaVM="true" jdkOnly="false">
|
||||
<searchSequence>
|
||||
<registry />
|
||||
<envVar name="JAVA_HOME" />
|
||||
<envVar name="JDK_HOME" />
|
||||
</searchSequence>
|
||||
<classPath>
|
||||
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" />
|
||||
</classPath>
|
||||
<nativeLibraryDirectories />
|
||||
</java>
|
||||
<includedFiles />
|
||||
<unextractableFiles />
|
||||
</exe4j>
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,213 @@
|
||||
# subsonic.nsi
|
||||
|
||||
!include "WordFunc.nsh"
|
||||
!include "MUI.nsh"
|
||||
|
||||
!insertmacro VersionCompare
|
||||
|
||||
# The name of the installer
|
||||
Name "Subsonic"
|
||||
|
||||
# The default installation directory
|
||||
InstallDir $PROGRAMFILES\Subsonic
|
||||
|
||||
# Registry key to check for directory (so if you install again, it will
|
||||
# overwrite the old one automatically)
|
||||
InstallDirRegKey HKLM "Software\Subsonic" "Install_Dir"
|
||||
|
||||
#--------------------------------
|
||||
#Interface Configuration
|
||||
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Getting Started.html"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Getting Started document"
|
||||
|
||||
#--------------------------------
|
||||
# Pages
|
||||
|
||||
# This page checks for JRE
|
||||
Page custom CheckInstalledJRE
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
# Languages
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Section "Subsonic"
|
||||
|
||||
SectionIn RO
|
||||
|
||||
# Install for all users
|
||||
SetShellVarContext "all"
|
||||
|
||||
# Take backup of existing subsonic-service.exe.vmoptions
|
||||
CopyFiles /SILENT $INSTDIR\subsonic-service.exe.vmoptions $TEMP\subsonic-service.exe.vmoptions
|
||||
|
||||
# Silently uninstall existing version.
|
||||
ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR'
|
||||
|
||||
# Remove previous Jetty temp directory.
|
||||
RMDir /r "c:\subsonic\jetty"
|
||||
|
||||
# Backup database.
|
||||
RMDir /r "c:\subsonic\db.backup"
|
||||
CreateDirectory "c:\subsonic\db.backup"
|
||||
CopyFiles /SILENT "c:\subsonic\db\*" "c:\subsonic\db.backup"
|
||||
|
||||
# Set output path to the installation directory.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
# Write files.
|
||||
File ..\..\..\target\subsonic-agent.exe
|
||||
File ..\..\..\target\subsonic-agent.exe.vmoptions
|
||||
File ..\..\..\target\subsonic-agent-elevated.exe
|
||||
File ..\..\..\target\subsonic-agent-elevated.exe.vmoptions
|
||||
File ..\..\..\target\subsonic-service.exe
|
||||
File ..\..\..\target\subsonic-service.exe.vmoptions
|
||||
File ..\..\..\..\subsonic-booter\target\subsonic-booter-jar-with-dependencies.jar
|
||||
File ..\..\..\..\subsonic-main\README.TXT
|
||||
File ..\..\..\..\subsonic-main\LICENSE.TXT
|
||||
File "..\..\..\..\subsonic-main\Getting Started.html"
|
||||
File ..\..\..\..\subsonic-main\target\subsonic.war
|
||||
File ..\..\..\..\subsonic-main\target\classes\version.txt
|
||||
File ..\..\..\..\subsonic-main\target\classes\build_number.txt
|
||||
|
||||
# Write the installation path into the registry
|
||||
WriteRegStr HKLM SOFTWARE\Subsonic "Install_Dir" "$INSTDIR"
|
||||
|
||||
# Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Subsonic" "DisplayName" "Subsonic"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Subsonic" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Subsonic" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Subsonic" "NoRepair" 1
|
||||
WriteUninstaller "uninstall.exe"
|
||||
|
||||
# Restore subsonic-service.exe.vmoptions
|
||||
CopyFiles /SILENT $TEMP\subsonic-service.exe.vmoptions $INSTDIR\subsonic-service.exe.vmoptions
|
||||
Delete $TEMP\subsonic-service.exe.vmoptions
|
||||
|
||||
# Write transcoding pack files.
|
||||
SetOutPath "c:\subsonic\transcode"
|
||||
File ..\..\..\..\subsonic-transcode\windows\*.*
|
||||
|
||||
# Add Windows Firewall exception.
|
||||
# (Requires NSIS plugin found on http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin to be installed
|
||||
# as NSIS_HOME/Plugins/SimpleFC.dll)
|
||||
|
||||
SimpleFC::AdvAddRule "Subsonic Service (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\subsonic-service.exe" "" "" "Subsonic" "" "" "" ""
|
||||
SimpleFC::AdvAddRule "Subsonic Service (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\subsonic-service.exe" "" "" "Subsonic" "" "" "" ""
|
||||
SimpleFC::AdvAddRule "Subsonic Agent (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\subsonic-agent.exe" "" "" "Subsonic" "" "" "" ""
|
||||
SimpleFC::AdvAddRule "Subsonic Agent (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\subsonic-agent.exe" "" "" "Subsonic" "" "" "" ""
|
||||
SimpleFC::AdvAddRule "Subsonic Agent Elevated (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\subsonic-agent-elevated.exe" "" "" "Subsonic" "" "" "" ""
|
||||
SimpleFC::AdvAddRule "Subsonic Agent Elevated (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\subsonic-agent-elevated.exe" "" "" "Subsonic" "" "" "" ""
|
||||
|
||||
# Install and start service.
|
||||
ExecWait '"$INSTDIR\subsonic-service.exe" -install'
|
||||
ExecWait '"$INSTDIR\subsonic-service.exe" -start'
|
||||
|
||||
# Start agent.
|
||||
Exec '"$INSTDIR\subsonic-agent-elevated.exe" -balloon'
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section "Start Menu Shortcuts"
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\Subsonic"
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Open Subsonic.lnk" "$INSTDIR\subsonic.url" "" "$INSTDIR\subsonic-agent.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Subsonic Tray Icon.lnk" "$INSTDIR\subsonic-agent.exe" "-balloon" "$INSTDIR\subsonic-agent.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Start Subsonic Service.lnk" "$INSTDIR\subsonic-service.exe" "-start" "$INSTDIR\subsonic-service.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Stop Subsonic Service.lnk" "$INSTDIR\subsonic-service.exe" "-stop" "$INSTDIR\subsonic-service.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Uninstall Subsonic.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\Subsonic\Getting Started.lnk" "$INSTDIR\Getting Started.html" "" "$INSTDIR\Getting Started.html" 0
|
||||
|
||||
CreateShortCut "$SMSTARTUP\Subsonic.lnk" "$INSTDIR\subsonic-agent.exe" "" "$INSTDIR\subsonic-agent.exe" 0
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
# Uninstaller
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
# Uninstall for all users
|
||||
SetShellVarContext "all"
|
||||
|
||||
# Stop and uninstall service if present.
|
||||
ExecWait '"$INSTDIR\subsonic-service.exe" -stop'
|
||||
ExecWait '"$INSTDIR\subsonic-service.exe" -uninstall'
|
||||
|
||||
# Stop agent by killing it.
|
||||
# (Requires NSIS plugin found on http://nsis.sourceforge.net/Processes_plug-in to be installed
|
||||
# as NSIS_HOME/Plugins/Processes.dll)
|
||||
Processes::KillProcess "subsonic-agent"
|
||||
Processes::KillProcess "subsonic-agent-elevated"
|
||||
Processes::KillProcess "ffmpeg"
|
||||
|
||||
# Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Subsonic"
|
||||
DeleteRegKey HKLM SOFTWARE\Subsonic
|
||||
|
||||
# Remove files.
|
||||
Delete "$SMSTARTUP\Subsonic.lnk"
|
||||
RMDir /r "$SMPROGRAMS\Subsonic"
|
||||
Delete "$INSTDIR\build_number.txt"
|
||||
Delete "$INSTDIR\elevate.exe"
|
||||
Delete "$INSTDIR\Getting Started.html"
|
||||
Delete "$INSTDIR\LICENSE.TXT"
|
||||
Delete "$INSTDIR\README.TXT"
|
||||
Delete "$INSTDIR\subsonic.url"
|
||||
Delete "$INSTDIR\subsonic.war"
|
||||
Delete "$INSTDIR\subsonic-agent.exe"
|
||||
Delete "$INSTDIR\subsonic-agent.exe.vmoptions"
|
||||
Delete "$INSTDIR\subsonic-agent-elevated.exe"
|
||||
Delete "$INSTDIR\subsonic-agent-elevated.exe.vmoptions"
|
||||
Delete "$INSTDIR\subsonic-booter-jar-with-dependencies.jar"
|
||||
Delete "$INSTDIR\subsonic-service.exe"
|
||||
Delete "$INSTDIR\subsonic-service.exe.vmoptions"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
Delete "$INSTDIR\version.txt"
|
||||
RMDir /r "$INSTDIR\log"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
# Remove Windows Firewall exception.
|
||||
# (Requires NSIS plugin found on http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin to be installed
|
||||
# as NSIS_HOME/Plugins/SimpleFC.dll)
|
||||
SimpleFC::AdvRemoveRule "Subsonic Service (TCP)"
|
||||
SimpleFC::AdvRemoveRule "Subsonic Service (UDP)"
|
||||
SimpleFC::AdvRemoveRule "Subsonic Agent (TCP)"
|
||||
SimpleFC::AdvRemoveRule "Subsonic Agent (UDP)"
|
||||
SimpleFC::AdvRemoveRule "Subsonic Agent Elevated (TCP)"
|
||||
SimpleFC::AdvRemoveRule "Subsonic Agent Elevated (UDP)"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
Function CheckInstalledJRE
|
||||
# Read the value from the registry into the $0 register
|
||||
ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" CurrentVersion
|
||||
|
||||
# Check JRE version. At least 1.6 is required.
|
||||
# $1=0 Versions are equal
|
||||
# $1=1 Installed version is newer
|
||||
# $1=2 Installed version is older (or non-existent)
|
||||
${VersionCompare} $0 "1.6" $1
|
||||
IntCmp $1 2 InstallJRE 0 0
|
||||
Return
|
||||
|
||||
InstallJRE:
|
||||
# Launch Java web installer.
|
||||
MessageBox MB_OK "Java was not found and will now be installed."
|
||||
File /oname=$TEMP\jre-setup.exe jre-8u31-windows-i586-iftw.exe
|
||||
ExecWait '"$TEMP\jre-setup.exe"' $0
|
||||
Delete "$TEMP\jre-setup.exe"
|
||||
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user