• Login
Community
  • Login

NppCalc for 64bit Notepad++

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
5 Posts 3 Posters 3.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    baluch2020
    last edited by Mar 10, 2022, 9:55 AM

    I would like to recompile NppCalc 32 bit plugin to 64 bit so I can use it in Notepad++ 64 bit.

    The source code downloaded from here https://sourceforge.net/projects/nppcalc/ seems to be Delphi.

    I have installed Lazarus Delphi compiler , loaded the project and compiled it. It produced some .exe and is not usable. It is supposed to generate a dll. How to compile this Delphi code in 64 bit ?

    M 1 Reply Last reply Mar 10, 2022, 11:49 AM Reply Quote 0
    • M
      Michael Vincent @baluch2020
      last edited by Mar 10, 2022, 11:49 AM

      @baluch2020 said in NppCalc for 64bit Notepad++:

      How to compile this Delphi code in 64 bit ?

      No idea. But there is a 64-bit “calculator” (I think) at https://planet-cnc.com/notepad-plugin/ . It’s even in the Plugin Admin. Does that one not do what you want?

      Cheers.

      B 1 Reply Last reply Mar 10, 2022, 12:13 PM Reply Quote 1
      • B
        baluch2020 @Michael Vincent
        last edited by Mar 10, 2022, 12:13 PM

        @michael-vincent thanks. but it is not userfriendly like nppcalc and many functions are missing too.

        R 1 Reply Last reply Mar 10, 2022, 12:31 PM Reply Quote 1
        • R
          rdipardo @baluch2020
          last edited by Mar 10, 2022, 12:31 PM

          @baluch2020,
          I happen to have a Delphi and Lazarus IDE (and some experience reviving old Delphi plugins), so I looked over the code.

          I’m sorry to say it’s practically hopeless.

          First, the developer used Delphi 7, which is Windows XP-era. I’m not sure they even had to think about 64-bits in those days. Notepad++ wasn’t Unicode back then, and Delphi has since made UTF-16 the default encoding for the string type, so every string variable has to be checked for buffer overflows, or else retyped as AnsiString (which the developer took for granted).

          Porting to Free Pascal (via Lazarus) is even harder. Not only are several standard libraries missing, but the plugin makes heavy use of inter-process communication with the Indy framework . For years this was a Delphi-only library. A Free Pascal port is still a work in progress.

          Even supposing you could compile the library in a modern IDE, you have to update the Scintilla interface unit, or the 64-bit DLL will crash in current Notepad++ versions.

          Maybe you could try getting your hands on Delphi 7, if you trust downloads from the Internet Archive .

          B 1 Reply Last reply Mar 11, 2022, 4:26 AM Reply Quote 4
          • B
            baluch2020 @rdipardo
            last edited by Mar 11, 2022, 4:26 AM

            @rdipardo Thank you for the detailed analysis. I have no experience in Delphi , I will continue to use 32bit NPP till a better calc plugin is available of 64bit NPP.

            1 Reply Last reply Reply Quote 1
            • R rdipardo referenced this topic on Mar 27, 2022, 8:53 PM
            • R rdipardo referenced this topic on Mar 28, 2022, 7:24 PM
            5 out of 5
            • First post
              5/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors