I want the entire code for my entire Mac app to look like this .swift script:
#!/path/to/swift
import Cocoa
// The rest of my entire Mac app.
Because we don't yet have binary stability, I guess I'd have to put the swift binary (which runs the above .swift script) and a bunch of .dylibs into the Mac .app bundle somehow.
Why do you want to do this?
What to you mean by “binary stability?”
Why not use Xcode to build an application using the swift compiler?
···
On Jun 20, 2017, at 10:34 AM, tuuranton--- via swift-users <swift-users@swift.org> wrote:
I want the entire code for my entire Mac app to look like this .swift script:
#!/path/to/swift
import Cocoa
// The rest of my entire Mac app.
Because we don't yet have binary stability, I guess I'd have to put the swift binary (which runs the above .swift script) and a bunch of .dylibs into the Mac .app bundle somehow.
It is not. The first problem is that there is no value of "/path/to/swift" that will work everywhere.
···
On Jun 20, 2017, at 7:34 AM, tuuranton--- via swift-users <swift-users@swift.org> wrote:
I want the entire code for my entire Mac app to look like this .swift script:
#!/path/to/swift
import Cocoa
// The rest of my entire Mac app.
Because we don't yet have binary stability, I guess I'd have to put the swift binary (which runs the above .swift script) and a bunch of .dylibs into the Mac .app bundle somehow.
It gets distributed as part of Xcode (which is free, but not preloaded on anything) or as a download from swift.org or GitHub now. Unless they port iOS's playgrounds app to macOS, I'm not sure what would motivate apple to change that in the future.
- Dave
···
On Jun 22, 2017, at 02:55, tuuranton--- via swift-users <swift-users@swift.org> wrote:
> It is not. The first problem is that there is no
> value of "/path/to/swift" that will work everywhere.
Makes sense, but I guess one day macOS will ship with swift in a standard location like /usr/bin/swift so that would no longer be a problem.