diff --git a/retroshare-gui/src/retroshare-process.nsi b/retroshare-gui/src/retroshare-process.nsi index d853f8461..9e6051d9d 100644 --- a/retroshare-gui/src/retroshare-process.nsi +++ b/retroshare-gui/src/retroshare-process.nsi @@ -4,7 +4,7 @@ ; Define your application name !define APPNAME "RetroShare" -!define VERSION "0.4.12a" +!define VERSION "0.4.12c" !define APPNAMEANDVERSION "${APPNAME} ${VERSION}" @@ -17,7 +17,7 @@ BrandingText "${APPNAMEANDVERSION}" ; Use compression SetCompressor LZMA -VAR KILLEXENAME +VAR KILLEXENAME ; Modern interface settings @@ -35,7 +35,7 @@ VAR KILLEXENAME !define MUI_LICENSEPAGE_RADIOBUTTONS !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support" -!define MUI_FINISHPAGE_LINK_LOCATION "http://sourceforge.net/forum/forum.php?forum_id=618174" +!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/" !define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare.exe" !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt !define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt @@ -136,101 +136,101 @@ ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS -; CloseRetroShare: this will in a loop send the RetroShare window the WM_CLOSE -; message until it does not find a valid RetroShare window +; CloseRetroShare: this will in a loop send the RetroShare window the WM_CLOSE +; message until it does not find a valid RetroShare window ; - -!macro CloseRetroShare UN -Function ${UN}CloseRetroShare - Push $0 - - IntFmt $R4 "%u" 0 - - goto skip - killloop: - DetailPrint "Killing RetroShare" - KillProcDLL::KillProc "RetroShare.exe" - loop: - Sleep 1000 - IntOp $R4 $R4 + 1 - IntCmp $R4 5 done - skip: - DetailPrint "Looking for running copies of RetroShare" - - ;Push "wxWindowClassNR" # the wcn - ;Push "RetroShare" # the known part of the wt - ;Call ${UN}EnhancedFindWindow - ;Pop $0 # will contain the window's handle - ;Pop $1 # will containg the full wcn - # both will containg "failed", if no matching wcn was found - - ;StrCmp $0 "failed" done - ;StrCmp $0 "0" done - ;DetailPrint "Stopping RetroShare" - ;SendMessage $0 16 0 0 # WM_CLOSE == 16 - Goto loop - done: - - IntFmt $R4 "%u" 0 - Processes::FindProcess "RetroShare.exe" - StrCmp $R0 "1" killloop reallydone - - reallydone: - Pop $0 -FunctionEnd -!macroend - - -!macro CheckForIt UN -Function ${UN}CheckForIt - - Processes::FindProcess $KILLEXENAME - StrCmp $R0 "1" foundit didntfindit - - foundit: - MessageBox MB_OKCANCEL "You must quit ${APPNAME} ($KILLEXENAME) \ - before installing this version.$\r$\nPlease quit it and press \ - OK to continue." IDOK tryagain - Abort - - tryagain: - - Sleep 2000 - Processes::FindProcess $KILLEXENAME - StrCmp $R0 "1" stillthere didntfindit - - stillthere: - MessageBox MB_OKCANCEL "There is still a copy of ${APPNAME} \ - ($KILLEXENAME) running.$\r$\nPress OK to force-quit the application, \ - or Cancel to exit." IDOK killit - Abort - - killit: - KillProcDLL::KillProc $KILLEXENAME - Sleep 1000 - - didntfindit: - -FunctionEnd -!macroend - -!macro QuitIt UN -Function ${UN}QuitIt - - # try nicely first - Call ${UN}CloseRetroShare - - # kill all the old ones - StrCpy $KILLEXENAME "RetroShare.exe" - Call ${UN}CheckForIt - StrCpy $KILLEXENAME "" -FunctionEnd -!macroend - - -; This function automatically uninstalls older versions. -; It is largely copied from: -; http://nsis.sourceforge.net/archive/viewpage.php?pageid=326 + +!macro CloseRetroShare UN +Function ${UN}CloseRetroShare + Push $0 + + IntFmt $R4 "%u" 0 + + goto skip + killloop: + DetailPrint "Killing RetroShare" + KillProcDLL::KillProc "RetroShare.exe" + loop: + Sleep 1000 + IntOp $R4 $R4 + 1 + IntCmp $R4 5 done + skip: + DetailPrint "Looking for running copies of RetroShare" + + ;Push "wxWindowClassNR" # the wcn + ;Push "RetroShare" # the known part of the wt + ;Call ${UN}EnhancedFindWindow + ;Pop $0 # will contain the window's handle + ;Pop $1 # will containg the full wcn + # both will containg "failed", if no matching wcn was found + + ;StrCmp $0 "failed" done + ;StrCmp $0 "0" done + ;DetailPrint "Stopping RetroShare" + ;SendMessage $0 16 0 0 # WM_CLOSE == 16 + Goto loop + done: + + IntFmt $R4 "%u" 0 + Processes::FindProcess "RetroShare.exe" + StrCmp $R0 "1" killloop reallydone + + reallydone: + Pop $0 +FunctionEnd +!macroend + + +!macro CheckForIt UN +Function ${UN}CheckForIt + + Processes::FindProcess $KILLEXENAME + StrCmp $R0 "1" foundit didntfindit + + foundit: + MessageBox MB_OKCANCEL "You must quit ${APPNAME} ($KILLEXENAME) \ + before installing this version.$\r$\nPlease quit it and press \ + OK to continue." IDOK tryagain + Abort + + tryagain: + + Sleep 2000 + Processes::FindProcess $KILLEXENAME + StrCmp $R0 "1" stillthere didntfindit + + stillthere: + MessageBox MB_OKCANCEL "There is still a copy of ${APPNAME} \ + ($KILLEXENAME) running.$\r$\nPress OK to force-quit the application, \ + or Cancel to exit." IDOK killit + Abort + + killit: + KillProcDLL::KillProc $KILLEXENAME + Sleep 1000 + + didntfindit: + +FunctionEnd +!macroend + +!macro QuitIt UN +Function ${UN}QuitIt + + # try nicely first + Call ${UN}CloseRetroShare + + # kill all the old ones + StrCpy $KILLEXENAME "RetroShare.exe" + Call ${UN}CheckForIt + StrCpy $KILLEXENAME "" +FunctionEnd +!macroend + + +; This function automatically uninstalls older versions. +; It is largely copied from: +; http://nsis.sourceforge.net/archive/viewpage.php?pageid=326 Function .onInit InitPluginsDir @@ -239,9 +239,9 @@ Function .onInit advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp Pop $R1 Pop $R1 - !insertmacro MUI_LANGDLL_DISPLAY - - + !insertmacro MUI_LANGDLL_DISPLAY + + FunctionEnd Section $(sec_main) sec_main @@ -257,7 +257,7 @@ Section $(sec_main) sec_main ; Set Section Files and Shortcuts SetOutPath "$INSTDIR\" - File /r "release\RetroShare.exe" + File /r "RetroShare.exe" File /r "D:\MinGW\bin\mingwm10.dll" File /r "pthreadGCE2.dll" File /r "D:\Qt\4.4.3\bin\QtCore4.dll" @@ -388,16 +388,16 @@ SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_END -;!insertmacro EnhancedFindWindow "" +;!insertmacro EnhancedFindWindow "" ;!insertmacro EnhancedFindWindow "un." -!insertmacro CloseRetroShare "" +!insertmacro CloseRetroShare "" !insertmacro CloseRetroShare "un." -!insertmacro CheckForIt "" -!insertmacro CheckForIt "un." - -!insertmacro QuitIt "" +!insertmacro CheckForIt "" +!insertmacro CheckForIt "un." + +!insertmacro QuitIt "" !insertmacro QuitIt "un." ;Uninstall section diff --git a/retroshare-gui/src/retroshare.nsi b/retroshare-gui/src/retroshare.nsi index 63731e1eb..e0309b817 100644 --- a/retroshare-gui/src/retroshare.nsi +++ b/retroshare-gui/src/retroshare.nsi @@ -2,7 +2,7 @@ ; Define your application name !define APPNAME "RetroShare" -!define VERSION "0.4.12a" +!define VERSION "0.4.12c" !define APPNAMEANDVERSION "${APPNAME} ${VERSION}" ; Main Install settings @@ -29,7 +29,7 @@ SetCompressor LZMA !define MUI_LICENSEPAGE_RADIOBUTTONS !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support" -!define MUI_FINISHPAGE_LINK_LOCATION "http://sourceforge.net/forum/forum.php?forum_id=618174" +!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/" !define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare.exe" !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt !define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt