Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
#
# BlueGriffon turbo.me file
# https://github.com/turboapps/turbome/tree/master/bluegriffon
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
###################################
# Meta tags
###################################
meta title="BlueGriffon"
meta namespace="bluegriffon"
meta name="bluegriffon"
###################################
# Pull dependency images
###################################
using turbo/turboscript-tools:2016.8.31
###################################
# Download and install
###################################
# Set working directory
cmd mkdir c:\Workspace
workdir c:\Workspace
# Get download url and version
batch
echo import requests >> getRelease.py
echo import re >> getRelease.py
echo import distutils.version >> getRelease.py
echo host = 'http://bluegriffon.org/freshmeat' >> getRelease.py
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getRelease.py
echo r = requests.get(host , headers=headers, timeout=10, verify=False) >> getRelease.py
echo tag = max(re.findall('a href="(\d+(?:\.\d)+)\/?"', r.text), key=lambda row: distutils.version.LooseVersion(row)) >> getRelease.py
echo r = requests.get(host + '/' + tag, headers=headers, timeout=10, verify=False) >> getRelease.py
echo filename = re.findall('a href="(.*?\.exe)"', r.text)[0] >> getRelease.py
echo url = "/".join([host, tag, filename]) >> getRelease.py
echo print([url, tag]) >> getRelease.py
cmd python getRelease.py
var res=last
cmd "python -c ""print(%res%[0])"""
var url=last
cmd "python -c ""print(%res%[1])"""
var version=last
# Download
cmd "wget --no-check-certificate --no-verbose -O installer.exe %url%"
# Install
cmd installer.exe /verysilent /nocancel
# Turn off auto-updates
batch
echo with open('c:\\Program Files (x86)\\BlueGriffon\\defaults\\pref\\bluegriffon-prefs.js', 'r+') as pref: >> noUpdates.py
echo settings = pref.read() >> noUpdates.py
echo for key in ["extensions.update.autoUpdateDefault", "extensions.update.enabled", "bluegriffon.updates.check.enabled"]: >> noUpdates.py
echo settings = settings.replace('\"{0}\", true'.format(key), '\"{0}\", false'.format(key)) >> noUpdates.py
echo pref.seek(0) >> noUpdates.py
echo pref.write(settings) >> noUpdates.py
echo pref.truncate() >> noUpdates.py
cmd python noUpdates.py
###################################
# Clean up
###################################
cmd powershell -NoProfile -Command "Import-Module Turbo; Remove-BuildTools"
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\TurboBuildTools /s /q
layer microsoft/universal-crt
###################################
# Version
###################################
meta tag=version
###################################
# Startup File
###################################
startup file ("@PROGRAMFILESX86@\BlueGriffon\bluegriffon.exe")