; ============================================================================== ; Fever Frenzy NSIS installer script ; ============================================================================== ; ; Footer ; Section "Fever Frenzy" FeverFrenzy !include "writefiles.inc" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application ; Delete old SHORTCUTS Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Play Fever Frenzy DEMO.lnk" Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Buy Fever Frenzy" Delete "$DESKTOP\Play Fever Frenzy DEMO.lnk" # Shouldn't do this under vista ; Create shortcuts ----added the readme shortcut here.------- CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Play Fever Frenzy.lnk" "$INSTDIR\Fever Frenzy.exe" "" "$INSTDIR\FeverFrenzy.ico" ;CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Readme.lnk" "$INSTDIR\ReadMe.txt" "" "$INSTDIR\FeverFrenzy.ico" ;CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Manual.lnk" "$INSTDIR\Rider'sWorld_Ride_manual.pdf" "" "$INSTDIR\FeverFrenzy.ico" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\FeverFrenzy.ico" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Legacy Games.lnk" "$INSTDIR\moregames.url" "" "$INSTDIR\legacygames.ico" ;CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Legacy Interactive.lnk" "$INSTDIR\legacyinteractive.url" "" "$INSTDIR\legacygames.ico" CreateShortCut "$DESKTOP\Play Fever Frenzy.lnk" "$INSTDIR\Fever Frenzy.exe" "" "$INSTDIR\FeverFrenzy.ico" CreateShortCut "$DESKTOP\Legacy Games.lnk" "$INSTDIR\moregames.url" "" "$INSTDIR\legacygames.ico" !insertmacro MUI_STARTMENU_WRITE_END ;Store install folder WriteRegStr HKCU "Software\${PRODUCT}" "" $INSTDIR ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" ;This line defines when the browser window will pop DURING INSTALL. ;Call openLinkNewWindow ; Add\Remove programs entry WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "DisplayName" "Fever Frenzy" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "UninstallString" "$INSTDIR\Uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "DisplayIcon" "$INSTDIR\FeverFrenzy.ico" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "NoRepair" 1 SectionEnd ; -----EDITED FOR ER Code Red-------- ; This function defines how the program will pop a webpage. To change the webpage, edit the StrCpy argument # Uses $0 ;Function openLinkNewWindow ;StrCpy $0 "http://www.legacygamesdownload.com/legacy/911paramedic_quicktime.htm" ;Push $3 ;Push $2 ;Push $1 ;Push $0 ;ReadRegStr $0 HKCR "http\shell\open\command" "" # Get browser path ;DetailPrint $0 ;StrCpy $2 '"' ;StrCpy $1 $0 1 ;StrCmp $1 $2 +2 # if path is not enclosed in " look for space as final char ;StrCpy $2 ' ' ;StrCpy $3 1 ;loop: ;StrCpy $1 $0 1 $3 ;DetailPrint $1 ;StrCmp $1 $2 found ;StrCmp $1 "" found ;IntOp $3 $3 + 1 ;Goto loop ;found: ;StrCpy $1 $0 $3 ;StrCmp $2 " " +2 ;StrCpy $1 '$1"' ;Pop $0 ;Exec '$1 $0' ;Pop $1 ;Pop $2 ;Pop $3 ;FunctionEnd ;-------------------------------- ;Descriptions ;FIXME: The descriptions coded as they are now are causing a warning. They will be comented ;while the warning remains unfixed. -- Diego ;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN ; !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) ;!insertmacro MUI_FUNCTION_DESCRIPTION_END ; -----EDITED FOR Fever Frenzy-------- ; This function defines how the program will pop a webpage. To change the webpage, edit the StrCpy argument # Uses $0 Function un.openLinkNewWindow StrCpy $0 "http://www.trialpay.com/productpage/?c=e365a7d&tid=RHyjy0d" Push $3 Push $2 Push $1 Push $0 ReadRegStr $0 HKCR "http\shell\open\command" "" # Get browser path DetailPrint $0 StrCpy $2 '"' StrCpy $1 $0 1 StrCmp $1 $2 +2 # if path is not enclosed in " look for space as final char StrCpy $2 ' ' StrCpy $3 1 loop: StrCpy $1 $0 1 $3 DetailPrint $1 StrCmp $1 $2 found StrCmp $1 "" found IntOp $3 $3 + 1 Goto loop found: StrCpy $1 $0 $3 StrCmp $2 " " +2 StrCpy $1 '$1"' Pop $0 Exec '$1 $0' Pop $1 Pop $2 Pop $3 FunctionEnd LangString DESC_Section1 ${LANG_ENGLISH} "Can you save the world from the funniest outbreak ever? Take care of some of the strangest patients you'll ever meet in this fun twist on popular service style games." !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${FeverFrenzy} $(DESC_Section1) !insertmacro MUI_FUNCTION_DESCRIPTION_END Section "Uninstall" ; This line defines when the browser window will pop. Call un.openLinkNewWindow ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" "GEGUID" Delete "$INSTDIR\Uninstall.exe" !include "deletefiles.inc" RMDir "$INSTDIR" !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP ;---added a line to uninstall the readme link Delete "$SMPROGRAMS\$MUI_TEMP\Play Fever Frenzy.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Readme.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Manual.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" ;Delete "$SMPROGRAMS\$MUI_TEMP\More Games.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Legacy Games.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Legacy Interactive.lnk" Delete "$DESKTOP\Play Fever Frenzy.lnk" Delete "$DESKTOP\Legacy Games.lnk" Delete "$DESKTOP\Legacy Interactive.lnk" RMDir /r "$SMPROGRAMS\$MUI_TEMP" DeleteRegKey HKCU "Software\${PRODUCT}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fever Frenzy" SectionEnd