Author Topic: How to create files for UNPACK/UNPACK2 in IBM-based installation packages?  (Read 6270 times)

Alfredo Fernández Díaz

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Hi everyone,

I have this old application that needs some files updated/replaced and a few more added after install. No biggie, except when you forget the fixes, and are reminded of them a few days later, the first time the program is started. So I thought, why not slipstream it?

You know, as in, unpack the installation media, replace / add files, repack it all, and have an installation that doesn't need upgrades and/or fixes afterwards.

This being directly based on IBM installers stuff, installation media was easy enough to unpack using, well, IBM's UNPACK or UNPACK2 (both work). However, I have no idea how to create compatible files that will be handled by the UNPACK routines later on. A quick search at Hobbes was not obviously helpful, so any ideas are welcome.

"PACK", anyone?

Thank you in advance,
AFD.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4977
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: How to create files for UNPACK/UNPACK2 in IBM-based installation packages?
« Reply #1 on: December 30, 2020, 02:50:32 pm »
Hi Alfredo.

As an alternative, I can help you create a WarpIn installer for that application, or at least we can try :)

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: How to create files for UNPACK/UNPACK2 in IBM-based installation packages?
« Reply #2 on: December 30, 2020, 03:43:47 pm »
Pack.Exe is a part of the OS/2 Toolkit. (So is Pack2.Exe, but I don't know if that is also needed.)

Code: [Select]
9-25-01  18:26          58,400    124  pack.exe
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: How to create files for UNPACK/UNPACK2 in IBM-based installation packages?
« Reply #3 on: December 30, 2020, 05:44:25 pm »
Pack.Exe is a part of the OS/2 Toolkit. (So is Pack2.Exe, but I don't know if that is also needed.)
Yes, PACK2/UNPACK2 gives better compression. IIRC, PACK2/UNPACK2 supports also the old pack method but read here:
Code: [Select]
start view toolsref pack
start view cmdref unpack
IIRC, the OS/2 installation files are packed with PACK2.

Alfredo Fernández Díaz

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: How to create files for UNPACK/UNPACK2 in IBM-based installation packages?
« Reply #4 on: December 30, 2020, 10:24:03 pm »
Hi guys,

As an alternative, I can help you create a WarpIn installer for that application, or at least we can try :)
You don't remember my old "WPI distro" project, do you? :)

Thank you, Martín, but there is a reason why I will not use WarpIN for this.

Neil, thank you, you were right! Turns out I have had not one, but two pack(2) EXEs lying around for the last twenty years or so! I seemed to recall these were part of the system (I was wrong, obviously), so they didn't fire when I typed 'pack' at a command prompt: I keep all development tools out of the path, etc. and I some 'setenv' scripts for this that I last modified in 2005 -- no wonder I forgot pack/pack2 were even there.

OK, so for anyone out there who may need this, or a possible future self of mine in a couple of years' time:

1. Unpack your archive file with the commands:
"Unpack oldapp.@ /SHOW > oldapp.txt" -- this will let you know the target paths for uncompressed files
"Unpack oldapp.@ ." will expand all files in the current dir (".")

2. Edit oldapp.txt. This might look like this

----8<--------8<--------8<--------8<--------8<--------8<--------8<----
oldapp.@
[...]
->\os2\dll\OldApp.dll
->\os2\help\OldApp.hlp
[...]
----8<--------8<--------8<--------8<--------8<--------8<--------8<----

and we need to transform that into something like this

----8<--------8<--------8<--------8<--------8<--------8<--------8<----
[...]
FixedApp.dll /H:\os2\dll\OldApp.dll
FixedApp.hlp /H:\os2\help\OldApp.hlp
[...]
----8<--------8<--------8<--------8<--------8<--------8<--------8<----

to rebuild the archive using the new files instead of the old ones, while keeping their target paths. Save the list as FixedApp.lst, and type:

"Pack FixedApp.lst OldApp.@ /L"

to pack everything back. You should be good to go. Pack2 shares the same syntax, apparently.

Thank you again,
AFD.