From 6719e7698d623bfacd381578cea34c2d88f0045b Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 19 May 2023 10:45:41 -0300 Subject: [PATCH] Updating windows bundler. --- win/bundle.common | 32 ++++++++++++++++++++++++++------ win/bundle.cross | 17 ----------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/win/bundle.common b/win/bundle.common index b016a76..074264c 100644 --- a/win/bundle.common +++ b/win/bundle.common @@ -332,6 +332,7 @@ make_nsis() { -DWITHIPC \ -DWITHPLUGINS \ -DWITHSDK \ + -DPKGDIR=${buildroot}${MINGW_PREFIX} \ ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi if [ "$?" != "0" ]; then echo "Cant build nsis script" @@ -357,7 +358,7 @@ make_nsis() { install_license() { mkdir -p "${buildroot}${MINGW_PREFIX}/usr/share/${PACKAGE_NAME}" - cp "${srcdir}/LICENSE" "${buildroot}${MINGW_PREFIX}/share/${PACKAGE_NAME}" + cp "${srcdir}/LICENSE" "${buildroot}${MINGW_PREFIX}/usr/share/${PACKAGE_NAME}" if [ "$?" != "0" ]; then echo "Cant copy LICENSE" exit -1 @@ -369,14 +370,33 @@ install_runtime() { install_locale } -make_packages() { +build_package() { - mkdir -p "${buildroot}${MINGW_PREFIX}/nsi" - cp "${srcdir}/win/${PACKAGE_NAME}.nsi" "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi" + # Build + make -C "${srcdir}" all if [ "$?" != "0" ]; then - echo "Cant copy nsis script" - fi + echo "Build failed" + exit -1 + fi + make -C "${srcdir}" "DESTDIR=${buildroot}" install + if [ "$?" != "0" ]; then + echo "Install failed" + exit -1 + fi + +} + +make_packages() { + + if [ -e "${srcdir}/win/${PACKAGE_NAME}.nsi" ]; then + mkdir -p "${buildroot}${MINGW_PREFIX}/nsi" + cp "${srcdir}/win/${PACKAGE_NAME}.nsi" "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi" + if [ "$?" != "0" ]; then + echo "Cant copy nsis script" + fi + fi + argument "zip" > /dev/null if [ "$?" == "0" ]; then make_zip diff --git a/win/bundle.cross b/win/bundle.cross index db8d350..844d845 100755 --- a/win/bundle.cross +++ b/win/bundle.cross @@ -76,23 +76,6 @@ install_prereqs() { done } -build_package() { - - # Build - make -C "${srcdir}" all - if [ "$?" != "0" ]; then - echo "Build failed" - exit -1 - fi - - make -C "${srcdir}" "DESTDIR=${buildroot}" install - if [ "$?" != "0" ]; then - echo "Install failed" - exit -1 - fi - -} - argument "install-requires" > /dev/null if [ "$?" == "0" ]; then install_prereqs -- libgit2 0.21.2