From 71ead4de0149d710e10b3970b583625f0f2dcb21 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 13 Dec 2023 09:03:20 -0300 Subject: [PATCH] Debugging bundle action. --- PKGBUILD.mingw | 6 ++++++ win/bundle.common | 18 +++++++++++++++--- win/bundle.msys | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/PKGBUILD.mingw b/PKGBUILD.mingw index ca679a1f..3e52be16 100644 --- a/PKGBUILD.mingw +++ b/PKGBUILD.mingw @@ -61,6 +61,12 @@ build() { package() { cd $srcdir/$pkgname-$pkgver make DESTDIR="${pkgdir}" install + + install \ + -Dm644 \ + "$srcdir/$pkgname-$pkgver/win/pw3270.nsi" \ + "${pkgdir}${MINGW_PREFIX}/share/${pkgname}" + install \ -Dm644 \ "$startdir/LICENSE" \ diff --git a/win/bundle.common b/win/bundle.common index 70030447..c5fc4974 100644 --- a/win/bundle.common +++ b/win/bundle.common @@ -340,6 +340,17 @@ make_txz() { } make_nsis() { + + if [ ! -e "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi" ]; then + cp -v \ + "${buildroot}${MINGW_PREFIX}/share/${PACKAGE_NAME}/${PACKAGE_NAME}.nsi" \ + "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi" + if [ "$?" != "0" ]; then + echo "Cant copy nsis script" + exit -1 + fi + fi + makensis \ -INPUTCHARSET UTF8 \ -DWITHIPC \ @@ -347,9 +358,10 @@ make_nsis() { -DWITHSDK \ -DPKGDIR=${buildroot}${MINGW_PREFIX} \ ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi - if [ "$?" != "0" ]; then - echo "Cant build nsis package" - fi + if [ "$?" != "0" ]; then + echo "Cant build nsis package" + exit -1 + fi if [ ! -z $(which gh) ]; then argument "upload" > /dev/null diff --git a/win/bundle.msys b/win/bundle.msys index fb4e20dc..f911c36d 100755 --- a/win/bundle.msys +++ b/win/bundle.msys @@ -21,6 +21,13 @@ # Load bundle functions . "$(dirname $(readlink -f "${0}"))/bundle.gtk3" +argument "help" > /dev/null +if [ "$?" == "0" ]; then + echo " --install-requires Install required packages" + echo " --build Build application from source" + echo " --configure Run configure" +fi + argument "install-requires" > /dev/null if [ "$?" == "0" ]; then pacman -S --needed \ @@ -55,6 +62,34 @@ do fi done +argument "build" > /dev/null +if [ "$?" == "0" ]; then + + NOCONFIGURE=1 ./autogen.sh + if [ "$?" != "0" ]; then + echo "Autogen failed" + exit -1 + fi + + ${MINGW_PACKAGE_PREFIX}-configure + if [ "$?" != "0" ]; then + echo "Configure failed" + exit -1 + fi + + build_package + +else + + argument "configure" > /dev/null + ./autogen.sh + if [ "$?" != "0" ]; then + echo "Configure failed" + exit -1 + fi + +fi + install_gtk3_runtime install_license make_packages