Updated unicode.nsi and removed UserVars.nsi
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7162 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bdbfff3cf2
commit
219eb59286
4 changed files with 23 additions and 76 deletions
|
@ -23,7 +23,6 @@ examples = Split("""
|
||||||
TextFunc.nsi
|
TextFunc.nsi
|
||||||
TextFuncTest.nsi
|
TextFuncTest.nsi
|
||||||
unicode.nsi
|
unicode.nsi
|
||||||
UserVars.nsi
|
|
||||||
VersionInfo.nsi
|
VersionInfo.nsi
|
||||||
viewhtml.nsi
|
viewhtml.nsi
|
||||||
waplugin.nsi
|
waplugin.nsi
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
; UserVars.nsi
|
|
||||||
;
|
|
||||||
; This script shows you how to declare and user variables.
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
Name "User Variables Text"
|
|
||||||
OutFile "UserVars.exe"
|
|
||||||
|
|
||||||
InstallDir "$PROGRAMFILES\User Variables Test"
|
|
||||||
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
;Pages
|
|
||||||
Page directory
|
|
||||||
Page instfiles
|
|
||||||
|
|
||||||
UninstPage uninstConfirm
|
|
||||||
UninstPage instfiles
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Declaration of user variables (Var command), allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
|
|
||||||
|
|
||||||
Var "Name"
|
|
||||||
Var "Serial"
|
|
||||||
Var "Info"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Installer
|
|
||||||
|
|
||||||
Section "Dummy Section" SecDummy
|
|
||||||
|
|
||||||
StrCpy $0 "Admin"
|
|
||||||
StrCpy "$Name" $0
|
|
||||||
StrCpy "$Serial" "12345"
|
|
||||||
MessageBox MB_OK "User Name: $Name $\n$\nSerial Number: $Serial"
|
|
||||||
|
|
||||||
CreateDirectory $INSTDIR
|
|
||||||
WriteUninstaller "$INSTDIR\Uninst.exe"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "Another Section"
|
|
||||||
|
|
||||||
Var /GLOBAL "AnotherVar"
|
|
||||||
|
|
||||||
StrCpy $AnotherVar "test"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Uninstaller
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
StrCpy $Info "User variables test uninstalled successfully."
|
|
||||||
Delete "$INSTDIR\Uninst.exe"
|
|
||||||
RmDir $INSTDIR
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Function un.OnUninstSuccess
|
|
||||||
|
|
||||||
HideWindow
|
|
||||||
MessageBox MB_OK "$Info"
|
|
||||||
|
|
||||||
FunctionEnd
|
|
|
@ -323,7 +323,6 @@ ${MementoSection} "Script Examples" SecExample
|
||||||
File ..\Examples\languages.nsi
|
File ..\Examples\languages.nsi
|
||||||
File ..\Examples\Library.nsi
|
File ..\Examples\Library.nsi
|
||||||
File ..\Examples\VersionInfo.nsi
|
File ..\Examples\VersionInfo.nsi
|
||||||
File ..\Examples\UserVars.nsi
|
|
||||||
File ..\Examples\LogicLib.nsi
|
File ..\Examples\LogicLib.nsi
|
||||||
File ..\Examples\silent.nsi
|
File ..\Examples\silent.nsi
|
||||||
File ..\Examples\StrFunc.nsi
|
File ..\Examples\StrFunc.nsi
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
; unicode is not enabled by default
|
; Unicode is not enabled by default
|
||||||
; unicode installers will not be able to run on Windows 9x!
|
; Unicode installers will not be able to run on Windows 9x!
|
||||||
Unicode true
|
Unicode true
|
||||||
|
|
||||||
Name "Unicode Games"
|
Name "Unicode Games"
|
||||||
OutFile "unicode.exe"
|
OutFile "unicode.exe"
|
||||||
|
RequestExecutionLevel User
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
|
|
||||||
XPStyle on
|
XPStyle on
|
||||||
|
|
||||||
|
|
||||||
Section "Unicode in UI"
|
Section "Unicode in UI"
|
||||||
|
|
||||||
DetailPrint "Hello World!"
|
DetailPrint "Hello World!"
|
||||||
|
@ -23,8 +23,26 @@ Section "Unicode in UI"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
Section "Unicode in Files"
|
Section "Unicode in Files"
|
||||||
|
|
||||||
# TODO add file I/O unicode function examples
|
Var /Global Message
|
||||||
|
|
||||||
|
InitPluginsDir
|
||||||
|
FileOpen $0 "$PluginsDir\Test.txt" w
|
||||||
|
IfErrors done
|
||||||
|
FileWriteUTF16LE /BOM $0 "Hello World "
|
||||||
|
FileWriteWord $0 0xD83C # Manually write ${U+1F30D}
|
||||||
|
FileWriteWord $0 0xDF0D # as surrogate-pair
|
||||||
|
FileWriteUTF16LE $0 " and Sun ${U+2600}$\r$\n"
|
||||||
|
FileClose $0
|
||||||
|
|
||||||
|
FileOpen $0 "$PluginsDir\Test.txt" r
|
||||||
|
IfErrors done
|
||||||
|
FileReadUTF16LE $0 $Message
|
||||||
|
FileClose $0
|
||||||
|
|
||||||
|
DetailPrint "Message: $Message"
|
||||||
|
done:
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue