[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nsis-commits
Subject:    [NSIS-commits] SF.net SVN: nsis:[7222] NSIS/trunk/Examples
From:       anders_k--- via NSIS-commits <nsis-commits () lists ! sourceforge ! net>
Date:       2020-08-29 17:20:06
Message-ID: 1598721606.690426.17123 () sfp-scm-7 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

Revision: 7222
          http://sourceforge.net/p/nsis/code/7222
Author:   anders_k
Date:     2020-08-29 17:20:05 +0000 (Sat, 29 Aug 2020)
Log Message:
-----------
Generate simple application in examples (bug #1252)

Modified Paths:
--------------
    NSIS/trunk/Examples/SConscript
    NSIS/trunk/Examples/install-per-user.nsi
    NSIS/trunk/Examples/install-shared.nsi
    NSIS/trunk/Examples/makensis.nsi

Added Paths:
-----------
    NSIS/trunk/Examples/AppGen.nsi

Added: NSIS/trunk/Examples/AppGen.nsi
===================================================================
--- NSIS/trunk/Examples/AppGen.nsi	                        (rev 0)
+++ NSIS/trunk/Examples/AppGen.nsi	2020-08-29 17:20:05 UTC (rev 7222)
@@ -0,0 +1,78 @@
+/*
+Note: This is not a installer example script, it's a script for a simple application \
used by some of the other examples. +*/
+
+!define /math ARCBITS ${NSIS_PTR_SIZE} * 8
+Name "${NAME}"
+!define /IfNDef OUTFILE ""
+OutFile "${OUTFILE}"
+Unicode True
+!define /IfNDef REL User
+RequestExecutionLevel ${REL}
+XPStyle On
+ManifestDPIAware True
+AutoCloseWindow True
+BrandingText " "
+Caption "$(^Name) (${ARCBITS}-bit)"
+MiscButtonText " " " " "E&xit" " "
+LicenseBkColor /windows
+
+!ifdef COMPANY
+!ifndef NOPEVI
+!define /IfNDef VER 1.2.3.4
+VIProductVersion ${VER}
+VIAddVersionKey /LANG=0 "FileVersion" "${VER}"
+VIAddVersionKey /LANG=0 "CompanyName" "${COMPANY}"
+VIAddVersionKey /LANG=0 "LegalCopyright" "${U+00A9} ${COMPANY}"
+VIAddVersionKey /LANG=0 "FileDescription" "${NAME}"
+!endif
+!endif
+
+!include WinMessages.nsh
+!include LogicLib.nsh
+
+PageEx License
+	Caption " "
+	LicenseText "$ExeFile$\n$ExePath" "E&xit"
+	PageCallbacks "" OnShow
+PageExEnd
+Page InstFiles
+
+
+Function .onInit
+!ifdef AUMI
+System::Call 'SHELL32::SetCurrentProcessExplicitAppUserModelID(ws)' "${AUMI}"
+!endif
+FunctionEnd
+
+
+Function OnShow
+FindWindow $0 "#32770" "" $hWndParent
+GetDlgItem $R9 $0 0x3E8
+
+!ifdef MSG
+SendMessage $R9 ${EM_REPLACESEL} "" "STR:${MSG}$\r$\n$\r$\n"
+!endif
+
+!ifdef TMPLDATA
+${IfNot} ${FileExists} "$AppData\${NAME}\*"
+  ; Copy template data from the shared source to this users profile
+  CreateDirectory "$AppData\${NAME}"
+  CopyFiles /Silent "${TMPLDATA}\*" "$AppData\${NAME}"
+${EndIf}
+ReadIniStr $2 "$AppData\${NAME}\Data.ini" Example Count
+IntOp $2 $2 + 1
+WriteIniStr "$AppData\${NAME}\Data.ini" Example Count $2
+SendMessage $R9 ${EM_REPLACESEL} "" "STR:Launch Count=$2$\r$\n$\r$\n"
+!endif
+
+SendMessage $R9 ${EM_REPLACESEL} "" "STR:CmdLine=$CmdLine$\r$\n"
+ReadEnvStr $2 "USERNAME"
+SendMessage $R9 ${EM_REPLACESEL} "" "STR:%USERNAME%=$2$\r$\n"
+ReadEnvStr $2 "__COMPAT_LAYER"
+StrCmp $2 "" +2
+SendMessage $R9 ${EM_REPLACESEL} "" "STR:Compatibility=$2$\r$\n"
+FunctionEnd
+
+Section
+SectionEnd

Modified: NSIS/trunk/Examples/SConscript
===================================================================
--- NSIS/trunk/Examples/SConscript	2020-08-22 16:24:14 UTC (rev 7221)
+++ NSIS/trunk/Examples/SConscript	2020-08-29 17:20:05 UTC (rev 7222)
@@ -6,6 +6,7 @@
 	FileFunc.nsi
 	FileFuncTest.nsi
 	gfx.nsi
+	AppGen.nsi
 	install-per-user.nsi
 	install-shared.nsi
 	languages.nsi

Modified: NSIS/trunk/Examples/install-per-user.nsi
===================================================================
--- NSIS/trunk/Examples/install-per-user.nsi	2020-08-22 16:24:14 UTC (rev 7221)
+++ NSIS/trunk/Examples/install-per-user.nsi	2020-08-29 17:20:05 UTC (rev 7222)
@@ -59,7 +59,10 @@
   WriteRegDWORD HKCU "${REGPATH_UNINSTSUBKEY}" "NoModify" 1
   WriteRegDWORD HKCU "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1
 
-  File "/oname=$InstDir\MyApp.exe" "${NSISDIR}\Bin\MakeLangId.exe" ; Pretend that we \
have a real application to install +  !tempfile APP
+  !makensis '-v2 "-DOUTFILE=${APP}" "-DNAME=NSISPerUserAppExample" \
-DCOMPANY=Nullsoft "AppGen.nsi"' = 0 +  File "/oname=$InstDir\MyApp.exe" "${APP}" ; \
Pretend that we have a real application to install +  !delfile "${APP}"
 SectionEnd
 
 Section "Start Menu shortcut"

Modified: NSIS/trunk/Examples/install-shared.nsi
===================================================================
--- NSIS/trunk/Examples/install-shared.nsi	2020-08-22 16:24:14 UTC (rev 7221)
+++ NSIS/trunk/Examples/install-shared.nsi	2020-08-29 17:20:05 UTC (rev 7222)
@@ -62,7 +62,10 @@
   WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoModify" 1
   WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1
 
-  File "/oname=$InstDir\MyApp.exe" "${NSISDIR}\Bin\MakeLangId.exe" ; Pretend that we \
have a real application to install +  !tempfile APP
+  !makensis '-v2 "-DOUTFILE=${APP}" "-DNAME=NSISSharedAppExample" -DCOMPANY=Nullsoft \
"AppGen.nsi"' = 0 +  File "/oname=$InstDir\MyApp.exe" "${APP}" ; Pretend that we have \
a real application to install +  !delfile "${APP}"
 SectionEnd
 
 Section "Start Menu shortcut"

Modified: NSIS/trunk/Examples/makensis.nsi
===================================================================
--- NSIS/trunk/Examples/makensis.nsi	2020-08-22 16:24:14 UTC (rev 7221)
+++ NSIS/trunk/Examples/makensis.nsi	2020-08-29 17:20:05 UTC (rev 7222)
@@ -307,6 +307,7 @@
   File ..\Examples\makensis.nsi
   File ..\Examples\example1.nsi
   File ..\Examples\example2.nsi
+  File ..\Examples\AppGen.nsi
   File ..\Examples\install-per-user.nsi
   File ..\Examples\install-shared.nsi
   File ..\Examples\waplugin.nsi

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