!include "Sections.nsh" !include "MUI.nsh" SetCompressor lzma Name "Grand Power K100 Whisper - H&K USP" BrandingText "HaMz's Installer - Made With NSIS v2.20" OutFile 'GrandPower K100 Whisper[H&K USP] - CSS.exe' SilentInstall Normal CRCCheck On XPStyle on AutoCloseWindow False ShowInstDetails Hide LangString SteamNotInstalled ${LANG_ENGLISH} "Valve's Steam is not installed!$\r$\nPlease Specify Location!" Function .onInit ; StrCpy $1 ${g101} ; Group 1 - Option 1 is selected by default ; StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default ; StrCpy $3 ${g3o2} ; Group 3 - Option 2 is selected by default !insertmacro RadioGetChecked "${g1o1}" "${g1o1},${g1o2},${g1o3}" !insertmacro RadioGetChecked "${g2o1}" "${g2o1},${g2o2}" !insertmacro RadioGetChecked "${g3o2}" "${g3o1},${g3o2},${g3o3},${g3o4}" Call GetSteamAccountName Pop $R0 Pop $R1 # Check if Steam is installed StrCmp $R0 "" 0 +4 MessageBox MB_OK|MB_ICONSTOP $(SteamNotInstalled) StrCpy $INSTDIR "Please specify the 'cstrike' directory of your Counter-Strike Source" Goto +4 # It is installed so set INSTDIR StrCpy $INSTDIR "$R1\SteamApps\$R0\counter-strike source\cstrike" SetOutPath $TEMP File /oname=splash.bmp "C:\Documents and Settings\t3h g4m3r\Desktop\Splash.bmp" advsplash::show 2000 600 600 -1 $TEMP\splash Pop $0 Delete $TEMP\splash.bmp FindWindow $0 "#32770" "" $HWNDPARENT GetDlgItem $0 $0 1006 SetCtlColors $0 0xFF0000 0x00FF00 FunctionEnd Function .onSelChange ; !insertmacro StartRadioButtons $1 ; !insertmacro RadioButton ${g1o1} ; !insertmacro RadioButton ${g1o2} ; !insertmacro RadioButton ${g1o3} ; !insertmacro EndRadioButtons ; !insertmacro StartRadioButtons $2 ; !insertmacro RadioButton ${g2o1} ; !insertmacro RadioButton ${g2o2} ; !insertmacro EndRadioButtons ; !insertmacro StartRadioButtons $3 ; !insertmacro RadioButton ${g3o1} ; !insertmacro RadioButton ${g3o2} ; !insertmacro RadioButton ${g3o3} ; !insertmacro RadioButton ${g3o4} ; !insertmacro EndRadioButtons !insertmacro SectionRadioButtons "${g1o1}" "${g1o1},${g1o2},${g1o3}" !insertmacro SectionRadioButtons "${g2o1}" "${g2o1},${g2o2}" !insertmacro SectionRadioButtons "${g3o2}" "${g3o1},${g3o2},${g3o3},${g3o4}" FunctionEnd Function GetSteamAccountName Push $R0 Push $R1 Push $R2 Push $R3 ReadRegStr $R0 HKCU "Software\Valve\Steam" "SteamExe" StrCmp $R0 "" noSteam StrCpy $R1 0 IntOp $R1 $R1 - 1 StrCpy $R2 $R0 1 $R1 StrCmp $R2 "" noAccount StrCmp $R2 "/" 0 -3 StrCpy $R0 $R0 $R1 StrCpy $R1 0 IntOp $R1 $R1 + 1 StrCpy $R2 $R0 1 -$R1 StrCmp $R2 "" +8 StrCmp $R2 "/" 0 -3 StrCpy $R2 $R0 -$R1 IntOp $R1 $R1 - 1 StrCpy $R3 $R0 "" -$R1 StrCpy $R0 "$R2\$R3" IntOp $R1 $R1 + 1 Goto -9 FindFirst $R1 $R2 "$R0\steamapps\*.*" loopFile: StrCmp $R2 "SourceMods" nextFile StrCmp $R2 "." nextFile StrCmp $R2 ".." nextFile IfFileExists "$R0\steamapps\$R2\*.*" done nextFile: ClearErrors FindNext $R1 $R2 IfErrors 0 loopFile FindClose $R1 noAccount: StrCpy $R2 "[ACCOUNT_NAME]" done: StrCpy $R1 $R0 StrCpy $R0 $R2 Goto +3 noSteam: StrCpy $R1 "" StrCpy $R0 "" Pop $R3 Pop $R2 Exch $R1 Exch Exch $R0 FunctionEnd Function CommonMaterials SetOutPath "$INSTDIR\materials\" File /r "C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\common\materials\" FunctionEnd Function CommonScripts SetOutPath "$INSTDIR\scripts\" File /r "C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\common\scripts\" FunctionEnd Function CommonSounds SetOutPath "$INSTDIR\sound\" File /r "C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\common\sound\" FunctionEnd ;InstallDir '$PROGRAMFILES\Regshot v1.7.2' !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "D:\Protion\NSIS Stuff\CSS Header.bmp" !define MUI_WELCOMEFINISHPAGE_BITMAP "D:\Protion\NSIS Stuff\CSS SideBar.bmp" ; !define MUI_UNWELCOMEFINISHPAGE_BITMAP "D:\Protion\NSIS Stuff\Blue SideBar.bmp" !define MUI_ABORTWARNING !define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_LICENSEPAGE_CHECKBOX ; !define MUI_LICENSEPAGE_CHECKBOX_TEXT "I have read the and agreed to the lisence agreement" ; !define MUI_FINISHPAGE_RUN "$INSTDIR\regshot.exe" ; !define MUI_FINISHPAGE_RUN_TEXT "Run Regshot v1.7.2" ; !define MUI_FINISHPAGE_RUN_PARAMETERS "-steam -game episodic" ; !define MUI_FINISHPAGE_RUN_NOTCHECKED ; !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt" ; !define MUI_FINISHPAGE_SHOWREADME_TEXT ; !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED SetDateSave On SetDataBlockOptimize On !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "C:\Documents and Settings\t3h g4m3r\Desktop\read.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH ; !insertmacro MUI_UNPAGE_WELCOME ; !insertmacro MUI_UNPAGE_CONFIRM ; !insertmacro MUI_UNPAGE_INSTFILES ; !insertmacro MUI_UNPAGE_FINISH !insertmacro MUI_LANGUAGE "English" Icon 'C:\Program Files\Valve\Steam\css.ico' ;UninstallIcon 'D:\Protion\Icons\blue-uninstall.ico' SectionGroup /e "!K100 Grand Power Model" Section "Normal Animations" g1o1 ;SectionIn RO SetOutPath "$INSTDIR\" Call CommonMaterials Call CommonSounds File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Normal Anims\' ;File 'C:\Documents and Settings\t3h g4m3r\Desktop\virtualdubmod_aud-x_enabled\VDMS_ReadTHIS!!!.txt' ;ExecShell "open" "$INSTDIR\Protection ID v5.0 Final\ProtectionID_public.html" ; CreateDirectory "$SMPROGRAMS\Regshot v1.7.2" ; CreateShortCut "$SMPROGRAMS\Regshot v1.7.2\Uninstall.lnk" "$INSTDIR\Uninstall.exe" ; CreateShortCut "$SMPROGRAMS\Regshot v1.7.2\Run Regshot v1.7.2.lnk" '$INSTDIR\regshot.exe' "" '$INSTDIR\regshot.exe' 0 "" "" "Compare your registry for changes!" ; CreateShortCut "$DESKTOP\Regshot v1.7.2.lnk" '$INSTDIR\regshot.exe' "" '$INSTDIR\regshot.exe' 0 "" "" "Compare your registry for changes!" ; WriteUninstaller "$INSTDIR\Uninstall.exe" ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2" "DisplayName" "Regshot v1.7.2" ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2" "UninstallString" "$INSTDIR\Uninstall.exe" ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2" "DisplayIcon" "$INSTDIR\regshot.exe" ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2" "NoModify" 1 ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2" "NoRepair" 1 ;Exec "$OUTDIR\Setup.Exe" ;Quit ;RMDir /r "$OUTDIR\" SectionEnd Section /o "Havoc Animations" g1o2 SetOutPath "$INSTDIR\" Call CommonMaterials Call CommonScripts Call CommonSounds File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Havoc Anims\' SectionEnd Section /o "Strykerwolf Animations" g1o3 SetOutPath "$INSTDIR\" Call CommonMaterials Call CommonScripts Call CommonSounds File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Strykerwolf Anims\' SectionEnd SectionGroup "K100 Materials" Section "Silver Slide Frame" g2o1 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-Normal frame\' SectionEnd Section /o "Black Slide Frame" g2o2 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-Black frame\' SectionEnd Section /o "Whisper Silencer Type 1" g3o1 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-WhisperSil1\' SectionEnd Section "Whisper Silencer Type 2" g3o2 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-WhisperSil2\' SectionEnd Section /o "Black Silencer Type 1" g3o3 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-BlackSil1\' SectionEnd Section /o "Black Silencer Type 2" g3o4 SetOutPath "$INSTDIR\materials\Weapons\v_models\pist_usp\K100\" File /r 'C:\Documents and Settings\t3h g4m3r\Desktop\K100 Model\Mat-BlackSil2\' SectionEnd SectionGroupEnd SectionGroupEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${g1o1} "The K100 Grand Power in normal CSS animations, tweaked by HaMsTeYr" !insertmacro MUI_DESCRIPTION_TEXT ${g1o2} "The K100 Grand Power in Havoc's animations, tweaked by HaMsTeYr" !insertmacro MUI_DESCRIPTION_TEXT ${g1o3} "The K100 Grand Power in Strykerwolf's animations, tweaked by HaMsTeYr" !insertmacro MUI_DESCRIPTION_TEXT ${g2o1} "A silver slide for the K100 Grand Power" !insertmacro MUI_DESCRIPTION_TEXT ${g2o2} "A black slide for the K100 Grand Power" !insertmacro MUI_DESCRIPTION_TEXT ${g3o1} "K100 Grand Power, type Whisper, Silencer Skin 1" !insertmacro MUI_DESCRIPTION_TEXT ${g3o2} "K100 Grand Power, type Whisper, Silencer Skin 2" !insertmacro MUI_DESCRIPTION_TEXT ${g3o3} "K100 Grand Power, Black Silencer skin 1" !insertmacro MUI_DESCRIPTION_TEXT ${g3o4} "K100 Grand Power, Black Silencer skin 2" !insertmacro MUI_FUNCTION_DESCRIPTION_END ; Section "Uninstall" ; RMDir /r "$SMPROGRAMS\Regshot v1.7.2" ; DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Regshot v1.7.2\" ; Delete "$INSTDIR\Uninstall.exe" ; Delete "$DESKTOP\Regshot v1.7.2.lnk" ; RMDir /r "$INSTDIR\" ; SectionEnd