Open amlan-sw opened 1 year ago
Thanks for opening a separate issue.
To restate a comment from the original (purely to save later readers looking for it): If a module can be installed easily then we can look at it. If it is more involved then we are open to pull requests, so long as the maintenance burden is low. If a module is difficult to install then that is often best taken up with the maintainers of the module.
PAR::Packer falls into the first category so can be added. It would seem that Tcl falls into the last category, although I am open to being convinced it falls into the middle category.
I would also suggest you look at developing an alien module to wrap the download of Tcl and ImageMagick. That can also handle the addition of the relevant bin dirs to the path and the update of the config.sh
file. Alien::Build has very good documentation and has plugins that can download precompiled software rather than building from scratch.
Force installing modules should be a last resort, and tests should be skipped only when one is confident the module will work (e.g. it has already been shown to work on the same setup on another machine) or that functionality is not needed (and even then one should think twice). We do skip some tests for Strawberry perl but these are typically cases where the build env has false negatives (i.e. a test fails on the docker system but passes locally).
Also, if you only need ImageMagick to manipulate image files then have a look at Imager, specifically Imager::File::ICO. It is already part of Strawberry perl.
I would also suggest you look at developing an alien module to wrap the download of Tcl and ImageMagick. That can also handle the addition of the relevant bin dirs to the path and the update of the
config.sh
file. Alien::Build has very good documentation and has plugins that can download precompiled software rather than building from scratch.
too complicated to create or maintain such module, nowday people want something "just werk" , maybe we can just make something like strawberry-perl-5.32.1.1-64bit-PDL.zip but for GUI edition like strawberry-perl-5.32.1.1-64bit-GUI-1.0.zip , portable zip version with addition all GUI module available:
- Win32::GUI -> no dependecies needed
- Tcl Tk and Tkx -> TCL dependensies
- SDLx::GUI -> low level GUI API, hard to build, like PDL, need GPU related build
After 20 years, at last , I understand how to code GUI with perl using Tk and newer Tkx with help from ChatGPT.
And now we need something different to make everything "just werk", I thing some module that can parse JSON then create GUI. all above module still complicated too code (at least for nowday generation) and very little example and documentation about all module above, best is only Tkx in https://tkdocs.com/tutorial/
And more reason people nowday using Python in windows because its very easy to install Tkinter (Tkx in perl) to create GUI /Form application.
Also, if you only need ImageMagick to manipulate image files then have a look at Imager, specifically Imager::File::ICO. It is already part of Strawberry perl.
For Tkx icon, I only find easiest way and only work from .ico build with ImageMagick convert.exe (still dont know why)
I think this particular issue will have to be on hold while we work out getting a Strawberry release going. Looking into this for Windows seems to be a bit complex. A possible solution would be to build an install of TCL/TK with some useful modules after we get Strawberry released and create releases for those that would be Strawberry major-version-specific while we're on gcc/MinGW.
FWIW, a patched version of Tk is available at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/patched_cpan_modules/
It can be installed using your preferred cpan utility. e.g. for cpanm:
cpanm https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/patched_cpan_modules/Tk-804.036_001.tar.gz
@shawnlaffan
maybe next release need add default package from CPAN: Tcl Tk Tkx PAR::Packer as default cross platform GUI/Form programming for Perl, Its not easy to install on StrawberryPerl, which is in windows, and it must easy access for GUI programming and "compilation" to .exe.
I manage to install Tkx and PAR::Packer on your dev_20230316 (and current 5.32.1.1) , compile, and run this example below on windows 11 without c:/strawberry
the "not easy" part is not about compiling CPAN module, but how to add and set path for TCL (Step 2 below) and addition (Step 5) add convert.exe from ImageMagick so user can easyly create icon for Tk specs.
THE STEPS:
update portableshell.bat
install Tcl
https://github.com/teclab-at/tcltk/releases/download/version-8.6.12.7/tcltk86-8.6.12.7.tcl86.Win10.x86_64.zip
cpan install deps
to compile .pl to .exe (in future maybe part of something like: guimake.bat)
Addition Step: Install ImageMagick to change icon, myicon must only 32x32
https://imagemagick.org/archive/binaries/ImageMagick-7.1.0-62-portable-Q16-HDRI-x64.zip
the test if 1-4 step above success
tkx_gui_example.zip