Menu

#368 NSIS 3.08 script updates

open
nobody
NSIS (2)
5
2021-11-12
2021-10-17
Anders
No

Some fixes for changed commands, mostly from their wiki with the important one being EW_GETOSINFO reusing an id 7Z detected as bad. I'm not set up to compile 7Z but hopefully there are not too many typos.

1 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2021-11-07

    I'm not ready to verify and test all these changed things now.

     
    • Anders

      Anders - 2021-11-09

      Can you at least not detect EW_GETLABELADDR and EW_GETFUNCTIONADDR as bad commands in NSIS v3?

       
      • Igor Pavlov

        Igor Pavlov - 2021-11-09

        I can look it, if you can write full description of each change, that can help me to verify and test these things.
        something like that:
        Old nsis was so ...
        Starting nsis version NNN (date), it's so ...
        The reason why it was changed in nsis: ...
        And example of nsis exe file that shows changed things.

        Note that I don't keep in mind all these nsis code things. So it very difficult to me to verify new patched code. I can change it, if I understand changed things.

         
        • Anders

          Anders - 2021-11-09

          EW_GETLABELADDR as correctly noted in your source was only used by the compiler but that instruction number is now used by exehead.

          I added most of the other changes to NSIS myself and wrote the wiki stuff. The wiki has most of the SVN revision numbers right there. It is mostly instruction parameter changes.

           
          • Igor Pavlov

            Igor Pavlov - 2021-11-09

            I don't understand such descriptions like " is now used by".
            What is "now"?
            When it was changed and why?
            Who uses new versions?
            How to keep compatibility with old and new archives?
            I don't want to break the code. So I don't want to change any line, if I don't understand it. Now I don't work for that nsis code, so I don't remember that my nsis code details.

            Maybe the changes are simple, but I have to do difficult (for me now) actions to verify these changes. If it will be simple to verify it for me, I can do it. That why I need description and some examples that can help me to verify each change.

             

            Last edit: Igor Pavlov 2021-11-09
            • Anders

              Anders - 2021-11-09

              The integer value previously used by EW_GETLABELADDR (and only in the compiler) is now (v3.06 and later) EW_GETOSINFO and this gets used by the generated installers. EW_GETLABELADDR was reassigned to some other value and still only used by the compiler. Here "now" means v3.x where x is not really important, no previous v3.x nor any 2.x (in the last 10 years at least) ever used the old integer value in any generated installer. I believe your code was just being defensive by marking it as a bad instruction although it would be possible for really old v2 to use it but that is irrelevant since the patch checks for => v3.

              The wiki lists the exact version where something changed and the patch also has version comments. Many of the changes are unused instruction parameters now being used or a bool value changing to flags where the old bool got the flag 0x01.

              Example from the patch:

              -        if (params[5] != 0)
              +        if (IsNsis3OrHigher() ? (params[5] & 1) : (params[5] != 0))
              

              (here param5 was changed from BOOL to flags in NSIS. In 64 bit v3 installers another bit can be set for 64-bit operations: Int(64)Cmp(U) for the instruction variants (+ if (params[5] & 0x8000) return "Int64Cmp"; // 3.03+).

              EW_CREATESHORTCUT changed its packing to allow for a larger icon index and while this patch adds some code for it, it does not get used because I did not add the code to do detection of the required minimum version, that macro just returns 0 right now.

               

              Last edit: Anders 2021-11-09
  • Igor Pavlov

    Igor Pavlov - 2021-11-12

    Ok. I'll change the code for suggested fixes.
    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.