PerlPowerTools
PerlPowerTools copied to clipboard
Suggestion : distribute PerlPowerTools as single file/exe
- Wouldn't a "new" file name make it possible to install and work without confusion relative to OS utils (so it could be in $PATH)? For example, if the script is called 'ppt' :
grep=> call OS grepppt grep=> call PPT grep
- I think a single .exe could find a public on Windows, as a lightweight and portable collection of Unix tools without dependencies. Only alternatives known to me :
- UnxUtils (old and unmaintained)
- BusyBox-w32
That's an interesting idea. I'm not against it, but I don't have time to do it myself. Would you like to work on that?
As for the first question, if you already have these utils, you probably aren't going to use Perl Power Tools. I'd also avoid ppt as a name since everyone will think that's PowerPoint. But, that could be something that we provide.
The idea's not really from me, but from ack (they provide such a file).
I'm interested (for other reasons), in experimenting with PAR::Packer "one day", so why not, it could be a training target. But as you've said, time is a limited resource...
Even before we get to the single file thing, everything would need to be converted to modulinos. That way, you could include all the modules in the packer (like ack does) without them stepping all over each other. That's a pretty big task in itself.
I had in mind a more naive solution, with an entry script to 'do' the tools, but maybe there are flaws in this approach? I've done some test with pp and it removes POD, so there would be an issue here also.
Hello,
you're right that modulinos are the right way to do it, but I've done a little proof of concept anyway (uploaded to my repo). The packer runs fine on mac/win. The tools can be called directly like cat (if packed script is renamed/linked) or like perlpowertools cat (result barely tested, but seems to work). Rest with ./perlpowertools -h.
Sounds good. Can you get a bunch a different people to play with it and see how it works out?
Oh, that's not possible I'm afraid...
On Tue, 8 Jun 2021 at 16:48, brian d foy @.***> wrote:
Sounds good. Can you get a bunch a different people to play with it and see how it works out?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/briandfoy/PerlPowerTools/issues/96#issuecomment-856834159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIXGCGNLRDC4DW7D7EDALLTRYUVPANCNFSM43LG2N2A .
Why is that not possible?
Updated my repo with new packer.pl (bugfixes, functional changes). Please see its header for more details. Took me a long time to figure out some things related to PAR.
Okay, I see this, but I'm a bit busy at the moment. I'll try to look at it soon.
I was able to play with this a bit and you work generally looks good. I have a new branch in this repo that you can use to make other improvements. My only hold up is time to play with this.
So initial thoughts:
- [] I played with it on Windows and it seems to work as intended. Nice work :)
- [] I want to check how cross platform this is. I see a perlpowertools.exe, and that's not going to work everywhere. Do we need a single-file app for every platform?
- [] I wonder how I'd distribute this? Include it in the distro? Packages on GitHub? Packages somewhere else? chocolatey?
- Thanks. Additional info about the Windows executable (that I should document before forgetting) :
- it still lacks POD from the tools (on-going slowly).
- you can rename it or use hard links to call individual tools directly, but not symbolic links (unlike Linux and macOS).
- exe produced by PAR::Packer are sometimes detected/deleted by antivirus.
- the full path of perl and parl.pl running 'pp' leaks into the exe.
- I wasn't able to build as 32-bits (for maximum portability).
-
It seems not possible to generate a pure (cross-platform) Perl script (with PAR::Packer), see https://metacpan.org/dist/PAR/view/lib/PAR/Tutorial.pod#Self-Bootstrapping-Tricks. Personally, I wouldn't distribute platform-specific binaries (Windows excepted). Another solution is needed (including POD).
-
A minimal zip (exe + readme) available as GitHub "releases" and at PerlPowerTools.com would be good. The helper script could be added to the standard distro (avoids namespace conflict).
Hello, I've tested again the build process and result packages (win + mac) : there are many small annoyances/glitches (not unfixable but time consuming, for unknown use cases). Therefore, to move forward, I'd like to make a pull request with :
- a packer script that builds only a windows executable, including perldoc.pod.
- a standalone helper script (not generated by packer), with dynamic tools list and version.
- massive simplification and cleanup.
What do you think?
PS : Sorry but I'll decline testing GitHub Actions (I already struggle enough with Git already).
- What are the small annoyances and glitches?
- What's the standalone helper script?
I have answered by email, what's your opinion? I'd like to close this topic in my mind, thanks.
I don't recall seeing any email. Can you send it again? But, the best place to record the conversation is in the issue thread.
I've sent it again, please let me know if you don't get it.
Updated my repository. If anybody reading this wants to contribute (or not), please do it. https://github.com/kal247/PerlPowerTools