diff --git a/configure.ac b/configure.ac index 82b1dc4..2cdd0a5 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,11 @@ dnl --------------------------------------------------------------------------- dnl Version info dnl --------------------------------------------------------------------------- +AC_ARG_WITH([revision], [AS_HELP_STRING([--with-revision], [Set revision])], [ app_cv_revision="$withval" ],[ app_cv_revision="`date +%Y%m%d`" ]) + +AC_DEFINE_UNQUOTED(PACKAGE_REVISION, $app_cv_revision) +AC_SUBST(PACKAGE_REVISION,$app_cv_revision) + app_vrs_major=$(echo $VERSION | cut -d. -f1) app_vrs_minor=$(echo $VERSION | cut -d. -f2) diff --git a/locale/pw3270.pot b/locale/pw3270.pot index 3e7a186..33d7527 100644 --- a/locale/pw3270.pot +++ b/locale/pw3270.pot @@ -9,7 +9,7 @@ msgstr "" "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-01 14:51-0200\n" +"POT-Creation-Date: 2017-02-02 10:40-0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,7 +20,7 @@ msgstr "" "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-01 14:51-0200\n" +"POT-Creation-Date: 2017-02-02 10:40-0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/pw3270/dialog.c b/src/pw3270/dialog.c index 59406be..683e835 100644 --- a/src/pw3270/dialog.c +++ b/src/pw3270/dialog.c @@ -510,7 +510,7 @@ g_free(text); #ifdef PACKAGE_REVISION - text = g_strdup_printf(_("Version %s - Revision %s"),PACKAGE_VERSION,PACKAGE_REVISION); + text = g_strdup_printf(_("Version %s - Revision %s"),PACKAGE_VERSION,G_STRINGIFY(PACKAGE_REVISION)); #else text = g_strdup_printf(_("Version %s - Revision %08lx"),PACKAGE_VERSION,BUILD_DATE); #endif // PACKAGE_REVISION diff --git a/win/pack.sh b/win/pack.sh index 875a991..a579c96 100755 --- a/win/pack.sh +++ b/win/pack.sh @@ -8,7 +8,6 @@ cleanup() # cd ${myDIR} rm -fr ${TEMPDIR} - rm -fr ${RUNTIMEDIR} exit -1 } @@ -76,24 +75,47 @@ build() rm -f ./win/*.exe - makensis ./win/pw3270.nsi - if [ "$?" != "0" ]; then - failed "Erro ao gerar instalador sem runtime" + mkdir -p ${DESTDIR}/${PACKAGE_NAME}/${1} + + if [ "${RUNTIME}" == "1" ]; then + + makensis ./win/${PACKAGE}.nsi + if [ "$?" != "0" ]; then + failed "Erro ao gerar instalador sem gtk" + fi + + mv -f ./win/${PACKAGE}-${PACKAGE_VERSION}-requires-gtk-${GTK_MODVERSION}-${host_cpu}.exe \ + ${DESTDIR}/${PACKAGE_NAME}/${1} + + if [ "$?" != "0" ]; then + failed "Erro ao copiar instalador sem gtk para ${1}" + fi + fi if [ "${COMPLETE}" == "1" ]; then + chmod +x ./win/makegtkruntime.sh ./win/makegtkruntime.sh - makensis -DWITHGTK ./win/pw3270.nsi + + makensis -DWITHGTK ./win/${PACKAGE}.nsi if [ "$?" != "0" ]; then failed "Erro ao gerar instalador com runtime" fi - fi - mkdir -p ${DESTDIR}/${PACKAGE_NAME}/${1} - mv -f ./win/*.exe ${DESTDIR}/${PACKAGE_NAME}/${1} - if [ "$?" != "0" ]; then - failed "Erro ao copiar pacotes de instalação" + mv -f ./win/${PACKAGE}-${PACKAGE_VERSION}-gtk-${GTK_MODVERSION}-${host_cpu}.exe \ + ${DESTDIR}/${PACKAGE_NAME}/${1} + + if [ "$?" != "0" ]; then + failed "Erro ao copiar instalador completo para ${1}" + fi + + ln -sf ${1}/${PACKAGE}-${PACKAGE_VERSION}-gtk-${GTK_MODVERSION}-${host_cpu}.exe \ + ${DESTDIR}/${PACKAGE_NAME}/${PACKAGE}-latest-${host_cpu}.exe + + if [ "$?" != "0" ]; then + failed "Erro ao criar link para ${1}" + fi fi make clean @@ -131,9 +153,11 @@ do FULL) COMPLETE=1 + RUNTIME=1 ;; RT) + COMPLETE=0 RUNTIME=1 ;; @@ -169,88 +193,86 @@ fi # Gera pacotes for i in ${ARCHS}; do - build "${i}" - done -if [ "${RUNTIME}" == "1" ]; then - - echo -e "\e]2;Baixando runtime\a" - - # - # Puxo scripts de construção do GTK direto da sourceforge. - # - cd ${RUNTIMEDIR} - git clone http://git.code.sf.net/p/gtk3win/code . - if [ "$?" != "0" ]; then - exit -1 - fi - - for i in ${ARCHS}; do - - echo -e "\e]2;gtk-runtime-${i}\a" - - case ${i} in - x86_32) - host_cpu=i686 - ./win32.sh - if [ "$?" != "0" ]; then - exit -1 - fi - ;; - - x86_64) - host_cpu=x86_64 - ./win64.sh - if [ "$?" != "0" ]; then - exit -1 - fi - ;; - - *) - echo "Arquitetura desconhecida ${i}" - exit -1 - - esac - - rm -f gtk-runtime-*-${host_cpu}.exe - - - chmod +x ./makeruntime.sh - - ./makeruntime.sh - if [ "$?" != "0" ]; then - exit -1 - fi - - # Copia o pacote gerado - FILENAME=$(find . -maxdepth 1 -name "gtk-runtime-*-${host_cpu}.exe" | head --lines 1) - - mkdir -p ${DESTDIR}/${host_cpu} - - mv gtk-runtime-*-${host_cpu}.exe ${DESTDIR}/${host_cpu} - if [ "$?" != "0" ]; then - failed "Erro ao copiar instalador" - fi - - ln -sf $(basename ${FILENAME}) "${DESTDIR}/${host_cpu}/gtk-runtime-latest-${host_cpu}.exe" - if [ "$?" != "0" ]; then - failed "Erro ao criar o link simbólico" - fi - - done - -fi +#if [ "${RUNTIME}" == "1" ]; then +# +# echo -e "\e]2;Baixando runtime\a" +# +# mkdir -p ${TEMPDIR}/runtime +# cd ${TEMPDIR}/runtime +# +# # +# # Puxo scripts de construção do GTK direto da sourceforge. +# # +# git clone http://git.code.sf.net/p/gtk3win/code . +# if [ "$?" != "0" ]; then +# echo "Erro ao baixar fontes do runtime" +# exit -1 +# fi +# +# for i in ${ARCHS}; do +# +# echo -e "\e]2;gtk-runtime-${i}\a" +# +# case ${i} in +# x86_32) +# host_cpu=i686 +# ./win32.sh +# if [ "$?" != "0" ]; then +# exit -1 +# fi +# ;; +# +# x86_64) +# host_cpu=x86_64 +# ./win64.sh +# if [ "$?" != "0" ]; then +# exit -1 +# fi +# ;; +# +# *) +# echo "Arquitetura desconhecida ${i}" +# exit -1 +# +# esac +# +# chmod +x ./win/makeruntime.sh +# +# ./win/makeruntime.sh +# if [ "$?" != "0" ]; then +# exit -1 +# fi +# +# # Copia o pacote gerado +# FILENAME=$(find . -maxdepth 1 -name "gtk-runtime-*-${host_cpu}.exe" | head --lines 1) +# +# mkdir -p ${DESTDIR}/${host_cpu} +# +# mv gtk-runtime-*-${host_cpu}.exe ${DESTDIR}/${host_cpu} +# if [ "$?" != "0" ]; then +# failed "Erro ao copiar instalador" +# fi +# +# ln -sf $(basename ${FILENAME}) "${DESTDIR}/${host_cpu}/gtk-runtime-latest-${host_cpu}.exe" +# if [ "$?" != "0" ]; then +# failed "Erro ao criar o link simbólico" +# fi +# +# done +# +#fi -cd $myDIR +cd $(dirname $myDIR) rm -fr ${TEMPDIR} -rm -fr ${RUNTIMEDIR} # Gera pacotes para envio ao SPB -#zip -9 -r -j ${DESTDIR}/${PACKAGE}-latest.zip \ -# ${DESTDIR}/${PACKAGE}/x86_32/${PACKAGE_NAME}-with-gtk-latest-i686.exe \ -# ${DESTDIR}/${PACKAGE}/x86_64/${PACKAGE_NAME}-with-gtk-latest-x86_64.exe +zip -9 -r -j \ + ${DESTDIR}/${PACKAGE}-latest.zip \ + $(readlink -f ${DESTDIR}/${PACKAGE}/${PACKAGE}-latest-i686.exe) \ + $(readlink -f ${DESTDIR}/${PACKAGE}/${PACKAGE}-latest-x86_64.exe) echo -e "\e]2;Success!\a" diff --git a/win/pw3270.nsi.in b/win/pw3270.nsi.in index b3ebbee..42c8f5c 100644 --- a/win/pw3270.nsi.in +++ b/win/pw3270.nsi.in @@ -3,7 +3,7 @@ !include "FileFunc.nsh" Name "@PACKAGE@" -Caption "@PACKAGE@ - 3270 Emulator for windows/gtk" +Caption "@PACKAGE@ - @PACKAGE_DESCRIPTION@" !ifdef WITHGTK outfile "@PACKAGE@-@PACKAGE_VERSION@-gtk-@GTK_MODVERSION@-@host_cpu@.exe" !else @@ -12,7 +12,7 @@ outfile "@PACKAGE@-@PACKAGE_VERSION@-requires-gtk-@GTK_MODVERSION@-@host_cpu@.ex XPStyle on -installDir "$@PROGRAMFILES@\pw3270" +installDir "$@PROGRAMFILES@\@PACKAGE@" #define the installer icon !define MUI_ICON "@PACKAGE@.ico" @@ -27,7 +27,7 @@ RequestExecutionLevel admin # Properties VIProductVersion "@PACKAGE_VERSION@.0.0" VIAddVersionKey "ProductName" "@PACKAGE@" -VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk" +VIAddVersionKey "FileDescription" "@PACKAGE_DESCRIPTION@" VIAddVersionKey "FileVersion" "@PACKAGE_VERSION@" VIAddVersionKey "LegalCopyright" "GPL-2.0" @@ -106,7 +106,7 @@ SubSection "@PACKAGE@" SecMain writeUninstaller $INSTDIR\uninstall.exe WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk" + "DisplayName" "@PACKAGE@ - @PACKAGE_DESCRIPTION@" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ "DisplayIcon" "$INSTDIR\@PACKAGE@.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ -- libgit2 0.21.2