Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
85 lines (60 sloc) 2.01 KB
#
# Gyazo turbo.me file
# https://github.com/turboapps/turbome/tree/master/[path_to_turbo.me]
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
###################################
# Meta tags
###################################
meta title="gyazo"
meta namespace="gyazo"
meta name="gyazo"
###################################
# Pull dependency images
###################################
using gnu/wget,python/python:3.4.1
###################################
# Download and install
###################################
# Set working directory
cmd mkdir c:\Workspace
workdir c:\Workspace
# Install "requests" module for python
cmd pip install requests --quiet
# Get download url and version
batch
echo import requests >> getRelease.py
echo import re >> getRelease.py
echo host = 'https://gyazo.com/download' >> 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 print(list(re.findall('(https://files.gyazo.com/setup/Gyazo-((?:\d+\.)*\d+).exe)', r.text )[0])) >> 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
batch
installer.exe /verysilent /norestart /suppressmsgboxes
taskkill /im GyStation.exe /t /f
enable httpUrlPassthrough
###################################
# Clean up
###################################
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir C:\wget /s /q
cmd rmdir C:\python34 /s /q
###################################
# Version
###################################
meta tag=version
###################################
# Startup File
###################################
startup file [("@PROGRAMFILESX86@\Gyazo\Gyazowin.exe"), ("@PROGRAMFILESX86@\Gyazo\GyStation.exe")]