[Github-comments] [geany/geany] NSIS upgrade to 3.x (#2181)

Colomban Wendling notifications at xxxxx
Wed Jun 19 21:42:19 UTC 2019


b4n approved this pull request.

Apart from the 2 comments that I'm sure are nothing, I have nothing else to say, as I don't know much of it and trust you on this :)

> +
+# extract variable names (then sort the result, conver to lowercase and replace new lines by spaces)
+variables=$(\
+    sed --silent --regexp-extended\
+        --expression 's/^[ ]*m_ShellConstants.add\(_T\("(.*)"\),.*,.*\);.*$/\1/p' \
+        --expression 's/^[ ]*m_UserVarNames.add\(_T\("(.*)"\),.*\);.*$/\1/p' "${BUILD_CPP_FILE}" | \
+    sort | \
+    tr '[:upper:]' '[:lower:]' | \
+    tr '\n' ' ')
+
+# hardcode a few more, as found in the documentation ("4.2.2 Other Writable Variables")
+variables_extra='{nsisdir} 0 1 2 3 4 5 6 7 8 9 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 \\n \\r \\t $'
+variables="${variables_extra} ${variables}"
+# prefix each element with a dollar sign
+declare -a variables_array=(${variables})
+variables="${variables_array[@]/#/'$'}"

You could avoid the Bash dependency if you wanted, using e.g. `sed 's/[^ ]*/$&/g'` instead of the array trick.  It doesn't matter though, either way is fine.

> @@ -23,8 +23,8 @@ commentbox=comment
 
 [keywords]
 # all items must be in one line and in lowercase
-functions=abort addbrandingimage !addincludedir !addincludedirdir !addplugindir addsize addsizesize_to_add_to_section_in_kb allowrootdirinstall allowskipfiles !appendfile autoclosewindow bgfont bggradient brandingtext bringtofront call callinstdll caption captioninstaller_caption !cd changeui checkbitmap clearerrors completedtext componenttext contributors: copyfiles crccheck createdirectory createdirectorydirectory_name createfont createshortcut !define delete deleteinisec deleteinistr deleteregkey deleteregvalue !delfilefile detailprint detailprintmessage detailsbuttontext dirshow dirtext dirvar dirverify dirverifyauto !echo !echomessage !else enablewindow !endif enumregkey enumregvalue !error exch exec execshell !execute execwait expandenvstrings file filebufsize fileclose fileerrortext fileopen fileread filereadbyte fileseek filewrite filewritebyte findclose findfirst findnext findwindow flushini function functionend function_name getcurinsttype getcurrentaddress getcurrentaddressoutput getdlgitem getdllversion getdllversionlocal geterrorlevel getfiletime getfiletimelocal getfullpathname getfunctionaddress getinstdirerror getlabeladdress gettempfilename goto gotolabel hidewindow icon !if ifabort !ifdef iferrors iffileexists !ifmacrodef !ifmacrondef !ifndef ifrebootflag ifsilent !include initpluginsdir !insertmacro installbuttontext installcolors installdir installdirregkey instprogressflags insttype insttypegettext insttypesettext intcmp intcmpu intfmt intop iswindow langstring langstringup licensebkcolor licensedata licenseforceselection licenselangstring licensetext loadlanguagefile lockwindow logset logtext !macro !macroend makensis messagebox miscbuttontext name none nop outfile !packhdr page pagecallbacks pageex pageexend pop portions push pushstring quit readenvstr readinistr readregdword readregstr reboot regdll rename requestexecutionlevel reservefile return rmdir !searchparse searchpath !searchreplace section sectionend sectiongetflags sectiongetinsttypes sectiongetsize sectiongettext sectiongroup sectiongroupend sectionin sectionsetflags sectionsetinsttypes sectionsetsize sectionsettext sendmessage setautoclose setbrandingimage setcompress setcompressionlevel setcompressor setcompressordictsize setctlcolors setcurinsttype setdatablockoptimize setdatesave setdetailsprint setdetailsview seterrorlevel seterrors setfileattributes setfont setoutpath setoverwrite setpluginunload setrebootflag setregview setshellvarcontext setsilent showinstdetails showuninstdetails showwindow silentinstall silentuninstall sleep spacetexts strcmp strcmps strcpy strlen subcaption subsection subsectionend !system !tempfilesymbol !undef uninstallbuttontext uninstallcaption uninstallexename uninstallicon uninstallsubcaption uninstalltext uninstpage unregdll var !verbose viaddversionkey viproductversion !warning windowicon writeinistr writeregbin writeregdword writeregexpandstr writeregstr writeuninstaller xpstyle
-variables=$$ $` $' $" $0 $0, $1 $2 $3 $4 $5 $6 $7 $8 $9 $admintools $appdata $cdburn_area $cmdline $commonfiles $cookies $desktop $documents $exedir $favorites $fonts $history $hwndparent $instdir $internet_cache $language $music $nethood ${nsisdir} $outdir $pictures $pluginsdir $printhood $profile $programfiles $quicklaunch $\r $r0 $r1 $r2 $r3 $r4 $r5 $r6 $r7 $r8 $r9 $recent $resources $resources_localized $sendto $smprograms $smstartup $startmenu $sysdir $temp $templates $varname $videos $windir
+functions=!addincludedir !addplugindir !appendfile !cd !define !delfile !echo !else !endif !error !execute !finalize !getdllversion !gettlbversion !if !ifdef !ifmacrodef !ifmacrondef !ifndef !include !insertmacro !macro !macroend !macroundef !makensis !packhdr !pragma !searchparse !searchreplace !system !tempfile !undef !verbose !warning abort addbrandingimage addsize allowrootdirinstall allowskipfiles autoclosewindow bgfont bggradient brandingtext bringtofront cpu crccheck call callinstdll caption changeui checkbitmap clearerrors completedtext componenttext copyfiles createdirectory createfont createshortcut delete deleteinisec deleteinistr deleteregkey deleteregvalue detailprint detailsbuttontext dirshow dirtext dirvar dirverify enablewindow enumregkey enumregvalue exch exec execshell execshellwait execwait expandenvstrings file filebufsize fileclose fileerrortext fileopen fileread filereadbyte filereadutf16le filereadword fileseek filewrite filewritebyte filewriteutf16le filewriteword findclose findfirst findnext findwindow flushini function functionend getcurinsttype getcurrentaddress getdllversion getdllversionlocal getdlgitem geterrorlevel getfiletime getfiletimelocal getfullpathname getfunctionaddress getinstdirerror getlabeladdress gettempfilename goto hidewindow icon ifabort iferrors iffileexists ifrebootflag ifsilent initpluginsdir instprogressflags insttype insttypegettext insttypesettext installbuttontext installcolors installdir installdirregkey int64cmp int64cmpu int64fmt intcmp intcmpu intfmt intop intptrcmp intptrcmpu intptrop iswindow langstring langstringup licensebkcolor licensedata licenseforceselection licenselangstring licensetext loadandsetimage loadlanguagefile lockwindow logset logtext manifestdpiaware manifestdpiawareness manifestdisablewindowfiltering manifestgdiscaling manifestmaxversiontested manifestsupportedos messagebox miscbuttontext name nop outfile peaddresource pedllcharacteristics peremoveresource pesubsysver page page pagecallbacks pageex pageexend pop push quit rmdir readenvstr readinistr readregdword readregstr reboot regdll rename requestexecutionlevel reservefile return searchpath section sectionend sectiongetflags sectiongetinsttypes sectiongetsize sectiongettext sectiongroup sectiongroupend sectionin sectionsetflags sectionsetinsttypes sectionsetsize sectionsettext sendmessage setautoclose setbrandingimage setcompress setcompressionlevel setcompressor setcompressordictsize setctlcolors setcurinsttype setdatablockoptimize setdatesave setdetailsprint setdetailsview seterrorlevel seterrors setfileattributes setfont setoutpath setoverwrite setpluginunload setrebootflag setregview setshellvarcontext setsilent showinstdetails showuninstdetails showwindow silentinstall silentuninstall sleep spacetexts strcmp strcmps strcpy strlen subcaption subsection subsectionend target unregdll unicode uninstpage uninstpage uninstallbuttontext uninstallcaption uninstallexename uninstallicon uninstallsubcaption uninstalltext unsafestrcpy viaddversionkey vifileversion viproductversion var windowicon writeinistr writeregbin writeregdword writeregexpandstr writeregmultistr writeregnone writeregstr writeuninstaller xpstyle 
+variables=${nsisdir} $0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $r0 $r1 $r2 $r3 $r4 $r5 $r6 $r7 $r8 $r9 $\n $\r $\t $$ $admintools $appdata $cdburn_area $cmdline $commonfiles $commonfiles32 $commonfiles64 $cookies $desktop $documents $exedir $exefile $exepath $favorites $fonts $history $hwndparent $instdir $internet_cache $language $localappdata $music $nethood $outdir $pictures $pluginsdir $printhood $profile $programfiles $programfiles32 $programfiles64 $quicklaunch $recent $resources $resources_localized $sendto $smprograms $smstartup $startmenu $sysdir $temp $templates $videos $windir $_click $_outdir

I see this removed `` $` ``, `$'`, `$"` and `$0,`, is it on purpose?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2181#pullrequestreview-251983481
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190619/403a6975/attachment.html>


More information about the Github-comments mailing list