Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making files more portable
#4
Thanks for the tip @SMcNeill!  I had considered $Console:Only, but not for file size reasons.

@Dav
Aha, I remember seeing that tutorial or one like it, but I could not remember who, where, or which.  Your pointy-clicky WinRar method would be more suitable for most folks' needs than the 7Zip method.


A few details for the 7Zip curious:
The required 7Zip installer is in "lzma????.7z from the 7Zip website, where "????" is the version number, currently 2408.  7zr.exe in that arcchive can do the archive creation work, while the "7z*.sfx" stubs handle the extraction & execution.

Any version of 7Zip can be used for simply launching a program, but for command-line use with compilers, 7Zip version 9.20 is needed.  That version has a bug which allows a batch file to access the folder which contains the self-extracting archive.  (I initially got my compiler archive process working using v9.20, then banged my head against the wall for a couple of days wondering why it wouldn't work on an up-to-date version of 7Zip.  Turned out I was making use of an "undocumented feature.")

Some config file editing is needed for the .SFX stubs, and the documentation is a bit sparse.  Hint: a small configuration text file must be embedded into the finished executable between the .SFX extractor and the .7z archive.  Not all of the available .SFX extractors will recognize that config file.

(((Notes if you experiment with 7z v9.20: the 7Zip files you need are in 7z920_extra.7z from SourceForge.  The v9.20 .SFX stubs get confused and run the wrong program if they see more than one executable or batch file, so ONLY one executable should be visible to them.  Hide everything else in subdirecctories.)))


I've never before mentioned this process online because it involves a fair amount of experimentation & configuration which is not for command-line virgins.  I was afraid that people might need a book's worth of explanation and a lot of hand-holding.

If the centerpiece of my SFX archive requires pre-run setup, or dynamic command-line parameters like input files, etc, then I configure the archive to run a batch file which does what's needed.
Reply


Messages In This Thread
Making files more portable - by JRace - 10-21-2024, 12:40 AM
RE: Making files more portable - by SMcNeill - 10-21-2024, 11:22 AM
RE: Making files more portable - by Dav - 10-21-2024, 01:14 PM
RE: Making files more portable - by JRace - 10-21-2024, 04:46 PM
RE: Making files more portable - by SMcNeill - 10-21-2024, 05:14 PM
RE: Making files more portable - by JRace - 10-21-2024, 05:29 PM
RE: Making files more portable - by grymmjack - 10-24-2024, 07:32 AM
RE: Making files more portable - by bplus - 10-24-2024, 02:07 PM
RE: Making files more portable - by euklides - 10-25-2024, 01:37 PM
RE: Making files more portable - by JRace - 10-26-2024, 02:16 PM



Users browsing this thread: 3 Guest(s)