From c14ba98c738c54a58d0edb37aa5b22e887a67202 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 28 Aug 2015 17:48:19 +0000 Subject: [PATCH] Implementando script para geração das últimas versões --- nsi/Makefile.in | 6 ++++++ nsi/j3270-init.nsi | 0 nsi/j3270.nsi | 0 po/pt_BR.po | 2 +- winpacket.sh | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------- 5 files changed, 66 insertions(+), 16 deletions(-) create mode 100644 nsi/j3270-init.nsi create mode 100644 nsi/j3270.nsi diff --git a/nsi/Makefile.in b/nsi/Makefile.in index 2f3d275..5ce79f0 100644 --- a/nsi/Makefile.in +++ b/nsi/Makefile.in @@ -49,7 +49,13 @@ MAKENSIS=@MAKENSIS@ #---[ Targets ]---------------------------------------------------------------- all: \ + $(PACKAGE_NAME)-$(HOST_CPU).nsi \ + $(PACKAGE_NAME).nsi + +$(PACKAGE_NAME).nsi: \ $(PACKAGE_NAME)-$(HOST_CPU).nsi + @cp $^ $@ + $(PACKAGE_NAME)-$(HOST_CPU).nsi: \ header-$(HOST_CPU).nsi \ diff --git a/nsi/j3270-init.nsi b/nsi/j3270-init.nsi new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/nsi/j3270-init.nsi diff --git a/nsi/j3270.nsi b/nsi/j3270.nsi new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/nsi/j3270.nsi diff --git a/po/pt_BR.po b/po/pt_BR.po index ddbe4bb..63ba615 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-28 10:29-0300\n" +"POT-Creation-Date: 2015-08-28 12:15-0300\n" "PO-Revision-Date: 2014-02-17 08:05-0300\n" "Last-Translator: Perry Werneck \n" "Language-Team: Portugues <>\n" diff --git a/winpacket.sh b/winpacket.sh index b154acf..8a788f2 100755 --- a/winpacket.sh +++ b/winpacket.sh @@ -14,11 +14,38 @@ cleanup() failed() { + echo -e "\e]2;Failed!\a" echo $1 cleanup } # +# Copia pacote gerado +# +# $1 = Arquitetura (x86_32/x86_64) +# $2 = Tipo do link +# +CopyPacket() +{ + + FILENAME=$(find . -maxdepth 1 -name "*.exe" | head --lines 1 | sed "s@./@@g") + + mkdir -p ${DESTDIR}/${1} + + cp ${FILENAME} ${DESTDIR}/${1} + if [ "$?" != "0" ]; then + failed "Erro ao copiar instalador" + fi + + ln -sf ${FILENAME} ${DESTDIR}/${1}/pw3270-${1}-${2}.exe + if [ "$?" != "0" ]; then + failed "Erro ao criar o link simbólico" + fi + +} + + +# # Gera pacote windows # # $1 = Arquitetura (x86_32/x86_64) @@ -30,13 +57,13 @@ build() case ${1} in x86_32) host=i686-w64-mingw32 - nsi=pw3270-i686 + host_cpu=i686 prefix=/usr/i686-w64-mingw32/sys-root/mingw ;; x86_64) host=x86_64-w64-mingw32 - nsi=pw3270-x86_64 + host_cpu=x86_64 prefix=/usr/x86_64-w64-mingw32/sys-root/mingw ;; @@ -59,23 +86,40 @@ build() make clean rm -f *.exe + make -C nsi pw3270-${host_cpu}.nsi + if [ "$?" != "0" ]; then + failed "Erro ao gerar script de empacotamento windows" + fi + make Release if [ "$?" != "0" ]; then failed "Erro ao compilar fontes" fi - make package + ln -sf .${prefix}/share/locale .bin/Release/locale if [ "$?" != "0" ]; then - failed "Erro ao gerar instalador" + failed "Erro ao criar link para traduções" fi - mkdir -p ${DESTDIR}/${1} + chmod +x makegtkruntime.sh + ./makegtkruntime.sh + if [ "$?" != "0" ]; then + failed "Erro ao construir runtime gtk" + fi + + echo -e "\e]2;pw3270-install-${host_cpu}.exe\a" + cat nsi/pw3270-${host_cpu}.nsi | makensis \ + -DLOCALEDIR=".bin/Release${prefix}/share/locale" \ + - + +# -Onsis-${host_cpu}.log - - cp *.exe ${DESTDIR}/${1} if [ "$?" != "0" ]; then - failed "Erro ao copiar instalador" + failed "Erro ao gerar pacote windows" fi + CopyPacket ${1} "latest" + make clean rm -f *.exe @@ -138,14 +182,7 @@ done # Gera pacotes for i in ${ARCHS}; do - if [ "${COMPLETE}" == "1" ]; then - build "${i}" - fi - -# if [ "${RUNTIME}" == "1" ]; then -# build "${i}" -# fi - + build "${i}" done @@ -209,5 +246,12 @@ cd $myDIR rm -fr ${TEMPDIR} rm -fr ${RUNTIMEDIR} +zip -r -j ${HOME}/public_html/win/pw3270-latest.zip \ + ${HOME}/public_html/win/x86_32/pw3270-x86_32-latest.exe \ + ${HOME}/public_html/win/x86_64/pw3270-x86_64-latest.exe + +echo -e "\e]2;Success!\a" + + -- libgit2 0.21.2