mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 06:16:32 +00:00
ccd8c5b65f
Implement a prototype of integrating [WalletConnect Web SDK]() - integrate WalletConnect Web SDK using Node.js and packing it using [webpack](https://webpack.js.org/guides/getting-started/) - this way, we achieve the same versioning strategy for the SDK - add WalletConnectSDK view - it is used to load the web SDK via a WebView (validated working on Mac and Windows) - add new app dependency of WebView QT - also update vendor packages `Dotherside` and `nimqml` to add required WebView::initialize API used to initialize the WebView integration at the app start - add WalletConnectPage to Storybook for quick prototyping - Also add dependency for WebView Qt lib - index.js is the wrapper used to provide a simple stateful interface with the WC SDK - Entry in ui/generate-rcc.go ensures the node_modules cache is excluded from the resource file Notes: - Added `com.apple.security.cs.allow-jit` entitlement when signing the app package. This allows Execution of JIT-compiled Code Entitlement required by the fast-path of the JavaScriptCore framework on MacOS platforms. - Keep some debugging entries expected to help debugging Linux package - Removed outdated `DerivationPathInputRegressionTests` qml test Closes #12301
77 lines
1.6 KiB
Go
77 lines
1.6 KiB
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"log"
|
|
"os"
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
var qrcExtensions = map[string]bool{
|
|
".qml": true,
|
|
".js": true,
|
|
".svg": true,
|
|
".png": true,
|
|
".ico": true,
|
|
".icns": true,
|
|
".mp3": true,
|
|
".wav": true,
|
|
".otf": true,
|
|
".ttf": true,
|
|
".webm": true,
|
|
".qm": true,
|
|
".txt": true,
|
|
".gif": true,
|
|
".json": true,
|
|
".mdwn": true,
|
|
}
|
|
|
|
func main() {
|
|
sourceDirName := flag.String("source", "", "source dir containing ui files")
|
|
qrcFileName := flag.String("output", "resources.qrc", "output filename")
|
|
flag.Parse()
|
|
if flag.NFlag() == 0 {
|
|
flag.Usage()
|
|
return
|
|
}
|
|
|
|
qrcFile, err := os.Create(*qrcFileName)
|
|
if err != nil {
|
|
log.Fatalf("Failed creating qrc file: %s", err)
|
|
}
|
|
defer qrcFile.Close()
|
|
|
|
qrcFile.WriteString("<!DOCTYPE RCC>\n")
|
|
qrcFile.WriteString("<RCC version=\"1.0\">\n")
|
|
qrcFile.WriteString(" <qresource>\n")
|
|
|
|
counter := 0
|
|
err = filepath.Walk(*sourceDirName,
|
|
func(path string, info os.FileInfo, err error) error {
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if info.IsDir() && (info.Name() == "vendor" || info.Name() == "tests" || info.Name() == "StatusQ" || info.Name() == "node_modules") {
|
|
return filepath.SkipDir
|
|
}
|
|
if !info.IsDir() {
|
|
ext := filepath.Ext(path)
|
|
base := filepath.Base(path)
|
|
if qrcExtensions[ext] || base == "qmldir" {
|
|
counter++
|
|
fixedPath := strings.ReplaceAll(path, "\\", "/")
|
|
fixedPath = "./" + strings.TrimPrefix(fixedPath, *sourceDirName)
|
|
qrcFile.WriteString(" <file>" + fixedPath + "</file>\n")
|
|
}
|
|
}
|
|
return nil
|
|
})
|
|
|
|
qrcFile.WriteString(" </qresource>\n")
|
|
qrcFile.WriteString("</RCC>")
|
|
|
|
fmt.Printf("%d resources added\n", counter)
|
|
}
|