discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Windows distribution viability


From: Simon Gornall
Subject: Re: Windows distribution viability
Date: Thu, 12 Dec 2024 15:45:36 -0800

Hey Riccardo,

Thanks very much for the detailed walkthrough :) I don’t actually mind a “fat” 
distribution, this will be very much a one-time-only thing, so I think my fears 
are assuaged, and I can start looking at the implementation.

I had been wondering about frameworks, and how they’re supported on Windows 
machines - the Mac (and presumably GNUstep) will look into specific directories 
for the framework entries but without that specific filesystem layout it’s good 
to know GNUstep'll look for things inside the app tree - perhaps I can quieten 
NSLog() by giving it a timezone file as well :) 

Cheers  
        Simon

> On Dec 12, 2024, at 9:14 am, Riccardo Mottola <riccardo.mottola@libero.it> 
> wrote:
> 
> Hi Simon,
> 
> 
> Simon Gornall wrote:
>> I’ve been a Mac engineer for the last couple of decades, and now I find 
>> myself looking at writing something that will work on both Windows and the 
>> Mac. If it were just for me, (from reading around) I think it’d be quite 
>> straightforward - just install MSYS, the GNUstep packages, and start running 
>> with it, but I might want to distribute this application in the future, and 
>> I’m cautious about requiring a GNUstep install as a part of that, it seems 
>> like a reasonably high bar.
> 
> I distribute a windows Application regularly since years and will give you 
> some details on my setup.
> 
> Until some years ago, MinGW of MSYS ("1") was our way to build on windows and 
> distribute things. For that, we supplied NSIS installers for GNUstep core and 
> developer tools. This allowed then to distribute your application the same 
> way, using the GS core non-dev package as a requirement.
> Unfortunately, while that environment still works, it is not really 
> maintained anymore so we use MSYS2 and MinGW32 or MinGW64.
> That one has an internal package manager system (pacman).
> 
> Maybe NSIS installers could be created also for MSYS2, but never delved into 
> it.
> 
> So, an way to get things on windows is install all packages from the command 
> line. You could in theory also make your app available such way. You need to 
> supply inside the folder a specially crafted configuration file
> 
> There is however a third way, which is the currently the one I settled to: a 
> self-contained folder. a GNUstep app will look first in system for libraries, 
> but then also for the whole tree inside itself.
> 
> At the end, libraries are DLLs, so it is a matter of getting all paths and 
> dependencies to work. MSYS and MINGW themselves are at core a main DLL for 
> runtime purposes.
> 
> More details below.
> 
> It is very convenient, unzip and start. Of course it is a "fat" distribution 
> and useful for one app, if you have more than one, you would end up 
> duplicating things
> 
>> 
>> In fact, I’ll be using SDL (3, if it matters) for the graphics side (which 
>> is cross-platform), what I’m really after here is the runtime and Foundation 
>> framework that I’ve come to know and love - even better if it has ARC :)
> 
> If you settle to the GCC runtime (no ARC) you get it ready as a package from 
> pacman of msys. So it is a matter of installing deps and then just building 
> gnustep core with "configure, make install" and then your own frameworks and 
> apps.
> 
> In my app I use standard AppKit and for my needs the win32 backend is enough, 
> the code is well portable. No need for SDL or C++, but YMMV.
> 
> 
> Here a guide I wrote:
> https://mediawiki.gnustep.org/index.php/Installation_MSYS2
> 
> If you want the libobjc2 runtime instead, you need additional steps to 
> install it and additional dependencies.
> 
> 
>> 
>> I have read a fair number of “it’s hard to get it working on Windows” 
>> posts/articles but I’m hoping these are a bit self-selecting - people who 
>> did struggle and wrote about it doesn’t mean that everyone struggles… 
>> They’re also a bit older, and I’m (again) hoping things keep improving :)
> 
> No getting it on windows it not that difficult, as proven. But depending on 
> your method of distribution existing solutions may suit you or not.
> 
> I thus prepare an environment with GNUStep and there I install many 
> frameworks and applications and run from the command line.
> 
> When I want to distribute, I run a script that packages and copies all things 
> together and then removes things not needed. That part needs to be tweaked 
> depending the dependency of each app and what your installation contains.
> 
> You can check
> https://github.com/rmottola/DataBasin
> 
> There note two special files:
> 
> https://github.com/rmottola/DataBasin/blob/master/windows-GNUstep.conf
> This represents the configuration to find the whole GNUstep distribution
> 
> This instead is the script, commented, I think you can understand it:
> https://github.com/rmottola/DataBasin/blob/master/windows_package.sh
> 
> I tried to make it parametric... perhaps you just need to change APP_NAME :)
> 
> This copies also MINGW DLLs, so you end up with a folder where you can just 
> launch your app with "double click" on the exe. Technicall a "snapshot".
> 
> There are minor details that can be discussed and improved, if you are 
> interested in this method.
> 
> Riccardo
> 
> 
> 




reply via email to

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