-
Notifications
You must be signed in to change notification settings - Fork 55
Description
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
set SP=%~dp0 set PATH=%SP%\site\bin;%SP%\perl\bin;%SP%\c\bin;%SP%\Tcl\bin;%SP%\ImageMagick;%SP%\bin;%PATH% -
install Tcl
- download:- extract to c:\strawberry\Tcl - update Tcl\lib\tclConfig.sh replace: /d/CM/product-tcltk86/release to: c:/strawberry/tcl -
cpan install deps
notest force install Tcl Tk Tkx PAR::Packer App::PP::Autolink -
to compile .pl to .exe (in future maybe part of something like: guimake.bat)
pp -o tkx_gui_example.exe -a Tcl/bin/tcl86.dll;Tcl/bin/tcl86.dll -a Tcl/bin/tk86.dll;Tcl/bin/tk86.dll -a Tcl/bin/zlib1.dll;Tcl/bin/zlib1.dll -a Tcl/lib/tcl8.6;Tcl/lib/tcl8.6 -a Tcl/lib/tk8.6;Tcl/lib/tk8.6 tkx_gui_example.pl - use: pp -gui ... -> for production and hide console - add: -a myicon.ico -> if you have 32x32 .ico file as window icon - for test: without c:/strawberry is needed for distribution .exe file - for test: remove cache par-* in %TEMP% before run .exe -
Addition Step: Install ImageMagick to change icon, myicon must only 32x32
- download:https://imagemagick.org/archive/binaries/ImageMagick-7.1.0-62-portable-Q16-HDRI-x64.zip
- extract to c:\strawberry\ImageMagick - example convert .png to .ico run: convert.exe myicon.png -resize 32x32 -gravity center -background transparent -extent 32x32 myicon.ico - set .exe icon: exe_update --icon myicon.ico tkx_gui_example.exe -
the test if 1-4 step above success
- test file:put to c:\strawberry\tkx_gui_example.pl - the goal- run app with console: perl tkx_gui_example.pl - run app WITHOUT console: wperl tkx_gui_example.pl - run .exe tkx_gui_example.exe - run .exe for distribution rename or remove c:/strawberry, delete %TEMP%/pp-*, then run .exe again
