diff --git a/win/bundle.common b/win/bundle.common index 14f0484..288af32 100644 --- a/win/bundle.common +++ b/win/bundle.common @@ -396,6 +396,35 @@ make_zip() { } +make_nsis() { + makensis \ + -INPUTCHARSET UTF8 \ + -DWITHIPC \ + -DWITHPLUGINS \ + -DWITHSDK \ + ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi + if [ "$?" != "0" ]; then + echo "Cant build nsis script" + fi + + if [ ! -z $(which gh) ]; then + argument "upload" > /dev/null + if [ "$?" == "0" ]; then + gh release upload --clobber "${PACKAGE_VERSION}" ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}*.exe + if [ "$?" != "0" ]; then + echo "Cant upload nsis installer" + exit -1 + fi + fi + fi + + mv -f ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}*.exe "${srcdir}" + if [ "$?" != "0" ]; then + echo "Cant copy nsis installer" + exit -1 + fi +} + install_runtime() { install_loaders @@ -409,11 +438,22 @@ install_runtime() { make_packages() { + mkdir -p "${buildroot}${MINGW_PREFIX}/nsi" + cp "${srcdir}/win/pw3270.nsi" "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi" + if [ "$?" != "0" ]; then + echo "Cant copy nsis script" + fi + argument "zip" > /dev/null if [ "$?" == "0" ]; then make_zip fi + argument "nsi" > /dev/null + if [ "$?" == "0" ]; then + make_nsis + fi + } diff --git a/win/pw3270.nsi.in b/win/pw3270.nsi.in index 362fdf4..6f410d9 100644 --- a/win/pw3270.nsi.in +++ b/win/pw3270.nsi.in @@ -82,18 +82,45 @@ SubSection "@PRODUCT_NAME@" SecMain ${DisableX64FSRedirection} # define the output path for this file - setOutPath $INSTDIR SetShellVarContext all createShortCut "$SMPROGRAMS\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe" createShortCut "$DESKTOP\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe" # Binary files - file /r "bin\*.exe" - file /r "bin\*.dll" - file /r "lib\gdk-pixbuf-2.0" + setOutPath "$INSTDIR" + file /r "bin" + + setOutPath "$INSTDIR\share\@PRODUCT_NAME@" + file /r "share\@PRODUCT_NAME@\*.png" + file /r "share\@PRODUCT_NAME@\*.svg" + file /r "share\@PRODUCT_NAME@\*.ui.xml" + file /r "share\@PRODUCT_NAME@\*.conf" + + setOutPath "$INSTDIR\share\@PRODUCT_NAME@\remap" + file /r "share\@PRODUCT_NAME@\remap\*" + + setOutPath "$INSTDIR\lib\gdk-pixbuf-2.0" + file /r "lib\gdk-pixbuf-2.0\*" + + setOutPath "$INSTDIR\etc" file /r "etc\*" + setOutPath "$INSTDIR\share\locale" + file /r "share\locale\*" + + setOutPath "$INSTDIR\share\themes" + file /r "share\themes\*" + + setOutPath "$INSTDIR\share\icons" + file /r "share\icons\*" + + setOutPath "$INSTDIR\share\glib-2.0" + file /r "share\glib-2.0\*" + + setOutPath "$INSTDIR\share\@PRODUCT_NAME@\icons" + file /r "share\@PRODUCT_NAME@\icons\*" + # define uninstaller name SetRegView 32 @@ -166,6 +193,7 @@ SubSection "@PRODUCT_NAME@" SecMain setOutPath $INSTDIR\sdk file /r "include\*.*" file /r "lib\*.a" + file /r "lib\pkgconfig\*.pc" setOutPath $INSTDIR\sdk\msvc file /r "share\@PRODUCT_NAME@\def\*.def" @@ -189,9 +217,9 @@ SubSection "@PRODUCT_NAME@" SecMain Section "Remote control" IPCPlugin - setOutPath $INSTDIR ${DisableX64FSRedirection} - file "lib/@PRODUCT_NAME@-plugins/ipcserver.dll" + CreateDirectory "$INSTDIR\lib\@PRODUCT_NAME@-plugins" + file "/oname=$INSTDIR\lib\@PRODUCT_NAME@-plugins\ipcserver.dll" "lib\@PRODUCT_NAME@-plugins\ipcserver.dll" sectionEnd -- libgit2 0.21.2