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