|
From: | Ethan C |
Subject: | Re: Windows distribution viability |
Date: | Wed, 11 Dec 2024 15:45:23 -0600 |
User-agent: | Mozilla Thunderbird |
On 12/11/24 15:44, Simon Gornall wrote:
So, just to follow up in case anyone else has the same query…
The instructions were pretty good, though it still took me most of the day to get it all working together. That’s more a mark of my inexperience with Visual Studio than any complaint about anything else. Things like “Clear the ‘compile as’ setting” - well it’s a drop-down, and set to ‘Default’ which doesn’t have the flags so that’s ‘clear’ right ? Wait, you can *edit* that drop-down and clear it out completely ? What ?”… That sort of thing :)
Also, SDL needs to be compiled with the same clang compiler as the thing calling into it (despite their release-notes claim otherwise :) but right now I’m staring at a colour-rotating window on my Windows VM, which has also successfully compiled and output:
NSString *test =[NSString stringWithUTF8String:"hi there"];
NSLog(@"test: %@", test);
(Admittedly, I got a bit more than I expected)…
Unable to create time zone for name: 'Etc/GMT+8'(source 'function: 'GetTimeZoneInformation()'').
It seems that your operating system does not have a valid timezone nameconfigured (it could be that some other software has set a, possiblyambiguous, timezone abbreviation rather than a name) ... please correctthat or override by setting a timezone name (such as 'Europe/London'or 'America/Chicago').
You can override the timezone name by setting the 'Local Time Zone'NSUserDefault via the 'defaults' command line utility, a Preferencesapplication, or some other utility.eg "defaults write NSGlobalDomain 'Local Time Zone' 'Africa/Nairobi'"See '(null)'for the standard timezones such as 'GB-Eire' or 'America/Chicago'.2024-12-11 21:33:57.396 SDLtest[8296:1528] Using time zone with absolute offset 0.2024-12-11 21:33:57.393 SDLtest[8296:1528] test: hi there
But the output happened, so it’s compiling the NSLog.
It also looks as though it’s perfect for packaging - having worked through the instructions, I end up with an architecture-specific directory full of the DLLs I need, and the binary itself. Pretty sure from that I can use one of the packager tools and create a ready-to-click-and-go installation.
Directory of C:\Users\simon\source\repos\SDLtest\x64\Release
12/11/2024 01:09 PM <DIR> .12/11/2024 11:20 AM <DIR> ..12/28/2023 10:46 AM 224,768 dispatch.dll12/28/2023 10:49 AM 5,595,648 gnustep-base-1_29.dll12/28/2023 10:50 AM 313,344 gnustep-corebase-0.dll12/28/2023 10:52 AM 3,652,096 gnustep-gui-0.dll12/28/2023 10:51 AM 673,792 jpeg.dll12/28/2023 10:47 AM 554,496 libcurl.dll12/28/2023 10:45 AM 27,648 libffi-8.dll12/28/2023 10:45 AM 941,568 libiconv.dll12/28/2023 10:50 AM 206,336 libpng16.dll12/28/2023 10:44 AM 172,544 objc.dll12/28/2023 10:53 AM 19,968 PreferencePanes-1.dll12/11/2024 01:05 PM 5,796,352 SDL3.dll12/11/2024 01:09 PM 12,800 SDLtest.exe12/11/2024 01:09 PM 491,520 SDLtest.pdb12/28/2023 10:50 AM 432,640 tiff.dll12/28/2023 10:51 AM 777,728 turbojpeg.dll12/28/2023 10:50 AM 159,744 zlib1.dll17 File(s) 20,052,992 bytes2 Dir(s) 188,881,162,240 bytes free
All the SDL examples work fine as well, so looks like I’m good to go :)
CheersSimonOn Dec 11, 2024, at 10:04 am, Simon Gornall <simon.gornall@mac.com> wrote:
Thanks Ethan - that’s really good to know :)
I’ve got the Visual Studio free version installed on a VM and have just seen my first (Windows, not NSWindow) window appear. Just going to see if I can get SDL to link as well and then I’ll try creating a packaged setup and install on my (one and only) real Windows machine.
Cheers again!
Simon
On Dec 11, 2024, at 9:47 am, Ethan C <echaroenpitaks@gmail.com> wrote:
Alternatively, you may want to use the MinGW toolchain. See the instructions at https://github.com/gnustep/tools-make/blob/master/Documentation/README.MinGW for information on that. It also includes instructions on making it into a self-contained folder. You will need to package the resulting folder and add the binary to the Start menu yourself, but all you’d need to do is to make your installer extract that folder somewhere on the filesystem and then add the shortcut to the Start menu.
On 12/11/24 11:30, Ethan C wrote:
Hi Simon,
On 12/11/24 10:36, Simon Gornall wrote:
Hi folks,
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.
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 :)
libobjc2 is a pretty mature runtime, and it has useful features the
Apple runtime doesn’t have, such as typed selectors (so having two
methods in different classes with the same name but different types
is no longer undefined behavior) and stuff to support dynamic
languages that have other object models. Our Foundation
implementation, gnustep-base, is also pretty mature, and if your
code doesn’t work on gnustep-base it shouldn’t be too hard to get it
working. If you need CoreFoundation, that might be a bit more
difficult. I don’t know the status of gnustep-corebase, and I have a
Linux-only port of the Catalina CoreFoundation with toll-free
bridging enabled that I’m currently working on.
I found https://github.com/gnustep/tools-windows-msvc but it’s not clear whether this results in something I can package up (binary, DLLs in the same directory etc.) and have an easy-to-use install.exe that means the end-user doesn’t have to install GNUstep, or whether it depends on filesystem layout etc (as I recall GNUstep needing, from using it a long while ago).
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 :)
Anyway, and info/hints from people who’ve done something like this would be appreciated - I’m at the stage where I’m planning stuff, and I don’t want to paint myself into a corner. There’s always the option of using C++. But… you know… :)
You should look at
https://gnustep.github.io/Guides/Setup/Windows/index.html;
it includes all the information that Hugo Melder wrote about Windows
setup. You should definitely be using tools-windows-msvc. I don’t
know how to package it on Windows since I don’t use Windows often,
but I know people have done it in the past for some decently large
commerical applications, such as Algoriddim djay.
CheersSimon
[Prev in Thread] | Current Thread | [Next in Thread] |