home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 101
/
FreelogNo101-JanvierFevrier2011.iso
/
Graphisme
/
MeshCreator
/
MeshCreator_v2.52_b108-BETA.exe
/
MeshCreator.nsi
< prev
Wrap
Text File
|
2010-11-01
|
3KB
|
107 lines
; example1.nsi
;
; This script is perhaps one of the simplest NSIs you can make. All of the
; optional settings are left to their default settings. The installer simply
; prompts the user asking them where to install, and drops a copy of example1.nsi
; there.
;--------------------------------
; The name of the installer
Name "MeshCreator"
; The file to write
OutFile "MeshCreator_ALPHA_v2.52_bXXX-BETA.exe"
; The default installation directory
InstallDir $PROGRAMFILES\MeshCreator
; Request application privileges for Windows Vista
RequestExecutionLevel admin
XPStyle on
Function .onInit
# the plugins dir is automatically deleted when the installer exits
InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp ".\Supporting Files\installer_image.bmp"
advsplash::show 1000 1600 800 0x000000 $PLUGINSDIR\splash
Delete $PLUGINSDIR\splash.bmp
FunctionEnd
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File MeshCreator.nsi
File MeshCreator.exe
SetOutPath $APPDATA\MeshCreator\Library
File .\Library\*.*
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\MeshCreator "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MeshCreator" "DisplayName" "MeshCreator"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MeshCreator" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MeshCreator" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MeshCreator" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd ; end the section
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\MeshCreator"
CreateShortCut "$SMPROGRAMS\MeshCreator\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\MeshCreator\MeshCreator.lnk" "$INSTDIR\MeshCreator.exe" "" "$INSTDIR\MeshCreator.exe" 0
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MeshCreator"
DeleteRegKey HKLM SOFTWARE\MeshCreator
; Remove files and uninstaller
Delete $INSTDIR\*.*
; Remove shortcuts, if any
Delete "$SMPROGRAMS\MeshCreator\*.*"
Delete $APPDATA\MeshCreator\Library\*.*
Delete $APPDATA\MeshCreator\*.*
; Remove directories used
RMDir "$SMPROGRAMS\MeshCreator"
RMDir "$INSTDIR"
RMDir $APPDATA\MeshCreator\Library
RMDir $APPDATA\MeshCreator
SectionEnd