summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-07-26 17:01:08 +0200
committerFlorian Bruhin <git@the-compiler.org>2016-07-26 17:01:08 +0200
commit2795ae947817f494c58b49959346b48779bb077c (patch)
treef8d2014ff38c30e07077395fbf60c797d4499dfc
parent614794a62a77552483a0b0471f06c9d04e547a75 (diff)
downloadqutebrowser-2795ae947817f494c58b49959346b48779bb077c.tar.gz
qutebrowser-2795ae947817f494c58b49959346b48779bb077c.zip
Update build scripts from master
-rw-r--r--scripts/dev/Makefile-dmg9
-rwxr-xr-xscripts/dev/build_release.py16
2 files changed, 17 insertions, 8 deletions
diff --git a/scripts/dev/Makefile-dmg b/scripts/dev/Makefile-dmg
index 1ecdb1514..0f699ea8b 100644
--- a/scripts/dev/Makefile-dmg
+++ b/scripts/dev/Makefile-dmg
@@ -24,7 +24,7 @@ SOURCE_DIR ?= .
SOURCE_FILES ?= dist/qutebrowser.app COPYING
TEMPLATE_DMG ?= template.dmg
-TEMPLATE_SIZE ?= 120m
+TEMPLATE_SIZE ?= 300m
################################################################################
# DMG building. No editing should be needed beyond this point.
@@ -37,17 +37,12 @@ WC_DIR=wc
.PHONY: all
all: $(MASTER_DMG)
-$(TEMPLATE_DMG): $(TEMPLATE_DMG).bz2
- bunzip2 -k $<
-
-$(TEMPLATE_DMG).bz2:
+$(TEMPLATE_DMG):
@echo
@echo --------------------- Generating empty template --------------------
mkdir template
hdiutil create -fs HFSX -layout SPUD -size $(TEMPLATE_SIZE) "$(TEMPLATE_DMG)" -srcfolder template -format UDRW -volname "$(NAME)" -quiet
rmdir template
- bzip2 "$(TEMPLATE_DMG)"
- @echo
$(WC_DMG): $(TEMPLATE_DMG)
cp $< $@
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py
index 31906b0c2..fc0897d4b 100755
--- a/scripts/dev/build_release.py
+++ b/scripts/dev/build_release.py
@@ -28,6 +28,7 @@ import shutil
import subprocess
import argparse
import tarfile
+import tempfile
import collections
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
@@ -94,7 +95,7 @@ def build_osx():
utils.print_title("Updating 3rdparty content")
update_3rdparty.update_pdfjs()
utils.print_title("Building .app via pyinstaller")
- call_tox('pyinstaller')
+ call_tox('pyinstaller', '-r')
utils.print_title("Building .dmg")
subprocess.check_call(['make', '-f', 'scripts/dev/Makefile-dmg'])
utils.print_title("Cleaning up...")
@@ -103,6 +104,17 @@ def build_osx():
for d in ['dist', 'build']:
shutil.rmtree(d)
+ utils.print_title("Running smoke test")
+ with tempfile.TemporaryDirectory() as tmpdir:
+ subprocess.check_call(['hdiutil', 'attach', 'qutebrowser.dmg',
+ '-mountpoint', tmpdir])
+ try:
+ binary = os.path.join(tmpdir, 'qutebrowser.app', 'Contents',
+ 'MacOS', 'qutebrowser')
+ smoke_test(binary)
+ finally:
+ subprocess.check_call(['hdiutil', 'detach', tmpdir])
+
def build_windows():
"""Build windows executables/setups."""
@@ -116,6 +128,8 @@ def build_windows():
python_x86 = r'C:\Python{}_x32'.format(ver)
python_x64 = r'C:\Python{}'.format(ver)
+ utils.print_title("Rebuilding tox environment")
+ call_tox('cxfreeze-windows', '-r', '--notest')
utils.print_title("Running 32bit freeze.py build_exe")
call_tox('cxfreeze-windows', 'build_exe', python=python_x86)
utils.print_title("Running 32bit freeze.py bdist_msi")