Merge branch 'next' of github.com:OliveTin/OliveTin into next

This commit is contained in:
jamesread 2026-06-29 11:00:32 +01:00
commit 043f16beae
4 changed files with 22 additions and 2 deletions

View File

@ -10,7 +10,7 @@ builds:
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
binary: OliveTin binary: OliveTin
main: main.go main: .
dir: service dir: service
goos: goos:
- linux - linux

View File

@ -17,7 +17,7 @@
<MajorUpgrade <MajorUpgrade
AllowSameVersionUpgrades="yes" AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A newer version of OliveTin is already installed." /> DowngradeErrorMessage="A newer version of OliveTin is already installed." />
<MediaTemplate /> <MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="OliveTin" Level="1"> <Feature Id="ProductFeature" Title="OliveTin" Level="1">
<ComponentGroupRef Id="CG.AppFiles" /> <ComponentGroupRef Id="CG.AppFiles" />

View File

@ -63,6 +63,15 @@ if [[ ! -f "${SOURCE_ROOT}/config.yaml" ]]; then
exit 1 exit 1
fi fi
if ! command -v objdump >/dev/null; then
echo "objdump is required to verify OliveTin.exe Windows resources" >&2
exit 1
fi
if ! objdump -h "${SOURCE_ROOT}/OliveTin.exe" | grep -q '[[:space:]]\.rsrc[[:space:]]'; then
echo "OliveTin.exe is missing embedded Windows resources (.rsrc); use main: . in .goreleaser.yml" >&2
exit 1
fi
mkdir -p "${APP_STAGING}/webui" mkdir -p "${APP_STAGING}/webui"
cp "${SOURCE_ROOT}/OliveTin.exe" "${APP_STAGING}/" cp "${SOURCE_ROOT}/OliveTin.exe" "${APP_STAGING}/"
cp -a "${SOURCE_ROOT}/webui/." "${APP_STAGING}/webui/" cp -a "${SOURCE_ROOT}/webui/." "${APP_STAGING}/webui/"
@ -89,4 +98,9 @@ wixl \
"${SCRIPT_DIR}/OliveTin.wxs" \ "${SCRIPT_DIR}/OliveTin.wxs" \
"${HEAT_WXS}" "${HEAT_WXS}"
if ! msiinfo export "${MSI_PATH}" Media 2>/dev/null | grep -q '#cab1.cab'; then
echo "MSI cabinet is not embedded (expected #cab1.cab in Media table); check EmbedCab in OliveTin.wxs" >&2
exit 1
fi
echo "Built ${MSI_PATH}" echo "Built ${MSI_PATH}"

View File

@ -91,4 +91,10 @@ trap 'rm -rf "${WORK_DIR}" "${TOOL_BIN%/*}"' EXIT
rm -f "${SERVICE_DIR}"/resource_windows_*.syso rm -f "${SERVICE_DIR}"/resource_windows_*.syso
mv "${WORK_DIR}"/resource_windows_*.syso "${SERVICE_DIR}/" mv "${WORK_DIR}"/resource_windows_*.syso "${SERVICE_DIR}/"
if ! compgen -G "${SERVICE_DIR}/resource_windows_*.syso" >/dev/null; then
echo "goversioninfo did not produce resource_windows_*.syso files" >&2
exit 1
fi
echo "Wrote Windows resource files to ${SERVICE_DIR}" echo "Wrote Windows resource files to ${SERVICE_DIR}"