diff --git a/LICENSE.txt b/LICENSE.txt
index bbb565f..3781389 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright 2019-2020 Daniel Dugger
+Copyright 2019-2022 KFDtool, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 3575895..9c7f54c 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Compliant with P25 standards (TIA-102.AACD-A)
Purchase Hardware: [online store](https://kfdtool.com/store)
-Download Software: [latest release](https://github.com/KFDtool/KFDtool/releases)
+Download Software: [latest release](https://kfdtool.com/download)
Release Notifications: [subscribe](https://kfdtool.com/newsletter)
@@ -94,6 +94,7 @@ Assembled and tested KFDtool hardware is available from me directly. I can ship
| AC107 | Motorola XTS4000 compatible adapter (0.15 m / 6 in) |
| AC108 | Aeroflex/IFR 2975 compatible adapter (0.15 m / 6 in) |
| AC109 | Harris XG-100P/XL-150P/XL-185P/XL-200P compatible adapter |
+| AC110 | KFDShield TRS compatible adapter (0.15 m / 6 in) |
OS Compatibility
----------------
@@ -118,25 +119,22 @@ Documentation
* [Developer Notes](doc/DEV_NOTES.md)
* [Security Considerations](doc/SECURITY_CONSIDERATIONS.md)
-Contributors
-------------
+Community Forks
+---------------
+
+The following projects are community created forks of the KFDtool project.
-* [Daniel Dugger](https://github.com/duggerd)
-* [Matt Ames](https://github.com/mattames)
+* [KFDShield](https://github.com/omahacommsys/KFDTool)
License / Legal
---------------
KFDtool software, firmware, and hardware is distributed under the MIT License (see [LICENSE.txt](LICENSE.txt)).
-KFDtool is a trademark of Florida Computer and Networking, Inc.
+KFDtool is a trademark of KFDtool, LLC
All product names, trademarks, registered trademarks, logos, and brands are property of their respective owners. All company, product, and service names used are for identification purposes only. Use of these names, trademarks, logos, and brands does not imply endorsement.
-Note about hardware:
-
-I request that no one else manufactures identical or compatible units **and sells them to others while I am still doing so** - I have put quite a bit of my own money into developing this hardware. I am totally fine with someone making a unit for themselves or a couple of extras to give to their friends, just that they don't charge for them. Proceeds from hardware sales enables me to further develop the software.
-
Included open-source components:
Software (see [doc/SW_LICENSE.txt](doc/SW_LICENSE.txt)):
diff --git a/doc/FW_LICENSE.txt b/doc/FW_LICENSE.txt
index 6d82710..5e777a8 100644
--- a/doc/FW_LICENSE.txt
+++ b/doc/FW_LICENSE.txt
@@ -4,7 +4,7 @@
# #
################################################################################
-Copyright 2019-2020 Daniel Dugger
+Copyright 2019-2022 KFDtool, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/doc/TWI_CABLE_ASSY_NOTES.md b/doc/TWI_CABLE_ASSY_NOTES.md
index 0e96dad..a3cba20 100644
--- a/doc/TWI_CABLE_ASSY_NOTES.md
+++ b/doc/TWI_CABLE_ASSY_NOTES.md
@@ -82,27 +82,36 @@ View:
* Female jack contacts from mating face (radio side)
-AC100
------
+3.5mm TRS Connector
+-------------------
+
+
+
+View:
+
+* Male plug contacts
+
+AC100A
+------
* 6 pin male plug Hirose to 6 pin male plug Hirose cable
* Wired straight through (pin 1 to pin 1, pin 2 to pin 2, etc)
* Pins 1, 5, and 6 are electrically connected in the cable assembly, however are not connected inside the KFDtool adapter
-AC101
------
+AC101A
+------
* 6 pin male plug Hirose pigtail
* Pins 1, 5, and 6 are electrically connected in the cable assembly, however are not connected inside the KFDtool adapter
-AC102
------
+AC102A
+------
* 6 pin female jack Hirose pigtail
* Pins 1, 5, and 6 are electrically connected in the cable assembly, however are not connected inside the KFDtool adapter
-AC103
------
+AC103A
+------
* 6 pin female jack Hirose to 5 pin male plug Amp
* Equivalent to Motorola TKN8210 cable
@@ -115,8 +124,8 @@ Pinout:
* Amp Pin 4 - Hirose Pin 4
* Amp Pin 5 - Hirose Pin 4
-AC104
------
+AC104B
+------
* 6 pin female jack Hirose to 8 pin male plug 8P8C
* Equivalent to Kenwood KPG-115 cable
@@ -128,8 +137,8 @@ Pinout:
* 8P8C Pin 5 - (Cathode) Schottky Diode (Anode) - Hirose Pin 2
* 8P8C Pin 6 - Hirose Pin 4
-AC106
------
+AC106A
+------
* 6 pin female jack Hirose to male Kenwood portable accessory connector
* Equivalent to Kenwood KPG-93 cable
@@ -142,8 +151,8 @@ Pinout:
* Accessory Pin 12 - (Cathode) Schottky Diode (Anode) - Hirose Pin 2
* Accessory Pin 13 - Hirose Pin 2
-AC107
------
+AC107A
+------
* 6 pin female jack Hirose to male Motorola XTS4000 accessory connector
* Equivalent to Motorola CKN6886/0182297T15 cable
@@ -153,9 +162,10 @@ Pinout:
* Accessory Pin 1 - Hirose Pin 4
* Accessory Pin 8 - Hirose Pin 4
* Accessory Pin 9 - Hirose Pin 2
+* Accessory Pin 13 - Remove
-AC108
------
+AC108A
+------
* 6 pin female jack Hirose to male 15 pin DSUB plug (2 row)
* Equivalent to Aeroflex/IFR cable 51190/6041-4201-200
@@ -168,8 +178,8 @@ Pinout:
* DB15 pin 8 - 2k Resistor - Hirose Pin 2
* DB15 pin 13 - Hirose Pin 2
-AC109
------
+AC109A
+------
* 6 pin female jack Hirose to male Harris 9 pin portable accessory connector
* Equivalent to Harris 12082-0400-A1 cable
@@ -180,3 +190,14 @@ Pinout:
* Accessory Pin 5 - Hirose Pin 4
* Accessory Pin 6 - Hirose Pin 2
* Accessory Pin 9 - Hirose Pin 4
+
+AC110A
+------
+
+* 6 pin female jack Hirose to male 3.5mm TRS plug
+
+Pinout:
+
+* TRS Tip - Hirose Pin 2
+* TRS Ring - Hirose Pin 3
+* TRS Sleeve - Hirose Pin 4
diff --git a/doc/pic/3-5_mm_trs.png b/doc/pic/3-5_mm_trs.png
new file mode 100644
index 0000000..d6594f4
Binary files /dev/null and b/doc/pic/3-5_mm_trs.png differ
diff --git a/fw/KFDtool/.ccsproject b/fw/KFDtool/.ccsproject
index fe08f06..b1cafbb 100644
--- a/fw/KFDtool/.ccsproject
+++ b/fw/KFDtool/.ccsproject
@@ -13,4 +13,6 @@
+
+
diff --git a/fw/KFDtool/.cproject b/fw/KFDtool/.cproject
index c3b637c..e0750b2 100644
--- a/fw/KFDtool/.cproject
+++ b/fw/KFDtool/.cproject
@@ -18,38 +18,36 @@
-
-
@@ -205,4 +209,4 @@
-
+
\ No newline at end of file
diff --git a/fw/KFDtool/InfoData.c b/fw/KFDtool/InfoData.c
index 5d65084..ced5a1e 100644
--- a/fw/KFDtool/InfoData.c
+++ b/fw/KFDtool/InfoData.c
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#include "driverlib.h"
#include "InfoData.h"
diff --git a/fw/KFDtool/InfoData.h b/fw/KFDtool/InfoData.h
index 8d5ea82..63625c9 100644
--- a/fw/KFDtool/InfoData.h
+++ b/fw/KFDtool/InfoData.h
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#ifndef INFODATA_H_
#define INFODATA_H_
diff --git a/fw/KFDtool/SerialProtocol.c b/fw/KFDtool/SerialProtocol.c
index 19cb2d3..688f895 100644
--- a/fw/KFDtool/SerialProtocol.c
+++ b/fw/KFDtool/SerialProtocol.c
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#include "USB_config/descriptors.h"
#include "USB_API/USB_Common/usb.h"
@@ -12,8 +12,16 @@
#define ESC 0x63
#define ESC_PLACEHOLDER 0x64
+uint8_t rxIndex;
+uint8_t rxStartFlag;
+uint8_t rxEscapeFlag;
+
void spConnect(void)
{
+ rxIndex = 0;
+ rxStartFlag = 0;
+ rxEscapeFlag = 0;
+
USB_setup(TRUE, TRUE);
}
@@ -32,54 +40,86 @@ void spDisconnect(void)
USB_disable(); // Disable USB module, disable PLL
}
-uint16_t spRxData(uint8_t* outData)
+uint16_t spRxData(uint8_t *rxBuffer)
{
- // TODO implement ring buffer, currently expecting all data to come in one transfer
-
+ uint8_t inData[1];
uint16_t inDataCount;
- uint8_t inData[128];
-
- inDataCount = cdcReceiveDataInBuffer(inData, sizeof(inData), CDC0_INTFNUM);
- // don't process partial frames
- if (inDataCount < 3 || inData[0] != SOM_EOM || inData[inDataCount - 1] != SOM_EOM)
+ while (1)
{
- return 0;
- }
+ inDataCount = cdcReceiveDataInBuffer(inData, sizeof(inData), CDC0_INTFNUM);
- uint16_t inIndex;
- uint16_t outIndex;
- outIndex = 0;
+ // no data to read
+ if (inDataCount < 1)
+ {
+ return 0;
+ }
- for (inIndex = 1; inIndex < inDataCount - 1; inIndex++) // skip SOM and EOM
- {
- if (inData[inIndex] == ESC)
+ // reset if buffer overrun
+ if (rxIndex == sizeof(rxBuffer))
{
- inIndex++;
+ rxIndex = 0;
+ rxStartFlag = 0;
+ rxEscapeFlag = 0;
+
+ return 0;
+ }
- if (inData[inIndex] == SOM_EOM_PLACEHOLDER)
+ // got SOM/EOM
+ if (inData[0] == SOM_EOM)
+ {
+ // not started, set start flag, clear other flags
+ if (rxStartFlag == 0)
{
- outData[outIndex] = SOM_EOM;
+ rxIndex = 0;
+ rxStartFlag = 1;
+ rxEscapeFlag = 0;
+
+ return 0;
}
- else if (inData[inIndex] == ESC_PLACEHOLDER)
+ // started, clear start flag and return message length
+ else
{
- outData[outIndex] = ESC;
+ rxStartFlag = 0;
+
+ return rxIndex;
}
}
- else
+
+ // not started, do not continue
+ if (rxStartFlag == 0)
{
- outData[outIndex] = inData[inIndex];
+ return 0;
}
- outIndex++;
- }
+ // escape byte
+ if (rxEscapeFlag)
+ {
+ if (inData[0] == SOM_EOM_PLACEHOLDER)
+ {
+ rxBuffer[rxIndex++] = SOM_EOM;
+ }
+ else if (inData[0] == ESC_PLACEHOLDER)
+ {
+ rxBuffer[rxIndex++] = ESC;
+ }
- return outIndex;
+ rxEscapeFlag = 0;
+ }
+ // escape byte, set flag for next byte to be escaped
+ else if (inData[0] == ESC)
+ {
+ rxEscapeFlag = 1;
+ }
+ // normal byte, save as is
+ else
+ {
+ rxBuffer[rxIndex++] = inData[0];
+ }
+ }
}
-uint16_t spFrameData(const uint8_t* inData,
- uint16_t inLength,
- uint8_t* outData)
+uint16_t spFrameData(const uint8_t *inData, uint16_t inLength, uint8_t *outData)
{
uint16_t escCharsNeeded = 0;
uint16_t i;
@@ -127,8 +167,7 @@ uint16_t spFrameData(const uint8_t* inData,
return totalCharsNeeded;
}
-void spTxDataBack(const uint8_t* inData,
- uint16_t inLength)
+void spTxDataBack(const uint8_t *inData, uint16_t inLength)
{
uint16_t outLength;
uint8_t outData[128];
@@ -138,8 +177,7 @@ void spTxDataBack(const uint8_t* inData,
cdcSendDataInBackground(outData, outLength, CDC0_INTFNUM, 1000);
}
-void spTxDataWait(const uint8_t* inData,
- uint16_t inLength)
+void spTxDataWait(const uint8_t *inData, uint16_t inLength)
{
uint16_t outLength;
uint8_t outData[128];
diff --git a/fw/KFDtool/SerialProtocol.h b/fw/KFDtool/SerialProtocol.h
index 51831c3..879fac9 100644
--- a/fw/KFDtool/SerialProtocol.h
+++ b/fw/KFDtool/SerialProtocol.h
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#ifndef SERIALPROTOCOL_H_
#define SERIALPROTOCOL_H_
diff --git a/fw/KFDtool/TwiProtocol.c b/fw/KFDtool/TwiProtocol.c
index 1a9459b..4384ba7 100644
--- a/fw/KFDtool/TwiProtocol.c
+++ b/fw/KFDtool/TwiProtocol.c
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#include "msp430.h"
#include "driverlib.h"
diff --git a/fw/KFDtool/TwiProtocol.h b/fw/KFDtool/TwiProtocol.h
index 08584a8..40a7623 100644
--- a/fw/KFDtool/TwiProtocol.h
+++ b/fw/KFDtool/TwiProtocol.h
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#ifndef TWIPROTOCOL_H_
#define TWIPROTOCOL_H_
diff --git a/fw/KFDtool/hal.c b/fw/KFDtool/hal.c
index a43a2df..2021e90 100644
--- a/fw/KFDtool/hal.c
+++ b/fw/KFDtool/hal.c
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#include "msp430.h"
#include "driverlib.h"
diff --git a/fw/KFDtool/hal.h b/fw/KFDtool/hal.h
index 5bb8018..b79577d 100644
--- a/fw/KFDtool/hal.h
+++ b/fw/KFDtool/hal.h
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
#ifndef HAL_H_
#define HAL_H_
diff --git a/fw/KFDtool/main.c b/fw/KFDtool/main.c
index f792290..dd0a53b 100644
--- a/fw/KFDtool/main.c
+++ b/fw/KFDtool/main.c
@@ -1,5 +1,5 @@
// KFDtool
-// Copyright 2019 Daniel Dugger
+// Copyright 2019-2022 KFDtool, LLC
// MSP430 Driver Library Version 2.91.11.01 2019-02-20
// MSP430 USB Stack Version ???
diff --git a/fw/KFDtool/targetConfigs/MSP430F5529.ccxml b/fw/KFDtool/targetConfigs/MSP430F5529.ccxml
index 965ea95..eae6068 100644
--- a/fw/KFDtool/targetConfigs/MSP430F5529.ccxml
+++ b/fw/KFDtool/targetConfigs/MSP430F5529.ccxml
@@ -1,12 +1,22 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/hw/Master BOM.xlsx b/hw/Master BOM.xlsx
index 1dad788..cfba10e 100644
Binary files a/hw/Master BOM.xlsx and b/hw/Master BOM.xlsx differ
diff --git a/sw/control/KFDtool.P25/ManualRekey/ManualRekeyApplication.cs b/sw/control/KFDtool.P25/ManualRekey/ManualRekeyApplication.cs
index 49f5db2..ce2d488 100644
--- a/sw/control/KFDtool.P25/ManualRekey/ManualRekeyApplication.cs
+++ b/sw/control/KFDtool.P25/ManualRekey/ManualRekeyApplication.cs
@@ -398,8 +398,17 @@ public List ViewKeyInfo()
while (more)
{
InventoryCommandListActiveKeys commandKmmBody = new InventoryCommandListActiveKeys();
+
commandKmmBody.InventoryMarker = marker;
- commandKmmBody.MaxKeysRequested = 78;
+
+ if (WithPreamble)
+ {
+ commandKmmBody.MaxKeysRequested = 75; // for DLI, to match KVL4000 1.3.5000.243 behavior
+ }
+ else
+ {
+ commandKmmBody.MaxKeysRequested = 78; // for TWI, per TIA 102.AACD-A 3.9.2.11
+ }
KmmBody responseKmmBody = TxRxKmm(commandKmmBody);
diff --git a/sw/script/build_software_release.ps1 b/sw/script/build_software_release.ps1
new file mode 100644
index 0000000..1281153
--- /dev/null
+++ b/sw/script/build_software_release.ps1
@@ -0,0 +1,216 @@
+param (
+ [Parameter(Mandatory)]
+ [string]$version,
+
+ [Parameter(Mandatory)]
+ [string]$date,
+
+ [Parameter(Mandatory)]
+ [string]$sequence,
+
+ [Parameter(Mandatory)]
+ [string]$repoPath,
+
+ [Parameter(Mandatory)]
+ [string]$outputPath,
+
+ [Parameter(Mandatory)]
+ [string]$certThumbprint,
+
+ [Parameter(Mandatory)]
+ [string]$timestampServer,
+
+ [Parameter(Mandatory)]
+ [string]$signtoolPath,
+
+ [Parameter(Mandatory)]
+ [string]$sbomtoolPath,
+
+ [Parameter(Mandatory)]
+ [string]$nugetPath,
+
+ [Parameter(Mandatory)]
+ [string]$msbuildPath
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = "Stop"
+
+function CleanRepo
+{
+ . git -C $repoPath clean -dfx
+}
+
+function PackageSrc
+{
+ $pkgfolder = "KFDtool_sw_src_$($verMajor)-$($verMinor)-$($verPatch)_release_$($date)_$($sequence)"
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)" > $null
+
+ Copy-Item -Recurse "$($repoPath)\*" "$($outputPath)\$($pkgfolder)" -Exclude @(".git")
+
+ Compress-Archive -Path "$($outputPath)\$($pkgfolder)" -DestinationPath "$($outputPath)\$($pkgfolder).zip"
+
+ Remove-Item -Recurse "$($outputPath)\$($pkgfolder)"
+}
+
+function PackageSbom
+{
+ $pkgfolder = "KFDtool_sw_sbom_$($verMajor)-$($verMinor)-$($verPatch)_release_$($date)_$($sequence)"
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)" > $null
+
+ . $sbomtoolPath Generate -b "$($repoPath)\sw" -bc "$($repoPath)\sw" -ps "KFDtool, LLC" -nsb "https://kfdtool.com" -pn "KFDtool SW" -pv "$($verMajor).$($verMinor).$($verPatch)"
+
+ Copy-Item "$($repoPath)\sw\_manifest\spdx_2.2\manifest.spdx.json" "$($outputPath)\$($pkgfolder)"
+
+ Compress-Archive -Path "$($outputPath)\$($pkgfolder)" -DestinationPath "$($outputPath)\$($pkgfolder).zip"
+
+ Remove-Item -Recurse "$($outputPath)\$($pkgfolder)"
+}
+
+function BuildBin
+{
+ . $nugetPath restore "$($repoPath)\sw\control\KFDtool.sln"
+
+ if ($LastExitCode -ne 0)
+ {
+ Write-Error "package restore failed"
+ }
+
+ . $msbuildPath "$($repoPath)\sw\control\KFDtool.sln" /p:Configuration=$($config)
+
+ if ($LastExitCode -ne 0)
+ {
+ Write-Error "bin build failed"
+ }
+}
+
+function BuildMsi
+{
+ param([string]$Architecture)
+
+ . $msbuildPath "$($repoPath)\sw\installer\KFDtoolSetup.sln" /p:Configuration=$($config) /p:Platform=x$($Architecture)
+
+ if ($LastExitCode -ne 0)
+ {
+ Write-Error "msi build failed"
+ }
+}
+
+function PackageBin
+{
+ $pkgfolder = "KFDtool_sw_bin_$($verMajor)-$($verMinor)-$($verPatch)_release_$($date)_$($sequence)"
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)" > $null
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)\driver" > $null
+
+ foreach ($filename in 'kfdtool.cat', 'kfdtool.inf')
+ {
+ Copy-Item "$($repoPath)\sw\driver\$($filename)" "$($outputPath)\$($pkgfolder)\driver\"
+ }
+
+ Copy-Item "$($repoPath)\doc\KFDtool_Manual.pdf" "$($outputPath)\$($pkgfolder)\"
+
+ foreach ($filename in 'HidLibrary.dll', 'KFDtool.Adapter.dll', 'KFDtool.BSL430.dll', 'KFDtool.Container.dll', 'KFDtool.P25.dll', 'KFDtool.Shared.dll', 'KFDtoolGui.exe', 'KFDtoolGui.exe.config', 'NLog.config', 'NLog.dll')
+ {
+ Copy-Item "$($repoPath)\sw\control\KFDtool.Gui\bin\$($config)\$($filename)" "$($outputPath)\$($pkgfolder)"
+ }
+
+ foreach ($filename in 'KFDtoolCmd.exe', 'KFDtoolCmd.exe.config', 'Mono.Options.dll')
+ {
+ Copy-Item "$($repoPath)\sw\control\KFDtool.Cmd\bin\$($config)\$($filename)" "$($outputPath)\$($pkgfolder)"
+ }
+
+ foreach ($filename in 'SW_CHANGELOG.txt', 'SW_LICENSE.txt')
+ {
+ Copy-Item "$($repoPath)\doc\$($filename)" "$($outputPath)\$($pkgfolder)"
+ }
+
+ Compress-Archive -Path "$($outputPath)\$($pkgfolder)" -DestinationPath "$($outputPath)\$($pkgfolder).zip"
+
+ Remove-Item -Recurse "$($outputPath)\$($pkgfolder)"
+}
+
+function PackageMsi
+{
+ param([string]$Architecture)
+
+ $pkgfolder = "KFDtool_sw_msi$($Architecture)_$($verMajor)-$($verMinor)-$($verPatch)_release_$($date)_$($sequence)"
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)" > $null
+
+ Copy-Item "$($repoPath)\sw\installer\KFDtoolApp\bin\x$($Architecture)\$($config)\KFDtool.msi" "$($outputPath)\$($pkgfolder)\$($pkgfolder).msi"
+
+ foreach ($filename in 'SW_CHANGELOG.txt', 'SW_LICENSE.txt')
+ {
+ Copy-Item "$($repoPath)\doc\$($filename)" "$($outputPath)\$($pkgfolder)"
+ }
+
+ . $signtoolPath sign /v /tr "http://$($timestampServer)" /td sha256 /fd sha256 /sha1 $($certThumbprint) /d "KFDtool Setup" "$($outputPath)\$($pkgfolder)\$($pkgfolder).msi"
+
+ Compress-Archive -Path "$($outputPath)\$($pkgfolder)" -DestinationPath "$($outputPath)\$($pkgfolder).zip"
+
+ Remove-Item -Recurse "$($outputPath)\$($pkgfolder)"
+}
+
+function PackageSym
+{
+ $pkgfolder = "KFDtool_sw_sym_$($verMajor)-$($verMinor)-$($verPatch)_release_$($date)_$($sequence)"
+
+ New-Item -ItemType Directory "$($outputPath)\$($pkgfolder)" > $null
+
+ foreach ($filename in 'HidLibrary.pdb', 'KFDtool.Adapter.pdb', 'KFDtool.BSL430.pdb', 'KFDtool.Container.pdb', 'KFDtool.P25.pdb', 'KFDtool.Shared.pdb', 'KFDtoolGui.pdb')
+ {
+ Copy-Item "$($repoPath)\sw\control\KFDtool.Gui\bin\$($config)\$($filename)" "$($outputPath)\$($pkgfolder)"
+ }
+
+ Copy-Item "$($repoPath)\sw\control\KFDtool.Cmd\bin\$($config)\KFDtoolCmd.pdb" "$($outputPath)\$($pkgfolder)"
+
+ Compress-Archive -Path "$($outputPath)\$($pkgfolder)" -DestinationPath "$($outputPath)\$($pkgfolder).zip"
+
+ Remove-Item -Recurse "$($outputPath)\$($pkgfolder)"
+}
+
+# print arguments to console
+Write-Host "*** arguments ***"
+Write-Host "version: $($version)"
+Write-Host "date: $($date)"
+Write-Host "sequence: $($sequence)"
+Write-Host "repoPath: $($repoPath)"
+Write-Host "outputPath: $($outputPath)"
+Write-Host "certThumbprint: $($certThumbprint)"
+Write-Host "timestampServer: $($timestampServer)"
+Write-Host "signtoolPath: $($signtoolPath)"
+Write-Host "sbomtoolPath: $($sbomtoolPath)"
+Write-Host "msbuildPath: $($msbuildPath)"
+Write-Host "nugetPath: $($nugetPath)"
+
+$relVer = [version]$version
+
+$verMajor = $relVer.Major
+$verMinor = $relVer.Minor
+$verPatch = $relVer.Build
+
+$config = "Release"
+
+CleanRepo
+
+PackageSrc
+
+PackageSbom
+
+BuildBin
+
+BuildMsi -Architecture "64"
+
+BuildMsi -Architecture "86"
+
+PackageBin
+
+PackageMsi -Architecture "64"
+
+PackageMsi -Architecture "86"
+
+PackageSym