Zip2Exe 0.3: based on header files, improved interface, Modern UI support, new script code, improved folder detection

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2977 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-09-28 12:42:03 +00:00
parent 7d99fd6700
commit f7bed1c222
7 changed files with 183 additions and 101 deletions

78
Contrib/zip2exe/Base.nsh Normal file
View file

@ -0,0 +1,78 @@
;Change this file to customize zip2exe generated installers
Name "${ZIP2EXE_NAME}"
OutFile "${ZIP2EXE_OUTFILE}"
AllowRootDirInstall true
!ifdef ZIP2EXE_COMPERSSOR_ZLIB
SetCompressor zlib
!else ifdef ZIP2EXE_COMPERSSOR_BZIP2
SetCompressor bzip2
!endif
!ifdef ZIP2EXE_INSTALLDIR
InstallDir "${ZIP2EXE_INSTALLDIR}"
Function zip2exe.SetOutPath
SetOutPath "$INSTDIR"
FunctionEnd
!else ifdef ZIP2EXE_INSTALLDIR_WINAMP
InstallDir "$PROGRAMFILES\Winamp"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString"
Function .onVerifyInstDir
IfFileExists $INSTDIR\winamp.exe WinampInstalled
Abort
WinampInstalled:
FunctionEnd
!ifdef ZIP2EXE_INSTALLDIR_WINAMPMODE
Var ZIP2EXE_TEMP1
Var ZIP2EXE_TEMP2
Function zip2exe.SetOutPath
!ifdef ZIP2EXE_INSTALLDIR_SKINS
StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Skins"
!else
StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Plugins"
!endif
ReadINIStr $ZIP2EXE_TEMP2 "$INSTDIR\winamp.ini" "Winamp" "${ZIP2EXE_INSTALLDIR_WINAMPMODE}"
StrCmp $ZIP2EXE_TEMP2 "" End
IfFileExists $ZIP2EXE_TEMP2 0 End
StrCpy $ZIP2EXE_TEMP1 $ZIP2EXE_TEMP2
End:
SetOutPath $ZIP2EXE_TEMP1
FunctionEnd
!else
Function zip2exe.SetOutPath
!ifdef ZIP2EXE_INSTALLDIR_PLUGINS
SetOutPath "$INSTDIR\Plugins"
!else
SetOutPath "$INSTDIR"
!endif
FunctionEnd
!endif
!endif
!macro SECTION_BEGIN
Section ""
Call zip2exe.SetOutPath
!macroend
!macro SECTION_END
SectionEnd
!macroend