-
Notifications
You must be signed in to change notification settings - Fork 757
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
An update to making macOS standalones. #2881
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a merge with
https://github.com/supercollider/supercollider/blob/master/HelpSource/Guides/standalones.schelp
especially the motivation section.
Also, we should discuss its location in the HelpSource
directory (Tutorial? Guide?)
all in all I could not complete the review because of an error in step 3 (class did not compile successfully)
This Guide is for exporting copies of an existing SC3 setup, | ||
for at least two scenarios: | ||
|
||
A - Freezing an SC-based setup for non-expert users, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not make this a list::
?
This set of scripts creates a SuperCollider-based | ||
Standalone app in a few basic steps: | ||
|
||
1. copy the open SuperCollider.app or SC3-derived standalone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not make this a list::
?
|
||
subsection:: What to prepare | ||
|
||
* have your system ready with all desired quarks installed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great to have such a minimal startup file listing here... something like
s.waitForBoot{
{
Line.kr(1, 0, 10, doneAction: 2) * SinOsc.ar(1000) * EnvGen.ar(Env.perc(0.01, 0.25), Impulse.kr(2), 0.1)!2
}.play;
}
~newAppName = "Utopia_GenComp_39d"; | ||
~newAppLocation = "~/Desktop".standardizePath; | ||
|
||
// some helper functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add
// nothing to be changed below this line
|
||
// 3. *** time for the first wakeup kiss *** // | ||
unixCmd("open" + ~pathToNewApp); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got lots of
ERROR: duplicate Class found: 'BinaryOpXStream'
[...]
ERROR: There is a discrepancy.
numClassDeps 3482 gNumClasses 4752
Library has not been compiled successfully.
Library has not been compiled successfully.
maybe because I have a custom LanguageConfig
file?
so I cannot test further...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @LFSaw,
Did I address all your requests in todays commits, or is anything still missing?
For the conflict, can you please test again whether it works now?
If your config is pointing to a git repo and not the internal classlib, things can go wrong.
So best to make a test config with internal classlib and help, plus a few quark includePaths.
thanks, adc
Or just replace that version. It is not possible to open that guide in a sc-version that still supports the feature described there 😄 And I don't think anybody is able to run the SC-version required for the feature (3.4) let alone build it. |
IMHO a mention of GPL in the standalone guide would be beneficial. |
merged with standalones.schelp, pointed out GPL, lists done with list:: , added basic startup file example.
@LFSaw @bagong, Unfortunately, one puzzling question came back again: I would appreciate any hunches, ideas, hints for what could cause this ... |
and more explanatory comments and tests added
@LFSaw - could be in Tutorials or Guides, both is fine with me. |
I will take a look at this today! No idea re: userAppSupportDir, I will see if I can figure out anything about that. Thanks for all your work on this @adcxyz! |
Unfortunately, I cannot have a close look atm... too much other things here. Hope someone else will jump in and try building a standalone. Great work anyhow! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! i'm not going to review this really thoroughly since you know what you're doing and a help file can't really hurt anyone anyway. but just to be safe, a few unix commands could be made less destructive so that someone experimenting with the code is less likely to shoot themselves in the foot.
HelpSource/Guides/standalones.schelp
Outdated
code:: | ||
/* | ||
// if it failed, delete the app | ||
unixCmd("rm -r" + quote(~pathToNewApp)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a safer alternative to rm -r
? i think there's a way to move something to trash from the command line on mac, but you gotta install something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brew install trash
, but idk, I think this could also just be prefixed by a check that ~pathToNewApp has a good value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or rm -ir
like you've suggested above—it'll check on each directory to be deleted rather than on each file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pathToNewApp = "*"
you get a pretty bad command, don't you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is File.delete(path)
, and path.pathMatch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a look at install
, a really great alternative to mv
and thelike...
HelpSource/Guides/standalones.schelp
Outdated
}; | ||
~writeText = { |path, string| File(path, "w").write(string).close; }; | ||
~copyFolder = { |orig, dest| | ||
var str = "cp -r" + quote(orig) + quote(dest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp -ir
?
HelpSource/Guides/standalones.schelp
Outdated
~pathsToCopy.do { |path| | ||
unixCmd( | ||
"cd" + quote(~newAppQuarksDir) ++ ";" | ||
" cp -r" + quote(path).postln + "."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp -ir
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a look at install
, a really great alternative to mv
and thelike...
HelpSource/Guides/standalones.schelp
Outdated
// b. rename the binary file: | ||
"renaming macos binary to: ".post; | ||
// fixups in the new app - 2. rename the binary inside the app folder | ||
unixCmd("mv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mv -i
?
OK, thanks for the tips!
|
removed obsolete help file images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code works perfectly on my machine, thank you so much for adding this material! There are two small issues I noticed; I think this can be merged once those are fixed.
HelpSource/Guides/standalones.schelp
Outdated
~pathsToCopy.do { |path| | ||
unixCmd( | ||
"cd" + quote(~newAppQuarksDir) ++ ";" | ||
" cp -ir" + quote(path).postln + "."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I get a parse error. I think you need to add ++
to the end of the line above, possibly also a newline if that's what you were going for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird - I dont get a parse error here (3.9 dev). SO, I added the ++ as suggested just to make sure,
and it still runs fine.
HelpSource/Guides/standalones.schelp
Outdated
|
||
Customize the "Standalone Resources" directory, which is located at the root of the SuperCollider source directory. Any files you put in this directory will override the files originating from the SuperCollider source at the same destination. | ||
// TO PREPARE, CHECK YOUR CURRENT config in Preferences->Interpreter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you intended this to go in the code:: block below; when rendered as-is this does not look well-formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, done.
Also, sorry it took me so long to look at this. I planned to give it a try Monday, but a friend visited unexpectedly :) |
ok, done, ready to merge :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks! parse error might have been because I was copy-pasting from the help window, so I got nbsp's (possibly CRLF? not sure)
thank you! |
happy to have it finalized :-) |
Hi,
following @brianlheim asking about old standalone-related code, and requests to make my
related scripts official, I updated and tested my scripts for making simple OSX standalones.
They are now in the Guides help file proposed here, and could go into 3.9.
Please test and let me know about any snags, and add pointers to other related projects, such as @miguel-negrao 's work on the project feature.
best adc