newbie question
1. this is my first try with nsis so please keep your answers simple^^
everytime i try to use "!insertmacro MUI_PAGE_INSTFILES" i get an errormessage while compiling
if i put a ";" before it compiling works fine
here is my script
SetCompressor lzma
Var hmci
!include g2mod.nsh
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "install\System\Namenlos.ico"
!define MUI_UNICON "install\System\Namenlos.ico"
; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "licence.rtf"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\System\GothicStarter.exe"
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "German"
; MUI end ------
;--------------------------------
Name "Die Schöpfung"
OutFile "DieSchoepfung.exe"
InstallDir "$PROGRAMFILES\JoWooD\Gothic II\"
;LicenseData "licence.rtf"
;LicenseBkColor 0xFFFFFF
;Insttype "Komplett"
;Insttype "Minimal"
;Page license
;Page components
;Page directory
;Page instfiles
;UninstPage uninstConfirm
;UninstPage instfiles
Function .onInit
;--------------------------------
; $INSTDIR bereits gültig?
IfFileExists "$INSTDIR\System\Gothic2.exe" done
; Sonst Add-ON Installation suchen (Registrierung)
Call g2mod_GetInstallLocation
Pop $R0
StrCmp $R0 "" done
; Ãœbernehmen
StrCpy $INSTDIR $R0
done:
Pop $R0
;--------------------------------
InitPluginsDir
SetOutPath $PLUGINSDIR
File "Installer_loop.mp3"
System::Call 'msvfw32.dll::MCIWndCreate(i 0, i 0,i 0x0070, t "$PLUGINSDIR\Installer_loop.mp3") i .r0'
StrCpy $hmci $0
SendMessage $hmci 0x0490 0 0 $0
IntCmp $0 0 nosup
ShowWindow $hmci SW_HIDE
SendMessage $hmci 0x0465 0 "STR:play repeat"
nosup:
;--------------------------------
;User defined skin
SetOutPath $TEMP
File /oname=ds-style.skf "ds-style.skf"
NSIS_SkinCrafter_Plugin::skin /NOUNLOAD $TEMP\ds-style.skf
;Delete $TEMP\ds-style.skf
FunctionEnd
;--------------------------------
Function .onGUIEnd
NSIS_SkinCrafter_Plugin::destroy
FunctionEnd
;--------------------------------
Function un.onGUIEnd
NSIS_SkinCrafter_Plugin::destroy
FunctionEnd
Section "Schöpfung Mod" main
SectionIn RO
;Icon und INI in System kopieren
SetOutPath "$INSTDIR\System"
File ".\install\System\schoepfung.ini"
File ".\install\System\Namenlos.ico"
;.mod in modvdf kopieren
SetOutPath "$INSTDIR\Data\modvdf"
File ".\install\Data\modvdf\schoepfung.mod"
;gothic starter kopieren
SetOutPath "$INSTDIR\System"
File ".\install\System\GothicStarter.exe"
File ".\install\System\GothicGame.ini"
;Uninstaller
WriteUninstaller "$INSTDIR\DS-Uninstall.exe"
;Save Ordner
CreateDirectory "$INSTDIR\saves_schoepfung\current"
SectionEnd
Section "Speech" speech
;blubbb
SectionEnd
Section "Shortcuts" links
CreateShortCut "$DESKTOP\Die Schöpfung.lnk" "$INSTDIR\System\GothicStarter.exe" "" "$INSTDIR\System\Namenlos.ico" 0
SectionEnd
;Component Descriptions
LangString DESC_main ${LANG_GERMAN} "Grunddateien der Mod Die Schöpfung"
LangString DESC_speech ${LANG_GERMAN} "Synchronisation der Dialoge"
LangString DESC_links ${LANG_GERMAN} "Verknüpfung auf dem Desktop und im Startmenü"
LangString DESC_haupt ${LANG_ENGLISH} "base files of the mod"
LangString DESC_speech ${LANG_ENGLISH} "audio files for the dialogs"
LangString DESC_links ${LANG_ENGLISH} "shortcuts on the desktop and in the starup menue"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${main} $(DESC_main)
!insertmacro MUI_DESCRIPTION_TEXT ${speech} $(DESC_speech)
!insertmacro MUI_DESCRIPTION_TEXT ${links} $(DESC_links)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "Die Schöpfung wurde erfolgreich deinstalliert."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Möchten Sie Die Schöpfung deinstallieren?" IDYES +2
Abort
NSIS_SkinCrafter_Plugin::skin /NOUNLOAD $TEMP\ds-style.skf
FunctionEnd
Section "Uninstall"
Delete "$INSTDIR\System\schoepfung.ini"
Delete "$INSTDIR\System\Namenlos.ico"
Delete "$INSTDIR\Data\modvdf\schoepfung.mod"
Delete "$INSTDIR\DS-Uninstall.exe"
RMDir "$INSTDIR\saves_schoepfung\current"
RMDir "$INSTDIR\saves_schoepfung"
RMDir /r "$INSTDIR\Data\modvdf"
Delete "$DESKTOP\Die Schöpfung.lnk"
SectionEnd
and sorry for the bad english :D