diff --git a/configure.ac b/configure.ac index 50f8c07..961589c 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,39 @@ DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" DEPENDS="" dnl --------------------------------------------------------------------------- +dnl Version info +dnl --------------------------------------------------------------------------- + +AC_SUBST(PACKAGE_DESCRIPTION,"PW3270 HLLAPI Module") + +app_vrs_major=$(echo $VERSION | cut -d. -f1) +app_vrs_minor=$(echo $VERSION | cut -d. -f2) + +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor) + +AC_SUBST(PACKAGE_MAJOR_VERSION,$app_vrs_major) +AC_SUBST(PACKAGE_MINOR_VERSION,$app_vrs_minor) + +AC_ARG_WITH([release], [AS_HELP_STRING([--with-release], [Set release])], [ app_cv_release="$withval" ],[ app_cv_release="`date +%-y`.`date +%-m`.`date +%-d`" ]) + +app_rls_major=$(echo $app_cv_release.0.0 | cut -d. -f1) +app_rls_minor=$(echo $app_cv_release.0.0 | cut -d. -f2) + +AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, $app_cv_release) +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor) + +AC_SUBST(PACKAGE_RELEASE,$app_cv_release) +AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) +AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) + +AC_ARG_WITH([application-datadir], [AS_HELP_STRING([--with-application-datadir], [Set path for configuration file])], [ app_cv_source_appdatadir="$withval" ],[ app_cv_source_appdatadir="\$(datarootdir)/\$(PACKAGE_NAME)" ]) + +AC_DEFINE_UNQUOTED(APPDATADIR, $app_cv_source_appdatadir) +AC_SUBST(APPDATADIR,$app_cv_source_appdatadir) + +dnl --------------------------------------------------------------------------- dnl Check for OS specifics dnl --------------------------------------------------------------------------- @@ -99,6 +132,8 @@ case "$host" in AC_SUBST(PROGRAMFILES,$app_cv_programfiles) AC_SUBST(WINARCH,$app_cv_winarch) + AC_SUBST(SONAME,hllapi.dll) + ;; *) @@ -109,6 +144,7 @@ case "$host" in app_cv_osname="linux" LOGDIR="/var/log" DLLEXT=".so" + AC_SUBST(SONAME,libhllapi.so.$app_vrs_major.$app_vrs_minor) esac @@ -133,48 +169,6 @@ AC_PATH_TOOL([VALGRIND], [valgrind], [no]) PKG_CHECK_EXISTS dnl --------------------------------------------------------------------------- -dnl Version info -dnl --------------------------------------------------------------------------- - -AC_SUBST(PACKAGE_DESCRIPTION,"PW3270 HLLAPI Module") - -app_vrs_major=$(echo $VERSION | cut -d. -f1) -app_vrs_minor=$(echo $VERSION | cut -d. -f2) - -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major) -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor) - -AC_SUBST(PACKAGE_MAJOR_VERSION,$app_vrs_major) -AC_SUBST(PACKAGE_MINOR_VERSION,$app_vrs_minor) - -AC_ARG_WITH([release], [AS_HELP_STRING([--with-release], [Set release])], [ app_cv_release="$withval" ],[ app_cv_release="`date +%-y`.`date +%-m`.`date +%-d`" ]) - -app_rls_major=$(echo $app_cv_release.0.0 | cut -d. -f1) -app_rls_minor=$(echo $app_cv_release.0.0 | cut -d. -f2) - -AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, $app_cv_release) -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major) -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor) - -AC_SUBST(PACKAGE_RELEASE,$app_cv_release) -AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) -AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) - -case "$host" in - *-mingw32|*-pc-msys) - AC_SUBST(SONAME,hllapi.dll) - ;; - - s390x-*) - AC_SUBST(SONAME,libhllapi.so) - ;; - - *) - AC_SUBST(SONAME,libhllapi.so.$app_vrs_major.$app_vrs_minor) - -esac - -dnl --------------------------------------------------------------------------- dnl Check for doxygen dnl --------------------------------------------------------------------------- diff --git a/win/hllapi.nsi b/win/hllapi.nsi index 71a49b1..f6a03bb 100644 --- a/win/hllapi.nsi +++ b/win/hllapi.nsi @@ -17,10 +17,10 @@ RequestExecutionLevel admin # Properties VIProductVersion "5.2.19.8" -VIFileVersion "19.8.13.14" +VIFileVersion "19.8.30.16" VIAddVersionKey "ProductVersion" "5.2.19.8" -VIAddVersionKey "FileVersion" "19.8.13.14" +VIAddVersionKey "FileVersion" "19.8.30.16" VIAddVersionKey "ProductName" "hllapi" VIAddVersionKey "FileDescription" "PW3270 HLLAPI Module" @@ -30,7 +30,7 @@ VIAddVersionKey "LegalCopyright" "GPL-2.0" !define MUI_ABORTWARNING # !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "..\LICENSE" +!insertmacro MUI_PAGE_LICENSE "LICENSE" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES @@ -58,7 +58,10 @@ SubSection "hllapi" SecMain setOutPath $SYSDIR SetShellVarContext all - file "/oname=$SYSDIR\hllapi.dll" "..\.bin\Release\hllapi.dll" + file "/oname=$SYSDIR\hllapi.dll" "libhllapi.dll" + + # For compatibility with old scripts. + file "/oname=$SYSDIR\libhllapi.dll" "libhllapi.dll" # define uninstaller name SetRegView 32 @@ -97,6 +100,7 @@ Section "Uninstall" # delete installed files delete $SYSDIR\hllapi.dll + delete $SYSDIR\libhllapi.dll # Remove registry SetRegView 32 diff --git a/win/hllapi.nsi.in b/win/hllapi.nsi.in index be416b8..40e9020 100644 --- a/win/hllapi.nsi.in +++ b/win/hllapi.nsi.in @@ -30,7 +30,7 @@ VIAddVersionKey "LegalCopyright" "GPL-2.0" !define MUI_ABORTWARNING # !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "..\LICENSE" +!insertmacro MUI_PAGE_LICENSE "LICENSE" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES @@ -58,10 +58,10 @@ SubSection "@PACKAGE@" SecMain setOutPath $SYSDIR SetShellVarContext all - file "/oname=$SYSDIR\hllapi.dll" "..\.bin\Release\hllapi.dll" + file "/oname=$SYSDIR\hllapi.dll" "libhllapi.dll" # For compatibility with old scripts. - file "/oname=$SYSDIR\libhllapi.dll" "..\.bin\Release\hllapi.dll" + file "/oname=$SYSDIR\libhllapi.dll" "libhllapi.dll" # define uninstaller name SetRegView 32 diff --git a/win/pack.sh b/win/pack.sh index 8912155..d1410f6 100755 --- a/win/pack.sh +++ b/win/pack.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd $(dirname $(dirname $(readlink -f $0))) +PROJECT_DIR=$(readlink -f $(dirname $(dirname $(readlink -f $0)))) PUBLISH=0 @@ -7,10 +7,22 @@ pack() { echo -e "\e]2;hllapi-${1}\a" + cd ${PROJECT_DIR} + + BUILDDIR=$(mktemp -d) + ./configure --cache=.${1}.cache \ --host=${1}-w64-mingw32 \ --prefix=/usr/${1}-w64-mingw32/sys-root/mingw \ - --libdir=/usr/${1}-w64-mingw32/sys-root/mingw/lib + --bindir=${BUILDDIR} \ + --libdir=${BUILDDIR} \ + --localedir=${BUILDDIR} \ + --includedir=${BUILDDIR} \ + --sysconfdir=${BUILDDIR} \ + --datadir=${BUILDDIR} \ + --datarootdir=${BUILDDIR} \ + --with-application-datadir=${BUILDDIR} + if [ "$?" != "0" ]; then exit -1 @@ -26,24 +38,45 @@ pack() { exit -1 fi - makensis win/hllapi.nsi + make install + if [ "$?" != "0" ]; then + exit -1 + fi + + NSI=$(readlink -f win/hllapi.nsi) + + cp LICENSE ${BUILDDIR} + + cd ${BUILDDIR} + + makensis -NOCD ${NSI} + if [ "$?" != "0" ]; then + exit -1 + fi if [ -d ~/public_html ]; then mkdir -p ~/public_html/win - cp -v ./win/*.exe ~/public_html/win + cp -v *.exe ~/public_html/win if [ "$?" != "0" ]; then exit -1 fi fi if [ "${PUBLISH}" == "1" ] && [ ! -z ${WIN_PACKAGE_SERVER} ]; then - scp ./win/*.exe ${WIN_PACKAGE_SERVER} + scp *.exe ${WIN_PACKAGE_SERVER} if [ "$?" != "0" ]; then exit -1 fi fi - rm -fr $TEMPDIR + mv -f *.exe ${PROJECT_DIR} + if [ "$?" != "0" ]; then + exit -1 + fi + + + cd ${PROJECT_DIR} + rm -fr ${BUILDDIR} rm -fr .${1}.cache } -- libgit2 0.21.2