; bigtest.nsi ; ;-------------------------------- !ifdef HAVE_UPX !packhdr tmp.dat "upx\upx -9 tmp.dat" !endif !ifdef NOCOMPRESS SetCompress off !endif ;-------------------------------- Name "Codec Pack" Caption "a-S Codec Pack by VegetaSan" Icon "..\Contrib\Graphics\Icons\nsis1-install.ico" OutFile "a-S CodecPack.exe" SetDateSave on SetDatablockOptimize on CRCCheck on SilentInstall normal BGGradient 000000 800000 FFFFFF InstallColors FF8060 000030 XPStyle on InstallDir "$PROGRAMFILES\a-S Codec Pack\30 - 01 - 2004\" InstallDirRegKey HKLM "Software\a-S Codec Pack\30 - 01 - 2004\" "" CheckBitmap "..\Contrib\Graphics\Checks\classic-cross.bmp" LicenseText "Please review the License Agreement before installing the Codec Pack. If you accept all terms of the Agreement, Clik I Agree" LicenseData "C:\license.txt" ;-------------------------------- Section "" ; empty string makes it hidden, so would starting with - ; write uninstall strings WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "BigNSISTest (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\bt-uninst.exe"' SetOutPath $INSTDIR File /a "C:\nsis.bmp" File /a "C:\XviD300104.exe" File /a "C:\SubTitDS300104.exe" File /a "C:\FFdshow300104.exe" File /a "C:\MPC300104.exe" File /a "C:\Ogg300104.exe" WriteUninstaller "CodecPack-uninst.exe" SectionEnd ;-------------------------------- Section "" StrCpy $2 "$TEMP\Winamp Installer.exe" NSISdl::download http://umn.dl.sourceforge.net/sourceforge/ac3filter/ac3filter_0_70b.exe $2 Pop $0 SectionEnd ;-------------------------------- Function "CSCTest" CreateDirectory "$SMPROGRAMS\a-S Codec Pack" SetOutPath $INSTDIR ; for working directory CreateShortCut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc. ; this one will use notepad's icon, start it minimized, and give it a hotkey (of Ctrl+Shift+Q) CreateShortCut "$SMPROGRAMS\Big NSIS Test\bin2h.exe.lnk" "$INSTDIR\bin2h.exe" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q CreateShortCut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z Exec '"$1"' ExecShell "open" '"$INSTDIR"' Sleep 100 BringToFront FunctionEnd Function myfunc StrCpy $2 "poop=$1" FunctionEnd Function poopTest ReadINIStr $1 "$INSTDIR\test.ini" "MySectionShit" "Value1" StrCmp $1 $8 NoFailedMsg MessageBox MB_OK "WriteINIStr failed" NoFailedMsg: FunctionEnd Function .onSelChange SectionGetText ${CRAPIDX} $0 StrCmp $0 "" e SectionSetText ${CRAPIDX} "" Goto e2 e: SectionSetText ${CRAPIDX} "Doop" e2: FunctionEnd ;-------------------------------- ; Uninstaller UninstallText "This will uninstall the Codec Pack. Hit next to continue." UninstallIcon "..\Contrib\Graphics\Icons\nsis1-uninstall.ico" Section "Uninstall" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\30 - 01 -04" DeleteRegKey HKLM "SOFTWARE\NSISCrap\30 - 01 - 04" Delete "$INSTDIR\Ogg300104.exe" Delete "$INSTDIR\XviD300104.exe" Delete "$INSTDIR\SubTitDS300104.exe" Delete "$INSTDIR\FFdshow300104.exe" Delete "$INSTDIR\MPC300104.exe" Delete "$INSTDIR\nsis.bmp" Delete "$INSTDIR\CodecPack-uninst.exe" Delete "$SMPROGRAMS\a-S Codec Pack\*.*" RMDir "$SMPROGRAMS\30 - 01 - 04" IfFileExists "$INSTDIR" 0 NoErrorMsg MessageBox MB_OK "$INSTDIR is succsesfully removed!" IDOK 0 ; skipped if file doesn't exist NoErrorMsg: SectionEnd