rcc: support rebuilding with go generate

This commit is contained in:
mappu 2024-10-03 18:51:11 +13:00
parent a3d527ca6b
commit 699f1389e2

View File

@ -15,7 +15,7 @@ main() {
local ARG_DEST_RCC="${2:-$(basename -s .qrc "$ARG_INPUT_QRC").rcc}" local ARG_DEST_RCC="${2:-$(basename -s .qrc "$ARG_INPUT_QRC").rcc}"
local ARG_DEST_GO="${3:-$(basename -s .rcc "$ARG_DEST_RCC").go}" local ARG_DEST_GO="${3:-$(basename -s .rcc "$ARG_DEST_RCC").go}"
local ARG_PACKAGENAME="${4:-main}" local ARG_PACKAGENAME="${4:-main}"
local ARG_VARIABLENAME="${4:-_resourceRcc}" local ARG_VARIABLENAME="${5:-_resourceRcc}"
if [[ ! -f ${ARG_INPUT_QRC} ]] ; then if [[ ! -f ${ARG_INPUT_QRC} ]] ; then
echo "Input file ${ARG_INPUT_QRC} not found" >&2 echo "Input file ${ARG_INPUT_QRC} not found" >&2
@ -29,6 +29,8 @@ main() {
cat > "${ARG_DEST_GO}" <<EOF cat > "${ARG_DEST_GO}" <<EOF
package ${ARG_PACKAGENAME} package ${ARG_PACKAGENAME}
//go:generate miqt-rcc.sh $@
import ( import (
"embed" "embed"