SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => Topic started by: sonic on October 14, 2018, 14:17:32

Title: Blitzmax & macOS Mojave
Post by: sonic on October 14, 2018, 14:17:32
hi there first post here (but Blitzbasic.com member since about 1999). thanks for having me.

i'm really sad about the abandoning of both the Blitzmax language and the old forums.

i'm seven years into a Unity project which relies heavily on tools written in BMax. when I installed Mojave on my new 2018 Macbook Pro, Blitzmax will no longer build / rebuild modules, claiming there are deprecated libraries (possibly wXWidgets related, i'm not entirely sure as i foolishly forgot to save the errors BMax threw when using Mojave.)

i've reverted to High Sierra for now as it will still build despite giving a warning:

Quoteclang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

in Mojave, the same warning is followed by several others and the build fails.

Not sure what to do - High Sierra has been a bit of a buggy mess for me, and I'd love to get off this OS, but I'm concerned it might be the last macOS capable of building Blitzmax software.

Does anyeone have any experience with this / has anyone found a solution?

Thanks!
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on October 14, 2018, 17:33:35
you might try BlitzMax NG

https://github.com/bmx-ng


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: GW on October 14, 2018, 19:34:23
Link to the prebuilt release for Bmax NG.
https://github.com/bmx-ng/bmx-ng/releases
edit: Just realized there is no mac binary.. oh well..
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on October 15, 2018, 21:02:53
yeah i looked into it but that was where i got stuck! will stay on high sierra for now, tho it's pretty buggy on this 2018 mbp
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on October 15, 2018, 21:56:12
There is "BlitzMax OS X v0.70.3.09" on Github, granted we're on what now..  0.98?  Then again, i began development of my project on 0.87 with minimal porting over to the next revisions so i'm sure it wouldn't be too bad.    Brucey is pretty busy with NXLibs and hasn't been on the forum or responding at all.  Perhaps when he manages to get some time, i'll look into it for you.   I plan to port to MAC as well, so i'll have to ask eventually.

It will require a lot of time though.
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on October 28, 2018, 17:53:54
I looked into OSX the other day and Mojave just isn't a viable as of now.  The most common compile failures seem to do with something called 'carbonLIB' which i believe is their old API for applications.

However due to Mojave sucking horse bollocks, i reverted all the way down to my beautiful El Capitan and NG 0.70 builds beautifully; Modules, anyways. 

I am trying to port an app at the moment so i can't speak on that behalf.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on October 28, 2018, 18:34:15
Raise an issue if you want to make sure to raise Brucey's awareness.

I am pretty sure to see him here and there in lurking around in the forums but he is kind of busy with the new website and fixing the issues people report via the github repository.


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on October 28, 2018, 18:38:20
Quote from: Derron on October 28, 2018, 18:34:15
Raise an issue if you want to make sure to raise Brucey's awareness.

I am pretty sure to see him here and there in lurking around in the forums but he is kind of busy with the new website and fixing the issues people report via the github repository.


bye
Ron

I'm aware of that.   He is lurking but he's backed up to the point where messages are on hold; I'm not going to bother him any further, right now.  I'll wait till he gets back to me.   The only real issue is with clang.  "Libstdc++ is deprecated; Move to libc++"; Preventing me from building.

I thought i'd have a more annoying time building for linux but mac is taking the cake.
Title: Re: Blitzmax & macOS Mojave
Post by: therevills on October 28, 2018, 21:35:39
Quote from: Derron on October 28, 2018, 18:34:15
the new website

What new website is he busy with?
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on October 28, 2018, 21:38:31
https://github.com/bmx-ng/bmx-site


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: therevills on October 28, 2018, 21:54:08
Quote from: Derron on October 28, 2018, 21:38:31
https://github.com/bmx-ng/bmx-site

Thanks - Nice to see him keeping BMX alive :) The site looks nice and clean too.
Title: Re: Blitzmax & macOS Mojave
Post by: DerFetteElch on October 29, 2018, 19:20:52
I've openend a bug-report on github for this issue a few weeks ago.

Brucey kindly replied:
QuoteAs a quick fix, you can use these lines in make.bmk, in the @define default_cc_opts section at around line 420...

         globals.SetOption("cc_opts", "osversion", "-mmacosx-version-min=10.9")
         globals.SetOption("ld_opts", "osversion", "-mmacosx-version-min=10.9")
         globals.SetOption("ld_opts", "stdlib", "-stdlib=libc++")

That fixed it for me.

Cheers!
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on October 31, 2018, 00:45:22
glad to see others looking for a solution at least. longer term i definitely need to upgrade because i don't think this machine was really designed for high sierra. testing out mojave was such a pain, i had to roll back to high sierra but it erased my recovery partition, meaning i can't run 'find my mac' on a (near maxed out) machine that cost more that i dare to admit.

so i'll probably need to do a clean os install of mojave to get my recovery partition back, and reinstall all my software again (i don't think i'll be able to get the high sierra installer, as apple only hosts the latest one afaik.) macos is so locked down and frustrating these days. i remember the early days of BMax and having a solid cross platform tool felt really cool and forward looking. nowadays i'm not surprised if noone wants to support macs anymore. at least there is Unity (which is what i'm primarily using now.) next year when they drop 32 bit support and opengl it's going to be a nasty shock for some users relying on old apps or playing even quite current games.
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on October 31, 2018, 13:30:15
Quote from: sonic on October 31, 2018, 00:45:22
glad to see others looking for a solution at least. longer term i definitely need to upgrade because i don't think this machine was really designed for high sierra. testing out mojave was such a pain, i had to roll back to high sierra but it erased my recovery partition, meaning i can't run 'find my mac' on a (near maxed out) machine that cost more that i dare to admit.

so i'll probably need to do a clean os install of mojave to get my recovery partition back, and reinstall all my software again (i don't think i'll be able to get the high sierra installer, as apple only hosts the latest one afaik.) macos is so locked down and frustrating these days. i remember the early days of BMax and having a solid cross platform tool felt really cool and forward looking. nowadays i'm not surprised if noone wants to support macs anymore. at least there is Unity (which is what i'm primarily using now.) next year when they drop 32 bit support and opengl it's going to be a nasty shock for some users relying on old apps or playing even quite current games.

I gave up on Mojave; It was total garbage.  They even managed to F'Up the usb drivers!  49 minutes to transfer 20mb, MEGABYTES. TWENTY.

Hell no.. just no.    With the removal of "allow all apps" in preferences, broken compatibility for most of my applications, intense slowdowns for basic tasks and this stupid transfer goof, i went back allll the way down to EL Capitan, the last good "OSX" in my opinion.   Modern OSX, anyways.   El Cap runs beautifully and does what i need it to do, if i ever unfortunately need to use a macintosh.  However to be fair, the last OSX i genuinely like is 10.6;   I still bring my old macbook around with me sometimes because it has 10.6..  just love that version of mac.  R.I.P MacOS9.

By the way, you can still get the old installers.   If you find the direct link to High Sierra appstore page on EL Capitan, you can downgrade.   You have to be on Mojave.

When you're on High Sierra, then you can go down to sierra.  that's how that crap works.   ...or you can torrent the installer app/back up your installers.   I failed to do so with EL Capitan so i just torrented the installer and did a fresh install after making a bootable USB.

AFAIK Mojave can't run 32bit;  None of mine work on Mojave.
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on November 07, 2018, 14:19:04
unfortunately you can only go as far as the OS the machine came with, so i'm stuck with high sierra which is pretty awful. i've been using mavericks and snow leopard up till now on past machines, snow leopard being the best of course. the future (or rather the present) is far less bright :(
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on November 25, 2018, 07:32:24
After some bug hunting and squashing Brucey released "BlitzMax macOS v0.98.3.29" during the last night. Give it a go.


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on November 27, 2018, 09:20:36
Quote from: Derron on November 25, 2018, 07:32:24
After some bug hunting and squashing Brucey released "BlitzMax macOS v0.98.3.29" during the last night. Give it a go.


bye
Ron

Now that's excellent.
Title: Re: Blitzmax & macOS Mojave
Post by: therevills on November 28, 2018, 08:19:35
Very excellent  8)
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on December 04, 2018, 23:33:14
promising! but i have an error at the momemt ("Can't find installation directory...")

will NG support MiniB3D / openGL stuff out of the box?
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on December 05, 2018, 03:28:01
Quote from: sonic on December 04, 2018, 23:33:14
promising! but i have an error at the momemt ("Can't find installation directory...")

will NG support MiniB3D / openGL stuff out of the box?


I'm pretty sure it's because you're on High Sierra.  It happened to me on MacOS Moshitve.   I downgraded to EL Capitan, thanks to torrents; worked out of the box, on there.

Now if only i could get PPC.
Title: Re: Blitzmax & macOS Mojave
Post by: Brucey on December 05, 2018, 06:18:31
Quote from: sonic on December 04, 2018, 23:33:14
promising! but i have an error at the momemt ("Can't find installation directory...")

The issue is because MaxIDE is being sandboxed due to it not being signed. When you double-click on it in Finder, it launches from a different location, and therefore can't see any of the BlitzMax resources it expects to find.
You can kick it off from the Terminal, via something like BlitzMax.app/Contents/MacOS/maxide

I am not currently subscribed to the Apple developer program, so it won't be getting signed any time soon, unfortunately.

I may introduce a script you can run in which it builds your own copy of MaxIDE, which wouldn't need to be signed.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 05, 2018, 07:11:53
@ script
Have scripts the same limitation? If not then you could have a "__OS X users run first.sh" file which creates a new MaxIDE. What about the binaries of BMK/BCC? They work because MaxIDE is calling them? What happens if a user decides to run them manually via cmd line?


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on December 05, 2018, 14:26:59
thanks for looking into this Brucey, and for keeping the platform alive. Blitz Research dropping support has left me suddenly in the lurch in the middle of a 7 year project haha. but that's the risk you take, and i understand the reasons why Mark abandoned it (though i still feel it would have been better to modernise BlitzMax as Game Maker have done, than start a new language. i digress.)

this stuff is only getting worse. Apple have announced that they're going more draconian with their 2019 OS about so-called 'notarized' apps. pretty certain now that they'll go full App-store only in 2020, so they can get their 30% cut of all Mac software.

it's already a nightmare trying to test other game developer friend's games, or even just jam games and other small indie games without developer accounts. having to do the secret handshake with system prefs for each version of game to even load. there is a terminal command to disable it which i've been considering tbh. but that shouldn't have to be the end user's experience

i'm close to jumping ship for good having been a diehard Mac dev for a decade or more.
Title: Re: Blitzmax & macOS Mojave
Post by: Steve Elliott on December 05, 2018, 18:58:45
If you read sonic's comments you see the developer unfriendly way Apple behaves, and the inexplicable way my linux system suddenly decided it would switch back to software rendering.  Seriously?  Not since the DOS days have I had software rendering.  I've not been able to get hardware accelerated rendering reinstated .

So what's the point even trying to support anything bar Windows?  It might not be perfect, but it works and is massively supported.
Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 05, 2018, 19:37:34
The wonderful Mac bashing continues :P - What's so horrific about a system designed to massively cut out malware / viruses? Surely that's a good thing?

An Apple developer account to sign apps is free and the upcoming "notarized" apps is also a free service which automatically scans your app and marks it as clean. I don't see what all the fuss is about?. It is not forcing you to sell / distribute your app via the App Store.

Don't all forget that different Blitz products broke with the various Windows revisions and either Mark released a fix or the community found a workaround. There was little jumping around giving off repeatedly but then again Windows is just a virus free, flawless, super stable, no problem OS, right? ;D
Title: Re: Blitzmax & macOS Mojave
Post by: Steve Elliott on December 05, 2018, 19:47:40
Ask Adam about how Apple suddenly destroyed his game engine by abandoning the widely supported opengl.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 05, 2018, 19:56:55
Quote from: Steve Elliott on December 05, 2018, 18:58:45
[...] my linux system suddenly decided it would switch back to software rendering.  Seriously?  Not since the DOS days have I had software rendering.

So you upgraded instead of updated packages? Newer xorg stuff tends to create trouble with older GPUs ... Updating binary blobs (nv or amd) can become a time eater.
Feel free to create a thread about this particular issue.


Bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Steve Elliott on December 05, 2018, 20:16:14
I really don't know why this happened.  I was using Linux Mint 19 and all was working well, a lovely OS.

Then booted up one day and software rendering with no way to return to Nvidia drivers...Just kinda irritated by the various systems out there right now,  that continually change, and in the process break code.
Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 05, 2018, 20:57:47
Quote from: Steve Elliott on December 05, 2018, 19:47:40
Ask Adam about how Apple suddenly destroyed his game engine by abandoning the widely supported opengl.
I think you're mistaken here. The main culprit here was his own forked and modified version of Monkey-X itself. Every piece of OpenGL software I have still works, eg, AGK, Cheetah3D( tested OpenGL version ), 3D Coat, Daz3D. Also, no problems with OpenGL games either. OpenGL is still in the latest version of MacOS.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 05, 2018, 21:16:15
Quote from: Qube on December 05, 2018, 20:57:47
I think you're mistaken here. The main culprit here was his own forked and modified version of Monkey-X itself.

I think you're mistaken here. He was forking Monkey 2 :-)



@ Steve
You should be able to "turn back time" with the newer Mint installations - timeshift.
Also you _might_ play with installing the most-current driver for your GPU (especially if it is a newer GPU). The "hardware-manager" proposed drivers might be too old or having problems with recent updates you installed. Maybe you have chosen to auto-update "critical" updates too (with higher "security levels"). So you updated (or even upgraded - aka "big version jumps) kernels or xorg. They often lead to issues with GPU drivers - eg. DKMS breaks or so.
As told you might open up a new thread for this particular issue as xorg-log (or some other logs) might tell us what happens.


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Steve Elliott on December 05, 2018, 21:20:10
Timeshift didn't work, I really don't know why my linux system seems to have become unstable...I'm really fed up with it all to be honest.
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on December 05, 2018, 23:15:25
Maybe in 20 years, we will move to Haiku OS or ReactOS  :P

Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 06, 2018, 08:38:37
@Steve Elliot - Part of my job is remote support and diagnostics so if you want I'll be more than happy to arrange a time to remote access your Linux and see if I can sort out your issue? - If you're interested then PM me your number and a time to call :)
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 06, 2018, 10:19:50
I repeat myself a 3rd time (or maybe Qube can "extract" these posts into a new thread to not further derail them): open up a new thread to keep stuff clean here.


@ Qube
So you call people that they have an infected computer and you have work for MS and are now trying to help via remote control ? ;-)

I assume that the binary blob for his NVidia card freaked out and this leads to problems - maybe try the open source drivers first? Or if you used the FOSS ones, use the binary blob from the chip vendor.

I am still on Mint 18 and for now  do not intend to upgrade.

$ inxi -F
System:    Host: RonnyPC Kernel: 4.10.0-38-generic x86_64 (64 bit) Desktop: Xfce 4.12.3
           Distro: Linux Mint 18.3 Sylvia
Graphics:  Card: NVIDIA GK106 [GeForce GTX 650 Ti Boost]
           Display Server: X.Org 1.18.4 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1200@59.95hz, 1280x1024@60.02hz

As you see I am using nvidia (binary blob) rather than nouveau (foss).


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Steve Elliott on December 06, 2018, 12:55:03
I'll have a look at your suggestions when I'm in a better mood for tech problems Derron.  And thanks - you too Qube.
Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 06, 2018, 13:06:00
Quote@ Qube
So you call people that they have an infected computer and you have work for MS and are now trying to help via remote control ? ;-)
A small part of what I do is remote support and my LogMeIn account has over 300 PC's on it spanned across various companies. Why is that odd?
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 06, 2018, 14:24:12
Was just kidding about these "I am an MS employer and your computer is infected, we can repair it if you do this and that"-dudes trying to install crap on your computer.


@ Steve
Yes you can (come back to us when in the right mood).


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Brucey on December 06, 2018, 14:42:24
Quote from: Qube on December 05, 2018, 19:37:34
An Apple developer account to sign apps is free and the upcoming "notarized" apps is also a free service which automatically scans your app and marks it as clean.
Cool. Do you have a link which provides more information, please?

As far as I can see, to get a certificate you need to be signed up to the program.

Thanks.
Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 06, 2018, 22:33:03
QuoteWas just kidding about these "I am an MS employer and your computer is infected, we can repair it if you do this and that"-dudes trying to install crap on your computer.
Lol, I get you now. I read your post half asleep and totally missed what you were getting at :P

Quote from: Brucey on December 06, 2018, 14:42:24
Quote from: Qube on December 05, 2018, 19:37:34
An Apple developer account to sign apps is free and the upcoming "notarized" apps is also a free service which automatically scans your app and marks it as clean.
Cool. Do you have a link which provides more information, please?

As far as I can see, to get a certificate you need to be signed up to the program.

Thanks.
Ah, looks like I was a little misleading with what I said. Apparently from Xcode 7 you could sign for free but the big gotcha here is that the certificate only last a week before expiring, so kinda pointless for any real world sharing of your app. The notarized service which will be enforced in future iterations of MacOS is a free service. I've always had a full developer account so never came across the week expiring on the free developer ID account :(
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 07, 2018, 07:02:54
Are you allowed to have "build bots" using your developer account? That way you could "share" your credentials indirectly allowing for signed apps (of course this only should be done for "trustworthy apps" or in a "open way" so people know that it is not _your_ app but a "from my build bot" app).


@ fee
Maybe raise some money from the NG-Mac-users - seems you do not have a reason to be an official mac-dev for other stuff, so it's $99 just for NG and I think it's ok to at least ask the (very small) community to donate some bucks - if they are interested in the benefits they get with it.
Are there ways around it? How do other compiler chains do it?


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Qube on December 08, 2018, 10:12:36
QuoteAre you allowed to have "build bots" using your developer account? That way you could "share" your credentials indirectly allowing for signed apps (of course this only should be done for "trustworthy apps" or in a "open way" so people know that it is not _your_ app but a "from my build bot" app).
You are allowed to assign team members within your account so I assume you could crowd fund a full developer account for sharing.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 08, 2018, 11:51:38
Maybe offer to make brucey a team member of yours? (Dunno what inflictions/side-effects it has for the "account owner")


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 09, 2018, 13:20:31
Hey, I'm new to these forums and community really. Have been working on an RPG in my spare time for years now in Blitzmax and am trying to launch NG on Mojave. I seen Brucey wrote that you can launch it from the terminal? I don't know much about the terminal but attempted to launch it by entering "open /Applications/BlitzMax/MaxIDE.app". Get the same error. Am I doing something wrong? Or is it impossible to launch until the app is signed?

Sorry if these are dumb questions. I just would really love to continue work on this passion project of mine. Thanks.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 09, 2018, 21:52:36
Somewhere he stated that you have to run the exact binary ("maxide.app" is a folder with some stuff in it).


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 09, 2018, 23:52:13
There is a folder called maxide. There are no folders called maxide.app. I've had no luck finding a binary to launch in the terminal :(

I would be one Mac user willing to chip in to get this signed.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 10, 2018, 07:17:12
Yes Mac OS X hides the folder in the finder/File Manager.

Go to a terminal. Move into your folder via "cd ~/Your/BlitzMax/Folder" (the "~" is a abbreviation for your home folder) ... or use "cd .." to go one folder "out" and "cd name" to move into the subfolder "name".

When then in your BlitzMax folder - go into the "maxide.app" folder.
cd maxide.app/Contents/MacOS (case sensitive, so might be "MaxIDE.app" on your side)

to start you then type in
./maxide (case sensitive, so might be "./MaxIDE" on your side)


the "./" is there to make the OS aware of the binary being exactly in this folder and not a system wide available command.


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 11, 2018, 12:34:36
Thank you, this is exactly what I needed!! :D It's awesome to finally see my game running again.

The game ran almost perfect with NG. The only thing I noticed which I found odd was the mouseY() seemed to be inverted. The top of the screen was my max screen height instead of 0 and the bottom of the screen was 0. This cause my image mouse icon to go down when I moved the mouse up and up when I moved the mouse down. NG Bug?
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 11, 2018, 13:45:24
Maybe an SDL bug? Can you create a simple example and note down what OS version you use on what gpu?

I only run an older OS X on a "non certified computer" - so others need to chime in when it comes to verifying your issue - Qube has a Mac, Brucey has a Mac, others surely too


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 13, 2018, 02:37:46
My OS is Mojave version 10.14.2
GPU: Intel Iris Plus Graphics 655 1536 MB

Strict
Graphics 1280,800,32,60

Global MouseIcon:TImage
MouseIcon = LoadImage("10x10icon.png")

DrawCursor()

Function DrawCursor()

Repeat
Cls
DrawImage(MouseIcon,MouseX(), MouseY())
DrawText(MouseY()),10,10
If KeyDown(KEY_ESCAPE) Then End
Flip
Forever

End Function


In windowed mode it seems to work correctly. In Full screen mode as I have here, both the mouse and the graphic icon which should appear overlapping the mouse icon behave separately. The mouse seems to move around the screen correctly but the 10x10icon is inverted.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 13, 2018, 06:12:55
So hardware cursor is correct but custom image drawn at mouseX,mouseY is inverted?

Bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 13, 2018, 06:37:41
yes, but only on full screen. It's something to do with MouseY() on fullscreen. When I move the hardware cursor to the bottom of the screen, it displays MouseY() as 0 but the 10x10icon.png will then be at the top of the screen (because MouseY() is returning 0). When I move the hardware cursor to the top of the screen it will display MouseY() as 800 and the 10x10icon.png will then be at the bottom. So the image seems to be going exactly where MouseY() is telling it to go. Just MouseY() is not where the actual mouse cursor is. Again, only in fullscreen mode. In windowed mode, everything seems to behave how it should.


P.S. MouseX() is not inverted. It is always behaving as it should.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 13, 2018, 08:36:37
In OpenGL "0,0" is at the bottom left - while in Max2D (BlitzMaX) "0,0" is on the top left, maybe there is something borked. Will create a github issue for this - maybe Brucey can verify it on his Mac.


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on December 13, 2018, 08:44:29
you can follow progress of the issue there:
https://github.com/bmx-ng/brl.mod/issues/79

And yes, it might be a bit "hacky" but meanwhile you could use your own "MouseY()" ... and handle the invertion on your own when doing full screen on mac.
Most of the time you are better having your own Mouse type to allow easier handling of "mouse clicks" (which are not _hits_ in all cases) or blockage of clicks (avoid spamming), double clicks handling ... not to forget about handling virtual resolutions (designed: 800,600, used: 1280*720 ->  black bars needed, and scaled mouse coords).


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: MickMuze on December 14, 2018, 03:17:30
I'll keep checking over there. I did whip up a cheap kinda hack around for it that works ok but yeah, kinda ugly. Hopefully this problem gets fixed at some point. Thanks again for your help.
Title: Re: Blitzmax & macOS Mojave
Post by: Xerra on December 31, 2018, 18:21:33
I just fired up the newest Blitzmax build as I wanted to build an old game of mine so I could potentially sequel it and found this mouse problem as well.
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on January 01, 2019, 16:11:56
sooo i got this to run at least using the terminal method. but i am unable to get it to build minib3d - it seems not to say which line is causing the issue, which makes it tricky to debug...

the error i get is: Can't find interface for module 'brl.blitz'
Title: Re: Blitzmax & macOS Mojave
Post by: Yellownakji on January 03, 2019, 04:21:48
Quote from: sonic on January 01, 2019, 16:11:56
sooo i got this to run at least using the terminal method. but i am unable to get it to build minib3d - it seems not to say which line is causing the issue, which makes it tricky to debug...

the error i get is: Can't find interface for module 'brl.blitz'

Check that [NG Install dir]\Mod\BRL\blitz exists and that the module is built.
Title: Re: Blitzmax & macOS Mojave
Post by: Derron on January 03, 2019, 08:08:20
Quote from: Brucey via github issue
Hi. There are several issues currently with Mojave and the default OpenGL graphics modules for BlitzMax.

I would like to suggest moving over to use the SDL backend (sdl.mod) on macOS. The latest SDL has fixed all the currently known macOS issues (fullscreen y flipping, fullscreen refresh sync, etc), and their team is generally quick to fix new ones.

Generally, all you need to do is to import SDL.gl2sdlmax2d, rather than BRL.GLMax2D.
If you are not using a Framework (and therefore all of BRL and Pub modules are automatically imported) you will need to switch to using the Framework statement, and then import the required modules for your project.
source: https://github.com/bmx-ng/brl.mod/issues/79


bye
Ron
Title: Re: Blitzmax & macOS Mojave
Post by: imaginaryhuman on January 19, 2019, 21:31:02
Thanks for getting this working on MacOS Brucey. I too upgraded my mac and found suddenly I couldn't use blitz any more. I tried NG but I had the same issue with the signing and had to launch the max IDE from the terminal. But i hate the terminal. So researched and found that you can use Automator.app on the Mac to make a very simple automation. You make a new automation and add a Utilities/Run Shell Script action. In the script, type in a script as given in this thread or as below, for me I did something like this... (you can probably figure out a more efficient one, I'm not familiar with terminal syntax stuff or how to make this 'flexible' to work on everyone's setup, so you'll have to change the folder names/path as you see fit)

cd /
cd applications/blitzmaxng/maxide.app/contents/macos
./maxide

then save the automation. In the save dialog, there's a dropdown option to save it as an application. Choose that. Put the application in your blitz folder or whatever you like. You can also then drag this icon into the dock to launch easily. Clicking the icon will run the automation and thus launch the IDE without having to go to the terminal.

Little trick I learned from here:
https://stackoverflow.com/questions/281372/executing-shell-scripts-from-the-os-x-dock

I guess to make that work on "anyone's" computer you'd need a way to locate the app from within a shell script without knowing where it is, or have a way to modify the script. Maybe make a little blitz app that finds the path of the blitzmax folder and auto-generates an automator action or something?

Also you can change the icon of the automator app by simply right-clicking its icon and doing a 'Get Info', then click and drag some other application icon (e.g. maxide app) and drop it onto the top left of the getinfo window where it shows the icon. .. mouse should show a plus sign.... as soon as you let go it assigns the icon to the app. Now the automator app 'looks like' the maxide app.
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on January 28, 2019, 12:57:08
hi there,

i'm still plugging away at this because High Sierra is very unstable on my macbook and i really need to move to Mojave if possible.

i have got minib3d to build as a module by switching to the SDL backend. all modules seem correctly built now.

however, trying to build my project, it says that it "Can't find interface for module 'sidesign.minib3d" - not sure where to go from here.

EDIT:
somehow i spotted the TGlobal inside Reflection was clashing with TGlobal in minib3d. i renamed it to MGlobal, and it finally gets as far as 'Executing' - however, i now see this error:

"Cannot initialise SDLSystemDriver. System driver already configured as MacOSSystemDriver"

EDIT2:
ok i got that to work by removing a call to a driver initialisation within MiniB3D.

it now builds and runs, very happy to see that!

... but fails after about half a second after repeated calls to linkedlist.ValueAtIndex(index) - i've tested that the index being requested is less than the Count() of the list, but it keeps failing (runtime error "List index out of range), often at the higher indices of the list, but always within its Count(). the list is 1690 entities large, and it tends to fall over at indices like 1592. not sure what i'm doing wrong here.

at somewhat of a loss on this one.

i should mention that i had to switch back to BRL.GLMax2D as the SDL backend didn't work. i have hacked Linkedlist.bmx to return null when it can't find ValueAtIndex(index), and things seem to work, except that i had to hack in the MouseY() flip because of not using SDL. 

i think this is solid enough for me to make the move to Mojave, possibly.

EDIT3: could the list issue be related to this: https://github.com/bmx-ng/brl.mod/issues/44 (https://github.com/bmx-ng/brl.mod/issues/44)? i hacked out 'IF _count=-1' in BRL.Linkedlist.Count(), so that it always returns the actual number rather than the cached one. Behaviour is now as expected, but there is obviously a better way to do this (fixing the thing that causes _count to hold the incorrect value!)

so - i'm going to try a clean install of Mojave, but before i do, am i going to see issues with the fact that i'm still on GLMax2D? ideally i'd like to switch to the SDL backend, but i have no idea how to write the Framework commands to import what i need
Title: Re: Blitzmax & macOS Mojave
Post by: Brucey on January 28, 2019, 17:38:08
Hallo :-)

I might add that linkedlist.ValueAtIndex(index) is very inefficient in the scheme of things, and if you feel you need to use that a lot, you may be better off with an Array instead - linked lists are good for dynamic insertions and iterating over, but very costly for random access.

If you want some help sorting out the issues with SDL, drop me a PM or email.
There are two GL SDL modules, one uses shaders, the other is like Max2D. The non-shader one should work with least fuss, but if you still have issues, I can try to help you get past them.

Brucey
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on January 28, 2019, 21:46:15
thanks Brucey! and more generally also for doing this project in the first place. you might have saved my seven year project! if it makes money, i'll be sure to send a good donation your way (if you accept them of course.)

so i call ValueAtIndex() very infrequently, 32 times / frame to be exact - i use this it to iterate through part of the list which holds all b3d entities, working out which objects are active / inactive and need to be added to/removed from a sublist containing active objects, but i wish to avoid iterating the entire list, instead going through it round robin, so i store an index of the last one tested. so i'm doing a lot more iterating and inserting / sorting / etc than random access. so i think i made the right choice, as otherwise i'd frequently need to resize arrays. but i wonder if there is a more elegant way to solve this list issue than my current hack (not that it seems to slow things hugely, throwing out the cache.)

about the SDL thing - besides the Y flip, it otherwise works flawlessly with the BRL library, but i'm still on High Sierra atm. i'm not sure what will happen if i try to build against Mojave again. if i do, and i run into trouble, i will accept your kind offer of a PM! :)
Title: Re: Blitzmax & macOS Mojave
Post by: sonic on February 01, 2019, 11:59:17
ok this is really odd. i installed the latest High Sierra security update, and now my original BlitzMax installation used for my editor no longer builds. incredibly frustrating. i could move to my experimental NG build but i don't feel it's stable enough yet.

any idea why i might be seeing this, where i didn't see it before?

(is it because my xcode updated?)

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Build Error: Failed to link /Users/.../Editor-2018c.mt.app/Contents/MacOS/Editor-2018c.mt
Process complete


ok i installed the 10.13 command line tools. it builds again! i get a lot of warnings that weren't there before, such as:

ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.


but i guess if it builds, i'm ok for now! i just need this thing to hold together till my game's release, hopefully in the next year or two :D