]> git.lizzy.rs Git - rust.git/blob - src/etc/pkg/rust.nsi
Simplify NSIS package script.
[rust.git] / src / etc / pkg / rust.nsi
1 # -*- shell-script -*-
2 # (not really, but syntax is similar)
3 #
4 # This is a NSIS win32 installer script the Rust toolchain.
5 #
6
7 Name "Rust"
8 ShowInstDetails "show"
9 ShowUninstDetails "show"
10 SetCompressor "lzma"
11 LicenseForceSelection checkbox
12
13 InstallDir $PROGRAMFILES\Rust
14
15 Page license
16 Page directory
17 Page instfiles
18 UninstPage uninstConfirm
19 UninstPage instfiles
20
21 Section
22     WriteUninstaller $INSTDIR\uninstall.exe
23 SectionEnd
24
25 Section "Compiler"
26     SetOutPath $INSTDIR
27     File /nonfatal /r i686-pc-mingw32\stage3\*.*
28 SectionEnd
29
30 Section "Documentation"
31     SetOutPath $INSTDIR\doc
32     File /nonfatal /oname=rust.html doc\rust.html
33     File /nonfatal /oname=rust.pdf  doc\rust.pdf
34 SectionEnd
35
36 Section "Uninstall"
37     Delete $INSTDIR\uninstall.exe
38     Delete $INSTDIR\bin\*.*
39     Delete $INSTDIR\lib\*.*
40     Delete $INSTDIR\lib\rustc\i686-pc-mingw32\bin\*.*
41     Delete $INSTDIR\lib\rustc\i686-pc-mingw32\lib\*.*
42     Delete $INSTDIR\doc\rust.html
43     Delete $INSTDIR\doc\rust.pdf
44     RMDir $INSTDIR\bin
45     RMDir $INSTDIR\lib\rustc\i686-pc-mingw32\bin
46     RMDir $INSTDIR\lib\rustc\i686-pc-mingw32\lib
47     RMDir $INSTDIR\lib\rustc\i686-pc-mingw32
48     RMDir $INSTDIR\lib\rustc
49     RMDir $INSTDIR\lib
50     RMDir $INSTDIR\doc
51     RMDir $INSTDIR
52 SectionEnd