package main import ( "os" "path" "io/ioutil" ) var plist = ` CFBundleName yarr CFBundleDisplayName yarr CFBundleIdentifier nkanaev.yarr CFBundleVersion 1.0 CFBundlePackageType APPL CFBundleExecutable yarr CFBundleIconFile AppIcon CFBundleIconName AppIcon LSApplicationCategoryType public.app-category.news NSHighResolutionCapable True CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString 1.1 LSMinimumSystemVersion 10.13 LSUIElement NSHumanReadableCopyright Copyright © 2020 nkanaev. All rights reserved. ` func main() { outdir := os.Args[1] outfile := "yarr" binDir := path.Join(outdir, "yarr.app", "Contents/MacOS") resDir := path.Join(outdir, "yarr.app", "Contents/Resources") plistPath := path.Join(outdir, "yarr.app", "Contents/Info.plist") os.MkdirAll(binDir, 0700) os.MkdirAll(resDir, 0700) f, _ := ioutil.ReadFile(path.Join(outdir, outfile)) ioutil.WriteFile(path.Join(binDir, outfile), f, 0700) ioutil.WriteFile(plistPath, []byte(plist), 0600) }