Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Mac/Linux support #4

Open
Boobies opened this issue Mar 5, 2019 · 79 comments
Open

Feature request: Mac/Linux support #4

Boobies opened this issue Mar 5, 2019 · 79 comments
Labels
C: Enhancement New feature or request
Milestone

Comments

@Boobies
Copy link

Boobies commented Mar 5, 2019

Would it be possible to include a Linux port of Open Minecraft Note Block Studio? Perhaps in the form of a .deb package or something.

@encode42
Copy link
Member

encode42 commented Mar 10, 2019

I've been able to install and run the EXE through the latest version of wine on Linux Mint just fine.

Edit:
Forgot to mention that it works perfectly fine so far.

@HielkeMinecraft HielkeMinecraft added the C: Enhancement New feature or request label Mar 11, 2019
@HielkeMinecraft
Copy link
Collaborator

Yeah right now the best thing you can do is to use Wine, as many things have been made with Windows in mind, and won't work on Linux.

@Boobies
Copy link
Author

Boobies commented Mar 12, 2019

Wow, this is suddenly looking like a forum rather than a bug tracker :) I wasn't looking for a workaround, guys; I've been using Wine too.

@HielkeMinecraft
Copy link
Collaborator

Upon further inspection of the code, I think it's pretty much impossible.
Just look at the .dll files at OpenNoteBlockStudio/datafiles/Data/

These files obviously won't work on Linux, and because I don't have the source code for them, making .so variants to work on Linux is... Impossible.

@Boobies
Copy link
Author

Boobies commented Mar 13, 2019

I thought perhaps they came with GameMaker Studio, which I am not particularly familiar with. Do you know who the author is? Perhaps we can contact the auhor for help (either for the source or the shared object files). And, for that matter, aren't there potential licensing issues surrounding those files?

@HielkeMinecraft
Copy link
Collaborator

HielkeMinecraft commented Mar 13, 2019

No, as in the code they are specified as libraries. You can find a lot of them online: http://www.gmtoolbox.com/
I have no idea who made these files and what the licenses they have. Your guess is as good as mine :-/

@Boobies
Copy link
Author

Boobies commented Mar 14, 2019

Chances are they do Windows-specific things anyway judging from their names (e.g., window.dll) so it's possibly not as simple as providing .so's. Otherwise, we could have used objcopy. Could you identify where in the code these are used? If it's not a million functions being used, perhaps I could reimplement them using portable libraries.

@HielkeMinecraft
Copy link
Collaborator

As far as I know the .dll files are only loaded in once, in lib_init. There they are put into global variables. If you were to make .so variants that would do exactly the same thing as the .dll ones, we could just have a check, and if the platform is linux, the .so files will be used. But is that even possible, without having the source code? :-/

Still, this is just one thing that won't work on Linux. More things might be broken.

@Boobies
Copy link
Author

Boobies commented Mar 18, 2019

The main reason why it's done this way, as far as I can tell, is that GML is a dumb language which doesn't abstract away calling conventions and such. At any rate, it would be possible, because it would not rely on those libraries at all; I would implement the functionality myself from scratch --- as long as it's not too much work (I expect that while those libraries have a lot of features, not too many are used by this specific program).

That said, in the mean while, I have tracked down one of the libraries. It seems to have its full source code available, and support is included Linux as well as macOS:

https://marketplace.yoyogames.com/assets/575/execute-shell

As far as I can tell, everything from file.dll and window.dll can easily be done using GameMaker's built-in functions. I haven't investigated further.

@stuffbydavid
Copy link

Hi, here are the sources for the DLLs you need to port:

https://github.com/stuffbydavid/audio-DLL
https://github.com/stuffbydavid/midi-input-DLL
https://github.com/stuffbydavid/window-DLL
https://github.com/stuffbydavid/file-DLL

window.dll and midiinput.dll use Windows features like ShowWindow and midiInGetDevCaps, so they'll need to be rewritten from scratch. audio.dll and file.dll use the FFMPEG and Boost libraries which are cross-platform and require less changes.

Good luck!!

@Boobies
Copy link
Author

Boobies commented Mar 18, 2019

You must be the original author :)

At any rate, if anything takes too much work to port, I'll also consider looking into how ditficult it is to replace them with cross-platform alternatives. Any idea as to how tight the coupling between these and Open Minecraft Note Block Studio is? Cause if it's just a matter of changing some calls and data structures, things should progress very quickly.

I haven't really looked at the APIs yet.

@leafs444
Copy link

leafs444 commented Jul 4, 2019

I know this is kinda necrotic but this isn't a forum so I have no reason not to tell y'all that I found a way to pretty much make this run without a compatibility layer (WINE (If its not an emulator then its a compatibility layer)) but I can't legally share it so... But it is possible...

@ShinkoNet
Copy link
Collaborator

ShinkoNet commented Jul 4, 2019

Could you explain the method in doing so? I'm interested in doing this.

@leafs444
Copy link

leafs444 commented Jul 4, 2019

I found the libraries and replaced them with minor coding skills (just switched the code for the libraries)

@AkarinLiu
Copy link

Why not change using Qt development environment? That can support any platform!

@Bentroen
Copy link
Member

Bentroen commented Apr 5, 2020

@ScottLiu2019 Glad you pointed that out! I'm actually working on a prototype for a new version using exactly that framework (its Python version, PyQt, to be exact). No timeframe when this is going to be available, but I can already say it will be much less restrictive than the current version. :)

@Bentroen Bentroen pinned this issue Apr 5, 2020
@Bentroen Bentroen changed the title Feature request: Linux port Feature request: Mac/Linux support Apr 5, 2020
@lachlandk
Copy link

@Bentroen I just happened to be thinking about creating a new version of the program using that framework myself, I would be interested in pursuing this, is there any way I could get involved?

@Bentroen
Copy link
Member

@lachlandk That's great! Thanks for your interest in helping the project. I'll invite you to the repository :)

@MinecraftDesktopOnPi
Copy link

If you would like some additional help, @Bentroen @lachlandk , I am good with linux and PyQT and interested in helping y'all out.

@lachlandk
Copy link

I think a rewrite could possibly do wonders to the performance of this program, my computer literally runs hotter while editing in NBS than playing some 3D games :D

@Bentroen Bentroen added this to the v4.0 milestone May 17, 2020
@Bentroen
Copy link
Member

@MinecraftDesktopOnPi Sorry, I seem to have missed your comment! I'm keeping the repository private until we have a minimally working version, and we've already reached the 3 contributors limit. As soon as it's made public you'll be able to contribute via pull requests :)

@treierxyz
Copy link

@Bentroen How's the progress on the new version? Any updates, how far along you guys are?

@Bentroen
Copy link
Member

I already wrote a significant part of the interface in Python, but we're considering the possibility of moving to another language due to performance reasons (though it's more likely that we'll stay with Python).

@AkarinLiu
Copy link

Do you plan to use other languages instead of GML? For example, Golang, Java, Rust, etc.

@AkarinLiu
Copy link

If Need Compatible All Platform, Best Thing to do Is using rebuild Without GML Languages.

Do you plan to use other languages instead of GML? For example, Golang, Java, Rust, etc.

@encode42
Copy link
Member

encode42 commented Jul 29, 2023

The program is being rewritten in Python!

Meanwhile, I'm working entirely on the new, rewritten cross-platform version (4.0) using the Qt framework, which will be made open-source as soon as we have a minimally usable version.

#4 (comment)

@AkarinLiu
Copy link

The program is being rewritten in Python!该程序正在用Python重写!

Meanwhile, I'm working entirely on the new, rewritten cross-platform version (4.0) using the Qt framework, which will be made open-source as soon as we have a minimally usable version.同时,我正在使用Qt框架完全致力于新的,重写的跨平台版本(4.0),一旦我们有一个最小可用版本,它将开源。

#4 (comment) #4(评论)

That`s fine, Has Release Timeline?

@AkarinLiu
Copy link

AkarinLiu commented Jul 29, 2023

Do I need Python 3 to install the software?

The program is being rewritten in Python!该程序正在用Python重写!

Meanwhile, I'm working entirely on the new, rewritten cross-platform version (4.0) using the Qt framework, which will be made open-source as soon as we have a minimally usable version.同时,我正在使用Qt框架完全致力于新的,重写的跨平台版本(4.0),一旦我们有一个最小可用版本,它将开源。

#4 (comment) #4(评论)

@tigercoding56
Copy link

Do I need Python 3 to install the software?

The program is being rewritten in Python!该程序正在用Python重写!

Meanwhile, I'm working entirely on the new, rewritten cross-platform version (4.0) using the Qt framework, which will be made open-source as soon as we have a minimally usable version.同时,我正在使用Qt框架完全致力于新的,重写的跨平台版本(4.0),一旦我们有一个最小可用版本,它将开源。

#4 (comment) #4(评论)

it could work with pypy3 , or you could compile it to c using Nuitka

@ReweMC
Copy link

ReweMC commented Aug 20, 2023

For anyone interested in running OBNS on mac os, got it successfully running on macOS Ventura 13.3 using wineskin.

@charlie-sans
Copy link

A year later; how's progress on the cross-platform version?

@TheoCGaming Currently @chenxi050402 is working on making the current version (3.x) compatible with Mac/Linux. However, there are big steps left until we have at least a minimally usable version for these platforms (still lacking extra features such as MIDI input support). Meanwhile, I'm working entirely on the new, rewritten cross-platform version (4.0) using the Qt framework, which will be made open-source as soon as we have a minimally usable version. This, too, is moving slowly, but steadily.

We're the only two active developers in the project, besides @time-killer-games which has been really helpful in providing replacements for some of the Windows-only dependencies! But, as with every complex software project, things take time to do, especially when you don't have a large team behind it. Though, I'm hopeful that as soon as we move out of GameMaker as the main development platform, we'll be able to centralize the development efforts on the new version, and possibly also find more active contributors as well. :)

can i grab the source code from you so i can help out?

@charlie-sans
Copy link

i might also add support for addonss in c#, python, JS with electron if you want no proformance and probs c++

@charlie-sans
Copy link

i also am writiing libs for certain things that i want to use so i can also help out there

@charlie-sans
Copy link

charlie-sans commented Aug 20, 2023

i also have
https://github.com/charlie-sans/VirtualRT virtualRT as a thing.

@encode42 encode42 mentioned this issue Jul 7, 2024
@SoCuul
Copy link

SoCuul commented Dec 15, 2024

@Bentroen I have been using OpenNBS on macOS through CrossOver the past few days, and it's been working almost perfectly.

However, there seems to be a problem with the fluent theme:

  • An error displays twice on-screen when launching the app (if fluent is enabled)
  • The same error displays when switching to the Fluent theme
  • Enabling (though not disabling) transparency effects (if fluent is enabled)
image

After dismissing this messagebox, however, the theme works perfectly without any further issues. I'd say it looks amazing, in all honesty.

image

@OctoFlareDev
Copy link
Collaborator

I have made a macOS test build here for everyone to download, please test for bugs for this version
It's code signed and notarized so it will be likely to pass apple's checks
Note Block Studio.dmg

@Ezekielman
Copy link

I have made a macOS test build here for everyone to download, please test for bugs for this version It's code signed and notarized so it will be likely to pass apple's checks Note Block Studio.dmg

I can't seem to increase the window scale. It's stuck at 75%, and it's hard to read. Is there a way to fix? (Also, should new issues be posted now on this build, or should they stay here?)

@OctoFlareDev
Copy link
Collaborator

I have made a macOS test build here for everyone to download, please test for bugs for this version It's code signed and notarized so it will be likely to pass apple's checks Note Block Studio.dmg

I can't seem to increase the window scale. It's stuck at 75%, and it's hard to read. Is there a way to fix? (Also, should new issues be posted now on this build, or should they stay here?)

You can just report them here or in the discord!
The scaling can be adjusted by cmd+ and cmd-.

@SoCuul
Copy link

SoCuul commented Dec 19, 2024

I've just done a direct comparison between the Windows version running through CrossOver and the native macOS build.

Most things are working (from what I've seen), but the macOS build is lacking a few things atm:

  • Window scaling cuts off text in the upper toolbar
  • The interface feels slightly less "snappy" than the windows one
  • Does not display connected midi devices text
  • Some icons are misalligned (mainly the spacers between tools in the upper toolbar, and the volume knob on the slider)
  • The application name gets replaced with the current song name, so instead of saying "Unsaved song - Note Block Studio" it says "Unsaved song"
  • Colours and UI elements are rendered slightly differently between windows & mac versions
  • No prompt to save before quitting on Command + Q
mcnbs.mp4

macOS Windows
image image
image image

@OctoFlareDev
Copy link
Collaborator

I've just done a direct comparison between the Windows version running through CrossOver and the native macOS build.

Most things are working (from what I've seen), but the macOS build is lacking a few things atm:

  • Window scaling cuts off text in the upper toolbar

  • The interface feels slightly less "snappy" than the windows one

  • Does not display connected midi devices text

  • Some icons are misalligned (mainly the spacers between tools in the upper toolbar, and the volume knob on the slider)

  • The application name gets replaced with the current song name, so instead of saying "Unsaved song - Note Block Studio" it says "Unsaved song"

  • Colours and UI elements are rendered slightly differently between windows & mac versions

  • No prompt to save before quitting on Command + Q

mcnbs.mp4

| macOS | Windows |

| ------- | --------- |

|image | image|

|image | image|

Hi, thank you for testing out the macOS build!

Some of the issues you mentioned are actually intended functionality!
Since there is no midi device library for macOS and linux, these platforms have no way of supporting midi devices right now!
The window title gets replaced by the song name is intended (for the most part) as I have looked other tools on macOS and most of them change their title to the file name. Still, this also changes the program name on the apple bar and there is no way to not change them both at the same time in GameMaker!
As for the no prompt for saving when quitting, macOS does not allow you to wait for a prompt to finish when quitting a GameMaker game, so the songs are automatically saved as autosave files on quitting, and prompted on next opening. You can actually notice it by comparing the autosave prompt on the Windows version!

Again, thank you for pointing out these issues for us!

@EvilSupahFly
Copy link

EvilSupahFly commented Dec 19, 2024

Since there is no midi device library for macOS and linux, these platforms have no way of supporting midi devices right now!

On Linux you should be able to call on ALSA for MIDI. Generally, as long as your drivers are current and correct, the MIDI sequencer is normally accessed via /dev/snd/seq.

At the time of writing, PuleAudio doesn't support MIDI out of the box, but there are wrappers for OSS and PulseAudio available to mediate.

I haven't worked on an Apple computer since my Quadra 950 stopped getting MacOS 9 updates, but from what I understand of the Apple Developer whitepapers, Apple's Core MIDI framework provides the requisite APIs.

@OctoFlareDev
Copy link
Collaborator

Since there is no midi device library for macOS and linux, these platforms have no way of supporting midi devices right now!

On Linux you should be able to call on ALSA for MIDI. Generally, as long as your drivers are current and correct, the MIDI sequencer is normally accessed via /dev/snd/seq.

At the time of writing, PuleAudio doesn't support MIDI out of the box, but there are wrappers for OSS and PulseAudio available to mediate.

I haven't worked on an Apple computer since my Quadra 950 stopped getting MacOS 9 updates, but from what I understand of the Apple Developer whitepapers, Apple's Core MIDI framework provides the requisite APIs.

Hi, accessing MIDI devices in GameMaker require a native library which doesn't exist for macOS and linux right now, to my knowledge. If we want to achieve that, we need to create one on our own. However, we don't have much people who are experienced in writing cross platform libraries for GameMaker on our team yet.

@EvilSupahFly
Copy link

Ah. I misunderstood. I thought it was an OS issue, not a functionality limitation of GMS. That being the case then, what about the GMS Simple MIDI project?

@OctoFlareDev
Copy link
Collaborator

Ah. I misunderstood. I thought it was an OS issue, not a functionality limitation of GMS. That being the case then, what about the GMS Simple MIDI project?

Hmm, this one looks like it will work. I'll test it out when I have time.

@OctoFlareDev
Copy link
Collaborator

TestFlight open!
Join the Note Block Studio beta for macOS!

https://testflight.apple.com/join/hg58hwbM

@SoCuul
Copy link

SoCuul commented Dec 30, 2024

TestFlight open! Join the Note Block Studio beta for macOS!

https://testflight.apple.com/join/hg58hwbM

@OctoFlareDev There seems to be an issue with the update checker. Upon launching the program, it tells me "Version 3.11.0 is available! Do you want to download it?"

@SoCuul
Copy link

SoCuul commented Dec 30, 2024

Also the program defaults on macOS should include:

  • Max frame rate: 120fps
  • Accent colour: 0, 122, 255 (matches apple's human interface guidelines)
  • Window scale: 200%
  • Optimize for high resolutions: true

This provides a good out-of-the-box experience for macOS users, and makes the program look optimal on MacBook retina displays.


Before:
Before applying suggested changes

After:
After applying suggested changes

@OctoFlareDev
Copy link
Collaborator

If anyone is experiencing a black screen not responding when try to open the testflight version, if you can, PLEASE upload the stacktrace here when you attach a debugger from xcode (or if a crash report is generated, please report it in the popup), it's needed for me to reproduce this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests