mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
update installer scripts
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1097 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
12f263f75b
commit
97a1ac3422
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
; Define your application name
|
; Define your application name
|
||||||
!define APPNAME "RetroShare"
|
!define APPNAME "RetroShare"
|
||||||
!define VERSION "0.4.12a"
|
!define VERSION "0.4.12c"
|
||||||
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ BrandingText "${APPNAMEANDVERSION}"
|
|||||||
; Use compression
|
; Use compression
|
||||||
SetCompressor LZMA
|
SetCompressor LZMA
|
||||||
|
|
||||||
VAR KILLEXENAME
|
VAR KILLEXENAME
|
||||||
|
|
||||||
|
|
||||||
; Modern interface settings
|
; Modern interface settings
|
||||||
@ -35,7 +35,7 @@ VAR KILLEXENAME
|
|||||||
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
!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_RUN "$INSTDIR\RetroShare.exe"
|
||||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||||
@ -136,101 +136,101 @@ ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
|
|||||||
|
|
||||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||||
|
|
||||||
; CloseRetroShare: this will in a loop send the RetroShare window the WM_CLOSE
|
; CloseRetroShare: this will in a loop send the RetroShare window the WM_CLOSE
|
||||||
; message until it does not find a valid RetroShare window
|
; message until it does not find a valid RetroShare window
|
||||||
;
|
;
|
||||||
|
|
||||||
!macro CloseRetroShare UN
|
!macro CloseRetroShare UN
|
||||||
Function ${UN}CloseRetroShare
|
Function ${UN}CloseRetroShare
|
||||||
Push $0
|
Push $0
|
||||||
|
|
||||||
IntFmt $R4 "%u" 0
|
IntFmt $R4 "%u" 0
|
||||||
|
|
||||||
goto skip
|
goto skip
|
||||||
killloop:
|
killloop:
|
||||||
DetailPrint "Killing RetroShare"
|
DetailPrint "Killing RetroShare"
|
||||||
KillProcDLL::KillProc "RetroShare.exe"
|
KillProcDLL::KillProc "RetroShare.exe"
|
||||||
loop:
|
loop:
|
||||||
Sleep 1000
|
Sleep 1000
|
||||||
IntOp $R4 $R4 + 1
|
IntOp $R4 $R4 + 1
|
||||||
IntCmp $R4 5 done
|
IntCmp $R4 5 done
|
||||||
skip:
|
skip:
|
||||||
DetailPrint "Looking for running copies of RetroShare"
|
DetailPrint "Looking for running copies of RetroShare"
|
||||||
|
|
||||||
;Push "wxWindowClassNR" # the wcn
|
;Push "wxWindowClassNR" # the wcn
|
||||||
;Push "RetroShare" # the known part of the wt
|
;Push "RetroShare" # the known part of the wt
|
||||||
;Call ${UN}EnhancedFindWindow
|
;Call ${UN}EnhancedFindWindow
|
||||||
;Pop $0 # will contain the window's handle
|
;Pop $0 # will contain the window's handle
|
||||||
;Pop $1 # will containg the full wcn
|
;Pop $1 # will containg the full wcn
|
||||||
# both will containg "failed", if no matching wcn was found
|
# both will containg "failed", if no matching wcn was found
|
||||||
|
|
||||||
;StrCmp $0 "failed" done
|
;StrCmp $0 "failed" done
|
||||||
;StrCmp $0 "0" done
|
;StrCmp $0 "0" done
|
||||||
;DetailPrint "Stopping RetroShare"
|
;DetailPrint "Stopping RetroShare"
|
||||||
;SendMessage $0 16 0 0 # WM_CLOSE == 16
|
;SendMessage $0 16 0 0 # WM_CLOSE == 16
|
||||||
Goto loop
|
Goto loop
|
||||||
done:
|
done:
|
||||||
|
|
||||||
IntFmt $R4 "%u" 0
|
IntFmt $R4 "%u" 0
|
||||||
Processes::FindProcess "RetroShare.exe"
|
Processes::FindProcess "RetroShare.exe"
|
||||||
StrCmp $R0 "1" killloop reallydone
|
StrCmp $R0 "1" killloop reallydone
|
||||||
|
|
||||||
reallydone:
|
reallydone:
|
||||||
Pop $0
|
Pop $0
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
!macro CheckForIt UN
|
!macro CheckForIt UN
|
||||||
Function ${UN}CheckForIt
|
Function ${UN}CheckForIt
|
||||||
|
|
||||||
Processes::FindProcess $KILLEXENAME
|
Processes::FindProcess $KILLEXENAME
|
||||||
StrCmp $R0 "1" foundit didntfindit
|
StrCmp $R0 "1" foundit didntfindit
|
||||||
|
|
||||||
foundit:
|
foundit:
|
||||||
MessageBox MB_OKCANCEL "You must quit ${APPNAME} ($KILLEXENAME) \
|
MessageBox MB_OKCANCEL "You must quit ${APPNAME} ($KILLEXENAME) \
|
||||||
before installing this version.$\r$\nPlease quit it and press \
|
before installing this version.$\r$\nPlease quit it and press \
|
||||||
OK to continue." IDOK tryagain
|
OK to continue." IDOK tryagain
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
tryagain:
|
tryagain:
|
||||||
|
|
||||||
Sleep 2000
|
Sleep 2000
|
||||||
Processes::FindProcess $KILLEXENAME
|
Processes::FindProcess $KILLEXENAME
|
||||||
StrCmp $R0 "1" stillthere didntfindit
|
StrCmp $R0 "1" stillthere didntfindit
|
||||||
|
|
||||||
stillthere:
|
stillthere:
|
||||||
MessageBox MB_OKCANCEL "There is still a copy of ${APPNAME} \
|
MessageBox MB_OKCANCEL "There is still a copy of ${APPNAME} \
|
||||||
($KILLEXENAME) running.$\r$\nPress OK to force-quit the application, \
|
($KILLEXENAME) running.$\r$\nPress OK to force-quit the application, \
|
||||||
or Cancel to exit." IDOK killit
|
or Cancel to exit." IDOK killit
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
killit:
|
killit:
|
||||||
KillProcDLL::KillProc $KILLEXENAME
|
KillProcDLL::KillProc $KILLEXENAME
|
||||||
Sleep 1000
|
Sleep 1000
|
||||||
|
|
||||||
didntfindit:
|
didntfindit:
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro QuitIt UN
|
!macro QuitIt UN
|
||||||
Function ${UN}QuitIt
|
Function ${UN}QuitIt
|
||||||
|
|
||||||
# try nicely first
|
# try nicely first
|
||||||
Call ${UN}CloseRetroShare
|
Call ${UN}CloseRetroShare
|
||||||
|
|
||||||
# kill all the old ones
|
# kill all the old ones
|
||||||
StrCpy $KILLEXENAME "RetroShare.exe"
|
StrCpy $KILLEXENAME "RetroShare.exe"
|
||||||
Call ${UN}CheckForIt
|
Call ${UN}CheckForIt
|
||||||
StrCpy $KILLEXENAME ""
|
StrCpy $KILLEXENAME ""
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
; This function automatically uninstalls older versions.
|
; This function automatically uninstalls older versions.
|
||||||
; It is largely copied from:
|
; It is largely copied from:
|
||||||
; http://nsis.sourceforge.net/archive/viewpage.php?pageid=326
|
; http://nsis.sourceforge.net/archive/viewpage.php?pageid=326
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
|
||||||
InitPluginsDir
|
InitPluginsDir
|
||||||
@ -239,9 +239,9 @@ Function .onInit
|
|||||||
advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp
|
advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp
|
||||||
Pop $R1
|
Pop $R1
|
||||||
Pop $R1
|
Pop $R1
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
|
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section $(sec_main) sec_main
|
Section $(sec_main) sec_main
|
||||||
@ -257,7 +257,7 @@ Section $(sec_main) sec_main
|
|||||||
|
|
||||||
; Set Section Files and Shortcuts
|
; Set Section Files and Shortcuts
|
||||||
SetOutPath "$INSTDIR\"
|
SetOutPath "$INSTDIR\"
|
||||||
File /r "release\RetroShare.exe"
|
File /r "RetroShare.exe"
|
||||||
File /r "D:\MinGW\bin\mingwm10.dll"
|
File /r "D:\MinGW\bin\mingwm10.dll"
|
||||||
File /r "pthreadGCE2.dll"
|
File /r "pthreadGCE2.dll"
|
||||||
File /r "D:\Qt\4.4.3\bin\QtCore4.dll"
|
File /r "D:\Qt\4.4.3\bin\QtCore4.dll"
|
||||||
@ -388,16 +388,16 @@ SectionEnd
|
|||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
|
||||||
;!insertmacro EnhancedFindWindow ""
|
;!insertmacro EnhancedFindWindow ""
|
||||||
;!insertmacro EnhancedFindWindow "un."
|
;!insertmacro EnhancedFindWindow "un."
|
||||||
|
|
||||||
!insertmacro CloseRetroShare ""
|
!insertmacro CloseRetroShare ""
|
||||||
!insertmacro CloseRetroShare "un."
|
!insertmacro CloseRetroShare "un."
|
||||||
|
|
||||||
!insertmacro CheckForIt ""
|
!insertmacro CheckForIt ""
|
||||||
!insertmacro CheckForIt "un."
|
!insertmacro CheckForIt "un."
|
||||||
|
|
||||||
!insertmacro QuitIt ""
|
!insertmacro QuitIt ""
|
||||||
!insertmacro QuitIt "un."
|
!insertmacro QuitIt "un."
|
||||||
|
|
||||||
;Uninstall section
|
;Uninstall section
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
; Define your application name
|
; Define your application name
|
||||||
!define APPNAME "RetroShare"
|
!define APPNAME "RetroShare"
|
||||||
!define VERSION "0.4.12a"
|
!define VERSION "0.4.12c"
|
||||||
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
||||||
|
|
||||||
; Main Install settings
|
; Main Install settings
|
||||||
@ -29,7 +29,7 @@ SetCompressor LZMA
|
|||||||
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
!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_RUN "$INSTDIR\RetroShare.exe"
|
||||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user