asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
129 stars 68 forks source link

cant build 10.15 and 11 support together #85

Closed si458 closed 3 years ago

si458 commented 3 years ago

im trying to identify why i cant buildle an app for both 10.15 and 11 using only Mac 11?

ive updated our github actions to use Mac 11 but when building a bundle it loses support for 10.15 and wont run unless the end user has Mac 11 installed

if i change our github actions to use Mac 10.15, it works no problem?

our build command is simply

astilectron-bundler -ldflags -X:${REPO}/pkg/version.Version=${VERSION},${REPO}/pkg/version.Revision=${REVISION},${REPO}/pkg/version.Branch=${BRANCH},${REPO}/pkg/version.BuildUser=${BUILDUSER},${REPO}/pkg/version.BuildDate=${BUILDTIME}
chinenual commented 3 years ago

have you tried setting flags in bundler.json?

Mine look like:

{
    "app_name": "MyApp",
    "version_electron" : "8.2.5",
    "icon_path_darwin": "resources/icon.icns",
    "icon_path_linux": "resources/icon-64x64.png",
    "icon_path_windows": "resources/icon.ico",
    "ldflags":{"linkmode":["internal"]},
    "environments": [
    {"arch" : "amd64",
     "os"   : "linux"},
    {"arch" : "arm",
     "os"   : "linux"},
    {"arch" : "386",
     "os"   : "linux"},
    {"arch" : "386",
     "os"   : "windows"},
    {"arch" : "amd64", 
     "os"   : "darwin",
     "env"  : {
         "CGO_ENABLED": "1",
             "CGO_CFLAGS": "-mmacosx-version-min=10.11",
             "CGO_LDFLAGS": "-mmacosx-version-min=10.11"
     }}
  ]
}
si458 commented 3 years ago

@chinenual thank you! legend! worked straight away! have a 🍺 on me please!