chore: fix qrc resource bloat
let the `generate-rcc.go` skip files under `vendor` and `tests` subdirs; decreases the binary size and thus RAM usage by ~130 MB! ``` $ ls -al resources.* -rw-r--r--. 1 ltinkl ltinkl 81950109 Mar 8 14:47 resources.rcc -rw-r--r--. 1 ltinkl ltinkl 215385428 Mar 8 12:35 resources.rcc.bloat ```
This commit is contained in:
parent
0e92b69bc5
commit
948a1fb085
|
@ -24,7 +24,7 @@ var qrcExtensions = map[string]bool{
|
||||||
".qm": true,
|
".qm": true,
|
||||||
".txt": true,
|
".txt": true,
|
||||||
".gif": true,
|
".gif": true,
|
||||||
".json": true,
|
".json": true,
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -52,6 +52,9 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if info.IsDir() && (info.Name() == "vendor" || info.Name() == "tests") {
|
||||||
|
return filepath.SkipDir
|
||||||
|
}
|
||||||
if !info.IsDir() {
|
if !info.IsDir() {
|
||||||
ext := filepath.Ext(path)
|
ext := filepath.Ext(path)
|
||||||
base := filepath.Base(path)
|
base := filepath.Base(path)
|
||||||
|
|
Loading…
Reference in New Issue