14 lines
403 B
Text
14 lines
403 B
Text
|
{
|
||
|
var app = Application.currentApplication()
|
||
|
app.includeStandardAdditions = true
|
||
|
|
||
|
{{- if .WindowIcon}}
|
||
|
ObjC.import('Cocoa')
|
||
|
let nsapp = $.NSApplication.sharedApplication
|
||
|
let nsimg = $.NSImage.alloc.initWithContentsOfFile({{json .WindowIcon}})
|
||
|
nsapp.setActivationPolicy($.NSApplicationActivationPolicyRegular)
|
||
|
nsapp.setApplicationIconImage(nsimg)
|
||
|
{{- end}}
|
||
|
|
||
|
app.activate()
|
||
|
}
|