[prev in list] [next in list] [prev in thread] [next in thread]
List: nsis-commits
Subject: [NSIS-commits] SF.net SVN: nsis:[7162] NSIS/trunk/Examples
From: anders_k--- via NSIS-commits <nsis-commits () lists ! sourceforge ! net>
Date: 2020-03-26 0:19:56
Message-ID: 1585181996.557924.11419 () sfp-scm-7 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]
Revision: 7162
http://sourceforge.net/p/nsis/code/7162
Author: anders_k
Date: 2020-03-26 00:19:55 +0000 (Thu, 26 Mar 2020)
Log Message:
-----------
Updated unicode.nsi and removed UserVars.nsi
Modified Paths:
--------------
NSIS/trunk/Examples/SConscript
NSIS/trunk/Examples/makensis.nsi
NSIS/trunk/Examples/unicode.nsi
Removed Paths:
-------------
NSIS/trunk/Examples/UserVars.nsi
Modified: NSIS/trunk/Examples/SConscript
===================================================================
--- NSIS/trunk/Examples/SConscript 2020-03-24 02:35:17 UTC (rev 7161)
+++ NSIS/trunk/Examples/SConscript 2020-03-26 00:19:55 UTC (rev 7162)
@@ -23,7 +23,6 @@
TextFunc.nsi
TextFuncTest.nsi
unicode.nsi
- UserVars.nsi
VersionInfo.nsi
viewhtml.nsi
waplugin.nsi
Deleted: NSIS/trunk/Examples/UserVars.nsi
===================================================================
--- NSIS/trunk/Examples/UserVars.nsi 2020-03-24 02:35:17 UTC (rev 7161)
+++ NSIS/trunk/Examples/UserVars.nsi 2020-03-26 00:19:55 UTC (rev 7162)
@@ -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
Modified: NSIS/trunk/Examples/makensis.nsi
===================================================================
--- NSIS/trunk/Examples/makensis.nsi 2020-03-24 02:35:17 UTC (rev 7161)
+++ NSIS/trunk/Examples/makensis.nsi 2020-03-26 00:19:55 UTC (rev 7162)
@@ -323,7 +323,6 @@
File ..\Examples\languages.nsi
File ..\Examples\Library.nsi
File ..\Examples\VersionInfo.nsi
- File ..\Examples\UserVars.nsi
File ..\Examples\LogicLib.nsi
File ..\Examples\silent.nsi
File ..\Examples\StrFunc.nsi
Modified: NSIS/trunk/Examples/unicode.nsi
===================================================================
--- NSIS/trunk/Examples/unicode.nsi 2020-03-24 02:35:17 UTC (rev 7161)
+++ NSIS/trunk/Examples/unicode.nsi 2020-03-26 00:19:55 UTC (rev 7162)
@@ -1,14 +1,14 @@
-; unicode is not enabled by default
-; unicode installers will not be able to run on Windows 9x!
+; Unicode is not enabled by default
+; Unicode installers will not be able to run on Windows 9x!
Unicode true
Name "Unicode Games"
OutFile "unicode.exe"
-
+RequestExecutionLevel User
ShowInstDetails show
-
XPStyle on
+
Section "Unicode in UI"
DetailPrint "Hello World!"
@@ -23,8 +23,26 @@
SectionEnd
+
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
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
_______________________________________________
NSIS-commits mailing list
NSIS-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nsis-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic