From 595fd90d45691e508504c0286456531c5ec6dad5 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 14:06:54 +0100 Subject: [PATCH 1/9] Fix some errors on windows --- tests/functional/openlp_core_ui/test_maindisplay.py | 1 + .../openlp_plugins/presentations/test_powerpointcontroller.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_core_ui/test_maindisplay.py b/tests/functional/openlp_core_ui/test_maindisplay.py index 5aa0f42a4..1ac6160a6 100644 --- a/tests/functional/openlp_core_ui/test_maindisplay.py +++ b/tests/functional/openlp_core_ui/test_maindisplay.py @@ -270,6 +270,7 @@ class TestMainDisplay(TestCase, TestMixin): service_item = MagicMock() service_item.theme_data = MagicMock() service_item.theme_data.background_type = 'video' + service_item.theme_data.theme_name = 'name' mocked_plugin = MagicMock() display.plugin_manager = PluginManager() display.plugin_manager.plugins = [mocked_plugin] diff --git a/tests/functional/openlp_plugins/presentations/test_powerpointcontroller.py b/tests/functional/openlp_plugins/presentations/test_powerpointcontroller.py index 3666eac40..824951a66 100644 --- a/tests/functional/openlp_plugins/presentations/test_powerpointcontroller.py +++ b/tests/functional/openlp_plugins/presentations/test_powerpointcontroller.py @@ -137,7 +137,7 @@ class TestPowerpointDocument(TestCase, TestMixin): instance.goto_slide(42) # THEN: mocked_critical_error_message_box should have been called - mocked_critical_error_message_box.assert_called_with('Error', 'An error occurred in the Powerpoint ' + mocked_critical_error_message_box.assert_called_with('Error', 'An error occurred in the PowerPoint ' 'integration and the presentation will be stopped.' ' Restart the presentation if you wish to ' 'present it.') From ceffeae39c6faf70b061944a86bb590c4da39b9e Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 14:07:21 +0100 Subject: [PATCH 2/9] Added appveyor conf file. --- appveyor.yml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..8d3f61477 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,66 @@ +version: 2.5.0.{build} + +init: + - choco install -y --force bzr + - set PATH=C:\Program Files (x86)\Bazaar;%PATH% + - bzr --version + +clone_script: + - bzr checkout --lightweight lp:openlp openlp + +environment: + PYTHON: C:\\Python34 + +install: + # Install dependencies from pypi + - %PYTHON%\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==3.0.10 psycopg2 pypiwin32 pyenchant + # Install mysql dependency + - %PYTHON%\python.exe -m pip install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df + # Download and install lxml and pyicu (originally from http://www.lfd.uci.edu/~gohlke/pythonlibs/) + - curl -L "https://www.dropbox.com/s/7dwwna459j6qvbp/lxml-3.6.4-cp34-cp34m-win32.whl?dl=1" -o lxml-3.6.4-cp34-cp34m-win32.whl + - %PYTHON%\python.exe -m pip install lxml-3.6.4-cp34-cp34m-win32.whl + - curl -L "https://www.dropbox.com/s/ib1yq4xq7o1dma7/PyICU-1.9.5-cp34-cp34m-win32.whl?dl=1" -o PyICU-1.9.5-cp34-cp34m-win32.whl + - %PYTHON%\python.exe -m pip install PyICU-1.9.5-cp34-cp34m-win32.whl + # Download and install PyQt5 + - curl -L -O http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-5.5.1/PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe + - PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe /S + # Download and install Inno Setup - used for packaging + - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe + - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP- + # Download and unpack portable-bundle + - curl -L "https://www.dropbox.com/s/omr8mw9kamnml3l/portable-setup.7z?dl=1" -o portable-setup.7z + - 7z x portable-setup.7z + # Download and unpack mupdf + - curl -O http://mupdf.com/downloads/archive/mupdf-1.9a-windows.zip + - 7z x mupdf-1.9a-windows.zip + - cp mupdf-1.9a-windows/mupdf.exe openlp/mupdf.exe + # Download and unpack mediainfo + - curl -O https://mediaarea.net/download/binary/mediainfo/0.7.90/MediaInfo_CLI_0.7.90_Windows_i386.zip + - mkdir MediaInfo + - 7z x -o MediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip + - cp MediaInfo\\MediaInfo.exe openlp\\MediaInfo.exe + # Disabled portable installers - can't figure out how to make them silent + # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe + # - PortableApps.comInstaller_3.4.4.paf.exe /S + # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Launcher/PortableApps.comLauncher_2.2.1.paf.exe + # - PortableApps.comLauncher_2.2.1.paf.exe /S + # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe + # - NSISPortable_3.0_English.paf.exe /S + + +build: off + +test_script: + - cd openlp + - %PYTHON%\\python.exe -m nose -v tests + +after_test: + # This is where we create a package using PyInstaller + # First download and unpack PyInstaller + - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip + - 7z x develop.zip + # Then get the packaging repo + - bzr checkout --lightweight lp:~tomasgroth/openlp/packaging-appveyor packaging + - cd packaging + - %PYTHON%\python.exe windows/windows-builder.py -v -u -t -c windows\\config.ini -b ..\\openlp + From 7017f82b3617890cd632d16b9c6b37f2a87113f8 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 14:17:32 +0100 Subject: [PATCH 3/9] Workaround for 7z extraction --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8d3f61477..189d94151 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,9 @@ install: # Download and unpack mediainfo - curl -O https://mediaarea.net/download/binary/mediainfo/0.7.90/MediaInfo_CLI_0.7.90_Windows_i386.zip - mkdir MediaInfo - - 7z x -o MediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip + - cd MediaInfo + - 7z x ../MediaInfo_CLI_0.7.90_Windows_i386.zip + - cd.. - cp MediaInfo\\MediaInfo.exe openlp\\MediaInfo.exe # Disabled portable installers - can't figure out how to make them silent # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe From 8595a2171f6feb4751b81577f922b47c6a588f60 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 14:54:29 +0100 Subject: [PATCH 4/9] Another test fix for windows. --- tests/functional/openlp_core_ui/test_maindisplay.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/openlp_core_ui/test_maindisplay.py b/tests/functional/openlp_core_ui/test_maindisplay.py index 1ac6160a6..751263e06 100644 --- a/tests/functional/openlp_core_ui/test_maindisplay.py +++ b/tests/functional/openlp_core_ui/test_maindisplay.py @@ -271,6 +271,7 @@ class TestMainDisplay(TestCase, TestMixin): service_item.theme_data = MagicMock() service_item.theme_data.background_type = 'video' service_item.theme_data.theme_name = 'name' + service_item._raw_frames = [] mocked_plugin = MagicMock() display.plugin_manager = PluginManager() display.plugin_manager.plugins = [mocked_plugin] From 1f4c8e742ee88087cea3aceadabf771514239a98 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 21:37:39 +0100 Subject: [PATCH 5/9] More work on appveyor --- scripts/appveyor-webhook.py | 102 +++++++++++++++++++++++++++ appveyor.yml => scripts/appveyor.yml | 27 +++---- 2 files changed, 113 insertions(+), 16 deletions(-) create mode 100755 scripts/appveyor-webhook.py rename appveyor.yml => scripts/appveyor.yml (70%) diff --git a/scripts/appveyor-webhook.py b/scripts/appveyor-webhook.py new file mode 100755 index 000000000..841c5b532 --- /dev/null +++ b/scripts/appveyor-webhook.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2016 OpenLP Developers # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +import json +import urllib +import urllib.request +import datetime +import sys +from subprocess import Popen, PIPE + +token = 'xx' +webhook_url = 'https://ci.appveyor.com/api/subversion/webhook?id=x' +branch = 'lp:openlp' + +webhook_element = \ +{ + "commit": { + "author": { + "email": "open@contributer", + "name": "OpenLP Contributor" + }, + "id": None, + "message": "Building " + branch, + "timestamp": datetime.datetime.now().isoformat() + }, + "config": None, + "repository": { + "name": "repo_name", + "url": "repo_url" + } +} + + +def get_version(): + """ + Get the version of the branch. + """ + bzr = Popen(('bzr', 'tags'), stdout=PIPE) + output = bzr.communicate()[0] + code = bzr.wait() + if code != 0: + raise Exception('Error running bzr tags') + lines = output.splitlines() + if len(lines) == 0: + tag = '0.0.0' + revision = '0' + else: + tag, revision = lines[-1].decode('utf-8').split() + bzr = Popen(('bzr', 'log', '--line', '-r', '-1'), stdout=PIPE) + output, error = bzr.communicate() + code = bzr.wait() + if code != 0: + raise Exception('Error running bzr log') + latest = output.decode('utf-8').split(':')[0] + version_string = latest == revision and tag or '%s-bzr%s' % (tag, latest) + # Save decimal version in case we need to do a portable build. + version = latest == revision and tag or '%s.%s' % (tag, latest) + return version_string, version + + +def get_yml(): + f = open('appveyor.yml') + yml_text = f.read() + f.close() + yml_text = yml_text.replace('BRANCHNAME', branch) + return yml_text + + +def hook(token, webhook_url): + webhook_element['config'] = get_yml() + webhook_element['commit']['message'] = 'Building ' + branch + version_string, version = get_version() + webhook_element['commit']['id'] = version_string + request = urllib.request.Request(webhook_url) + print(json.dumps(webhook_element)) + request.add_header('Content-Type','application/json;charset=utf-8') + request.add_header('Authorization', 'Bearer ' + token) + responce = urllib.request.urlopen(request, json.dumps(webhook_element).encode('utf-8')) + print(responce.read().decode('utf-8')) + + +hook(token, webhook_url) diff --git a/appveyor.yml b/scripts/appveyor.yml similarity index 70% rename from appveyor.yml rename to scripts/appveyor.yml index 189d94151..490464044 100644 --- a/appveyor.yml +++ b/scripts/appveyor.yml @@ -6,21 +6,21 @@ init: - bzr --version clone_script: - - bzr checkout --lightweight lp:openlp openlp + - bzr checkout --lightweight BRANCHNAME openlp environment: PYTHON: C:\\Python34 install: # Install dependencies from pypi - - %PYTHON%\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==3.0.10 psycopg2 pypiwin32 pyenchant + - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==3.0.10 psycopg2 pypiwin32 pyenchant" # Install mysql dependency - - %PYTHON%\python.exe -m pip install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df + - "%PYTHON%\\python.exe -m pip install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df" # Download and install lxml and pyicu (originally from http://www.lfd.uci.edu/~gohlke/pythonlibs/) - curl -L "https://www.dropbox.com/s/7dwwna459j6qvbp/lxml-3.6.4-cp34-cp34m-win32.whl?dl=1" -o lxml-3.6.4-cp34-cp34m-win32.whl - - %PYTHON%\python.exe -m pip install lxml-3.6.4-cp34-cp34m-win32.whl + - "%PYTHON%\\python.exe -m pip install lxml-3.6.4-cp34-cp34m-win32.whl" - curl -L "https://www.dropbox.com/s/ib1yq4xq7o1dma7/PyICU-1.9.5-cp34-cp34m-win32.whl?dl=1" -o PyICU-1.9.5-cp34-cp34m-win32.whl - - %PYTHON%\python.exe -m pip install PyICU-1.9.5-cp34-cp34m-win32.whl + - "%PYTHON%\\python.exe -m pip install PyICU-1.9.5-cp34-cp34m-win32.whl" # Download and install PyQt5 - curl -L -O http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-5.5.1/PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe - PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe /S @@ -37,9 +37,7 @@ install: # Download and unpack mediainfo - curl -O https://mediaarea.net/download/binary/mediainfo/0.7.90/MediaInfo_CLI_0.7.90_Windows_i386.zip - mkdir MediaInfo - - cd MediaInfo - - 7z x ../MediaInfo_CLI_0.7.90_Windows_i386.zip - - cd.. + - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip - cp MediaInfo\\MediaInfo.exe openlp\\MediaInfo.exe # Disabled portable installers - can't figure out how to make them silent # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe @@ -54,15 +52,12 @@ build: off test_script: - cd openlp - - %PYTHON%\\python.exe -m nose -v tests + - "%PYTHON%\\python.exe -m nose -v tests" after_test: # This is where we create a package using PyInstaller - # First download and unpack PyInstaller - - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip + # First get PyInstaller + - curl -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip - 7z x develop.zip - # Then get the packaging repo - - bzr checkout --lightweight lp:~tomasgroth/openlp/packaging-appveyor packaging - - cd packaging - - %PYTHON%\python.exe windows/windows-builder.py -v -u -t -c windows\\config.ini -b ..\\openlp - + # Build the bundle + - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp" From 1bb2e9e2781b2060f8e3ef2c137add272e01fee8 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 21:57:33 +0100 Subject: [PATCH 6/9] Another fix for tests on windows. --- tests/functional/openlp_core_ui/test_maindisplay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/openlp_core_ui/test_maindisplay.py b/tests/functional/openlp_core_ui/test_maindisplay.py index 751263e06..8b10f6e0f 100644 --- a/tests/functional/openlp_core_ui/test_maindisplay.py +++ b/tests/functional/openlp_core_ui/test_maindisplay.py @@ -271,7 +271,7 @@ class TestMainDisplay(TestCase, TestMixin): service_item.theme_data = MagicMock() service_item.theme_data.background_type = 'video' service_item.theme_data.theme_name = 'name' - service_item._raw_frames = [] + service_item.theme_data.background_filename = 'background_filename' mocked_plugin = MagicMock() display.plugin_manager = PluginManager() display.plugin_manager.plugins = [mocked_plugin] From bbda32b949e88848bb9772f678504423e337fceb Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 22:08:32 +0100 Subject: [PATCH 7/9] use revision number for appveyor id --- scripts/appveyor-webhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/appveyor-webhook.py b/scripts/appveyor-webhook.py index 841c5b532..e28fac6b3 100755 --- a/scripts/appveyor-webhook.py +++ b/scripts/appveyor-webhook.py @@ -72,7 +72,7 @@ def get_version(): if code != 0: raise Exception('Error running bzr log') latest = output.decode('utf-8').split(':')[0] - version_string = latest == revision and tag or '%s-bzr%s' % (tag, latest) + version_string = latest == revision and tag or 'r%s' % latest # Save decimal version in case we need to do a portable build. version = latest == revision and tag or '%s.%s' % (tag, latest) return version_string, version @@ -93,7 +93,7 @@ def hook(token, webhook_url): webhook_element['commit']['id'] = version_string request = urllib.request.Request(webhook_url) print(json.dumps(webhook_element)) - request.add_header('Content-Type','application/json;charset=utf-8') + request.add_header('Content-Type', 'application/json;charset=utf-8') request.add_header('Authorization', 'Bearer ' + token) responce = urllib.request.urlopen(request, json.dumps(webhook_element).encode('utf-8')) print(responce.read().decode('utf-8')) From 105edf36c36092c98a3e5e602b43ffe8c2cce148 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 30 Nov 2016 21:54:06 +0100 Subject: [PATCH 8/9] More appveyor adjustments --- scripts/appveyor-webhook.py | 79 ++++++++++++++++++++++++++----------- scripts/appveyor.yml | 66 +++++++++++++++++-------------- 2 files changed, 92 insertions(+), 53 deletions(-) diff --git a/scripts/appveyor-webhook.py b/scripts/appveyor-webhook.py index e28fac6b3..573aa1045 100755 --- a/scripts/appveyor-webhook.py +++ b/scripts/appveyor-webhook.py @@ -21,34 +21,40 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### +""" +This script is used to trigger a build at appveyor. Since the code is not hosted +on github the normal triggering mechanisms can't be use. The project is +registered as subversion repository. A webhook is used to trigger new builds. +The appveyor.yml used for the build is send to appveyor when calling the hook. +""" import json import urllib import urllib.request import datetime import sys +import time from subprocess import Popen, PIPE -token = 'xx' -webhook_url = 'https://ci.appveyor.com/api/subversion/webhook?id=x' -branch = 'lp:openlp' +appveyor_build_url = 'https://ci.appveyor.com/project/TomasGroth/openlp/build' +appveyor_api_url = 'https://ci.appveyor.com/api/projects/TomasGroth/openlp' webhook_element = \ -{ - "commit": { - "author": { - "email": "open@contributer", - "name": "OpenLP Contributor" + { + 'commit': { + 'author': { + 'email': 'open@contributer', + 'name': 'OpenLP Contributor' + }, + 'id': None, + 'message': None, + 'timestamp': datetime.datetime.now().isoformat() }, - "id": None, - "message": "Building " + branch, - "timestamp": datetime.datetime.now().isoformat() - }, - "config": None, - "repository": { - "name": "repo_name", - "url": "repo_url" + 'config': None, + 'repository': { + 'name': 'repo_name', + 'url': 'repo_url' + } } -} def get_version(): @@ -78,7 +84,10 @@ def get_version(): return version_string, version -def get_yml(): +def get_yml(branch): + """ + Returns the content of appveyor.yml and inserts the branch to be build + """ f = open('appveyor.yml') yml_text = f.read() f.close() @@ -86,17 +95,39 @@ def get_yml(): return yml_text -def hook(token, webhook_url): - webhook_element['config'] = get_yml() +def hook(webhook_url, yml): + """ + Activate the webhook to start the build + """ + webhook_element['config'] = yml webhook_element['commit']['message'] = 'Building ' + branch version_string, version = get_version() webhook_element['commit']['id'] = version_string request = urllib.request.Request(webhook_url) - print(json.dumps(webhook_element)) request.add_header('Content-Type', 'application/json;charset=utf-8') - request.add_header('Authorization', 'Bearer ' + token) responce = urllib.request.urlopen(request, json.dumps(webhook_element).encode('utf-8')) - print(responce.read().decode('utf-8')) + if responce.getcode() != 204: + print('An error happened when calling the webhook! Return code: %d' % responce.getcode()) + print(responce.read().decode('utf-8')) -hook(token, webhook_url) +def get_appveyor_build_url(branch): + """ + Get the url of the build. + """ + # Wait 10 seconds to make sure the hook has been triggered + time.sleep(10) + responce = urllib.request.urlopen(appveyor_api_url) + json_str = responce.read().decode('utf-8') + build_json = json.loads(json_str) + build_url = '%s/%s' % (appveyor_build_url, build_json['build']['version']) + print('Check this URL for build status: %s' % build_url) + + +if len(sys.argv) != 3: + print('Usage: %s ' % sys.argv[0]) +else: + webhook_url = sys.argv[1] + branch = sys.argv[2] + hook(webhook_url, get_yml(branch)) + get_appveyor_build_url(branch) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 490464044..4784ed50d 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.5.0.{build} +version: OpenLP-win-ci-b{build} init: - choco install -y --force bzr @@ -6,39 +6,54 @@ init: - bzr --version clone_script: - - bzr checkout --lightweight BRANCHNAME openlp + - bzr checkout --lightweight BRANCHNAME openlp-branch environment: PYTHON: C:\\Python34 install: # Install dependencies from pypi - - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==3.0.10 psycopg2 pypiwin32 pyenchant" + - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc psycopg2 pypiwin32 pyenchant" # Install mysql dependency - "%PYTHON%\\python.exe -m pip install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df" # Download and install lxml and pyicu (originally from http://www.lfd.uci.edu/~gohlke/pythonlibs/) - - curl -L "https://www.dropbox.com/s/7dwwna459j6qvbp/lxml-3.6.4-cp34-cp34m-win32.whl?dl=1" -o lxml-3.6.4-cp34-cp34m-win32.whl - - "%PYTHON%\\python.exe -m pip install lxml-3.6.4-cp34-cp34m-win32.whl" - - curl -L "https://www.dropbox.com/s/ib1yq4xq7o1dma7/PyICU-1.9.5-cp34-cp34m-win32.whl?dl=1" -o PyICU-1.9.5-cp34-cp34m-win32.whl - - "%PYTHON%\\python.exe -m pip install PyICU-1.9.5-cp34-cp34m-win32.whl" + - "%PYTHON%\\python.exe -m pip install https://get.openlp.org/win-sdk/lxml-3.6.4-cp34-cp34m-win32.whl" + - "%PYTHON%\\python.exe -m pip install https://get.openlp.org/win-sdk/PyICU-1.9.5-cp34-cp34m-win32.whl" # Download and install PyQt5 - curl -L -O http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-5.5.1/PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe - PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe /S - # Download and install Inno Setup - used for packaging - - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe - - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP- - # Download and unpack portable-bundle - - curl -L "https://www.dropbox.com/s/omr8mw9kamnml3l/portable-setup.7z?dl=1" -o portable-setup.7z - - 7z x portable-setup.7z # Download and unpack mupdf - curl -O http://mupdf.com/downloads/archive/mupdf-1.9a-windows.zip - 7z x mupdf-1.9a-windows.zip - - cp mupdf-1.9a-windows/mupdf.exe openlp/mupdf.exe + - cp mupdf-1.9a-windows/mupdf.exe openlp-branch/mupdf.exe # Download and unpack mediainfo - curl -O https://mediaarea.net/download/binary/mediainfo/0.7.90/MediaInfo_CLI_0.7.90_Windows_i386.zip - mkdir MediaInfo - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip - - cp MediaInfo\\MediaInfo.exe openlp\\MediaInfo.exe + - cp MediaInfo\\MediaInfo.exe openlp-branch\\MediaInfo.exe + + +build: off + +test_script: + - cd openlp-branch + - "%PYTHON%\\python.exe -m nose -v tests" + # Go back to the user root folder + - cd.. + +after_test: + # This is where we create a package using PyInstaller + # First get PyInstaller + - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip + - 7z x develop.zip + # Install PyInstaller dependencies + - "%PYTHON%\\python.exe -m pip install future" + # Download and install Inno Setup - used for packaging + - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe + - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP- + # Download and unpack portable-bundle + - curl -O https://get.openlp.org/win-sdk/portable-setup.7z + - 7z x portable-setup.7z # Disabled portable installers - can't figure out how to make them silent # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe # - PortableApps.comInstaller_3.4.4.paf.exe /S @@ -46,18 +61,11 @@ install: # - PortableApps.comLauncher_2.2.1.paf.exe /S # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe # - NSISPortable_3.0_English.paf.exe /S - - -build: off - -test_script: - - cd openlp - - "%PYTHON%\\python.exe -m nose -v tests" - -after_test: - # This is where we create a package using PyInstaller - # First get PyInstaller - - curl -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip - - 7z x develop.zip + # Get the packaging code + - bzr checkout --lightweight lp:~tomasgroth/openlp/packaging-appveyor packaging # Build the bundle - - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp" + - cd packaging + - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch" + +artifacts: + - path: openlp-branch\dist\*.exe From 19a450fab5e7556c609d7909d4d01c9b5dd8bbe1 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Thu, 1 Dec 2016 09:10:51 +0100 Subject: [PATCH 9/9] Use the standard packaging repo. --- scripts/appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 4784ed50d..43647bf71 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -62,7 +62,7 @@ after_test: # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe # - NSISPortable_3.0_English.paf.exe /S # Get the packaging code - - bzr checkout --lightweight lp:~tomasgroth/openlp/packaging-appveyor packaging + - bzr checkout --lightweight lp:openlp/packaging packaging # Build the bundle - cd packaging - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch"