|
|
#1 | |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Assembler for NSIS
https://sourceforge.net/projects/nslassembler/files/
Quote:
This project is part of my University degree but it's time for me to move on to other University related work before my exams in May/June. That does not mean I will be stopping work on nsL. I plan on adding support for arrays with the help of a small plug-in (among other things) but that will be done at a later stage. My demonstration for this project is on Tuesday (29th) so I would be grateful to get feedback tomorrow or Monday! I apologise for posting so close to the demonstration date but there was so many features that I wanted to add I got a little carried away. Anyway, run the executable file from the SourceForge page and then you will have a "Compile nsL Script" right-click option on ".nsl" files. You'll find some example scripts in NSIS\Examples\NSL. Edit: Attached an example script. Stu |
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
It is very interesting, I like its style very much.
Contact me: 137729898@qq.com |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
(All of my comments are based on just reading the .pdf)
"Before a variable can be used, it must be assigned to" I don't really like this, I'm used to variables defaulting to "" if you never set them (And they don't need an initial value if you are going to be pop'ing into them) Using \ as escape is a bit painful in a installer since it usually contains a lot of paths, maybe you could add @"this\is\not\escaped" like C#? Or use ^ or something like that? Real functions (with overloading even) looks great! I'm not really a fan of the section syntax, what if we add another flag? Named arguments would also be better so you don't have to remember the order. What about something like section MySection("hello world",/ReadOnly,"/newflag=space string",/Bold,1,2,...N), also, "optional" is not a good word for /o, IMHO you should call it unselected or unchecked. (I'm assuming /o is supposed to simulate [O] vs [X] ) Did you forget about the /ENABLECANCEL flag for custom pages? Is there a way to tell how many parameters have been passed to a #macro? getmacroargcount() or something like that? There is an old bug in the nsis parser, MessageBox mb_ok "$${foo}" this should display "${foo}" and not "$" + the content of ${foo}, maybe you can either add a working escape for \$ ($\$ in nsis, but does not exist) or work around it in other ways in your string handling? Are functions merged? aka can you have more than one .onInit() assuming they have the same number of parameters? (You don't want this for normal functions, but it would be nice to have for the nsis callbacks) I assume the .docx is the same as the .pdf? I think .rtf has table support, all I know is, I can't (and will not try to) read .docx Not a big fan of java, but hey, the author gets to choose the language =) IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#4 |
|
Major Dude
|
This looks totally awesome!
Pluses: I am very happy about C like syntax and case sensitivity. Making own functions is fantastic, variable scope (finally!), arithmetic operators, code blocks, inlining NSIS code these all are great! Using hash for defines is a little strange, but it reminds me a old-good C/C++ ![]() Minuses: I am a little disappointed from function calls: e.g code: WTF is that true, true, 99 ? Althought I am skilled NSIS user on first signt I didn't have any idea what it means. I suggest to use enums for parameters [flags] - is this possible? Maybe these flags should be ORed someone?? PHP Code:
code: MB_OK|MB_ICONEXCLAMATION would fit perfectly for enums PHP Code:
so everything should be rewritten into .nsl which is enormus work.I noticed that generated .nsi file requires a little of brushing. Anyway: nsL looks very promising and you made a really good job on it! Thanks!!! Edit: In this state I suggest using nsL in this style: Create .nsl file where you create all logic, functions, etc because in nsL it is easier than in .nsi and then generate .nsi file which you later include in your installer, you brush it a little and generate final installer. Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com Last edited by T.Slappy; 27th March 2011 at 06:57. Reason: Adding some stuff |
|
|
|
|
|
#5 | ||||
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Thanks for the feedback guys. Keep it coming! I will make note of everything.
Quote:
Quote:
getmacroargcount() is a good idea. There are probably plenty more that I could add really such as macrodef(name) and perhaps date() etc. Quote:
The docx was included in the source code. The pdf is the Docs copy. The original plan was to write it in C++ but using Java of course allowed me to write code and debug much faster. Yes the \\ in strings is a real pain. I will add support for the C# @ prefix. Quote:
. Either way you can use enums now (no constructor mind) as the | operator exists and you can define constants as numbers.As for MUI, I should include an example. It's actually very simple. Just add #nsis ... #nsisend sections with the MUI code in it. Maybe not very pretty but that's the best we can do probably. I need to add an #nsisdef or something similar to !define constants to nsL values (i.e. import values from nsL into NSIS) but maybe there is a nicer way. Any thoughts? (Defining all nsL constants as NSIS ones... no). Edit: New build uploaded which has the @ string prefix added. Also included a simple Modern UI 2 example script. Stu |
||||
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
I can't stand C# enums, and you should try to keep the amount of extra typing to a minimum and emulate the nsis constant names when possible...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yeh I agree. I will keep it simple and predefine MB_* as constants (among others). Something else I need to add is to assemble MessageBox (and other jump instructions) specially in switch statements. Currently you can use them, sure, but it will first StrCpy IDOK for example to a register and use that register for the switch. This is not the case when used in if statements or while loops - e.g. the MessageBox or IfSilent go-to label arguments will be used instead, but you are limited to a true or false (i.e. IDOK or not).
Stu |
|
|
|
|
|
#8 | |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
1.0.2 released.
Quote:
|
|
|
|
|
|
|
#9 |
|
Senior Member
Join Date: May 2009
Posts: 152
|
Installation Issue
I'm using a PortableApps version of NSIS so the install "Claims" that NSIS is not installed. I took a look at the SVN source and find that the installer get the install path from the registry, if the registry key is missing then kaboom. Install.nsl --> Line 18
For a simple workaround, just add the portable apps path to the registry.. here is a VBScript that dose the trick: PHP Code:
↓ Your Welcome
↓Last edited by Zinthose; 29th March 2011 at 21:04. |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ah thanks. I may just remove that code as people can still use the assembler without NSIS installed anyway.
Stu |
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If anyone else would like to play around with the language and post some more feedback I would be grateful.
Stu |
|
|
|
|
|
#12 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
Sublime Text plugin supporting nsL Assember is now available, adding language syntax, command completion (WIP) and a build system.
https://github.com/idleberg/nsL-Assembler-Sublime-Text Will make the command completion more useful, but the nsL documentation isn't too much of an help (also, why docx?!) |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I wasn't aware people were still using nsL? It was a project when I was at University 6 years ago (hence Java and docx).
Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|