OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: TNG999 on January 16, 2023, 11:03:07 pm

Title: Porting question
Post by: TNG999 on January 16, 2023, 11:03:07 pm
Hi all,

First of all, I am NOT a programmer...  I'm mainly a Microsoft-product administrator...  did OS/2 back in the hey-day and Novell.

As far as porting applications from Windows...  is it easier to port and maintain individual applications and needed libraries or would it be easier to port and maintain to ODIN?

Thanks for any info.....

-m
Title: Re: Porting question
Post by: Dave Yeo on January 16, 2023, 11:10:42 pm
Welcome TNG999,

Probably easier to port and maintain to Odin. Problem with Odin is not much has been done to it in quite a while. At one point it could run quite a few Win32 apps and things like Java and Adobe Acrobat were ported with it back in the day but MS has added lots of new API since.
Title: Re: Porting question
Post by: TNG999 on January 16, 2023, 11:37:30 pm
Ahh ok...  Yes, makes sense you'd have to keep up ODIN with new libraries. 

Wish I was a programmer so I could help with porting......    Anything a non-programmer can do to help?

Thanks!

-m
Title: Re: Porting question
Post by: Mentore on January 17, 2023, 07:53:57 am
Ahh ok...  Yes, makes sense you'd have to keep up ODIN with new libraries. 

Wish I was a programmer so I could help with porting......    Anything a non-programmer can do to help?

Thanks!

-m

Actually I think one of the biggest issues with Microsoft products is that most Windows programs are written in .NET.

.NET shares many similarities with the OS/2 SOM, from what I remember of the latter, but they have different dialects. What's worse is that .NET has become a full interface to the entire system, so porting an application would mean first of all porting all .NET to OS/2: and here comes the problem, since .NET is open source (and Linux has got it) but so big that we would require huge manpower to try and port it - then again, .NET is 64-bit aware, while OS/2 Kernel is not. This is just a quick handful of problems.

Mentore
Title: Re: Porting question
Post by: Martin Iturbide on January 17, 2023, 06:30:24 pm
Hi

Correct me if I'm wrong. Running an Win32 app on OS/2 with Odin, does not necesary means you are porting a Windows app to OS/2. For me it means you are running a Win32 binary that is being intepreted over OS/2 to run.

If a it is neded Windows application made in .Net to be ported to OS/2, it may be hard, the only way I know would be to porting first the Mono project, and later compiling the .Net application on OS/2. Currently we don't have Mono ported to OS/2.

If you want to port a different Windows application, that is not created in .Net, you should check the language and libraries that it uses. For example if it uses C and Qt5 and other libraries that we have ported to OS/2, that may be a good candidate to be ported.

But if you want to compile some little thing with OS/2, you may want to read this little article I wrote. "Compiling "OS/2 Presentation Manager Programming" Samples on 2016 (http://www.edm2.com/index.php/Compiling_%22OS/2_Presentation_Manager_Programming%22_Samples_on_2016)". You can compile a little test and then keep growing your knowledge from there.

Regards
Title: Re: Porting question
Post by: Dave Yeo on January 17, 2023, 07:30:03 pm
Hi

Correct me if I'm wrong. Running an Win32 app on OS/2 with Odin, does not necesary means you are porting a Windows app to OS/2. For me it means you are running a Win32 binary that is being intepreted over OS/2 to run.

Hi Martin, a Win32 program can be recompiled and linked against Odin giving a native program. Bitwise and before that, Innotek, took that route for some versions of Acrobat, latest Java and Flash and likely others. I've never done it.

As for programs compiled with .NET, guess they'll be a deal breaker.
Title: Re: Porting question
Post by: TNG999 on January 17, 2023, 08:30:43 pm
Ahh yes Mono...

Is there a chromium browser port in progress somewhere still?  I thought I read about it but haven't found a release for it.

I think that's what I need the most to make OS/2 an almost daily-driver.

Thanks...

-m
Title: Re: Porting question
Post by: Martin Iturbide on January 17, 2023, 09:03:16 pm
...a Win32 program can be recompiled and linked against Odin giving a native program. Bitwise and before that, Innotek, took that route for some versions of Acrobat, latest Java and Flash and likely others. I've never done it.

Thanks for the correction Dave. I forgot about that.
Title: Re: Porting question
Post by: Rich Walsh on January 17, 2023, 09:06:39 pm
Is there a chromium browser port in progress somewhere still?

That's whal the QT5, QT6, and Dooble threads are all about. Use AN Package Manager (ANPM) to install the official (and pretty usable) versions of QT5 and Dooble. The QT6 port is coming along but definitely still of alpha-quality/stability.
Title: Re: Porting question
Post by: Martin Iturbide on January 17, 2023, 09:15:13 pm
Hi TNG999

Is there a chromium browser port in progress somewhere still?  I thought I read about it but haven't found a release for it.

We have the preview release of "dooble (https://www.os2world.com/cms/index.php/past-news/80-news/software/23292-dooble-browser-preview-version-rpm)" running on Qt5 on the RPM Repository. You can install it with ANPM or by running "yum install dooble". If you don't see it, you may need to change your platform to "pentium 4" on ANPM.  Give it a try.


Regards
Title: Re: Porting question
Post by: TNG999 on January 17, 2023, 09:23:17 pm
Ok got it.  QT WebEngine is based on Chromium.

I'll try out Dooble. Thanks.

-m
Title: Re: Porting question
Post by: TNG999 on January 26, 2023, 08:58:22 pm
If there is an application out there that is available on windows, Linux and macosx, can they recompile for os/2 or is it a complicated thing?
Title: Re: Porting question
Post by: Dave Yeo on January 26, 2023, 10:04:45 pm
If there is an application out there that is available on windows, Linux and macosx, can they recompile for os/2 or is it a complicated thing?

Probably the simplest are QT based apps, either Qt4 or Qt5. Qt6 isn't quite ready. There's a list of ported apps here, http://trac.netlabs.org/qtapps (http://trac.netlabs.org/qtapps) along with needed diffs by the looks of it.
Note that there doesn't seem to be a porting Qt apps guide for OS/2, the bit on the above page is out of date but generally they build the same on all systems besides where and how the libraries are installed. I was going to link to https://www.qt-apps.org/ (https://www.qt-apps.org/) but it currently giving a 509 (bandwidth exceeded) error.
You were wondering how else to help. Being new to this would be a good time to write up a porting Qt apps guide, what needs installed, how to apply a diif and eventually produce one and how to build, which is the simple part once you have all the prerequisites. Luckily YUM/RPM has made installing prerequisites simple.
You could start a new thread, something like porting my first Qt app.
Title: Re: Porting question
Post by: TNG999 on January 26, 2023, 11:23:55 pm
Hi I'd love to... Is this something a non programmer can do?  I'm more of a administrator then a programmer.
Title: Re: Porting question
Post by: Dave Yeo on January 27, 2023, 12:17:54 am
Hi I'd love to... Is this something a non programmer can do?  I'm more of a administrator then a programmer.

Simple programs will just build and work (might need installing). There's learning involved but it is a simple way to start and learn about build systems and eventually simple fixes.
Title: Re: Porting question
Post by: TNG999 on January 27, 2023, 12:42:53 am
Ok cool, I can mess around with that kind of thing.

Ok please don't be upset with me...  I've never compiled anything in my life.    What do I need?  What type of existing programs should I be looking for? (Like stuff written in C or ...?) 

I have an ArcaOS 5 system here that I can do whatever I need to with.  I also have Windows 10/11 and Ubuntu systems.

Any suggested reading as well?

Thanks again.

-m
Title: Re: Porting question
Post by: Dave Yeo on January 27, 2023, 04:04:30 am
Not knowing anything about programming/compiling makes it hard to say where to begin.
As you asked for stuff that compiles on all major platforms, I figured Qt would be a good start.
We do have an old Qtcreator, for Qt4. You could install that along with all the Qt4 stuff that ANPM shows, basically qt4-* and look at its tutorial.
There's pages like https://wiki.qt.io/Qt_for_Beginners (https://wiki.qt.io/Qt_for_Beginners) but even they're aimed at someone with some programming knowledge. Still it is a start for you and the knowledge pretty well works for all platforms. A lot of the time we have to follow the Linux advice, things like using the package manager (ANPM for us) to install stuff, sometimes the Windows stuff applies more, we use DLL's and drive letters.
Anyways try installing qtcreator along with the Qt4 stuff and play with it. It seems to want to use the examples for testing. I haven't used it myself.
 For some reason it is installed into @unixroot\usr\lib\qtcreator \bin so not on the PATH. Probably best to create a program object for it.
Title: Re: Porting question
Post by: Martin Iturbide on January 27, 2023, 01:23:32 pm
Hi TNG999

I do not do software programming, but I tested the compiling procedure and wrote this little article to compile some little PM samples with GCC.
"Compiling "OS/2 Presentation Manager Programming" Samples on 2016 (http://www.edm2.com/index.php/Compiling_%22OS/2_Presentation_Manager_Programming%22_Samples_on_2016)

From that I tried to compile some other things, with more elaborated "make files", which are text files to script the procedure to compile more complex things (with linked libraries and DLLs).
I went over it on this forum thread (https://www.os2world.com/forum/index.php/topic,3033.0.html).

What is next on my personal "programming wishlist" is to make some time to compile a simple Qt game like Hexalate.

Regards
Title: Re: Porting question
Post by: TNG999 on January 27, 2023, 03:46:44 pm
Thanks, I"lll look at those as well
Title: Re: Porting question
Post by: TNG999 on January 31, 2023, 09:52:11 pm
Ugh...  I remember again why I'm not a programmer.....   >:(

Title: Re: Porting question
Post by: Neil Waldhauer on January 31, 2023, 10:54:05 pm
Ugh...  I remember again why I'm not a programmer.....   >:(

It isn't for everyone. You might be able to document how to use an OS/2 program. The skills needed to make a program are different from the skills needed to describe how to use a program.

Long ago I was with a bunch of hard core Unix programmers, and one of them had to use Windows NT. So I looked over at his screen, and it had a full screen command prompt (running vi) and the registry editor open. He had figured out how to kill explore (which normal people would have called the Windows desktop), which was of no use to him.
Title: Re: Porting question
Post by: Dariusz Piatkowski on February 01, 2023, 04:09:53 am
Ugh...  I remember again why I'm not a programmer.....   >:(

Well, let's not get discouraged far too easily and/or quickly...there are resources out there.

Take a look at https://archive.org/search?query=os2 (https://archive.org/search?query=os2), pick a book that will ease you into the OS/2 DEV game...say something like:

1) "OS/2 Warp Programming For Dummies"
- don't let the title turn you off either, we all start somewhere

2) "OS/2 Presentation Manager Programming" by Charls Petzold
- this will really do a nice job of walking you through every piece of PM API: building controls, windows, putting content into the window, manipulating it, etc.

3) "OS/2 Warp Presentation Manager for Power Programmers"
- in the meantime this little gem will step into the more advanced features, stuff you might not readily touch each and every time, it spends a good amount of time on each of the building blocks of PM programming: menus, notebooks, even stuff like inter-process communciations, etc.

4) "The Art of OS/2 Warp Programming"
- this is the most up-to-date book AFAIK, the original release covered OS/2 2.1, this one is updated to cover V4 and does a very good job of reviewing everything

Once you understand the OS/2 framework itself you are going to be in a much better position attempting to do some porting, where inherently you'll need to be able to map that "other" framework to our OS/2 model.

Hopefully, if you are lucky, your starting point in the porting effort may be pretty close, and therefore require very little "elbow grease".