OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Martin Iturbide on October 23, 2024, 07:24:06 pm

Title: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 23, 2024, 07:24:06 pm
Hello

I want to have an easy way to install VisualAge C++ on ArcaOS and I found it annoying to install with with Netscape and Feature Installer.

I'm being tempted to create my own IBM C/C++ Compiler 3.6.5 (+ Fix2) installer. But I don't know if I should do it on WarpIn or on RPM.

Will it be too crazy to create an RPM package for the "C/C++ Compiler 3.6.5 (+ Fix2)" ? can the compiler work on the /usr/bin and all that crazy FHS paths (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)?

Or I should stick to WarpIn and create a directory for "C:\PROGRAMS\IBMCXXO" ?

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: ivan on October 23, 2024, 11:52:54 pm
I would vote for WARPIN which is the OS/2 way rather than RPM which is trying to turn OS/2 into a sort of clone of Linux which it is NOT, also Warpin allows one to select an OS/2 directory structure.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Dave Yeo on October 24, 2024, 01:29:48 am
I think Warpin would be better, it is designed to install in its own directory. Also there would be conflicts with the toolkit components installed by RPM. Even with OS2TK45, Bitwise decided not to install all of it as an RPM, namely the SOM stuff at least, likely as it would not be a good fit with UNIXROOT.
Also if making an installer, you should do some things a bit different, like installing stuff at the end of LIBPATH instead of the beginning or give a choice of installing a setenv.cmd instead of messing with config.sys
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 24, 2024, 02:35:59 am
Hello

1) About the OS2TK45, I was thinking on not to include it at all, and just use the one from the RPM or the one provided by David Azarewicz (Os2Tk45-20240311.zip (https://88watts.net/download/Os2Tk45-20240311.zip)).

2) I will first check what changes on the config.sys with the regular installer.  And later see how to put the option of a "setenv.cmd"

3) I also noticed that VAC includes a different SOM.DLL of the one included in ArcaOS.
Quote
Directory of C:\OS2\DLL
 6-30-99  4:33p        92,009      0 a---  SOM.DLL

Directory of E:\WarpIn\IBM C C++ 3.6.5\ibmcxxo\dll
 10-08-97  1:55p       127,838    248 a---  SOM.DLL

I guess I can ignore it , and use the one in ArcaOS, right?

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Neil Waldhauer on October 24, 2024, 03:28:34 am
While I don't know about VAC 3.6, I know you should use the one from OS/2 for VAC 3.08.

By the way, what is the legal status of Visual Age C++?
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 24, 2024, 04:39:41 am
Hi Neil

By the way, what is the legal status of Visual Age C++?
It is "Abandonware" but I don't plan to make it public if I succeed, only the .WIS file and file structure for people to create their own.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 24, 2024, 05:24:34 am
Hello

2) I will first check what changes on the config.sys with the regular installer.  And later see how to put the option of a "setenv.cmd"

Is there any good .wis sample around when I can see how to change a text file?
I want to be able to change "SET CXXMAIN=C:\programs\Ibmcxxo" from SETENV.CMD.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Dave Yeo on October 24, 2024, 06:31:21 am
Can you run sed from the WIS?
To change all occurrences of C: to %ROOT%
Code: [Select]
sed -i 's/C:/%ROOT%/g'  setenv.cmd
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Lars on October 24, 2024, 07:13:27 am
I have created a CD-ROM that contains a few Rexx scripts that build upon the Feature Installer. No need for Netscape. I can bundle the changes in a ZIP and then you need to do this:
1) copy your cd-rom to a tmp dir
2) drop the zip content on top of that. Due to licensing issues, you will also need to get the fixpak and put it in a subdir
3) burn a new cd-rom from that

You can then just invoke the rexxscript that allows you to select a target location. The rexx script for the fixpak needs no additional info as it can locate the install location via feature install.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 24, 2024, 05:37:43 pm
Hello.

Lars, I have interest to see your scripts and check them out.

Dave, I haven't created a WarpIn installer that uses a REXX script. (and I had not done any serious REXX). What I need is something that grabs in WarpIn the install path that user putted there, and send it to rexx to change the "setenv.cmd" with that path.

For the moment I have a very simple WIS file.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: aziz on October 24, 2024, 05:58:26 pm
There is no reason to package this as a rpm:
- it does not have any dependencies on other rpm packages;
- there will be no further versions, so there is no need for an automatically update mechanism (Furthermore you do not plan to redistribute the "abandon-ware" files, so there would not be a repository anybody could update from).
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Rich Walsh on October 24, 2024, 08:42:20 pm
While I don't know about VAC 3.6, I know you should use the one from OS/2 for VAC 3.08.

This is almost certainly incorrect. Over the years I've seen numerous warning that installing VACPP would backlevel SOM unless you took steps to prevent it. In any case, v3.65 (which doesn't include an IDE) makes no use of SOM, so it isn't even needed for this package.

The only "valid" version of SOM.DLL is the one in CP2/AOS5.x:  size= 92,009  timestamp= 99/06/30 16:33:04
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Steven Levine on October 24, 2024, 09:11:35 pm
Hi Martin,

If you are looking for a .wis example that modifies installed files, extract vboxadd.wis from the VirtualBox Additions wpi on your ArcaOS install media.

This .wis uses cube to do the file edits because cube is always installed by ArcaOS.  However, you can always write your own REXX script to do the edits.

Since you are newish to REXX, I recommend learning to use the TRACE statement and the RXD utility.  They will make debugging your script go faster.

Regarding the SOM DLLs, do not put the 3.65 SOM DLLs that backlevel the versions shipped by ArcaOS into the .wpi or you will be unhappy with the results.

Since you are supplying a toolkit for building the distro, rather than a distro. I would recommend using WarpIN, rather than rpm, only because more users may be able to use the toolkit.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Neil Waldhauer on October 24, 2024, 10:46:05 pm
While I don't know about VAC 3.6, I know you should use the one from OS/2 for VAC 3.08.

This is almost certainly incorrect. Over the years I've seen numerous warning that installing VACPP would backlevel SOM unless you took steps to prevent it. In any case, v3.65 (which doesn't include an IDE) makes no use of SOM, so it isn't even needed for this package.

The only "valid" version of SOM.DLL is the one in CP2/AOS5.x:  size= 92,009  timestamp= 99/06/30 16:33:04

That is why I recommend the one from OS/2 rather than the one from VAC.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Doug Clark on October 25, 2024, 12:17:16 am
Martin - Netscape and Feature install isn't THAT bad.  The only gotcha is you need to size the netscape window large enough to accommodate the install screen without resizing.  Size the netscape window to the size you need  - shut down netscape, then do the feature install stuff.  Otherwise the little icon at the bottom of the netscape screen that you click on to start the install can't be reached because there are not scroll bars.  If you can't see that icon/graphic at the bottom of the last screen - you haven't sized the window large enough.

And you probably want netscape anyway for the help system.  I know the help system runs with mozilla on Windows, but (according to my faulty memory) I don't think the help system runs with any later browsers on OS/2, so you need the legacy netscape anyway.  If anyone has gotten the help system to run with mozilla please correct me here.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Rich Walsh on October 25, 2024, 07:15:13 am
Attached is a forwarder that eliminates the need for the real 'netscape.exe'.

Unzip, then place the dummy 'netscape.exe' into either your Firefox or Seamonkey directory. You can invoke it from any directory using a f/q pathname (or you can add your FF/SM directory to the PATH).

When it starts, it will change to whatever directory it's in, then see if FF or SM is present. If so, the browser will be started; if not, it will terminate.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Lars on October 25, 2024, 02:07:51 pm
The FI browser plugin largely cripples the capabilities of Feature Install.
For example, you are very limited in selecting/deselecting packages (for VAC 3.6.5 the only thing you can do is to install or not install the toolkit). Plus it is more of a hassle rather than help.

As Alex Taylor has presented, using FI via the command line (clifi.exe) is not too difficult and my REXX scripts make use of that. They even avoid the need for any manual interaction (apart from selecting/deselection of packages which I think is a fair enough reason for manual interaction).
The fixes also install via REXX scripts and FI is smart enough to find out what to update and where the original install is located.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Alex Taylor on October 25, 2024, 02:09:36 pm
There is zero need for Netscape when installing Feature Install based products. See my tutorials on the subject:

Part 1 describes using the WPS Install Objects. It actually uses VAC 3.65 as an example, so you can just install it using the example CXXVARS.RSP I listed. 

Part 2 describes how to use FI in CID or 'backend' mode so you don't need to mess with the Install Objects at all.

IMO Feature Install is actually quite a neat install backend once you take Netscape out of the picture, although there is a certain amount of caution involved when using any program that runs in the WPS process (as FI does).  I wrote a couple of replacement GUIs (generally in VX-REXX) for the FI backend to install specific products.  My HPFS386 installer is one such example: https://hobbesarchive.com/?detail=/pub/os2/util/system/HPFS386Installer_2009-04-04.zip (https://hobbesarchive.com/?detail=/pub/os2/util/system/HPFS386Installer_2009-04-04.zip)

(FWIW I much prefer this approach over rewriting the whole install in something like WarpIN.)
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 25, 2024, 09:58:14 pm
Thanks for the feedback

Hi Martin,

If you are looking for a .wis example that modifies installed files, extract vboxadd.wis from the VirtualBox Additions wpi on your ArcaOS install media.

This .wis uses cube to do the file edits because cube is always installed by ArcaOS.  However, you can always write your own REXX script to do the edits.

Thanks Steven, I got the vboxadd.wis and just found out that I don't know a thing about cube. I guess I will like to look at  REXX sample.

I think I need something that does:
1) Opens the $(1)\bin\SETENV.CMD file
2) Find the "SET CXXMAIN=C:\programs\Ibmcxxo"
3) Replace the path for $(1)

(Where $(1) is the path that the user selected in the WarpIn installer GUI)

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 25, 2024, 10:41:44 pm
Hello  Neil
While I don't know about VAC 3.6, I know you should use the one from OS/2 for VAC 3.08.

I just noticed that the thread title is misleading.  Should be "IBM C and C++ Compiler". I'm more focused to have an icc compiler installer instead of the VisualAge IDE.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Steven Levine on October 28, 2024, 08:28:03 am
Martin,

Cube is a REXX script.  However, if you really want to invent your own, a typical file read loop looks like:

/*=== DoReadFile(fileName) Read file and process code snippet ===*/

DoReadFile:
  parse arg fileName
  say 'Reading' fileName
  call stream fileName, 'C', 'OPEN READ'
  do while lines(fileName)

    line = linein(fileName)
    say line

  end /* while lines */

  call stream fileName, 'C', 'CLOSE'

  return

/* end DoReadFile */

You will need to add logic to find the drive letter in the set statement, replace the drive letter and rewrite the statement in the file.  Seems like a lot of work to me compared to reading the cube docs and figuring out how to change the vboxadd.wis line

         EXECUTE="CONFIGSYS|cube { CL #DEVICE=?:\OS2\BOOT\MOUSE.SYS# WITH #rem# (ALL } ?:\CONFIG.SYS (DLM #"

to do what you need.  The above changeline command changes the device statement to a rem.  You can modify this to find the set statement in setenv.cmd.  The result will be something like:

  EXECUTE="cube { CL #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)# } $(1):\bin\setenv.cmd (DLM #"

The above is untested, but should be close to what you need.



Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 28, 2024, 01:19:20 pm
Thanks Steven.

You showed me that CUBE is very efficient to modify the config.sys. I will try to sample and read more about it to include it on the installer.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 28, 2024, 11:26:56 pm
Hello

  EXECUTE="cube { CL #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)# } $(1):\bin\setenv.cmd (DLM #"

Thanks for the help. I'm trying to understand CUBE.

I run it on the command line, since WarpIn didn't showed me any log (or don't know where to see it).

Quote
[C:\IBMCXXO\BIN]cube { CL #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(
1)# } setenv.cmd (DLM #"
CUBE 3.0 applying  CL #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)#
 to setenv.cmd on 28 Oct 2024 14:32:54

>>>  CL #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)#
Changed line 2
  old: "SET CXXMAIN=C:\programs\Ibmcxxo"
  new: "SET CXXMAIN=$(1) SET CXXMAIN=C:\programs\Ibmcxxo"
OS/2 COMMAND CUBE ended. 1 changes applied

It seems it didn't replace "SET CXXMAIN=C:\programs\Ibmcxxo", it added all the line ""SET CXXMAIN=$(1) SET CXXMAIN=C:\programs\Ibmcxxo"

But this one worked for me (from the command line to test):
Quote
EXECUTE="cube { RS #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)# } setenv.cmd (DLM #"

But it works from the command line, not from the WarpIn installer. I need to check what else I'm missing.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: davidrg on October 28, 2024, 11:50:30 pm
Hi Neil

By the way, what is the legal status of Visual Age C++?
It is "Abandonware" but I don't plan to make it public if I succeed, only the .WIS file and file structure for people to create their own.

Regards

Its a shame Arca Noae never negotiated anything about this with IBM. I'd gladly buy a copy if they could sell it to me - it would have made getting Kermit 95 for OS/2 going again so much easier if I could have used the original compiler Columbia used rather than having to switch to Open Watcom
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Dave Yeo on October 29, 2024, 12:45:24 am
Hi Neil

By the way, what is the legal status of Visual Age C++?
It is "Abandonware" but I don't plan to make it public if I succeed, only the .WIS file and file structure for people to create their own.

Regards

Its a shame Arca Noae never negotiated anything about this with IBM. I'd gladly buy a copy if they could sell it to me - it would have made getting Kermit 95 for OS/2 going again so much easier if I could have used the original compiler Columbia used rather than having to switch to Open Watcom

There are copies floating around the internet that you could download or you could ask here for a donation of the package.
IBM doesn't seem to care about this old software.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 29, 2024, 02:44:43 am
Hello

Here it is the updated .wis file, but it is like cube is not executing, or not working when I run the install procedure.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Steven Levine on October 29, 2024, 06:52:07 pm
Sorry, my bad.  I remembered CL as ChangeLine, which it is not.  CL is an alias for CommentLine, which changes the matched line to a comment line.  Your REPSTRING should work.  Another option would be REPLINE.

Your REPSTRING looks correct to me.  What does the WarpIN log report it did?

Note that vboxadd.wis expects to run cube.exe, which is cube.cmd converted to an executable.  If you happen to have a copy of cube.cmd in the PATH, it may cause problems.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on October 30, 2024, 03:58:28 am
Hello

I checked the log:

Code: [Select]
20:42:29.82 Created WPS object "Read Me", class "WPProgram", location "<WP_IBMC>", setup "EXENAME=e.exe;PARAMETERS=C:\ibmcxxo\readme.txt;OBJECTID=<IBMCReadme>;"
20:42:29.82 HOBJECT is 0x241BF
20:42:29.89 Executed "CMD.EXE /c cube { RS #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=C:\ibmcxxo# } C:\ibmcxxo:\bin\setenv.cmd (DLM #"

Install log closed.

It seems the issue was here "C:\ibmcxxo:\bin\setenv.cmd" with the extra colon. I removed it and seems to work as a I want.

Now it looks like:
Quote
EXECUTE="cube { RS #SET CXXMAIN=C:\programs\ibmcxxo# WITH #SET CXXMAIN=$(1)# } $(1)\bin\setenv.cmd (DLM #"

I will keep working the rest of the installer. Thanks Steven.

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Lars on October 31, 2024, 01:04:59 am
See here:

http://www.hobbesarchive.com/Home/Download?path=/Hobbes/pub/incoming/VAC_3-6-5_InstallFix_2024-10-31.zip

Once you copied the CD-ROM to a temp dir and dropped the ZIP over it, you just need to get the two Fixpak 2 files and drop them into the FIXPAK2 folder.
The main folder contains the main install REXX script, the FIXPAK2 folder contains the two REXX install scripts to install the 2 fixpak files.
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: SoundChaser on November 05, 2024, 09:44:49 pm
In the spirit of welcoming back hobbyist developers who've been away for so long, wouldn't be worth it to summarize the necessary steps and perhaps have a decision tree of which toolset to use, which packages to download in a concise procedures?

a) porting from Linux/Unix? Use bww kLIBC + gcc
b) porting from DOS/Win16?
      MSC/MASM? Stick with it or migrate to Watcom (with link to the "right" one)
      Watcom? Stick to Watcom
      Borland? Migrate to Watcom if feasible
c) porting from Win32? Odin?! Which compiler?
d) Writing drivers? Watcom?
e) OS2 app using VACPP? use VAC 3.6.5fp2?

I think many developers may be put down by the friction of the toolset setup? I understand it can be part of the fun, but sometimes it's really in the way for getting things done. Hobbyist means time available to tinker is limited...
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on November 05, 2024, 11:01:34 pm
Hello SoundChaser

I think you are in the right track.

Arca Noae published this page and I think it will be good to read it first and find anything that may be missing to complement it.
- https://www.arcanoae.com/wiki/information-for-developers/

Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Martin Iturbide on November 06, 2024, 12:30:45 am
Hello

Returning to the subject of a "VisualAge C++ 3.6.5 (+ Fix2)  WarpIn Installer". I think I have it in someway working, sadly I'm not a developer to completely test it out.  I preferred a Dave Yeo suggestion of having a WarpIn installer that does not modify the config.sys and only give you the "Command line" icon (REXX script) with the icc working.

Now I have a little thing here with the icons. I use "Dynamic Icons" so, the .ICO files I'm assigning are not showing. Is there any way to also assign a PNG icon with the WarpIn Installer script?
I refer to this:
Quote
CREATEOBJECT="REPLACE WPProgram|Message Queue Analysis Tool|<WP_IBMC>|EXENAME=cmd.exe;ICONFILE=$(1)\bin\MQWA.ICO;PARAMETERS=/k $(1)\bin\setenv.cmd MQWA.EXE;STARTUPDIR=$(1)\WORKING;OBJECTID=<IBMCMessage>;""
;ICONFILE=$ only assigns the .ICO file, is there a way to asing the PNG file?


Regards
Title: Re: VisualAge C++ 3.6.5 (+ Fix2) - WarpIn or RPM?
Post by: Alfredo Fernández Díaz on February 27, 2025, 10:13:06 pm
is there a way to assign the PNG file?

According to Dynamic Icons help, the only direct method is interactive (good ol' drag'n'drop, with the Icon type radio button set to "PNG"), not programmatic (e.g. via setup strings). Time for an RFE? ; )

Indirectly, you need to add your icon file to %BIGICONSPATH%, find "bigicons.txt" there and add a line like
"<MyObectID>"  "MyBigIcon.png" to it under the [OBJECTID] section.