Create package_info.conf when building and read it when deploying.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-02-22 19:19:17 -03:00
parent ef53a9508e
commit f746a77318
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
5 changed files with 23 additions and 7 deletions

View file

@ -31,3 +31,19 @@ elseif (WIN32)
endif () endif ()
add_subdirectory(Manager) add_subdirectory(Manager)
if (APPLE)
set(TARGET_SYSTEM mac)
elseif (WIN32)
set(TARGET_SYSTEM windows)
endif ()
file(WRITE ${CMAKE_BINARY_DIR}/package_info.conf
"[Package]\n"
"appName = AkVirtualCamera\n"
"packageName = akvirtualcamera\n"
"version = ${VERSION}\n"
"description = AkVirtualCamera, virtual camera for Mac and Windows\n"
"url = https://github.com/webcamoid/akvirtualcamera\n"
"licenseDescription = GNU General Public License v3.0\n"
"targetSystem = ${TARGET_SYSTEM}\n")

View file

@ -44,7 +44,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
self.detectQtIFWVersion() self.detectQtIFWVersion()
self.programName = 'AkVirtualCamera' self.programName = 'AkVirtualCamera'
self.adminRights = True self.adminRights = True
self.packageConfig = os.path.join(self.rootDir, 'ports/deploy/package_info.conf') self.packageConfig = os.path.join(self.buildDir, 'package_info.conf')
self.rootInstallDir = os.path.join(self.installDir, 'Applications') self.rootInstallDir = os.path.join(self.installDir, 'Applications')
self.appBundleDir = os.path.join(self.rootInstallDir, self.programName + '.plugin') self.appBundleDir = os.path.join(self.rootInstallDir, self.programName + '.plugin')
self.execPrefixDir = os.path.join(self.appBundleDir, 'Contents') self.execPrefixDir = os.path.join(self.appBundleDir, 'Contents')

View file

@ -43,16 +43,16 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
self.detectQtIFW() self.detectQtIFW()
self.detectQtIFWVersion() self.detectQtIFWVersion()
self.rootInstallDir = os.path.join(self.installDir, self.qmakeQuery(var='QT_INSTALL_PREFIX')[1:]) self.rootInstallDir = os.path.join(self.installDir, self.qmakeQuery(var='QT_INSTALL_PREFIX')[1:])
self.packageConfig = os.path.join(self.rootDir, 'ports/deploy/package_info.conf') self.packageConfig = os.path.join(self.buildDir, 'package_info.conf')
self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin') self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin')
self.mainBinary = os.path.join(self.binaryInstallDir, 'webcamoid') self.mainBinary = os.path.join(self.binaryInstallDir, 'webcamoid')
self.programName = os.path.basename(self.mainBinary) self.programName = os.path.basename(self.mainBinary)
self.detectMake() self.detectMake()
xspec = self.qmakeQuery(var='QMAKE_XSPEC') targetSystem = self.targetSystem()
if 'win32' in xspec: if targetSystem == 'windows':
self.targetSystem = 'posix_windows' self.targetSystem = 'posix_windows'
elif 'android' in xspec: elif targetSystem == 'android':
self.targetSystem = 'android' self.targetSystem = 'android'
self.binarySolver = DTBinaryElf.ElfBinaryTools() self.binarySolver = DTBinaryElf.ElfBinaryTools()

View file

@ -43,7 +43,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
self.detectQtIFWVersion() self.detectQtIFWVersion()
self.programName = 'AkVirtualCamera' self.programName = 'AkVirtualCamera'
self.adminRights = True self.adminRights = True
self.packageConfig = os.path.join(self.rootDir, 'ports/deploy/package_info.conf') self.packageConfig = os.path.join(self.buildDir, 'package_info.conf')
self.rootInstallDir = os.path.join(self.installDir, self.programName + '.plugin') self.rootInstallDir = os.path.join(self.installDir, self.programName + '.plugin')
self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin') self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin')
self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe') self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe')

View file

@ -43,7 +43,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
self.detectQtIFWVersion() self.detectQtIFWVersion()
self.adminRights = True self.adminRights = True
self.programName = 'AkVirtualCamera' self.programName = 'AkVirtualCamera'
self.packageConfig = os.path.join(self.rootDir, 'ports/deploy/package_info.conf') self.packageConfig = os.path.join(self.buildDir, 'package_info.conf')
self.rootInstallDir = os.path.join(self.installDir, self.programName + '.plugin') self.rootInstallDir = os.path.join(self.installDir, self.programName + '.plugin')
self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin') self.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin')
self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe') self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe')