OpenNoteBlockStudio
OpenNoteBlockStudio copied to clipboard
Feature request: Mac/Linux support
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.
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.
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.
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.
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.
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?
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 :-/
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.
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.
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.
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!!
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.
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...
Could you explain the method in doing so? I'm interested in doing this.
I found the libraries and replaced them with minor coding skills (just switched the code for the libraries)
Why not change using Qt development environment? That can support any platform!
@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 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?
@lachlandk That's great! Thanks for your interest in helping the project. I'll invite you to the repository :)
If you would like some additional help, @Bentroen @lachlandk , I am good with linux and PyQT and interested in helping y'all out.
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
@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 :)
@Bentroen How's the progress on the new version? Any updates, how far along you guys are?
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).
@Bentroen iirc creating a free github organisation allows you to bypass the private repo contributor limit (and add better access control)
I think you can just export/compile it for ubuntu in gamemaker studio.
@TheEpicProgrammer That won't work since NBS uses custom DLL files that are Windows-specific. No matter how the project is exported, DLLs will always stay the same and only work on Windows.
oh
thats sad
@Bentroen how's the progress on the new cross-platform version?
@Mhowser Right now I'm splitting my time between working on the new version, and adding features to the current program (as otherwise it would look abandoned). The tricky part is that a lot must be done before we have even a partially working version, so a lot of time must be spent for the progress to be apparent. To remedy this, I inverted the order of things a little bit: instead of designing the interface, I'm working on the new functionality that was announced for the rewrite. The goal is to gradually incorporate them into the current version - this way the progress will be pushed out as soon as possible, making use of the code that's already there. Once those features are ready, releasing the new version will just be a matter of tying up everything with the new interface.