Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
63 lines (46 sloc) 1.68 KB
# Stellarium turbo.me file
# https://github.com/turboapps/turbome/tree/master/stellarium
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
requires privilege:admin
meta title="stellarium"
meta namespace="stellarium"
meta name="stellarium"
###################################
# Install settings
###################################
var page = "http://www.stellarium.org/"
var pattern = "(https?:\/\/sourceforge\.net\/projects\/stellarium\/files\/Stellarium-win32\/\d+\.\d+[\d\.]*\/stellarium-(\d+\.\d+[\d\.]*)-win32.exe\/download)"
###################################
# Pull dependency images
###################################
using wget,python:3.4.1
###################################
# Download and install
###################################
cmd "mkdir @SYSDRIVE@\Workspace"
workdir @SYSDRIVE@\Workspace
# Install "requests" module for python
cmd "pip install requests --quiet"
# Get the latest version tag and download url
cmd "python -c ""import sys, requests, re; r = requests.get('%page%'); print(re.findall('%pattern%', r.text)[0]);"""
var res = last
cmd "python -c ""print(%res%[0])"""
var url = last
cmd "python -c ""print(%res%[1])"""
var tag = last
# Download and install the latest version
cmd "wget -q -O install.exe --no-check-certificate --no-verbose ""%url%"""
cmd install.exe /VERYSILENT
# Set startup file
startup file ("@PROGRAMFILESX86@\Stellarium\stellarium.exe")
setworkdir "@PROGRAMFILESX86@\Stellarium\"
###################################
# Clean up
###################################
workdir @SYSDRIVE@\
cmd "rmdir @SYSDRIVE@\Workspace /s /q"
cmd "rmdir @SYSDRIVE@\wget /s /q"
cmd "rmdir @SYSDRIVE@\Python34 /s /q"
meta tag=tag