diff --git a/src/messic-assembly/bin/windows/messic_console.exe b/src/messic-assembly/bin/windows/messic_console.exe
new file mode 100644
index 0000000..7299ee1
Binary files /dev/null and b/src/messic-assembly/bin/windows/messic_console.exe differ
diff --git a/src/messic-assembly/bin/windows/nsis_installer/script.nsi b/src/messic-assembly/bin/windows/nsis_installer/script.nsi
index 32ac1bb..b5e8edb 100644
--- a/src/messic-assembly/bin/windows/nsis_installer/script.nsi
+++ b/src/messic-assembly/bin/windows/nsis_installer/script.nsi
@@ -2,6 +2,7 @@
!addplugindir ".\Include\AccessControl\Plugins\"
!include .\Include\ZipDLL\zipdll.nsh
+
# This installs two files, app.exe and logo.ico, creates a start menu shortcut, builds an uninstaller, and
# adds uninstall information to the registry for Add/Remove Programs
@@ -15,11 +16,11 @@
!define COMPANYNAME "messic"
!define DESCRIPTION "Music organizer and player"
#Files to include at the installer
-!define ZIP_FILE "messic-1.0.0-beta.app.zip"
+!define ZIP_FILE "messic-1.1.0.app.zip"
# These three must be integers
!define VERSIONMAJOR 1
-!define VERSIONMINOR 0
-!define VERSIONBUILD 0-beta
+!define VERSIONMINOR 1
+!define VERSIONBUILD 0
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
# It is possible to use "mailto:" links in here to open the email client
!define HELPURL "http://spheras.github.io/messic/" # "Support Information" link
@@ -29,7 +30,18 @@
# This is the size (in kB) of all the files copied into "Program Files"
!define INSTALLSIZE 122880
+XPStyle on
RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
+
+; First is default
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Spanish.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Catalan.nlf"
+
+LangString uninstall_previous_message ${LANG_ENGLISH} "${APPNAME} is already installed. $\n$\nClick 'OK' to remove the previous version (remember that the uninstall DON'T remove your music folder) or `Cancel` to cancel this upgrade. $\nWARNING: before uninstall, be sure to STOP the messic service if it is running."
+LangString uninstall_previous_message ${LANG_SPANISH} "${APPNAME} ya está instalado. $\n$\nHaz Click en 'OK' para eliminar la instalación previa de messic (recuerda que la desinstalación NO elimina la carpeta de música) o 'Cancelar' para cancelar esta instalación. $\nIMPORTANTE: antes de desinstalar asegúrate de que el servicio messic está parado."
+LangString uninstall_previous_message ${LANG_CATALAN} "${APPNAME} ja està instal·lat. $\n$\nFes clic a 'OK' per eliminar la instal·lació prèvia d'messic (recorda que la desinstal·lació NO elimina la carpeta de música) o 'Cancel·la' per cancel·lar aquesta instal·lació. $\nIMPORTANT: abans de desinstal·lar assegura't que el servei messic està aturat."
+
InstallDir "$PROGRAMFILES\${APPNAME}"
@@ -61,6 +73,42 @@ ${EndIf}
function .onInit
setShellVarContext all
!insertmacro VerifyUserIsAdmin
+
+ ;code to uninstall previously the installed messic
+ ReadRegStr $R0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" \
+ "UninstallString"
+ StrCmp $R0 "" done
+
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
+ "$(uninstall_previous_message)" \
+ IDOK uninst
+ Abort
+
+ ;Run the uninstaller
+ uninst:
+ ClearErrors
+ ;Exec $INSTDIR\uninstall.exe ; instead of the ExecWait line
+ ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
+
+ IfErrors no_remove_uninstaller done
+ ;You can either use Delete /REBOOTOK in the uninstaller or add some code
+ ;here to remove the uninstaller. Use a registry key to check
+ ;whether the user has chosen to uninstall. If you are using an uninstaller
+ ;components page, make sure all sections are uninstalled.
+ no_remove_uninstaller:
+
+ done:
+
+ ;we check again
+ ReadRegStr $R0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" \
+ "UninstallString"
+ StrCmp $R0 "" doneagain
+ Abort
+
+ doneagain:
+
functionEnd
section "install"
@@ -122,7 +170,6 @@ function un.onInit
functionEnd
section "uninstall"
-
# Remove Start Menu launcher
delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk"
delete "$SMPROGRAMS\${COMPANYNAME}\uninstall.lnk"
diff --git a/src/messic-assembly/bin/windows/readme-creatensisinstall.txt b/src/messic-assembly/bin/windows/readme-creatensisinstall.txt
index 4e3f9ca..00c1638 100644
--- a/src/messic-assembly/bin/windows/readme-creatensisinstall.txt
+++ b/src/messic-assembly/bin/windows/readme-creatensisinstall.txt
@@ -2,7 +2,8 @@ This instructions details the creation of the nsis .exe installer
1. first download nsis and install it at any windows computer
2. Modify the file nsis_installer/script.nsi, the line 18, something like (!define ZIP_FILE "messic-1.0.0-beta.app.zip"), to the new zip name
-3. copy there the zip of messic
-4. IMPORTANT! ensure that the zip contains directly messic (by default the zip contains a folder which contains messic).
-5. compile with nsis the script at nsis_installer/script.nsi
-6. that's all!
\ No newline at end of file
+3. Modify the version numbering major minor build
+4. copy there the zip of messic
+5. IMPORTANT! ensure that the zip contains directly messic (by default the zip contains a folder which contains messic).
+6. compile with nsis the script at nsis_installer/script.nsi
+7. that's all!
\ No newline at end of file
diff --git a/src/messic-assembly/bin/windows/script.nsi b/src/messic-assembly/bin/windows/script.nsi
deleted file mode 100644
index 12adbf5..0000000
--- a/src/messic-assembly/bin/windows/script.nsi
+++ /dev/null
@@ -1,146 +0,0 @@
-!addplugindir ".\Include\ZipDLL\"
-!addplugindir ".\Include\AccessControl\Plugins\"
-!include .\Include\ZipDLL\zipdll.nsh
-
-# This installs two files, app.exe and logo.ico, creates a start menu shortcut, builds an uninstaller, and
-# adds uninstall information to the registry for Add/Remove Programs
-
-# To get started, put this script into a folder with the two files (app.exe, logo.ico, and license.rtf -
-# You'll have to create these yourself) and run makensis on it
-
-# If you change the names "app.exe", "logo.ico", or "license.rtf" you should do a search and replace - they
-# show up in a few places.
-# All the other settings can be tweaked by editing the !defines at the top of this script
-!define APPNAME "messic"
-!define COMPANYNAME "messic"
-!define DESCRIPTION "Music organizer and player"
-#Files to include at the installer
-!define ZIP_FILE "messic-1.0.1.app.zip"
-# These three must be integers
-!define VERSIONMAJOR 1
-!define VERSIONMINOR 0
-!define VERSIONBUILD 0-beta
-# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
-# It is possible to use "mailto:" links in here to open the email client
-!define HELPURL "http://spheras.github.io/messic/" # "Support Information" link
-!define UPDATEURL "http://spheras.github.io/messic/" # "Product Updates" link
-!define ABOUTURL "http://spheras.github.io/messic/" # "Publisher" link
-!define LOGOTIPO_FILE "logotipo-32x32.ico"
-# This is the size (in kB) of all the files copied into "Program Files"
-!define INSTALLSIZE 122880
-
-RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
-
-InstallDir "$PROGRAMFILES\${APPNAME}"
-
-# rtf or txt file - remember if it is txt, it must be in the DOS text format (\r\n)
-LicenseData "license.txt"
-# This will be in the installer/uninstaller's title bar
-Name "${APPNAME}"
-Icon "${LOGOTIPO_FILE}"
-outFile "messic-installer.exe"
-
-!include LogicLib.nsh
-
-# Just three pages - license agreement, install location, and installation
-page license
-page directory
-Page instfiles
-
-
-!macro VerifyUserIsAdmin
-UserInfo::GetAccountType
-pop $0
-${If} $0 != "admin" ;Require admin rights on NT4+
- messageBox mb_iconstop "Administrator rights required!"
- setErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
- quit
-${EndIf}
-!macroend
-
-function .onInit
- setShellVarContext all
- !insertmacro VerifyUserIsAdmin
-functionEnd
-
-section "install"
- # Files for the install directory - to build the installer, these should be in the same directory as the install script (this file)
- setOutPath $INSTDIR
- # Files added here should be removed by the uninstaller (see section "uninstall")
- file "${ZIP_FILE}"
- file "${LOGOTIPO_FILE}"
- # Add any other files for the install directory (license files, app data, etc) here
-
- # Decompressing the zip file
-
- ZipDLL::extractall "${ZIP_FILE}" "$INSTDIR\messic.app"
- delete ${ZIP_FILE}
- # Make the directory "$INSTDIR\database" read write accessible by all users
- AccessControl::GrantOnFile \
- "$INSTDIR\messic.app" "(BU)" "GenericRead + GenericWrite"
-
- # Uninstaller - See function un.onInit and section "uninstall" for configuration
- writeUninstaller "$INSTDIR\uninstall.exe"
-
- # Start Menu
- createDirectory "$SMPROGRAMS\${COMPANYNAME}"
- setOutPath $INSTDIR\messic.app #this to set the start in parameter of the shortcut
- createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\messic.app\messic.exe" "" "$INSTDIR\${LOGOTIPO_FILE}"
- setOutPath $INSTDIR #returning to the start in of the application
- createShortCut "$SMPROGRAMS\${COMPANYNAME}\uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe"
-
- # Registry information for add/remove programs
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayName" "${COMPANYNAME} - ${APPNAME} - ${DESCRIPTION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation" "$\"$INSTDIR$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\${LOGOTIPO_FILE}$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "Publisher" "$\"${COMPANYNAME}$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "HelpLink" "$\"${HELPURL}$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLInfoAbout" "$\"${ABOUTURL}$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayVersion" "$\"${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}$\""
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMajor" ${VERSIONMAJOR}
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMinor" ${VERSIONMINOR}
- # There is no option for modifying or repairing the install
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1
- # Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "EstimatedSize" ${INSTALLSIZE}
-sectionEnd
-
-# Uninstaller
-
-function un.onInit
- SetShellVarContext all
-
- #Verify the uninstaller - last chance to back out
- MessageBox MB_OKCANCEL "Permanently remove ${APPNAME}?" IDOK next
- Abort
- next:
- !insertmacro VerifyUserIsAdmin
-functionEnd
-
-section "uninstall"
-
- # Remove Start Menu launcher
- delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk"
- delete "$SMPROGRAMS\${COMPANYNAME}\uninstall.lnk"
- # Try to remove the Start Menu folder - this will only happen if it is empty
- rmDir "$SMPROGRAMS\${COMPANYNAME}"
-
- # Remove files
- #delete $INSTDIR\app.exe
- delete $INSTDIR\${LOGOTIPO_FILE}
-
- # Always delete uninstaller as the last action
- delete $INSTDIR\uninstall.exe
-
- # removing the whole directory
- rmDir /r $INSTDIR\messic.app
- # Try to remove the install directory - this will only happen if it is empty
- rmDir $INSTDIR
-
- # Remove uninstaller information from the registry
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}"
-sectionEnd
\ No newline at end of file
diff --git a/src/messic-assembly/src/assembly/dep-windows.xml b/src/messic-assembly/src/assembly/dep-windows.xml
index f3fa1fd..dd00eff 100644
--- a/src/messic-assembly/src/assembly/dep-windows.xml
+++ b/src/messic-assembly/src/assembly/dep-windows.xml
@@ -75,6 +75,11 @@
./messic_admin.exe
+
+
+ ./
+ messic_console.exe
+
diff --git a/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/Activator.java b/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/Activator.java
index 618acb8..5067f76 100644
--- a/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/Activator.java
+++ b/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/Activator.java
@@ -36,16 +36,28 @@ public class Activator
**/
public void start( BundleContext bundleContext )
{
- String sversion = LibShout.get().getVersion();
- if ( !sversion.equals( "2.3.1" ) )
+ try
{
- logger.warn( "icecast2 version " + sversion );
- }
- logger.info( "Radio - Icecast2 Started" );
- Hashtable props = new Hashtable();
- props.put( MessicRadioPlugin.MESSIC_RADIO_PLUGIN_NAME, MessicRadioPluginIceCast2.NAME );
- bundleContext.registerService( MessicRadioPlugin.class.getName(), new MessicRadioPluginIceCast2(), props );
+ String sversion = LibShout.get().getVersion();
+ if ( !sversion.equals( "2.3.1" ) )
+ {
+ logger.warn( "icecast2 version " + sversion );
+ }
+ logger.info( "Radio - Icecast2 Started" );
+
+ Hashtable props = new Hashtable();
+ props.put( MessicRadioPlugin.MESSIC_RADIO_PLUGIN_NAME, MessicRadioPluginIceCast2.NAME );
+ bundleContext.registerService( MessicRadioPlugin.class.getName(), new MessicRadioPluginIceCast2(), props );
+ }
+ catch ( Exception e )
+ {
+ logger.info( "Radio - Icecast2 Not Available" );
+ }
+ catch ( Error e )
+ {
+ logger.info( "Radio - Icecast2 Not Available" );
+ }
}
diff --git a/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/MessicRadioPluginIceCast2.java b/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/MessicRadioPluginIceCast2.java
index 430ece1..2f1bf85 100644
--- a/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/MessicRadioPluginIceCast2.java
+++ b/src/messic-server-plugin-radio-icecast2/src/main/java/org/messic/server/api/radio/icecast2/MessicRadioPluginIceCast2.java
@@ -81,9 +81,20 @@ private void checkConnection()
{
if ( isStarted() )
{
- if ( !LibShout.get().isConnected() )
+ try
+ {
+ if ( !LibShout.get().isConnected() )
+ {
+ this.info.status = MessicRadioStatus.NOT_STARTED;
+ }
+ }
+ catch ( Exception e )
+ {
+ this.info.status = MessicRadioStatus.NOT_ENABLED;
+ }
+ catch ( Error e )
{
- this.info.status = MessicRadioStatus.NOT_STARTED;
+ this.info.status = MessicRadioStatus.NOT_ENABLED;
}
}
}