[r213]: trunk / vcd-setup.nsi  Maximize  Restore  History

Download this file

178 lines (141 with data), 5.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# vimcdoc (http://vimcdoc.sf.net) Win32 platform installation program
# NSIS source script
# Compile this file with NSIS2!! available at http://nsis.sf.net
# Author: lang2 (lang2_at_users.sf.net)
OutFile "vimcdoc-setup.exe"
SetCompressor bzip2
# We are overwriting everything
SetOverwrite on
######
# Setup pages to be displayed
######
Page license
Page components
Page directory
Page instfiles
######
# Load the lanuage files
######
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\SimpChinese.nlf"
#Setup license page
LicenseLangString myLicenseData ${LANG_ENGLISH} "LICENSE"
LicenseLangString myLicenseData ${LANG_SIMPCHINESE} "LICENSE"
LicenseData $(myLicenseData)
######
# Setup various language string
# The same name is used for lang string and the install attribute is the
# same, which is confusing. But works nonetheless. Note that $() is a
# user variable.
######
#Setup name string
LangString Name ${LANG_SIMPCHINESE} "Vim ��������"
LangString Name ${LANG_ENGLISH} "Vim Chinese Documentation"
Name $(Name)
LangString DocsectName ${LANG_ENGLISH} "Chinese documentation"
LangString DocsectName ${LANG_SIMPCHINESE} "Vim ��������"
;LangString Backup ${LANG_ENGLISH} "Backup originals"
;LangString Backup ${LANG_SIMPCHINESE} "����������"
LangString StartVim ${LANG_SIMPCHINESE} "����������������������"
LangString StartVim ${LANG_ENGLISH} "View the Chinese help after installation"
LangString SetupVim ${LANG_SIMPCHINESE} "����������������������"
LangString SetupVim ${LANG_ENGLISH} "Set Chinese as the default help language"
LangString BrandingText ${LANG_SIMPCHINESE} "http://vimcdoc.sf.net"
LangString BrandingText ${LANG_ENGLISH} "http://vimcdoc.sf.net"
BrandingText $(BrandingText)
LangString LicenseText ${LANG_SIMPCHINESE} "��������"
LangString LicenseText ${LANG_ENGLISH} "License agreement"
LicenseText $(LicenseText)
LangString CompletedText ${LANG_ENGLISH} "Thanks for installing vimcdoc."
LangString CompletedText ${LANG_SIMPCHINESE} "�������� Vim ����������"
CompletedText $(CompletedText)
LangString DirText1 ${LANG_ENGLISH} "Please make sure that the following directory is corrrect. \
If you are not sure, simply press 'Install'."
LangString DirText2 ${LANG_ENGLISH} "The setup program has \
detected that you have Vim installed in:"
LangString DirText1 ${LANG_SIMPCHINESE} "������������������������������������������'����'��"
LangString DirText2 ${LANG_SIMPCHINESE} "������������������ Vim ��������������:"
DirText $(DirText1) $(DirText2)
LangString ComponentText ${LANG_SIMPCHINSE} "��������������:"
LangString ComponentText ${LANG_ENGLISH} "Please setup installation options:"
ComponentText $(ComponentText)
######
# Pre-processing
######
#Setup the INSTDIR from registery
InstallDirRegKey HKLM SOFTWARE\Vim\Gvim "path"
#InstallColors 000000 809090
InstProgressFlags smooth
UninstallText "This will uninstall vimcdoc. Hit next to continue."
ShowInstDetails show
###########
# Sections
###########
Section !$(DocsectName)
SectionIn RO ;This section has to be run
; Set the other two options to be off
StrCpy $R1 'no'
StrCpy $R2 'no'
SectionEnd
#Section $(Backup)
#StrCpy $R0 'yes'
#AddSize 3500
#SectionEnd
Section $(SetupVim)
StrCpy $R2 'yes'
SectionEnd
Section $(StartVim)
StrCpy $R1 'yes'
SectionEnd
Section - DoStuff
SetOutPath $INSTDIR\..\vimfiles\doc
File /r "doc\*.cnx"
File "doc\tags-cn"
SetOutPath $INSTDIR\..\vimfiles\syntax
File "help_cn.vim"
StrCmp $R2 'yes' 0 +3
SetOutPath $INSTDIR\..\vimfiles\plugin
File "vimcdoc.vim"
SetOutPath $PROGRAMFILES\vimcdoc
File "README"
File "INSTALL"
File "LICENSE"
File "AUTHORS"
File "guides.txt"
SectionEnd
Section "Uninstall"
Delete $INSTDIR\*.cnx
Delete $INSTDIR\tags-cn
Delete $INSTDIR\..\syntax\help_cn.vim
Delete $INSTDIR\..\plugin\vimcdoc.vim
Delete $INSTDIR\vimcdoc-uninst.exe
Rmdir /r $PROGRAMFILES\vimcdoc
SectionEnd
###########################
## Functions
##########################
#Function BackupOrig
#IfFileExists $INSTDIR\doc\backup\*.* BackedUp
#CreateDirectory $INSTDIR\doc\backup
#CopyFiles "$INSTDIR\doc\*.cnx" "$INSTDIR\doc\backup" 4000
#BackedUp: ; backup already. skip
#FunctionEnd
# Yes the uninstaller is not written into $PROGRAMFILES
# because I don't know how to!
Function .onInstSuccess
WriteUninstaller $INSTDIR\..\vimfiles\doc\vimcdoc-uninst.exe
StrCmp $R1 'yes' 0 +2
Exec "$INSTDIR\gvim.exe +help@cn" ; view help file in Vim
FunctionEnd
Function .onInit
Push ${LANG_ENGLISH}
Push English
Push ${LANG_SIMPCHINESE}
Push "��������"
Push 2 ; 2 is the number of languages
LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
FunctionEnd
; eof

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks