NSIS + DiscSpawnig ^^
Hello Here ;)
Can you help me to create my script?
I will want to divide it into several Cab ( with Cab Setup ==> http://nsis.sourceforge.net/CABSetup_plug-in ), but it's impossible... :(
Thx :p
Here My Script :
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
define PRODUCT_NAME "CPU-Z"
>;Script Created by Lumo ^^ For XXX by XXX .
;Le Vendredi 27 Octobre 2006
>;€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
>;------------------------------------------------------------------------------------------------------------------------------------
;Choix du type de Compression ( Préférence pour le LZMA )
;------------------------------------------------------------------------------------------------------------------------------------
setcompressor lzma
>;------------------------------------------------------------------------------------------------------------------------------------
; Définitions des Variables
>;------------------------------------------------------------------------------------------------------------------------------------
!
>!define PRODUCT_VERSION "1.38"
>!define PRODUCT_PUBLISHER "Lumo"
>!define PRODUCT_WEB_SITE "XXX"
>!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\cpuz.exe"
>!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
>!define PRODUCT_UNINST_ROOT_KEY "HKLM"
>;------------------------------------------------------------------------------------------------------------------------------------
; Infos sur le PACK
>;------------------------------------------------------------------------------------------------------------------------------------
>Name "${PRODUCT_NAME}"
>OutFile "pack_cpuz_pixs_${PRODUCT_VERSION}-setup.exe"
>InstallDir "$PROGRAMFILES\Pixs\${PRODUCT_NAME}"
>InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
>ShowInstDetails show
ShowUnInstDetails show
BrandingText/TRIMCENTER "Packs Applis P!xiens By Lumo"
>;------------------------------------------------------------------------------------------------------------------------------------
; Insertion du Modern UI 1.67
>;------------------------------------------------------------------------------------------------------------------------------------
!include "MUI.nsh"
>;------------------------------------------------------------------------------------------------------------------------------------
; MUI Settings
>;------------------------------------------------------------------------------------------------------------------------------------
!define MUI_ABORTWARNING
>!define MUI_PAGE_HEADER_TEXT "${PRODUCT_NAME} ${PRODUCT_VERSION}"
>; MUI Settings / Icons
>!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
>!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
>; MUI Settings / Header
>!define MUI_HEADERIMAGE
>!define MUI_HEADERIMAGE_RIGHT
>!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-r.bmp"
>!define MUI_HEADERIMAGE_UNBITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-uninstall-r.bmp"
>; MUI Settings / Wizard
>!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
>!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
>; Page de Bienvenue
>!insertmacro MUI_PAGE_WELCOME
>; Page de selection du Dossier d'install
!insertmacro MUI_PAGE_DIRECTORY
; Page de la copie des fichiers
!insertmacro MUI_PAGE_INSTFILES
; Dernière Page ( Lancer Jeu + ReadMe )
!define MUI_FINISHPAGE_RUN "$INSTDIR\cpuz.exe"
!insertmacro MUI_PAGE_FINISH
; Page de Désinstallation
!insertmacro MUI_UNPAGE_INSTFILES
;Définition de la langue par défaut
!insertmacro MUI_LANGUAGE "French"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
;------------------------------------------------------------------------------------------------------------------------------------
; Copitage des fichiers ^^ + Création des Raccourcis
;------------------------------------------------------------------------------------------------------------------------------------
Section "Installation Stantard" SEC01
SetOutPath "$INSTDIR"
SetOverwrite on
File "cpuz.exe"
File "cpuz.ini"
File "cpuz-readme.txt"
File "latency.exe"
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\cpuz.exe"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\cpuz.exe"
SectionEnd
Section -AdditionalIcons
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Désinstaller.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\cpuz.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\cpuz.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
;------------------------------------------------------------------------------------------------------------------------------------
; Désinstallation :D Oh Yeah !!!
;------------------------------------------------------------------------------------------------------------------------------------
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) a été désinstallé avec succès de votre ordinateur. Nous vous remercions d'avoir choisi ce désinstalleur."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Êtes-vous certains de vouloir désinstaller totalement $(^Name) ? Pourquoi tant de haine ?" IDYES +2
Abort
FunctionEnd
Section Uninstall
Delete "$INSTDIRuninst.exe"
Delete "$INSTDIRcpuz.exe"
Delete "$INSTDIRcpuz.ini"
Delete "$INSTDIRcpuz-readme.txt"
Delete "$INSTDIRlatency.exe"
Delete "$SMPROGRAMS${PRODUCT_NAME}Désinstaller.lnk"
Delete "$DESKTOP${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS${PRODUCT_NAME}${PRODUCT_NAME}.lnk"
RMDir "$SMPROGRAMS${PRODUCT_NAME}"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
>