Work on scripts

master
Dominik Deák 5 years ago
parent bf4403025b
commit 350611b26e
No known key found for this signature in database
GPG Key ID: 85514EC0CCE7007C
  1. 95
      Scripts/Detail/Build.py
  2. 17
      Scripts/Detail/Config.py
  3. 10
      Scripts/build.py

@ -113,54 +113,65 @@ class BuildSystem:
utility.printHeading( "Building standalone ZIP package..." )
# Copy Synergy binaries
fileList = [
"libEGL.dll",
"libGLESv2.dll",
"Qt5Core.dll",
"Qt5Gui.dll",
"Qt5Network.dll",
"Qt5Svg.dll",
"Qt5Widgets.dll",
"synergy.exe",
"synergyc.exe",
"synergyd.exe",
"synergys.exe",
"syntool.exe"
]
sourceBinPath = utility.joinPath( config.synergyBuildPath(), "bin/Release" )
targetBinPath = utility.joinPath( config.synergyBuildPath(), "bin", self.productPackageName )
if not os.path.exists( targetBinPath ):
os.mkdir( targetBinPath )
for fileName in fileList:
filePath = utility.joinPath( sourceBinPath, fileName )
shutil.copy2( filePath, targetBinPath )
shutil.copytree( utility.joinPath( sourceBinPath, "Platforms" ), utility.joinPath( targetBinPath, "Platforms" ), dirs_exist_ok = True )
shutil.copytree( utility.joinPath( sourceBinPath, "Styles" ), utility.joinPath( targetBinPath, "Styles" ), dirs_exist_ok = True )
# Copy OpenSSL binaries
sourceOpenSSLPath = utility.joinPath( config.synergyCorePath(), "ext/openssl/windows/x64/bin" )
targetOpenSSLPath = utility.joinPath( targetBinPath, "OpenSSL" )
def copySynergyBinaries( sourcePath, productPath ):
fileList = [
"libEGL.dll",
"libGLESv2.dll",
"Qt5Core.dll",
"Qt5Gui.dll",
"Qt5Network.dll",
"Qt5Svg.dll",
"Qt5Widgets.dll",
"synergy.exe",
"synergyc.exe",
"synergyd.exe",
"synergys.exe",
"syntool.exe"
]
if not os.path.exists( productPath ):
os.mkdir( productPath )
for fileName in fileList:
filePath = utility.joinPath( sourcePath, fileName )
shutil.copy2( filePath, productPath )
shutil.copytree( utility.joinPath( sourcePath, "Platforms" ), utility.joinPath( productPath, "Platforms" ), dirs_exist_ok = True )
shutil.copytree( utility.joinPath( sourcePath, "Styles" ), utility.joinPath( productPath, "Styles" ), dirs_exist_ok = True )
def copyOpenSSLBinaries( sourceOpenSSLPath, productPath ):
productOpenSSLPath = utility.joinPath( productPath, "OpenSSL" )
if not os.path.exists( productOpenSSLPath ):
os.mkdir( productOpenSSLPath )
if not os.path.exists( targetOpenSSLPath ):
os.mkdir( targetOpenSSLPath )
for filePath in glob.glob( sourceOpenSSLPath + "/*" ):
shutil.copy2( filePath, productOpenSSLPath )
for filePath in glob.glob( sourceOpenSSLPath + "/*" ):
shutil.copy2( filePath, targetOpenSSLPath )
for filePath in glob.glob( sourceOpenSSLPath + "/*.dll" ):
shutil.copy2( filePath, productPath )
def makeZipArchive( productPath, zipPath ):
rootPath = utility.joinPath( productPath, ".." )
basePath = os.path.relpath( productPath, rootPath )
shutil.make_archive( zipPath, 'zip', rootPath, basePath )
sourcePath = utility.joinPath( config.synergyBuildPath(), "bin/Release" )
productPath = utility.joinPath( config.synergyBuildPath(), "bin", self.productPackageName )
copySynergyBinaries( sourcePath, productPath )
sourceOpenSSLPath = utility.joinPath( config.synergyCorePath(), "ext/openssl/windows/x64/bin" )
for filePath in glob.glob( sourceOpenSSLPath + "/*.dll" ):
shutil.copy2( filePath, targetBinPath )
copyOpenSSLBinaries( sourceOpenSSLPath, productPath )
# Make ZIP package
zipPath = utility.joinPath( config.binariesPath(), self.productPackageName )
rootPath = utility.joinPath( targetBinPath, ".." )
basePath = os.path.relpath( targetBinPath, rootPath )
shutil.make_archive( zipPath, 'zip', rootPath, basePath )
makeZipArchive( productPath, zipPath )
# Darwin builds
def __darwinMakeApplication( self ):

@ -5,11 +5,26 @@ import os, platform, configparser
import Detail.Utility as utility
class Configuration( configparser.ConfigParser ):
class Configuration:
upstreamURL = ""
toplevelPath = ""
synergyCorePath = ""
synergyBuildPath = ""
synergyVersionPath = ""
binariesPath = ""
toolsPath = ""
libQtPath = ""
vcvarsallPath = ""
cmakeGenerator = ""
# Constructor
def __init__( self, configPath ):
# parser = configparser.ConfigParser
super().__init__( dict_type = dict, allow_no_value = True )
self.read( configPath )

@ -2,9 +2,11 @@
# import clean
import Detail.Build# as build
import Detail.Build
b = Detail.Build.BuildSystem()
# b = Detail.Build.BuildSystem()
b.configure()
b.make()
# b.configure()
# b.make()
# b.clean()

Loading…
Cancel
Save