I am following the ‘Making Standalone Applications’ tutorial of the Help Browser. It does not mention how to remove the IDE window. I would like to close it, preferably before ‘booting’ the interpreter so that it never appears.
In my startup file I would like only one line to be executed:
which opens my own GUI. It is essentially a MIDI sequencer so even no need to boot the server or anything like that.
If you run the IDE (which is what happens when you double-click on the normal SC icon), then you have requested an editor session and of course you’re going to get an editor window. I’m not on Mac, so I’m not totally sure, but it looks to me like the standalone application guide a/ is Mac-only (so, if you’re interested in distributing your work cross-platform, do not follow the instructions in it!) and b/ seems perhaps not to bypass the editor.
I would suggest to run sclang directly, and not touch the editor at all.
Create a shell script (or a Windows batch file) with:
Make it executable, and then you have something you can double-click and run.
In Linux and probably Mac (not sure about Windows), the shell script has to run in a terminal window – this is where sclang posted output will appear. I don’t know how to suppress this. But, if your SC script opens a fullscreen GUI window, then the terminal window will be hidden pretty quickly.
The problem is that it is using supercollider 3.6, and on the bottom of the page it says that it has some issues linking to the QT libraries. Too bad making a standalone seems to be quite a hassle to do on the latest branch. I’ll see if I can build from 3.6 and merge in what I need myself (LinkClock for example).
It’s possible to package sclang so that it’s launched directly from the icon on mac. You can start from the existing SuperCollider.app package, but modify the Info.plist so that it points to the sclang executable instead - I believe some additional modifications are required to pass the right command line flags. Info.plist is pretty well documented.
This is an old branch that build a standalone sclang app package as part of the regular cmake build process. It’s very far out of date, and was not totally finished, but there are a few subtle C++ changes related to running as standalone - if you get in deep territory, these might give some clues
That’s irrelevant. sclang has for years supported command-line usage as sclang path/to/script.scd and that feature has not been removed in any recent versions.
It looks like that repository is trying to jigger things around in a MacOS .app bundle – which is fine to do for that OS, but that’s separate from the question of whether you can run sclang without an editor window. You can, on all OSes, today, with all versions available for several years.
After having a sudden increase of work while dealing with this issue (my excuses for the inactivity of this thread), I decided to contact @Dionysis, who then made the required adjustments to his project to make it run with QT!
So I can definitely recommend his method.