Skip to content

Commit

Permalink
Remove LLA private and RFIDeas build options
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Jan 8, 2024
1 parent fedc57b commit 721261e
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 84 deletions.
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mode: ContinuousDelivery
next-version: 2.5.0
next-version: 3.0.0
branches:
master:
regex: (origin\/)?master
Expand Down
9 changes: 1 addition & 8 deletions build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
set -x
set -e

buildprivate=False
# Full Edition build?
if [[($1 -eq 1) || ($1 = 'true') || ($1 = 'yes')]]
then
buildprivate=True
fi

(cd installer && conan install -o LLA_BUILD_PRIVATE=$buildprivate -u . --build=missing)
(cd installer && conan install -u . --build=missing)
(cd sources/scripts/ && pip3 install -r requirements.txt)
(cd sources/scripts/ && python3 lla.py)

Expand Down
14 changes: 5 additions & 9 deletions build-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@ Param(
[Parameter(ParameterSetName="WithoutProfile", Mandatory)]
[string]$build_type,
[Parameter(Mandatory=$false)]
[bool]$build_private,
[Parameter(Mandatory=$false)]
[bool]$build_nfc,
[Parameter(Mandatory=$false)]
[bool]$build_rfideas,
[Parameter(Mandatory=$false)]
[bool]$build_unittest
)

Write-Host $arch $build_type $build_private $build_nfc
Write-Host $arch $build_type $build_nfc
Set-Location installer
if($with_profile) {
.\conan-imports.ps1 -with_profile -build_private $build_private -build_nfc $build_nfc -build_rfideas $build_rfideas -build_unittest $build_unittest
.\conan-imports.ps1 -with_profile -build_nfc $build_nfc -build_unittest $build_unittest
} else {
.\conan-imports.ps1 -arch $arch -build_type $build_type -build_private $build_private -build_nfc $build_nfc -build_rfideas $build_rfideas -build_unittest $build_unittest
.\conan-imports.ps1 -arch $arch -build_type $build_type -build_nfc $build_nfc -build_unittest $build_unittest
}
Set-Location ../sources/scripts
#pip install -r requirements.txt
Expand All @@ -29,9 +25,9 @@ Set-Location ../../
.\sources/scripts/generate-swig.ps1
Set-Location sources/LibLogicalAccessNet.win32
if($with_profile) {
.\conan-build.ps1 -with_profile -build_private $build_private -build_nfc $build_nfc -build_rfideas $build_rfideas -build_unittest $build_unittest
.\conan-build.ps1 -with_profile -build_private -build_nfc $build_nfc -build_unittest $build_unittest
} else {
./conan-build.ps1 -arch $arch -build_type $build_type -build_private $build_private -build_nfc $build_nfc -build_rfideas $build_rfideas -build_unittest $build_unittest
./conan-build.ps1 -arch $arch -build_type $build_type -build_nfc $build_nfc -build_unittest $build_unittest
}
Set-Location ..

Expand Down
2 changes: 1 addition & 1 deletion installer/LibLogicalAccess.Msm/MergeModule.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?include config.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Module Id="LibLogicalAccess.Msm" Language="1033" Version="1.0.0.0">
<Module Id="LibLogicalAccess.Msm" Language="1033" Version="3.0.0.0">
<Package Id="e75b8ac8-6ed3-4601-bfc3-30c46564c0c7" Manufacturer="$(var.Manufacturer)" InstallerVersion="200" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="MergeRedirectFolder">
Expand Down
2 changes: 1 addition & 1 deletion installer/LibLogicalAccess.Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?include config.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="2.5.0.0" Manufacturer="$(var.Manufacturer)" UpgradeCode="9b055bc0-f36a-4bfc-a711-73b405cceac3">
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="3.0.0.0" Manufacturer="$(var.Manufacturer)" UpgradeCode="9b055bc0-f36a-4bfc-a711-73b405cceac3">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Expand Down
14 changes: 5 additions & 9 deletions installer/conan-imports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ Param(
[Parameter(ParameterSetName="WithoutProfile", Mandatory)]
[string]$build_type,
[Parameter(Mandatory=$false)]
[bool]$build_private,
[Parameter(Mandatory=$false)]
[bool]$build_nfc,
[Parameter(Mandatory=$false)]
[bool]$build_rfideas,
[Parameter(Mandatory=$false)]
[bool]$build_unittest
)

if($with_profile) {
conan install -pr compilers/x64_msvc_debug -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x64_msvc_release -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x86_msvc_debug -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x86_msvc_release -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x64_msvc_debug -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x64_msvc_release -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x86_msvc_debug -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest -u .
conan install -pr compilers/x86_msvc_release -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest -u .
} else {
conan install -s arch=$arch -s build_type=$build_type -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest --build=missing -u .
conan install -s arch=$arch -s build_type=$build_type -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest --build=missing -u .
}
16 changes: 3 additions & 13 deletions installer/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,23 @@

class LogicalAccessSwigConan(ConanFile):
name = "LogicalAccessSwig"
version = "2.5.0"
version = "3.0.0"
settings = "build_type", "arch", "os"
options = { 'LLA_BUILD_PRIVATE': [True, False],
'LLA_BUILD_NFC': [True, False],
'LLA_BUILD_RFIDEAS': [True, False],
options = { 'LLA_BUILD_NFC': [True, False],
'LLA_BUILD_UNITTEST': [True, False]}
default_options = 'LogicalAccess:LLA_BUILD_PKCS=True', 'LLA_BUILD_PRIVATE=True', 'LLA_BUILD_NFC=True', 'LLA_BUILD_RFIDEAS=True'
default_options = 'LogicalAccess:LLA_BUILD_PKCS=True', 'LLA_BUILD_NFC=True'
revision_mode = "scm"

def configure(self):
if self.settings.os == 'Windows' and self.options.LLA_BUILD_RFIDEAS:
self.options['LogicalAccess'].LLA_BUILD_RFIDEAS = True

self.options['LogicalAccess'].LLA_BUILD_UNITTEST = self.options.LLA_BUILD_UNITTEST
self.options['LogicalAccessPrivate'].LLA_BUILD_UNITTEST = self.options.LLA_BUILD_UNITTEST

def requirements(self):
try:
if self.options.LLA_BUILD_PRIVATE:
self.requires('LogicalAccessPrivate/' + self.version + '@islog/' + self.channel)
if self.options.LLA_BUILD_NFC:
self.requires('LogicalAccessNFC/' + self.version + '@islog/' + self.channel)
else:
self.requires('LogicalAccess/' + self.version + '@islog/' + self.channel)
except ConanException:
if self.options.LLA_BUILD_PRIVATE:
self.requires('LogicalAccessPrivate/' + self.version + '@islog/' + tools.Git().get_branch())
if self.options.LLA_BUILD_NFC:
self.requires('LogicalAccessNFC/' + self.version + '@islog/' + tools.Git().get_branch())
else:
Expand Down
10 changes: 1 addition & 9 deletions sources/LibLogicalAccessNet.win32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ liblogicalaccess_card_wrap.cxx
liblogicalaccess_data_wrap.cxx
liblogicalaccess_library_wrap.cxx
liblogicalaccess_core_wrap.cxx
liblogicalaccess_iks_wrap.cxx
liblogicalaccess_exception_wrap.cxx
liblogicalaccess_crypto_wrap.cxx
lla_std_types_wrap.cxx)
Expand Down Expand Up @@ -40,13 +39,6 @@ else()
list(APPEND LLA_LINK CONAN_PKG::LogicalAccess)
endif()

set(LLA_ADDITIONAL_LINK)
if (LLA_BUILD_PRIVATE)
add_compile_definitions(BUILD_PRIVATE)
list(APPEND LLA_ADDITIONAL_LINK CONAN_PKG::LogicalAccessPrivate)
endif()

target_link_libraries(${TARGET_NAME} PUBLIC
${LLA_LINK}
${LLA_ADDITIONAL_LINK})
${LLA_LINK})
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
18 changes: 6 additions & 12 deletions sources/LibLogicalAccessNet.win32/conan-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ Param(
[Parameter(ParameterSetName="WithoutProfile", Mandatory)]
[string]$build_type,
[Parameter(Mandatory=$false)]
[bool]$build_private,
[Parameter(Mandatory=$false)]
[bool]$build_nfc,
[Parameter(Mandatory=$false)]
[bool]$build_rfideas,
[Parameter(Mandatory=$false)]
[bool]$build_unittest,
[Parameter(Mandatory=$false)]
Expand All @@ -28,7 +24,7 @@ function ExecExternal {
}
}

Write-Output "Welcome, ISLOG SWIG Win32 Build"
Write-Output "Welcome, LLA SWIG Win32 Build"

New-Item -name build -Force -ItemType Directory | Out-Null
if($with_profile) {
Expand All @@ -39,19 +35,17 @@ if($with_profile) {

Set-Location build

$PackageName = "LogicalAccessSwig/2.5.0@islog/master"
$PackageName = "LogicalAccessSwig/3.0.0@lla/master"
$Profiles = @(("compilers/x64_msvc_release", "Release", "x86_64"),
("compilers/x86_msvc_release", "Release", "x86"),
("compilers/x86_msvc_debug", "Debug", "x86"),
("compilers/x64_msvc_debug", "Debug", "x86_64"))

if (!$build_private) {
$env:ASSEMBLYAPPENDER = 'CE'
}
$env:ASSEMBLYAPPENDER = 'CE'

if($with_profile) {
foreach ($Profile in $Profiles) {
ExecExternal { conan install -pr $Profile[0] -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest --build=missing .. }
ExecExternal { conan install -pr $Profile[0] -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest --build=missing .. }
ExecExternal { conan build .. }
$config = $Profile[1]
$arch = $Profile[2]
Expand All @@ -63,7 +57,7 @@ if($with_profile) {
Remove-Item * -Recurse -Force
}
} else {
ExecExternal { conan install -s arch=$arch -s build_type=$build_type -o LLA_BUILD_PRIVATE=$build_private -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_RFIDEAS=$build_rfideas -o LLA_BUILD_UNITTEST=$build_unittest --build=missing .. }
ExecExternal { conan install -s arch=$arch -s build_type=$build_type -o LLA_BUILD_NFC=$build_nfc -o LLA_BUILD_UNITTEST=$build_unittest --build=missing .. }
ExecExternal { conan build .. }
Copy-Item bin/LibLogicalAccessNet.win32.* ../bin/$arch/$build_type/
if ($publish) {
Expand All @@ -75,4 +69,4 @@ if($with_profile) {

Set-Location ..

Write-Output "ISLOG SWIG Win32 done."
Write-Output "LLA SWIG Win32 done."
28 changes: 7 additions & 21 deletions sources/LibLogicalAccessNet.win32/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,36 @@

class LLASwig(ConanFile):
name = "LogicalAccessSwig"
version = "2.5.0"
version = "3.0.0"
license = "LGPL"
url = "https://github.com/islog/liblogicalaccess-swig"
url = "https://github.com/liblogicalaccess/liblogicalaccess-swig"
description = "SWIG wrapper for LibLogicalAccess"
settings = "os", "compiler", "build_type", "arch"
options = { 'LLA_BUILD_PRIVATE': [True, False],
'LLA_BUILD_NFC': [True, False],
'LLA_BUILD_RFIDEAS': [True, False],
options = { 'LLA_BUILD_NFC': [True, False],
'LLA_BUILD_UNITTEST': [True, False]}
default_options = 'LogicalAccess:LLA_BUILD_PKCS=True','LogicalAccess:LLA_BUILD_IKS=False', 'LLA_BUILD_PRIVATE=False', 'LLA_BUILD_NFC=True', 'LLA_BUILD_RFIDEAS=True'
generators = "cmake"
revision_mode = "scm"

def requirements(self):
try:
if self.options.LLA_BUILD_PRIVATE:
self.requires('LogicalAccessPrivate/' + self.version + '@islog/' + self.channel)
if self.options.LLA_BUILD_NFC:
self.requires('LogicalAccessNFC/' + self.version + '@islog/' + self.channel)
self.requires('LogicalAccessNFC/' + self.version + '@lla/' + self.channel)
else:
self.requires('LogicalAccess/'+ self.version + '@islog/' + self.channel)
self.requires('LogicalAccess/'+ self.version + '@lla/' + self.channel)
except ConanException:
if self.options.LLA_BUILD_PRIVATE:
self.requires('LogicalAccessPrivate/' + self.version + '@islog/' + tools.Git().get_branch())
if self.options.LLA_BUILD_NFC:
self.requires('LogicalAccessNFC/' + self.version + '@islog/' + tools.Git().get_branch())
self.requires('LogicalAccessNFC/' + self.version + '@lla/' + tools.Git().get_branch())
else:
self.requires('LogicalAccess/'+ self.version + '@islog/' + tools.Git().get_branch())
self.requires('LogicalAccess/'+ self.version + '@lla/' + tools.Git().get_branch())


def configure(self):
if self.settings.os == 'Windows' and self.options.LLA_BUILD_RFIDEAS:
self.options['LogicalAccess'].LLA_BUILD_RFIDEAS = True

self.options['LogicalAccess'].LLA_BUILD_UNITTEST = self.options.LLA_BUILD_UNITTEST
self.options['LogicalAccessPrivate'].LLA_BUILD_UNITTEST = self.options.LLA_BUILD_UNITTEST

def configure_cmake(self):
cmake = CMake(self, build_type=self.settings.build_type)
if self.options.LLA_BUILD_PRIVATE:
cmake.definitions['LLA_BUILD_PRIVATE'] = True
else:
cmake.definitions['LLA_BUILD_PRIVATE'] = False

if self.options.LLA_BUILD_NFC:
cmake.definitions['LLA_BUILD_NFC'] = True
else:
Expand Down

0 comments on commit 721261e

Please sign in to comment.