in reply to Writing a Perl extension framework for Inkscape

Hi fdesar,

first, welcome to the Monastery.

Second, I'm using Perl much more on various kinds of Unix and Linux than on Windows; in addition, when working under Windows, I usually prefer to use Cygwin when possible (mainly because of the bash environment, which is so much nicer to use than a cmd console -- although I know it is now possible and pretty easy to run a bash under pure Windows without Cygwin). So I am really not an expert on Perl on Windows, but, in my experience with Windows (i.e. when not using Cygwin), Strawberry is really good and I would think that you should have much less problems with Strawberry than with Active Perl.

Contrary to what you seem to think, Strawberry does not need Cygwin to run and works well with pure native Windows. In addition, Strawberry provides a portable version (no installation required) which is likely to fit well into your project of bundling it with Inkscape and your own Origami modules. I really think that you should give Strawberry another try and tell us if you encounter any difficulties.

Finally, kudos for being an Open Source enthusiast, I can only fully support you on this point. I haven't studied that issue in detail, but I believe that Strawberry is free software and will fit your outlook better than Active State. I really hope that you'll be able to release your project for Windows.

Replies are listed 'Best First'.
Re^2: Writing a Perl extension framework for Inkscape
by fdesar (Beadle) on Jan 22, 2019 at 19:39 UTC

    But my extension is already available at https://github.com/fdesar/Origami-Ext and I wrote a command line installer. It only requires you have Active Perl installed first on your system. It even automatically download the missing Lib::LibXML module using ppm and I rewrote a mini-gettext specially for Windows (as Active State does't supply Locale::gettext) to have I18n working (Windows is a nightmare for that: they don't have AFAIK any libintl.dll available...)!

    As I'm not at all (luckily) of the Windows world, I've never been interested by Perl tools on it. Could you tell me more about Strawberry Perl? Is it really easy to extract just the binaries, dlls and libs and copy them to another system without having it installed? Have you already done that?

    As I use VirtualBox, it's not a problem to check it all again (I'm just running out of disk space now, but that should be ok by tomorrow) but it's just soooooo time consuming (but I have a freshly installed Windows 10 virtual box ready to speed up the process).

    I just wonder if compiling the sources is not as easy finally : when I have compiled them, it's just a game to build up the extra modules via CPAN and package the whole thing... It _should_ be easy : I finally got the thing (5.28.3) compiled and installed in my Virtual box with MS-VC compiler (with just a few details about (only) 4 test failures I have to discuss further with P5P... and next step is to get Locale::gettext working on it and thats all).

    But I will try again Strawberry, sure, especially if they have Locale::gettext out of the box... I was just convinced that it was not a native build and that it would require cygwin libraries to run.

      The strawberry portable-zip is a self-contained entity that can be unzipped wherever you want it, with the binaries all precompiled (you can download either the 32bit or the 64bit); you can look at the release notes for a given release to find out which modules come pre-bundled (for example, 5.28.1 64bit). It even includes the gcc toolchain necessary for building XS-based modules, or modules that come bundled with c-type libraries. I personally grab the PDL versions of the portable zipfiles: I don't much use PDL, but I like that it comes with a bunch of mathy libraries in places where it can easily find them, like GSL.

      To have it run, you just need the PATH to either temporarily or permanently include a few main directories: either use portableshell.bat (as Lotus1 recommended), which sets up a few environment variables for you; or you can temporarily set the PATH to include the appropriate bin-directories (as seen in portableshell.bat); or if you're launching from another application, it could change the **env argument to add those variables; or if you want your machine to always use that version of perl, permanently set your PATH variable to include those directories.

        pryrt wrote:

        [...] or you can temporarily set the PATH to include the appropriate bin-directories (as seen in portableshell.bat); or if you're launching from another application, it could change the **env argument to add those variables;

        Hi pryrt, I wasn't sure if you realized it but portableshell.bat can be used to launch Perl scripts from other applications. You can call it in place of perl.exe to run your script without actually opening a shell. All of the command line parameters are passed through portableshell.bat to perl.exe. If you don't provide any parameters then it just opens the shell. I have used this frequently from the Windows Task Scheduler as well as from other programs where I need to launch Perl scripts.