mirror of
https://github.com/bluszcz/cutego.git
synced 2024-09-28 13:15:17 +03:00
fix webengine deployment for linux again
This commit is contained in:
parent
5a85b07e29
commit
b2ff80dbde
1 changed files with 9 additions and 4 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
@ -888,8 +889,14 @@ func deployInternal() {
|
|||
utils.RunCmd(exec.Command("cp", "-R", filepath.Join(libraryPath, "plugins/"), depPath), fmt.Sprintf("copy plugins dir for %v on %v", buildTarget, runtime.GOOS))
|
||||
|
||||
if usesWebEngine {
|
||||
utils.RunCmd(exec.Command("cp", "-R", filepath.Join(libraryPath, "libexec"), depPath), fmt.Sprintf("copy libexec content for %v on %v", buildTarget, runtime.GOOS))
|
||||
utils.RunCmd(exec.Command("cp", "-R", strings.TrimSuffix(filepath.Join(libraryPath, "resources"), "/"), depPath), fmt.Sprintf("copy resources content for %v on %v", buildTarget, runtime.GOOS))
|
||||
utils.RunCmd(exec.Command("cp", filepath.Join(libraryPath, "libexec", "QtWebEngineProcess"), depPath), fmt.Sprintf("copy QtWebEngineProcess for %v on %v", buildTarget, runtime.GOOS))
|
||||
var fileList, err = ioutil.ReadDir(filepath.Join(libraryPath, "resources"))
|
||||
if err != nil {
|
||||
utils.Log.WithError(err).Error("failed to read resource folder")
|
||||
}
|
||||
for _, file := range fileList {
|
||||
utils.RunCmd(exec.Command("cp", "-R", filepath.Join(libraryPath, "resources", file.Name()), depPath), fmt.Sprintf("copy resource %v for %v on %v", file.Name(), buildTarget, runtime.GOOS))
|
||||
}
|
||||
utils.RunCmd(exec.Command("cp", "-R", filepath.Join(libraryPath, "translations/qtwebengine_locales/"), depPath), fmt.Sprintf("copy qtwebengine_locales dir for %v on %v", buildTarget, runtime.GOOS))
|
||||
}
|
||||
}
|
||||
|
@ -1135,13 +1142,11 @@ func linuxSH() string {
|
|||
fmt.Fprintf(bb, "export QT_PLUGIN_PATH=$%v\n", filepath.Join(miscDir, "plugins"))
|
||||
fmt.Fprintf(bb, "export QML_IMPORT_PATH=%v\n", filepath.Join(miscDir, "qml"))
|
||||
fmt.Fprintf(bb, "export QML2_IMPORT_PATH=%v\n", filepath.Join(miscDir, "qml"))
|
||||
fmt.Fprintf(bb, "export QTWEBENGINEPROCESS_PATH=%v\n", filepath.Join(miscDir, "libexec"))
|
||||
} else {
|
||||
fmt.Fprint(bb, "export LD_LIBRARY_PATH=$dirname/lib\n")
|
||||
fmt.Fprint(bb, "export QT_PLUGIN_PATH=$dirname/plugins\n")
|
||||
fmt.Fprint(bb, "export QML_IMPORT_PATH=$dirname/qml\n")
|
||||
fmt.Fprint(bb, "export QML2_IMPORT_PATH=$dirname/qml\n")
|
||||
fmt.Fprintf(bb, "export QTWEBENGINEPROCESS_PATH=$dirname/libexec\n")
|
||||
}
|
||||
fmt.Fprint(bb, "$dirname/$appname \"$@\"\n")
|
||||
|
||||
|
|
Loading…
Reference in a new issue