Provide 64bit installer for Windows

This commit is contained in:
Philipp Hörist 2018-03-28 23:03:22 +02:00 committed by Philipp Hörist
parent ec78ce22e6
commit 2ff96ad793
5 changed files with 33 additions and 20 deletions

View File

@ -1,6 +1,12 @@
environment: environment:
matrix: matrix:
- MSYSTEM: MINGW64
MSYS_ARCH: "x86_64"
ARCH: "64bit"
- MSYSTEM: MINGW32 - MSYSTEM: MINGW32
MSYS_ARCH: "i686"
ARCH: "32bit"
branches: branches:
only: only:
@ -22,10 +28,10 @@ build_script:
C:\msys64\usr\bin\sh.exe --login -c $command C:\msys64\usr\bin\sh.exe --login -c $command
} }
bash 'git clone C:/projects/gajim C:/msys64/home/appveyor/gajim' bash "git clone C:/projects/gajim C:/msys64/home/appveyor/gajim"
bash 'C:/msys64/home/appveyor/gajim/win/build.sh' bash "C:/msys64/home/appveyor/gajim/win/build.sh $($env:MSYS_ARCH)"
Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim.exe" -FileName "Gajim-Master-$($env:TIME_STRING).exe" Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim.exe" -FileName "Gajim-Master-$($env:ARCH)-$($env:TIME_STRING).exe"
Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim-Portable.exe" -FileName "Gajim-Portable-Master-$($env:TIME_STRING).exe" Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim-Portable.exe" -FileName "Gajim-Portable-Master-$($env:ARCH)-$($env:TIME_STRING).exe"
# on_finish: # on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

View File

@ -11,8 +11,6 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "${DIR}" cd "${DIR}"
# CONFIG START # CONFIG START
ARCH="i686"
PYTHON_VERSION="3" PYTHON_VERSION="3"
BUILD_VERSION="0" BUILD_VERSION="0"
@ -25,15 +23,20 @@ MINGW="mingw32"
QL_VERSION="0.0.0" QL_VERSION="0.0.0"
QL_VERSION_DESC="UNKNOWN" QL_VERSION_DESC="UNKNOWN"
function set_arch {
ARCH="$1"
if [ "$1" == "x86_64" ]; then
MINGW="mingw64"
fi
}
function set_build_root { function set_build_root {
BUILD_ROOT="$1" BUILD_ROOT="${DIR}/_build_root"
REPO_CLONE="${BUILD_ROOT}/${MINGW}"/gajim REPO_CLONE="${BUILD_ROOT}/${MINGW}"/gajim
MINGW_ROOT="${BUILD_ROOT}/${MINGW}" MINGW_ROOT="${BUILD_ROOT}/${MINGW}"
PACKAGE_DIR="${BUILD_ROOT}/${MINGW}/lib/python3.6/site-packages" PACKAGE_DIR="${BUILD_ROOT}/${MINGW}/lib/python3.6/site-packages"
} }
set_build_root "${DIR}/_build_root"
function build_pacman { function build_pacman {
pacman --root "${BUILD_ROOT}" "$@" pacman --root "${BUILD_ROOT}" "$@"
} }
@ -114,8 +117,6 @@ pillow==4.3.0
} }
function install_gajim { function install_gajim {
[ -z "$1" ] && (echo "Missing arg"; exit 1)
rm -Rf "${PACKAGE_DIR}"/gajim* rm -Rf "${PACKAGE_DIR}"/gajim*
cd .. cd ..
@ -302,6 +303,6 @@ function move_ssl_libs {
} }
function build_installer { function build_installer {
(cd "$BUILD_ROOT" && makensis -NOCD -DVERSION="$QL_VERSION_DESC" "${MISC}"/gajim.nsi) (cd "$BUILD_ROOT" && makensis -NOCD -DVERSION="$QL_VERSION_DESC" -DARCH="${MINGW}" "${MISC}"/gajim.nsi)
(cd "$BUILD_ROOT" && makensis -NOCD -DVERSION="$QL_VERSION_DESC" "${MISC}"/gajim-portable.nsi) (cd "$BUILD_ROOT" && makensis -NOCD -DVERSION="$QL_VERSION_DESC" -DARCH="${MINGW}" "${MISC}"/gajim-portable.nsi)
} }

View File

@ -10,12 +10,12 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
source "$DIR"/_base.sh source "$DIR"/_base.sh
function main { function main {
local GIT_TAG=${1:-"master"} set_arch "$1"
set_build_root
install_pre_deps install_pre_deps
create_root create_root
install_deps install_deps
install_gajim "$GIT_TAG" install_gajim
cleanup_install cleanup_install
move_ssl_libs move_ssl_libs
build_installer build_installer

View File

@ -101,7 +101,7 @@ Section "Gajim" SecGajim
SectionIn RO SectionIn RO
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File /r "mingw32\*.*" File /r "${ARCH}\*.*"
SetOutPath "$INSTDIR\bin" SetOutPath "$INSTDIR\bin"
CreateShortCut "$INSTDIR\Gajim-Portable.lnk" "$INSTDIR\bin\Gajim.exe" \ CreateShortCut "$INSTDIR\Gajim-Portable.lnk" "$INSTDIR\bin\Gajim.exe" \

View File

@ -147,11 +147,17 @@ LangString STR_Running ${LANG_HEBREW} "נראה שהתוכנית Gajim מורצ
Section "Gajim" SecGajim Section "Gajim" SecGajim
SectionIn RO SectionIn RO
Var /GLOBAL arch_name
StrCpy $arch_name "(64-Bit)"
StrCmp ${ARCH} "mingw64" cont
StrCpy $arch_name "(32-Bit)"
cont:
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File /r "mingw32\*.*" File /r "${ARCH}\*.*"
WriteRegStr HKCU "Software\Gajim" "" $INSTDIR WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim ${VERSION} $arch_name"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "${VERSION}"