discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep vs. The Cocotron for Mac to Windows porting


From: Dr. Rolf Jansen
Subject: Re: GNUstep vs. The Cocotron for Mac to Windows porting
Date: Sun, 13 Dec 2015 21:34:42 -0200

Hello Ricardo!

Am 13.12.2015 um 17:26 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:

Hi Rolf,

Dr. Rolf Jansen wrote:
I am a Mac developer and in the past I successfully used The Cocotron to port, build and distribute one of my bigger GUI application projects for Windows. This one is feature complete now, and I am now looking forward to port one of my next big projects to Windows. I am considering to use GNUstep for this, however, I got some questions:

I do maintain and use a couple of applications under Windows, but only with GNUstep, so I don't know how things compare with Cocotron.

1. Look & Feel

I want my applications look & feel native on Windows, and I am demanding on that. I read, that the WinUXTheme is still under development, and my question is now what exactly does this mean. Do most of the GUI elements work and look nice? Or, perhaps, do only the buttons look nice and the other stuff looks and feels somehow? What is missing? Does it crash any now and then? For my other application, I submitted some contributions to The Cocotron in order to letting it behave and look good on Windows.

Most elements display well and directly with WinUX, meaning that they theme and blend in WinXP, Win7, Win8 and even Win10. Tested and proven with all of them. Buttons scrollbar and native file dialogs do work (with limitations). There is extra-code that needs soem setup for which I have not released a guide yet, but I will do soon.

OK, I will keep this in mind in case I run into issues with file dialogs. I use only the plain dialogs without any customizations, so perhaps I won't experience much problems.

Caveats? yes, there are.
Popupbuttons do not work well for me they have a coupe of issues, the most annoying is that in certain conditions (that is, certain Popupbuttons) do not update in display (but do work) in the first usage. Other, within the same app, do work.

On Cocotron, I recently fixed the behaviour of Combo Buttons, PopUp Buttons worked and work fine though.

There are issues with multi-monitor setup where monitors have different sizes too.

This is a known issue for pure Mac applications as well. Users expect window positions with respect to the top, while Cocoa usually measures everything in cartesian coordinates (origin at the bottom), so if the screen height changes, then windows seem to be displaced with respect to users expectations, although, the positions are correct with respect to cartesian coordinates. Note, I am a scientist, and as such, I am a big fan of cartesian coordinates, i.e. I happily live with it and I do not fight against it. My applications come with small code snippets that do the correct coordinate conversions on opening/closing windows. I wouldn't touch the frameworks for handling this, because from their point of view, the measurements are correct.

You will have issues with document based applications if you don't have empty docs, this is not a problem of the theme itself.

I know, Windows will close applications without windows, because it does not know where to place the menu bar ;-)

I am not aware of other things, but it depends on what your application uses.

Look here:

http://multixden.blogspot.it/2014/09/improvements-in-gnusteps-native-window.html

Sounds promising to me.

3. Shared Code Base

My other GUI application got apprx. 25000 lines of custom Objective-C and C code, and it is a shared code base for both platforms Mac OS X and Windows. With a little bit of coding discipline, I was able to keep the number of platform specific #ifdef segments low (perhaps 5 small snippets). Can I expect the same with GNUstep for my still to be ported application (apprx. 50000 lines, other purpose, same coding style).

I don't know The Cocotron, but I would expect something similar, just perhaps different. In my case, I have one application ported with no changes at all, the other one has changes because networking is different on windows. Other apps might require ifdefs to tweak UI elements.

Yeah, I guess, this won't be a major issue.

4. PDF readiness

My application requires reading and flawless display of PDF files, as well as generation of PDF files from its view contents, some of which may become really huge. Does this work with GNUstep on Windows?

I would say no, I am not aware of native PDF handling on windows. Do you know what The Cocotron uses?

Cocotron does the whole PDF handling (parsing, reading, writing) by itself, using its Quartz2D replacement named Onyx2D. Recently I committed a minor fix to the PDF generator.

On GNUstep you have two kits: PDFKit and PopplerKit which rely on xpdf and poppler libraries. Or you can GSPdf's approach to work with ghostscript.
I got none of the above working on windows yet, not because of the GNUstep code, but because of the dependend library/application.

Well, this sounds not that promising. I have to evaluate this. One option might be to switch from a PDF to a SVG workflow. Recently, I wrote a SVG generator for a non GUI server application. SVG is less complex than PDF, and I guess that I will be able to implement a simple parser and writer in my application.

I did not try since a long time though, things might have gotten better upstream.

I need to investigate this. I hate Ghostscript, and if the other libraries do not work, then I go the SVG way.

5. RTF views and editing

Does GNUstep provide complete RTF compatibility, editing and display. Here The Cocotron is lacking, and the application to be ported to Windows does rely heavily on perfect RTF text formatting capabilities. So actually, my concerns may be rephrased to, whether it would be more work for me to implement the missing RTF capabilities into The Cocotron, compared to implement something into GNUstep if not to work around any other shortcomings in GNUstep.

Our RTF support is quite good. We use it internally and it improved a lot in the past years thanks to Fred's invaluable work. Since SimpleWebKit essentially transforms HTML into RichText, support for attributes, images and other details made big strides, I seriously doubt The Cocotron has such quality.

Yes, this was one of my primary concerns on using Cocotron for my next big application, which needs way much  more text formatting abilities then my previous application.

I did interchange files with WordPad quite well and did try basic RTF features in read/write from and to Windows apps. We do write RTF files that are usually read quite well, however the RTF produced by latest Word might be problematic, because specs are not clear and MS changed stuff, it is no longer a 1:1 match of the corresponding Word format.
The best would be to test some example and use Ink to show them.

The formatted text is kept within my application. Interoperation of formatted text with other applications is not necessary. Well, now saying this, my Mac application use PDF export of the documents view in order to let third parties view and present the nicely formatted contents (containing the formatted text) in Acrobat Reader (or Preview). It also allows drag & drop of any graphics format including PDF into its views and PDF snippets out of it to the desktop. What a pain … need to evaluate this.

If I need to change something within GNUstep, then my intention is to commit my changes upstream, and ideally the GNUstep frameworks shipped with my application would be based on the upstream code at the given point in time. This is how, I handled it with The Cocotron. May I expect the same with GNUstep? Do I need to provide the sources in a separate place anyway, or may I simply add a link to the GNUstep SVN repository on a prominent place (e.g. the About panel) of my application?

If your changes are of general use and quality, we will be happy to improve GNUstep itself, send in the patches!

We will see.

Best regards

Rolf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]