mirror of
https://github.com/mappu/miqt.git
synced 2025-02-08 22:10:23 +00:00
rcc: add -Qt6 flag
This commit is contained in:
parent
b61e12fcc9
commit
78c1178a62
@ -21,6 +21,7 @@ func main() {
|
|||||||
outputGo := flag.String("OutputGo", "", "(Optional) Path to .go output file. If omitted, interred from the input file path")
|
outputGo := flag.String("OutputGo", "", "(Optional) Path to .go output file. If omitted, interred from the input file path")
|
||||||
packageName := flag.String("Package", "main", "Package to use in generated Go files")
|
packageName := flag.String("Package", "main", "Package to use in generated Go files")
|
||||||
variableName := flag.String("VariableName", "_resourceRcc", "Temporary global variable name for loading embedded data")
|
variableName := flag.String("VariableName", "_resourceRcc", "Temporary global variable name for loading embedded data")
|
||||||
|
useQt6 := flag.Bool("Qt6", false, "Use Qt 6 instead of Qt 5")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
// Check if input file exists
|
// Check if input file exists
|
||||||
@ -52,6 +53,11 @@ func main() {
|
|||||||
|
|
||||||
// Create Go file that loads the resource
|
// Create Go file that loads the resource
|
||||||
|
|
||||||
|
miqtImport := `"github.com/mappu/miqt/qt"`
|
||||||
|
if *useQt6 {
|
||||||
|
miqtImport = `qt "github.com/mappu/miqt/qt6"`
|
||||||
|
}
|
||||||
|
|
||||||
goSrcData := `
|
goSrcData := `
|
||||||
package ` + *packageName + `
|
package ` + *packageName + `
|
||||||
|
|
||||||
@ -60,7 +66,7 @@ package ` + *packageName + `
|
|||||||
import (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
|
|
||||||
"github.com/mappu/miqt/qt"
|
` + miqtImport + `
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed ` + *outputRcc + `
|
//go:embed ` + *outputRcc + `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user