70 lines
1.9 KiB
Python
Raw Normal View History

2019-10-06 16:13:50 +03:00
# This Python file uses the following encoding: utf-8
2019-10-06 20:17:52 +03:00
from BuildBotLib.make import Make
2019-10-06 16:13:50 +03:00
from buildbot.plugins import secrets, util, steps
from pathlib import Path
import datetime
import os
import subprocess
from BuildBotLib.secretManager import *
2019-10-06 20:17:52 +03:00
class CMake(Make):
2019-10-06 16:13:50 +03:00
2019-10-06 19:15:02 +03:00
def __init__(self):
Make.__init__(self);
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
@util.renderer
def linuxXmakeCmd(self, props):
secret = SecretManager("/home/andrei/buildBotSecret/secret.json")
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=linux-g++',
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
]
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
return command
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
@util.renderer
def windowsXmakeCmd(self, props):
secret = SecretManager("/home/andrei/buildBotSecret/secret.json")
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=win64-g++',
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
]
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
return command
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
@util.renderer
def androidXmakeCmd(self, props):
secret = SecretManager("/home/andrei/buildBotSecret/secret.json")
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=android-clang',
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
]
2019-10-06 16:13:50 +03:00
2019-10-06 20:17:52 +03:00
return command