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 · 65 comments
Open

Feature request: Mac/Linux support #4

Boobies opened this issue Mar 5, 2019 · 65 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).

@bdotsamir
Copy link

bdotsamir commented Jan 16, 2022

Seems that while starting this app via wine on my machine it takes exclusive control over the audio card and will prevent anything else from playing sounds until after the app is closed. The reverse is also true: while I have other applications open, ONBS will not play sounds. Not sure if this is the place to put this problem, but is anyone else having this issue?

uname -a: Linux (hostname) 5.15.13-arch1-1 #1 SMP PREEMPT Wed, 05 Jan 2022 16:20:59 +0000 x86_64 GNU/Linux

@time-killer-games
Copy link

Seems that while starting this app via wine on my machine it takes exclusive control over the audio card and will prevent anything else from playing sounds until after the app is closed. The reverse is also true: while I have other applications open, ONBS will not play sounds. Not sure if this is the place to put this problem, but is anyone else having this issue?

uname -a: Linux (hostname) 5.15.13-arch1-1 #1 SMP PREEMPT Wed, 05 Jan 2022 16:20:59 +0000 x86_64 GNU/Linux

That would be a problem with WINE, you posted in the wrong place I believe. :P

@bdotsamir
Copy link

Seems that while starting this app via wine on my machine it takes exclusive control over the audio card and will prevent anything else from playing sounds until after the app is closed. The reverse is also true: while I have other applications open, ONBS will not play sounds. Not sure if this is the place to put this problem, but is anyone else having this issue?

uname -a: Linux (hostname) 5.15.13-arch1-1 #1 SMP PREEMPT Wed, 05 Jan 2022 16:20:59 +0000 x86_64 GNU/Linux

That would be a problem with WINE, you posted in the wrong place I believe. :P

Ah, well, thanks for responding at least. Hopefully some poor soul in the future on their second page on Google will see this post and be that much closer to solving their problem. Hello future!

@time-killer-games
Copy link

time-killer-games commented Jan 18, 2022

I think the person who gave me a thumbs down doesn't understand what I said is actually relevant. They shouldn't complain if they are too lazy to report bugs to the right people. We have nothing to do with WINE. Expecting us to fix Wine's bugs is like expecting Microsoft to fix Apple's version of iTunes that just so happens to run on Windows. That is not Microsoft's problem and would be blaming the wrong people 100%.

My suggestion is find out what underlying C++ api is actually being used by the audio playback in the app, contact someone who knows, and once you have that information, attach that information to a WINE bug report, and give them information about your distro's setup or any other information that might be useful, which is the only way it's going to get fixed, I am trying to help and not be provoking, understand that.

That said, if you can wait like others have mentioned I am one of the users looking to help give native linux support so you won't need to rely on buggy workarounds like WINE. Don't bite the hand that feeds you.

@TheoCGaming
Copy link

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

@time-killer-games
Copy link

Unfortunately, there's only like 2 or 3 active developers working on this most the time as far as I can tell, I don't really count as one of those primary 2 or 3. The most I've done is fill in a few hollow spots that game maker lacked. Hopefully the other developers can give you a better idea of where we are at.

@time-killer-games
Copy link

That being said, i would like to help more proactively with this project and I will try to help more in any way I can to keep things moving in the direction you all want it to get to. :)

@mrmelon54
Copy link

That's cool thanks

@Bentroen
Copy link
Member

Bentroen commented Jan 10, 2023

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. :)

@sanjerno
Copy link

So I figured out how to run OBNS on linux with pretty much native performance! I have tested on ZorinOS and Kubuntu, but should work for essentially any distro.

image

Steps to reproduce:

  • Download EXE from https://opennbs.org/
  • Download Bottles from https://usebottles.com/ or by flatpak and open it
  • Navigate to the "Bottles" tab in the top-middle-left
  • Click the "+" on the top-left and leave it on" gaming (name it whatever you want) and click create (This will take a sec)
  • It will then automatically open your app up for you
  • Find the "Settings" tab in the middle-ish and in the first section called "Components" change the runner to sys-wine-x.x.x (you may have to install wine on your system to change this setting but idk)
  • Then click the back arrow and hit the big blue button that says "Run Executable..."
  • It will prompt you to select a file, make sure you go to your downloads folder and select "Minecraft.Note.Block.Studio.exe"
  • Then go through the installation as normal
  • When you finish setup and launch it, it will say "invalid name". This will show up twice every time you open ONBS, but just click "Ok" twice and everything should just work!
  • If you want it to show up as an app, in your app mainscreen under programs hit the three dots on the right and click "Add Desktop Entry"

You now have ONBS on linux!

@TheoCGaming
Copy link

TheoCGaming commented Jan 12, 2023 via email

@EvilSupahFly
Copy link

I've been a Linux user since 2000, and I'm pleased by the (slowly) increasing number of things - like this - that are making their way over, so I've been eagerly watching this particular thread since it was opened. And while I appreciate the most recent work-around provided by @santisnotboss, @TheoCGaming is right - what we really want is full native support, and that can sometimes take a lot of time.

@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
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