diff --git a/CMakeLists.txt b/CMakeLists.txt index e8473b8..1f1da90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,3 +31,19 @@ elseif (WIN32) endif () 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") diff --git a/ports/deploy/deploy_mac.py b/ports/deploy/deploy_mac.py index d58655d..d372abb 100644 --- a/ports/deploy/deploy_mac.py +++ b/ports/deploy/deploy_mac.py @@ -44,7 +44,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools): self.detectQtIFWVersion() self.programName = 'AkVirtualCamera' 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.appBundleDir = os.path.join(self.rootInstallDir, self.programName + '.plugin') self.execPrefixDir = os.path.join(self.appBundleDir, 'Contents') diff --git a/ports/deploy/deploy_posix.py b/ports/deploy/deploy_posix.py index cfbec41..0c28700 100644 --- a/ports/deploy/deploy_posix.py +++ b/ports/deploy/deploy_posix.py @@ -43,16 +43,16 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools): self.detectQtIFW() self.detectQtIFWVersion() 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.mainBinary = os.path.join(self.binaryInstallDir, 'webcamoid') self.programName = os.path.basename(self.mainBinary) self.detectMake() - xspec = self.qmakeQuery(var='QMAKE_XSPEC') + targetSystem = self.targetSystem() - if 'win32' in xspec: + if targetSystem == 'windows': self.targetSystem = 'posix_windows' - elif 'android' in xspec: + elif targetSystem == 'android': self.targetSystem = 'android' self.binarySolver = DTBinaryElf.ElfBinaryTools() diff --git a/ports/deploy/deploy_posix_windows.py b/ports/deploy/deploy_posix_windows.py index 0e784f3..8e6c65d 100644 --- a/ports/deploy/deploy_posix_windows.py +++ b/ports/deploy/deploy_posix_windows.py @@ -43,7 +43,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools): self.detectQtIFWVersion() self.programName = 'AkVirtualCamera' 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.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin') self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe') diff --git a/ports/deploy/deploy_windows.py b/ports/deploy/deploy_windows.py index 9d0d31a..96905f4 100644 --- a/ports/deploy/deploy_windows.py +++ b/ports/deploy/deploy_windows.py @@ -43,7 +43,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools): self.detectQtIFWVersion() self.adminRights = True 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.binaryInstallDir = os.path.join(self.rootInstallDir, 'bin') self.mainBinary = os.path.join(self.binaryInstallDir, self.programName + '.exe')