diff --git a/README.md b/README.md index 279bd38..d757268 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ Cross-compiling on SuSE Linux (Native or WSL) 1. First add the MinGW Repositories for your SuSE version from: - * https://build.opensuse.org/project/show/home:PerryWerneck:pw3270 + * https://build.opensuse.org/project/show/windows:mingw:win32 + * https://build.opensuse.org/project/show/windows:mingw:win64 2. Get pw3270 sources from git diff --git a/win/pack.sh b/win/pack.sh index b745957..991cf52 100755 --- a/win/pack.sh +++ b/win/pack.sh @@ -2,6 +2,7 @@ PROJECTDIR=$(dirname $(dirname $(readlink -f ${0}))) WORKDIR=$(mktemp -d) +PUBLISH=0 if [ -e /etc/os-release ]; then . /etc/os-release @@ -175,14 +176,7 @@ pack() ./configure \ --host=${host} \ --prefix=${prefix} \ - --libdir=${prefix}/lib \ - --enable-self-signed-cert-check \ - --enable-ssl-crl-check \ - --enable-crl-expiration-check \ - --disable-ldap \ - --enable-curl \ - --with-default-crl-url="ldap://pkildap.bb.com.br:389/CN=CRL1,CN=AC%20Banco%20do%20Brasil%20-%20EI%20v1,OU=ICP-BB,O=Banco%20do%20Brasil%20S.A.,C=BR?certificaterevocationlist" \ - --with-default-host="tn3270s://3270.df.bb:9023" + --libdir=${prefix}/lib if [ "$?" != "0" ]; then cleanup @@ -384,17 +378,73 @@ pack() fi fi -# if [ ! -z ${WIN_PACKAGE_SERVER} ]; then -# scp *.exe ${WIN_PACKAGE_SERVER}/pw3270 -# if [ "$?" != "0" ]; then -# cleanup -# exit -1 -# fi -# fi + if [ "${PUBLISH}" == "1" ] && [ ! -z ${WIN_PACKAGE_SERVER} ]; then + scp *.exe ${WIN_PACKAGE_SERVER}/pw3270 + if [ "$?" != "0" ]; then + cleanup + exit -1 + fi + fi } # +# Setup options +# +until [ -z "$1" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + value=${tmp##*=} + + case "$parameter" in + NOPUBLISH) + PUBLISH=0 + ;; + + PUBLISH) + PUBLISH=1 + ;; + + CLEAR) + if [ -d ~/public_html/win/pw3270 ]; then + rm -fr ~/public_html/win/pw3270{x86_32,x86_64} + fi + ;; + + HELP) + echo "${0} [OPTIONS]" + echo "" + echo "Options:" + echo "" + + if [ ! -z ${WIN_PACKAGE_SERVER} ]; then + echo " --nopublish Don't send packages to ${WIN_PACKAGE_SERVER}/pw3270" + echo " --publish Send packages to ${WIN_PACKAGE_SERVER}/pw3270" + fi + + + if [ -d ~/public_html/win/sisbb ]; then + echo " --clear Remove directories ~/public_html/win/pw3270{x86_32,x86_64}" + fi + + echo "" + exit 0 + + ;; + + esac + fi + + shift + +done + + + +# # Get sources from GIT # mkdir -p ${WORKDIR}/sources diff --git a/win/pw3270.nsi.in b/win/pw3270.nsi.in index ae6b158..4c5e536 100644 --- a/win/pw3270.nsi.in +++ b/win/pw3270.nsi.in @@ -73,8 +73,8 @@ SubSection "@PACKAGE@" SecMain # Binary files file "/oname=$INSTDIR\@PACKAGE@.exe" "bin\@PACKAGE@.exe" file "/oname=$INSTDIR\@PACKAGE@.ico" "@PACKAGE@.ico" - file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" "bin\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$INSTDIR\@PACKAGE@.dll.@PACKAGE_VERSION@" "bin\@PACKAGE@.dll.@PACKAGE_VERSION@" + file "/oname=$INSTDIR\lib3270.dll" "bin\lib3270.dll" + file "/oname=$INSTDIR\@PACKAGE@.dll" "bin\@PACKAGE@.dll" # Configuration files file "/oname=$INSTDIR\@PACKAGE@-logo.png" "@PACKAGE@-logo.png" -- libgit2 0.21.2