• Login
Community
  • Login

Help to porting SourceCookifier for 64bit

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
18 Posts 6 Posters 4.9k 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.
  • A
    ArkadiuszMichalski
    last edited by Mar 17, 2019, 1:52 PM

    Could anyone try port the SourceCookifier plugin for the 64-bit version of Notepad ++? Here is homepage and source.
    Personally, I do not have knowledge about C ++ and learning it would take forever to be able to do it. So if there is someone brave who has the time and desire I would be grateful (and certainly not only me because this plugin is very good).

    @andrecool-68 Maybe you would try? In the same way as for the Preview Plugin? I wonder how much work it takes to compile it into a working form.

    M 1 Reply Last reply Dec 12, 2022, 1:49 PM Reply Quote 0
    • A
      andrecool-68
      last edited by Mar 17, 2019, 5:38 PM

      I am a professional house builder (retired) …not a programmer)))

      1 Reply Last reply Reply Quote 2
      • M
        Michael Vincent
        last edited by Mar 26, 2019, 7:52 PM

        SourceCookifier is written in C# not C++. I know little of either, but have Visual Studio 2017 Community install and after a bit of hacking was able to get SourceCookifier to compile as 64-bit. However, it gives the old “This ANSI plugin is not compatible with your UNICODE N++” …

        This is weird because the isUnicode() sub is present and it returns true. Not sure if there’s a compiler flag missing or something.

        Anyone who knows C# care to weigh in?

        E 1 Reply Last reply Mar 26, 2019, 9:41 PM Reply Quote 2
        • E
          Ekopalypse @Michael Vincent
          last edited by Mar 26, 2019, 9:41 PM

          @Michael-Vincent

          Out of curiosity I gave it a try.
          Besides creating a x64 configuration I had to edit NppPlugin.DllExport.targets file.
          LibToolPath needs to be set to the path of lib.exe, for me this was
          LibToolPath="$(DevEnvDir)\..\..\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64"
          and the SdkPath needs to be set to find ildasm.exe which for me was
          SdkPath="C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64"

          After those changes I was able to build a 64bit version but didn’t do any functional tests as I’m not using this plugin but maybe this enough for you to get started.

          1 Reply Last reply Reply Quote 1
          • M
            Michael Vincent
            last edited by Mar 26, 2019, 9:45 PM

            Thanks, I needed to do those things as well to get it to compile. The issue is Notepad++ thinks the output DLL is ANSI, not UNICODE. I can’t find an “OutputUnicodeDLL” or some such switch in the C# project files or the MSVC 2017 Community IDE even after much Google-ing.

            E 1 Reply Last reply Mar 26, 2019, 9:55 PM Reply Quote 0
            • E
              Ekopalypse @Michael Vincent
              last edited by Mar 26, 2019, 9:55 PM

              @Michael-Vincent

              I haven’t had this issue

              M 1 Reply Last reply Mar 26, 2019, 10:56 PM Reply Quote 2
              • M
                Michael Vincent
                last edited by Mar 26, 2019, 10:17 PM

                Interesting! So if I figure out why it seems I’m outputting ANSI, it should work.

                1 Reply Last reply Reply Quote 0
                • M
                  Meta Chuh moderator @Ekopalypse
                  last edited by Mar 26, 2019, 10:56 PM

                  @Ekopalypse

                  i guess the easiest thing for the op would be if you upload and publish your sourcecookifier x64 unicode test build. eg at your github repo (binary only) or anywhere else.

                  E 1 Reply Last reply Mar 26, 2019, 11:21 PM Reply Quote 0
                  • E
                    Ekopalypse @Meta Chuh
                    last edited by Mar 26, 2019, 11:21 PM

                    @Meta-Chuh

                    but that would bring me into a position which I don’t really like,
                    namely doing some kind of maintenance - it is not really python :-D

                    1 Reply Last reply Reply Quote 1
                    • A
                      Alan Kilborn
                      last edited by Mar 27, 2019, 12:20 PM

                      @Meta-Chuh said:

                      upload and publish your sourcecookifier x64 unicode test build. eg at your github repo (binary only)

                      @Ekopalypse said:

                      but that would bring me into a position which I don’t really like, namely doing some kind of maintenance

                      Why bin only? One presumes the (source) code fork is already there. And there are plenty of “dead” forks around (so why would you feel obligated to do maintenance).

                      E 1 Reply Last reply Mar 27, 2019, 12:25 PM Reply Quote 2
                      • E
                        Ekopalypse @Alan Kilborn
                        last edited by Mar 27, 2019, 12:25 PM

                        @Alan-Kilborn

                        but if you upload something and offer a solution you will be automatically
                        the primary person to contact if something doesn’t work as expected as you have
                        provided that plugin/source code.

                        A 1 Reply Last reply Mar 27, 2019, 12:28 PM Reply Quote 0
                        • A
                          Alan Kilborn @Ekopalypse
                          last edited by Mar 27, 2019, 12:28 PM

                          @Ekopalypse

                          Ha. Nah. All you did was fork something and play around with it. Plenty of examples of people doing that on github. Only if you go so far as to take real ownership do you get into the situation you talk about. :)

                          1 Reply Last reply Reply Quote 0
                          • M
                            Michael Vincent
                            last edited by Mar 27, 2019, 2:28 PM

                            @Ekopalypse

                            Agree - that’s what I’ve been doing with un-maintained N++ plugins. Fork, it improve for me and post if others want it. I don’t plan on trying to include it in the nppPluginList which I think would be the real “taking ownership” thing.

                            A 1 Reply Last reply Mar 27, 2019, 2:37 PM Reply Quote 2
                            • A
                              Alan Kilborn @Michael Vincent
                              last edited by Alan Kilborn Mar 27, 2019, 2:37 PM Mar 27, 2019, 2:37 PM

                              @Michael-Vincent said:

                              …include it in the nppPluginList which I think would be the real “taking ownership” thing.

                              Well, you could go that far if you wanted to, and (I’d say) if you got the original author’s permission…but it is up to you.

                              Downside to not doing this: How would others know about the existence of these plugins (the “column” one especially I look forward to trying out).

                              1 Reply Last reply Reply Quote 1
                              • M
                                Michael Vincent
                                last edited by Mar 31, 2019, 12:46 AM

                                @Ekopalypse What version of the Microsoft SDK are you using to compile? Is it version 7? What version of Visual Studio Community?

                                I’m using VS Comm 2017 and version 10 of the SDK (v10.0A). I’m getting weird errors and overflows when trying to run the successfully build DLL in N++. Wondering if the supplied DLL in DLLExport are geared for an older version of Visual Studio and / or SDK?

                                1 Reply Last reply Reply Quote 2
                                • M
                                  Michael Vincent
                                  last edited by Mar 31, 2019, 2:19 AM

                                  More troubling, the same set of tools / versions on Windows 7 actually works for me - my successful build actually runs in N++ without crashing it. But copy that good DLL to Windows 10 and save errors. I wonder if there’s a redistributable that I have on Windows 7 and not on 10? I just don’t know/ understand C#.

                                  E 1 Reply Last reply Mar 31, 2019, 10:33 AM Reply Quote 2
                                  • E
                                    Ekopalypse @Michael Vincent
                                    last edited by Mar 31, 2019, 10:33 AM

                                    @Michael-Vincent

                                    Yes, I’m using Win7 as well and I was using VS 2017 community edition and SDK 7.
                                    Unfortunately I don’t have Win10 - so cannot confirm your findings.

                                    1 Reply Last reply Reply Quote 1
                                    • M
                                      Michael Vincent @ArkadiuszMichalski
                                      last edited by Dec 12, 2022, 1:49 PM

                                      @ArkadiuszMichalski said in Help to porting SourceCookifier for 64bit:

                                      Could anyone try port the SourceCookifier plugin for the 64-bit version of Notepad ++?

                                      Seems the (perhaps) original author finally got around to it:

                                      https://github.com/notepad-plus-plus/nppPluginList/commit/4233a0171213201fc296906200d179b3ace63179

                                      Cheers.

                                      1 Reply Last reply Reply Quote 2
                                      • First post
                                        Last post
                                      The Community of users of the Notepad++ text editor.
                                      Powered by NodeBB | Contributors