Commit bc247bf0 authored by Mladen Milinkovic's avatar Mladen Milinkovic
Browse files

Added win32 build to travis.

parent d347c3a6
......@@ -107,7 +107,24 @@ matrix:
./appimagetool "$appdir/" -g
- |- # publish
echo 'Publishing release to GitHub...'
bash "$TRAVIS_BUILD_DIR/pkg/misc/github-release.sh" linux $PWD/Subtitle_Composer-x86_64.AppImage*
bash "$TRAVIS_BUILD_DIR/pkg/misc/github-release.sh" linux "$PWD/Subtitle_Composer-x86_64.AppImage"*
- os: linux
dist: trusty
sudo: required
compiler: gcc
before_install:
- docker pull maxrd2/arch-mingw
script:
- |-
mkdir build && chmod 0777 build
docker run -v "$PWD":/home/devel -it maxrd2/arch-mingw /bin/bash pkg/mingw/build.sh || exit 1
after_success:
- |- # do not create release of funky stuff
[[ "$TRAVIS_EVENT_TYPE" != "push" ]] && exit
- |- # publish
echo 'Publishing release to GitHub...'
bash "$TRAVIS_BUILD_DIR/pkg/misc/github-release.sh" win32 "$PWD/build/SubtitleComposerSetup.exe"
- os: linux
dist: xenial
......
#!/bin/bash
set -e
appver="$(git describe --always --abbrev=8 | sed 's/-g/./;s/-/./;s/^v//g')"
rm -rf build &>/dev/null || true
mkdir -p build/nsis
sudo pacman -Sy --noconfirm --needed \
mingw-w64-toolchain mingw-w64-cmake mingw-w64-configure mingw-w64-pkg-config \
mingw-w64-ffmpeg mingw-w64-qt5 mingw-w64-kf5 nsis \
mingw-w64-kinit mingw-w64-pango mingw-w64-libvisual \
mingw-w64-aspell mingw-w64-hunspell mingw-w64-icu \
kconfig kcoreaddons breeze-icons \
mingw-w64-mpv \
mingw-w64-gst-libav mingw-w64-gst-plugins-good
sudo pacman -Sdd --noconfirm --needed kauth kbookmarks kcodecs kcompletion \
kconfig kconfigwidgets kcoreaddons kglobalaccel kitemviews kjobwidgets \
knotifications kross ktextwidgets kwidgetsaddons kwindowsystem kxmlgui \
solid sonnet
cd build
i686-w64-mingw32-cmake \
-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF \
-DKF5_HOST_TOOLING=/usr/lib/cmake \
-DKCONFIGCOMPILER_PATH=/usr/lib/cmake/KF5Config/KF5ConfigCompilerTargets.cmake \
-DTARGETSFILE=/usr/lib/cmake/KF5CoreAddons/KF5CoreAddonsToolingTargets.cmake \
-DAPP_VERSION="$appver" \
..
make -j$(nproc)
make DESTDIR="$PWD/nsis" nsis
......@@ -6,30 +6,4 @@ _gitroot="$(cd $(dirname "$0") && echo $PWD)"
while [[ ! -d "$_gitroot/.git" ]]; do _gitroot="$(dirname "$_gitroot")" ; [[ "$_gitroot" == "/" ]] && echo "ERROR: cannot find .git directory" && exit 1 ; done
cd "$_gitroot"
appver="$(git describe --always --abbrev=8 | sed 's/-g/./;s/-/./;s/^v//g')"
rm -rf build && mkdir -p build/nsis
sudo docker run --rm -v "$PWD":/home/devel -it maxrd2/arch-mingw /bin/bash -c '\
sudo pacman -Sy --noconfirm --needed \
mingw-w64-kinit mingw-w64-pango mingw-w64-libvisual \
mingw-w64-aspell mingw-w64-hunspell mingw-w64-icu \
kconfig kcoreaddons breeze-icons \
mingw-w64-mpv \
mingw-w64-gst-libav mingw-w64-gst-plugins-good && \
sudo pacman -Sdd --noconfirm --needed kauth kbookmarks kcodecs kcompletion \
kconfig kconfigwidgets kcoreaddons kglobalaccel kitemviews kjobwidgets \
knotifications kross ktextwidgets kwidgetsaddons kwindowsystem kxmlgui \
solid sonnet && \
cd build && \
i686-w64-mingw32-cmake \
-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF \
-DKF5_HOST_TOOLING=/usr/lib/cmake \
-DKCONFIGCOMPILER_PATH=/usr/lib/cmake/KF5Config/KF5ConfigCompilerTargets.cmake \
-DTARGETSFILE=/usr/lib/cmake/KF5CoreAddons/KF5CoreAddonsToolingTargets.cmake \
-DAPP_VERSION='$appver' \
.. && \
make -j$(nproc) && \
make DESTDIR="$PWD/nsis" nsis'
sudo docker run --rm -v "$PWD":/home/devel -it maxrd2/arch-mingw /bin/bash -c 'bash pkg/mingw/build.sh'
......@@ -40,8 +40,8 @@ release_update() {
local ght_appimage="Instructions on using AppImage can be found [here](https://github.com/maxrd2/subtitlecomposer/wiki/AppImage-HOWTO)"
if [[ $gh_is_tag -eq 1 ]]; then
local gh_tag="$gh_branch"
local gh_rel_name="Latest Development Build - git master"
local gh_rel_body="$ght_appimage\n\nThis is ***stable release $TRAVIS_TAG build***."
local gh_rel_name="Release $gh_tag"
local gh_rel_body="$ght_appimage\n\nThis is ***stable release $gh_tag build***."
local gh_prerelease='false'
echo -e "Processing '\e[1;39m$gh_tag\e[m' release from tag '\e[1;39m$gh_tag\e[m'..."
else
......@@ -73,16 +73,18 @@ release_update() {
local id="$(jq -r .id .github_release)"
if [[ -z "$id" || "$id" = "null" ]]; then
# create new release
[[ ! -z "$TRAVIS_BUILD_ID" ]] && gh_rel_body="$gh_rel_body\n\n$ght_travis: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
[[ ! -z "$TRAVIS_JOB_ID" ]] && gh_rel_body="$gh_rel_body\n\n$ght_travis: https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID"
echo -e "Creating release '\e[1;39m$gh_tag\e[m'..."
"${curl[@]}" -s -XPOST "$api_url/releases" --data '{"tag_name":"'"$gh_tag"'", "name":"'"$gh_rel_name"'", "body":"'"$gh_rel_body"'", "draft":false, "prerelease":'$gh_prerelease'}' >.github_release
else
# update existing release with new build log
gh_rel_body="$(jq -r .body .github_release | grep -v "$ght_travis" | sed -e ':a;N;$!ba;s/\n/\\n/g')"
[[ ! -z "$TRAVIS_BUILD_ID" ]] && gh_rel_body="$gh_rel_body\n$ght_travis: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
gh_rel_body="$(jq -r .body .github_release | grep -v "$ght_travis" | sed -e 's|\r||g' -e ':a;N;$!ba;s/\n/\\n/g;s/\r//g')"
[[ ! -z "$TRAVIS_JOB_ID" ]] && gh_rel_body="$gh_rel_body\n$ght_travis: https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID"
echo -e "Updating release '\e[1;39m$gh_tag\e[m'..."
"${curl[@]}" -s -XPOST "$api_url/releases/$id" --data '{"tag_name":"'"$gh_tag"'", "name":"'"$gh_rel_name"'", "body":"'"$gh_rel_body"'", "draft":false, "prerelease":'$gh_prerelease'}' >.github_release
fi
id="$(jq -r .id .github_release)"
[[ -z "$id" || "$id" = "null" ]] && echo -e "\e[1;31mERROR:\e[m unable to update/create release '\e[1;39m$gh_tag\e[m'." && exit 1 || true
}
asset_exists() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment