Commit 6a281517baddc31103825a48782cb971800dcc47
1 parent
9fe35d8e
Exists in
master
and in
1 other branch
Updating windows package builder.
Showing
4 changed files
with
86 additions
and
55 deletions
Show diff stats
configure.ac
| ... | ... | @@ -69,6 +69,39 @@ DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" |
| 69 | 69 | DEPENDS="" |
| 70 | 70 | |
| 71 | 71 | dnl --------------------------------------------------------------------------- |
| 72 | +dnl Version info | |
| 73 | +dnl --------------------------------------------------------------------------- | |
| 74 | + | |
| 75 | +AC_SUBST(PACKAGE_DESCRIPTION,"PW3270 HLLAPI Module") | |
| 76 | + | |
| 77 | +app_vrs_major=$(echo $VERSION | cut -d. -f1) | |
| 78 | +app_vrs_minor=$(echo $VERSION | cut -d. -f2) | |
| 79 | + | |
| 80 | +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major) | |
| 81 | +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor) | |
| 82 | + | |
| 83 | +AC_SUBST(PACKAGE_MAJOR_VERSION,$app_vrs_major) | |
| 84 | +AC_SUBST(PACKAGE_MINOR_VERSION,$app_vrs_minor) | |
| 85 | + | |
| 86 | +AC_ARG_WITH([release], [AS_HELP_STRING([--with-release], [Set release])], [ app_cv_release="$withval" ],[ app_cv_release="`date +%-y`.`date +%-m`.`date +%-d`" ]) | |
| 87 | + | |
| 88 | +app_rls_major=$(echo $app_cv_release.0.0 | cut -d. -f1) | |
| 89 | +app_rls_minor=$(echo $app_cv_release.0.0 | cut -d. -f2) | |
| 90 | + | |
| 91 | +AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, $app_cv_release) | |
| 92 | +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major) | |
| 93 | +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor) | |
| 94 | + | |
| 95 | +AC_SUBST(PACKAGE_RELEASE,$app_cv_release) | |
| 96 | +AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) | |
| 97 | +AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) | |
| 98 | + | |
| 99 | +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)" ]) | |
| 100 | + | |
| 101 | +AC_DEFINE_UNQUOTED(APPDATADIR, $app_cv_source_appdatadir) | |
| 102 | +AC_SUBST(APPDATADIR,$app_cv_source_appdatadir) | |
| 103 | + | |
| 104 | +dnl --------------------------------------------------------------------------- | |
| 72 | 105 | dnl Check for OS specifics |
| 73 | 106 | dnl --------------------------------------------------------------------------- |
| 74 | 107 | |
| ... | ... | @@ -99,6 +132,8 @@ case "$host" in |
| 99 | 132 | |
| 100 | 133 | AC_SUBST(PROGRAMFILES,$app_cv_programfiles) |
| 101 | 134 | AC_SUBST(WINARCH,$app_cv_winarch) |
| 135 | + AC_SUBST(SONAME,hllapi.dll) | |
| 136 | + | |
| 102 | 137 | ;; |
| 103 | 138 | |
| 104 | 139 | *) |
| ... | ... | @@ -109,6 +144,7 @@ case "$host" in |
| 109 | 144 | app_cv_osname="linux" |
| 110 | 145 | LOGDIR="/var/log" |
| 111 | 146 | DLLEXT=".so" |
| 147 | + AC_SUBST(SONAME,libhllapi.so.$app_vrs_major.$app_vrs_minor) | |
| 112 | 148 | |
| 113 | 149 | esac |
| 114 | 150 | |
| ... | ... | @@ -133,48 +169,6 @@ AC_PATH_TOOL([VALGRIND], [valgrind], [no]) |
| 133 | 169 | PKG_CHECK_EXISTS |
| 134 | 170 | |
| 135 | 171 | dnl --------------------------------------------------------------------------- |
| 136 | -dnl Version info | |
| 137 | -dnl --------------------------------------------------------------------------- | |
| 138 | - | |
| 139 | -AC_SUBST(PACKAGE_DESCRIPTION,"PW3270 HLLAPI Module") | |
| 140 | - | |
| 141 | -app_vrs_major=$(echo $VERSION | cut -d. -f1) | |
| 142 | -app_vrs_minor=$(echo $VERSION | cut -d. -f2) | |
| 143 | - | |
| 144 | -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major) | |
| 145 | -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor) | |
| 146 | - | |
| 147 | -AC_SUBST(PACKAGE_MAJOR_VERSION,$app_vrs_major) | |
| 148 | -AC_SUBST(PACKAGE_MINOR_VERSION,$app_vrs_minor) | |
| 149 | - | |
| 150 | -AC_ARG_WITH([release], [AS_HELP_STRING([--with-release], [Set release])], [ app_cv_release="$withval" ],[ app_cv_release="`date +%-y`.`date +%-m`.`date +%-d`" ]) | |
| 151 | - | |
| 152 | -app_rls_major=$(echo $app_cv_release.0.0 | cut -d. -f1) | |
| 153 | -app_rls_minor=$(echo $app_cv_release.0.0 | cut -d. -f2) | |
| 154 | - | |
| 155 | -AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, $app_cv_release) | |
| 156 | -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major) | |
| 157 | -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor) | |
| 158 | - | |
| 159 | -AC_SUBST(PACKAGE_RELEASE,$app_cv_release) | |
| 160 | -AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) | |
| 161 | -AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) | |
| 162 | - | |
| 163 | -case "$host" in | |
| 164 | - *-mingw32|*-pc-msys) | |
| 165 | - AC_SUBST(SONAME,hllapi.dll) | |
| 166 | - ;; | |
| 167 | - | |
| 168 | - s390x-*) | |
| 169 | - AC_SUBST(SONAME,libhllapi.so) | |
| 170 | - ;; | |
| 171 | - | |
| 172 | - *) | |
| 173 | - AC_SUBST(SONAME,libhllapi.so.$app_vrs_major.$app_vrs_minor) | |
| 174 | - | |
| 175 | -esac | |
| 176 | - | |
| 177 | -dnl --------------------------------------------------------------------------- | |
| 178 | 172 | dnl Check for doxygen |
| 179 | 173 | dnl --------------------------------------------------------------------------- |
| 180 | 174 | ... | ... |
win/hllapi.nsi
| ... | ... | @@ -17,10 +17,10 @@ RequestExecutionLevel admin |
| 17 | 17 | |
| 18 | 18 | # Properties |
| 19 | 19 | VIProductVersion "5.2.19.8" |
| 20 | -VIFileVersion "19.8.13.14" | |
| 20 | +VIFileVersion "19.8.30.16" | |
| 21 | 21 | |
| 22 | 22 | VIAddVersionKey "ProductVersion" "5.2.19.8" |
| 23 | -VIAddVersionKey "FileVersion" "19.8.13.14" | |
| 23 | +VIAddVersionKey "FileVersion" "19.8.30.16" | |
| 24 | 24 | |
| 25 | 25 | VIAddVersionKey "ProductName" "hllapi" |
| 26 | 26 | VIAddVersionKey "FileDescription" "PW3270 HLLAPI Module" |
| ... | ... | @@ -30,7 +30,7 @@ VIAddVersionKey "LegalCopyright" "GPL-2.0" |
| 30 | 30 | |
| 31 | 31 | !define MUI_ABORTWARNING |
| 32 | 32 | # !insertmacro MUI_PAGE_WELCOME |
| 33 | -!insertmacro MUI_PAGE_LICENSE "..\LICENSE" | |
| 33 | +!insertmacro MUI_PAGE_LICENSE "LICENSE" | |
| 34 | 34 | !insertmacro MUI_PAGE_COMPONENTS |
| 35 | 35 | !insertmacro MUI_PAGE_DIRECTORY |
| 36 | 36 | !insertmacro MUI_PAGE_INSTFILES |
| ... | ... | @@ -58,7 +58,10 @@ SubSection "hllapi" SecMain |
| 58 | 58 | setOutPath $SYSDIR |
| 59 | 59 | SetShellVarContext all |
| 60 | 60 | |
| 61 | - file "/oname=$SYSDIR\hllapi.dll" "..\.bin\Release\hllapi.dll" | |
| 61 | + file "/oname=$SYSDIR\hllapi.dll" "libhllapi.dll" | |
| 62 | + | |
| 63 | + # For compatibility with old scripts. | |
| 64 | + file "/oname=$SYSDIR\libhllapi.dll" "libhllapi.dll" | |
| 62 | 65 | |
| 63 | 66 | # define uninstaller name |
| 64 | 67 | SetRegView 32 |
| ... | ... | @@ -97,6 +100,7 @@ Section "Uninstall" |
| 97 | 100 | |
| 98 | 101 | # delete installed files |
| 99 | 102 | delete $SYSDIR\hllapi.dll |
| 103 | + delete $SYSDIR\libhllapi.dll | |
| 100 | 104 | |
| 101 | 105 | # Remove registry |
| 102 | 106 | SetRegView 32 | ... | ... |
win/hllapi.nsi.in
| ... | ... | @@ -30,7 +30,7 @@ VIAddVersionKey "LegalCopyright" "GPL-2.0" |
| 30 | 30 | |
| 31 | 31 | !define MUI_ABORTWARNING |
| 32 | 32 | # !insertmacro MUI_PAGE_WELCOME |
| 33 | -!insertmacro MUI_PAGE_LICENSE "..\LICENSE" | |
| 33 | +!insertmacro MUI_PAGE_LICENSE "LICENSE" | |
| 34 | 34 | !insertmacro MUI_PAGE_COMPONENTS |
| 35 | 35 | !insertmacro MUI_PAGE_DIRECTORY |
| 36 | 36 | !insertmacro MUI_PAGE_INSTFILES |
| ... | ... | @@ -58,10 +58,10 @@ SubSection "@PACKAGE@" SecMain |
| 58 | 58 | setOutPath $SYSDIR |
| 59 | 59 | SetShellVarContext all |
| 60 | 60 | |
| 61 | - file "/oname=$SYSDIR\hllapi.dll" "..\.bin\Release\hllapi.dll" | |
| 61 | + file "/oname=$SYSDIR\hllapi.dll" "libhllapi.dll" | |
| 62 | 62 | |
| 63 | 63 | # For compatibility with old scripts. |
| 64 | - file "/oname=$SYSDIR\libhllapi.dll" "..\.bin\Release\hllapi.dll" | |
| 64 | + file "/oname=$SYSDIR\libhllapi.dll" "libhllapi.dll" | |
| 65 | 65 | |
| 66 | 66 | # define uninstaller name |
| 67 | 67 | SetRegView 32 | ... | ... |
win/pack.sh
| 1 | 1 | #!/bin/bash |
| 2 | -cd $(dirname $(dirname $(readlink -f $0))) | |
| 2 | +PROJECT_DIR=$(readlink -f $(dirname $(dirname $(readlink -f $0)))) | |
| 3 | 3 | |
| 4 | 4 | PUBLISH=0 |
| 5 | 5 | |
| ... | ... | @@ -7,10 +7,22 @@ pack() { |
| 7 | 7 | |
| 8 | 8 | echo -e "\e]2;hllapi-${1}\a" |
| 9 | 9 | |
| 10 | + cd ${PROJECT_DIR} | |
| 11 | + | |
| 12 | + BUILDDIR=$(mktemp -d) | |
| 13 | + | |
| 10 | 14 | ./configure --cache=.${1}.cache \ |
| 11 | 15 | --host=${1}-w64-mingw32 \ |
| 12 | 16 | --prefix=/usr/${1}-w64-mingw32/sys-root/mingw \ |
| 13 | - --libdir=/usr/${1}-w64-mingw32/sys-root/mingw/lib | |
| 17 | + --bindir=${BUILDDIR} \ | |
| 18 | + --libdir=${BUILDDIR} \ | |
| 19 | + --localedir=${BUILDDIR} \ | |
| 20 | + --includedir=${BUILDDIR} \ | |
| 21 | + --sysconfdir=${BUILDDIR} \ | |
| 22 | + --datadir=${BUILDDIR} \ | |
| 23 | + --datarootdir=${BUILDDIR} \ | |
| 24 | + --with-application-datadir=${BUILDDIR} | |
| 25 | + | |
| 14 | 26 | |
| 15 | 27 | if [ "$?" != "0" ]; then |
| 16 | 28 | exit -1 |
| ... | ... | @@ -26,24 +38,45 @@ pack() { |
| 26 | 38 | exit -1 |
| 27 | 39 | fi |
| 28 | 40 | |
| 29 | - makensis win/hllapi.nsi | |
| 41 | + make install | |
| 42 | + if [ "$?" != "0" ]; then | |
| 43 | + exit -1 | |
| 44 | + fi | |
| 45 | + | |
| 46 | + NSI=$(readlink -f win/hllapi.nsi) | |
| 47 | + | |
| 48 | + cp LICENSE ${BUILDDIR} | |
| 49 | + | |
| 50 | + cd ${BUILDDIR} | |
| 51 | + | |
| 52 | + makensis -NOCD ${NSI} | |
| 53 | + if [ "$?" != "0" ]; then | |
| 54 | + exit -1 | |
| 55 | + fi | |
| 30 | 56 | |
| 31 | 57 | if [ -d ~/public_html ]; then |
| 32 | 58 | mkdir -p ~/public_html/win |
| 33 | - cp -v ./win/*.exe ~/public_html/win | |
| 59 | + cp -v *.exe ~/public_html/win | |
| 34 | 60 | if [ "$?" != "0" ]; then |
| 35 | 61 | exit -1 |
| 36 | 62 | fi |
| 37 | 63 | fi |
| 38 | 64 | |
| 39 | 65 | if [ "${PUBLISH}" == "1" ] && [ ! -z ${WIN_PACKAGE_SERVER} ]; then |
| 40 | - scp ./win/*.exe ${WIN_PACKAGE_SERVER} | |
| 66 | + scp *.exe ${WIN_PACKAGE_SERVER} | |
| 41 | 67 | if [ "$?" != "0" ]; then |
| 42 | 68 | exit -1 |
| 43 | 69 | fi |
| 44 | 70 | fi |
| 45 | 71 | |
| 46 | - rm -fr $TEMPDIR | |
| 72 | + mv -f *.exe ${PROJECT_DIR} | |
| 73 | + if [ "$?" != "0" ]; then | |
| 74 | + exit -1 | |
| 75 | + fi | |
| 76 | + | |
| 77 | + | |
| 78 | + cd ${PROJECT_DIR} | |
| 79 | + rm -fr ${BUILDDIR} | |
| 47 | 80 | rm -fr .${1}.cache |
| 48 | 81 | |
| 49 | 82 | } | ... | ... |