Commit de83b7b773c09580c4f5360cb7fbb82560a059e0

Authored by Perry Werneck
1 parent eae848b2
Exists in develop

Working on win32 installer.

Showing 2 changed files with 74 additions and 6 deletions   Show diff stats
win/bundle.common
@@ -396,6 +396,35 @@ make_zip() { @@ -396,6 +396,35 @@ make_zip() {
396 396
397 } 397 }
398 398
  399 +make_nsis() {
  400 + makensis \
  401 + -INPUTCHARSET UTF8 \
  402 + -DWITHIPC \
  403 + -DWITHPLUGINS \
  404 + -DWITHSDK \
  405 + ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi
  406 + if [ "$?" != "0" ]; then
  407 + echo "Cant build nsis script"
  408 + fi
  409 +
  410 + if [ ! -z $(which gh) ]; then
  411 + argument "upload" > /dev/null
  412 + if [ "$?" == "0" ]; then
  413 + gh release upload --clobber "${PACKAGE_VERSION}" ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}*.exe
  414 + if [ "$?" != "0" ]; then
  415 + echo "Cant upload nsis installer"
  416 + exit -1
  417 + fi
  418 + fi
  419 + fi
  420 +
  421 + mv -f ${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}*.exe "${srcdir}"
  422 + if [ "$?" != "0" ]; then
  423 + echo "Cant copy nsis installer"
  424 + exit -1
  425 + fi
  426 +}
  427 +
399 install_runtime() { 428 install_runtime() {
400 429
401 install_loaders 430 install_loaders
@@ -409,11 +438,22 @@ install_runtime() { @@ -409,11 +438,22 @@ install_runtime() {
409 438
410 make_packages() { 439 make_packages() {
411 440
  441 + mkdir -p "${buildroot}${MINGW_PREFIX}/nsi"
  442 + cp "${srcdir}/win/pw3270.nsi" "${buildroot}${MINGW_PREFIX}/${PACKAGE_NAME}.nsi"
  443 + if [ "$?" != "0" ]; then
  444 + echo "Cant copy nsis script"
  445 + fi
  446 +
412 argument "zip" > /dev/null 447 argument "zip" > /dev/null
413 if [ "$?" == "0" ]; then 448 if [ "$?" == "0" ]; then
414 make_zip 449 make_zip
415 fi 450 fi
416 451
  452 + argument "nsi" > /dev/null
  453 + if [ "$?" == "0" ]; then
  454 + make_nsis
  455 + fi
  456 +
417 } 457 }
418 458
419 459
win/pw3270.nsi.in
@@ -82,18 +82,45 @@ SubSection "@PRODUCT_NAME@" SecMain @@ -82,18 +82,45 @@ SubSection "@PRODUCT_NAME@" SecMain
82 ${DisableX64FSRedirection} 82 ${DisableX64FSRedirection}
83 83
84 # define the output path for this file 84 # define the output path for this file
85 - setOutPath $INSTDIR  
86 SetShellVarContext all 85 SetShellVarContext all
87 86
88 createShortCut "$SMPROGRAMS\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe" 87 createShortCut "$SMPROGRAMS\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe"
89 createShortCut "$DESKTOP\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe" 88 createShortCut "$DESKTOP\@PRODUCT_NAME@.lnk" "$INSTDIR\bin\@PRODUCT_NAME@.exe"
90 89
91 # Binary files 90 # Binary files
92 - file /r "bin\*.exe"  
93 - file /r "bin\*.dll"  
94 - file /r "lib\gdk-pixbuf-2.0" 91 + setOutPath "$INSTDIR"
  92 + file /r "bin"
  93 +
  94 + setOutPath "$INSTDIR\share\@PRODUCT_NAME@"
  95 + file /r "share\@PRODUCT_NAME@\*.png"
  96 + file /r "share\@PRODUCT_NAME@\*.svg"
  97 + file /r "share\@PRODUCT_NAME@\*.ui.xml"
  98 + file /r "share\@PRODUCT_NAME@\*.conf"
  99 +
  100 + setOutPath "$INSTDIR\share\@PRODUCT_NAME@\remap"
  101 + file /r "share\@PRODUCT_NAME@\remap\*"
  102 +
  103 + setOutPath "$INSTDIR\lib\gdk-pixbuf-2.0"
  104 + file /r "lib\gdk-pixbuf-2.0\*"
  105 +
  106 + setOutPath "$INSTDIR\etc"
95 file /r "etc\*" 107 file /r "etc\*"
96 108
  109 + setOutPath "$INSTDIR\share\locale"
  110 + file /r "share\locale\*"
  111 +
  112 + setOutPath "$INSTDIR\share\themes"
  113 + file /r "share\themes\*"
  114 +
  115 + setOutPath "$INSTDIR\share\icons"
  116 + file /r "share\icons\*"
  117 +
  118 + setOutPath "$INSTDIR\share\glib-2.0"
  119 + file /r "share\glib-2.0\*"
  120 +
  121 + setOutPath "$INSTDIR\share\@PRODUCT_NAME@\icons"
  122 + file /r "share\@PRODUCT_NAME@\icons\*"
  123 +
97 # define uninstaller name 124 # define uninstaller name
98 SetRegView 32 125 SetRegView 32
99 126
@@ -166,6 +193,7 @@ SubSection "@PRODUCT_NAME@" SecMain @@ -166,6 +193,7 @@ SubSection "@PRODUCT_NAME@" SecMain
166 setOutPath $INSTDIR\sdk 193 setOutPath $INSTDIR\sdk
167 file /r "include\*.*" 194 file /r "include\*.*"
168 file /r "lib\*.a" 195 file /r "lib\*.a"
  196 + file /r "lib\pkgconfig\*.pc"
169 197
170 setOutPath $INSTDIR\sdk\msvc 198 setOutPath $INSTDIR\sdk\msvc
171 file /r "share\@PRODUCT_NAME@\def\*.def" 199 file /r "share\@PRODUCT_NAME@\def\*.def"
@@ -189,9 +217,9 @@ SubSection "@PRODUCT_NAME@" SecMain @@ -189,9 +217,9 @@ SubSection "@PRODUCT_NAME@" SecMain
189 217
190 Section "Remote control" IPCPlugin 218 Section "Remote control" IPCPlugin
191 219
192 - setOutPath $INSTDIR  
193 ${DisableX64FSRedirection} 220 ${DisableX64FSRedirection}
194 - file "lib/@PRODUCT_NAME@-plugins/ipcserver.dll" 221 + CreateDirectory "$INSTDIR\lib\@PRODUCT_NAME@-plugins"
  222 + file "/oname=$INSTDIR\lib\@PRODUCT_NAME@-plugins\ipcserver.dll" "lib\@PRODUCT_NAME@-plugins\ipcserver.dll"
195 223
196 sectionEnd 224 sectionEnd
197 225