mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[linux] get compiling working
This commit is contained in:
@@ -295,10 +295,12 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
if options.Platform != "windows" {
|
||||
// Use upsertEnv so we don't overwrite user's CGO_CFLAGS
|
||||
cmd.Env = upsertEnv(cmd.Env, "CGO_CFLAGS", func(v string) string {
|
||||
if v != "" {
|
||||
v += " "
|
||||
if options.Platform == "darwin" {
|
||||
if v != "" {
|
||||
v += " "
|
||||
}
|
||||
v += "-mmacosx-version-min=10.13"
|
||||
}
|
||||
v += "-mmacosx-version-min=10.13"
|
||||
return v
|
||||
})
|
||||
// Use upsertEnv so we don't overwrite user's CGO_CXXFLAGS
|
||||
@@ -313,7 +315,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
cmd.Env = upsertEnv(cmd.Env, "CGO_ENABLED", func(v string) string {
|
||||
return "1"
|
||||
})
|
||||
if runtime.GOOS == "darwin" {
|
||||
if options.Platform == "darwin" {
|
||||
// Set the minimum Mac SDK to 10.13
|
||||
cmd.Env = upsertEnv(cmd.Env, "CGO_LDFLAGS", func(v string) string {
|
||||
if v != "" {
|
||||
|
||||
@@ -27,6 +27,8 @@ func packageProject(options *Options, platform string) error {
|
||||
err = packageApplicationForDarwin(options)
|
||||
case "windows":
|
||||
err = packageApplicationForWindows(options)
|
||||
case "linux":
|
||||
err = packageApplicationForLinux(options)
|
||||
default:
|
||||
err = fmt.Errorf("packing not supported for %s yet", platform)
|
||||
}
|
||||
@@ -204,6 +206,29 @@ func packageApplicationForWindows(options *Options) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func packageApplicationForLinux(options *Options) error {
|
||||
// Generate icon
|
||||
//var err error
|
||||
//err = generateIcoFile(options)
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
//
|
||||
//// Ensure Manifest is present
|
||||
//err = generateManifest(options)
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
//
|
||||
//// Create syso file
|
||||
//err = compileResources(options)
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func generateManifest(options *Options) error {
|
||||
filename := options.ProjectData.Name + ".exe.manifest"
|
||||
manifestFile := filepath.Join(options.ProjectData.Path, "build", "windows", filename)
|
||||
|
||||
Reference in New Issue
Block a user