Closed taotieren closed 1 year ago
Hi.
The protocol analyzers can't be compiled into single file executables as they are standalone DLL's. These basically are plugins that are loaded by the LogicAnalyzer app on the fly using reflection, so they need to be built separatedly and placed in the folder "analyzers" on the same fodler the application resides in order for them to work.
Also, I would not recommend to use single file executables, these are problematic when reflection is used and I can't guarantee that Avalonia works with them.
Finally, you are mixing different applications into a single package. CLCapture and LogicAnalyzer are different apps with different purposes, one (CLCapture) is intended for those people that doesn't wants to or cannot use the GUI app and will use a third-party software like PulseView to analyze the captures, the other (LogicAnalyzer) is the main GUI application and does not need at all CLCapture if is used.
Cheers.
Thank you. Could you add the ability to execute a single file to CLCapture
? This would reduce the number of files to be installed and make it easier for users to use.
Later I will split it into two packages logicanalyzer
and clcapture
.
Hi.
CLCapture can already be built as single file, you just need to issue the correct commands. Keep in mind that even if you build it as "single file" it will produce multiple ones as the native libraries will still be outside the packaged file.
To build the two programs with the correct structure you should update the build step like this (I'm posting only the x64 version, expand it as you wish to include other architectures, maybe use a var so you don't need to create twice the code):
build() {
#first step, prepare the structure
mkdir "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact"
mkdir "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer"
mkdir "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
mkdir "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/CLCapture"
#second step, compile analyzers. These are pure IL assemblies, do not need to publish for a specified architecture
cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/SerialProtocolAnalyzer"
dotnet publish -c Release -o artifact
cp ./artifact/SerialProtocolAnalyzer.dll "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/I2CProtocolAnalyzer"
dotnet publish -c Release -o artifact
cp ./artifact/I2CProtocolAnalyzer.dll "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/SPIProtocolAnalyzer"
dotnet publish -c Release -o artifact
cp ./artifact/SPIProtocolAnalyzer.dll "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
#third step, compile LogicAnalyzer
cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/LogicAnalyzer"
dotnet publish -r linux-x64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/LogicAnalyzer"
#fourth step, compile CLCapture
cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/CLCapture"
dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/CLCapture"
}
With this build you will end with a structure like this:
gusman@DESKTOP-C983CQ7:/mnt/c/Users/geniw/source/repos/LogicAnalyzer/artifact$ exa -Tla
drwxrwxrwx - gusman 30 Aug 10:08 .
drwxrwxrwx - gusman 30 Aug 10:24 ├── CLCapture
.rwxrwxrwx 14M gusman 30 Aug 10:24 │ ├── CLCapture
.rwxrwxrwx 18k gusman 23 Oct 2021 │ └── libSystem.IO.Ports.Native.so
drwxrwxrwx - gusman 30 Aug 10:38 └── LogicAnalyzer
drwxrwxrwx - gusman 30 Aug 10:11 ├── analyzers
.rwxrwxrwx 9.2k gusman 30 Aug 10:11 │ ├── I2CProtocolAnalyzer.dll
.rwxrwxrwx 9.2k gusman 30 Aug 10:10 │ ├── SerialProtocolAnalyzer.dll
.rwxrwxrwx 12k gusman 30 Aug 10:11 │ └── SPIProtocolAnalyzer.dll
.rwxrwxrwx 68k gusman 15 Aug 2022 ├── Avalonia.Animation.dll
.rwxrwxrwx 301k gusman 15 Aug 2022 ├── Avalonia.Base.dll
.rwxrwxrwx 962k gusman 15 Aug 2022 ├── Avalonia.Controls.dll
.rwxrwxrwx 218k gusman 15 Aug 2022 ├── Avalonia.DesignerSupport.dll
.rwxrwxrwx 12k gusman 15 Aug 2022 ├── Avalonia.Desktop.dll
.rwxrwxrwx 36k gusman 15 Aug 2022 ├── Avalonia.DesktopRuntime.dll
.rwxrwxrwx 252k gusman 15 Aug 2022 ├── Avalonia.Dialogs.dll
.rwxrwxrwx 10k gusman 15 Aug 2022 ├── Avalonia.dll
.rwxrwxrwx 94k gusman 15 Aug 2022 ├── Avalonia.FreeDesktop.dll
.rwxrwxrwx 119k gusman 15 Aug 2022 ├── Avalonia.Input.dll
.rwxrwxrwx 29k gusman 15 Aug 2022 ├── Avalonia.Interactivity.dll
.rwxrwxrwx 93k gusman 15 Aug 2022 ├── Avalonia.Layout.dll
.rwxrwxrwx 72k gusman 15 Aug 2022 ├── Avalonia.Markup.dll
.rwxrwxrwx 72k gusman 15 Aug 2022 ├── Avalonia.Markup.Xaml.dll
.rwxrwxrwx 20k gusman 15 Aug 2022 ├── Avalonia.MicroCom.dll
.rwxrwxrwx 224k gusman 15 Aug 2022 ├── Avalonia.Native.dll
.rwxrwxrwx 317k gusman 15 Aug 2022 ├── Avalonia.OpenGL.dll
.rwxrwxrwx 70k gusman 15 Aug 2022 ├── Avalonia.Remote.Protocol.dll
.rwxrwxrwx 113k gusman 15 Aug 2022 ├── Avalonia.Skia.dll
.rwxrwxrwx 99k gusman 15 Aug 2022 ├── Avalonia.Styling.dll
.rwxrwxrwx 450k gusman 15 Aug 2022 ├── Avalonia.Themes.Default.dll
.rwxrwxrwx 5.5M gusman 15 Aug 2022 ├── Avalonia.Themes.Fluent.dll
.rwxrwxrwx 459k gusman 15 Aug 2022 ├── Avalonia.Visuals.dll
.rwxrwxrwx 489k gusman 15 Aug 2022 ├── Avalonia.Win32.dll
.rwxrwxrwx 296k gusman 15 Aug 2022 ├── Avalonia.X11.dll
.rwxrwxrwx 2.4M gusman 24 Jun 2022 ├── AvaloniaColorPicker.dll
.rwxrwxrwx 692k gusman 21 Feb 2022 ├── AvaloniaEdit.dll
.rwxrwxrwx 20k gusman 21 Feb 2022 ├── AvaloniaEdit.TextMate.dll
.rwxrwxrwx 46k gusman 30 Apr 2022 ├── ColorTextBlock.Avalonia.dll
.rwxrwxrwx 203k gusman 6 Dec 2022 ├── createdump
.rwxrwxrwx 117k gusman 12 Aug 2022 ├── HarfBuzzSharp.dll
.rwxrwxrwx 62k gusman 15 Feb 2017 ├── JetBrains.Annotations.dll
.rwxrwxrwx 770k gusman 6 Dec 2022 ├── libclrgc.so
.rwxrwxrwx 3.5M gusman 6 Dec 2022 ├── libclrjit.so
.rwxrwxrwx 7.3M gusman 6 Dec 2022 ├── libcoreclr.so
.rwxrwxrwx 757k gusman 6 Dec 2022 ├── libcoreclrtraceptprovider.so
.rwxrwxrwx 1.6M gusman 12 Aug 2022 ├── libHarfBuzzSharp.so
.rwxrwxrwx 421k gusman 6 Dec 2022 ├── libhostfxr.so
.rwxrwxrwx 380k gusman 6 Dec 2022 ├── libhostpolicy.so
.rwxrwxrwx 2.6M gusman 6 Dec 2022 ├── libmscordaccore.so
.rwxrwxrwx 1.8M gusman 6 Dec 2022 ├── libmscordbi.so
.rwxrwxrwx 683k gusman 18 Feb 2022 ├── libonigwrap.so
.rwxrwxrwx 9.2M gusman 12 Aug 2022 ├── libSkiaSharp.so
.rwxrwxrwx 75k gusman 6 Dec 2022 ├── libSystem.Globalization.Native.so
.rwxrwxrwx 937k gusman 6 Dec 2022 ├── libSystem.IO.Compression.Native.so
.rwxrwxrwx 18k gusman 23 Oct 2021 ├── libSystem.IO.Ports.Native.so
.rwxrwxrwx 109k gusman 6 Dec 2022 ├── libSystem.Native.so
.rwxrwxrwx 20k gusman 6 Dec 2022 ├── libSystem.Net.Security.Native.so
.rwxrwxrwx 192k gusman 6 Dec 2022 ├── libSystem.Security.Cryptography.Native.OpenSsl.so
.rwxrwxrwx 181k gusman 30 Aug 10:38 ├── LogicAnalyzer
.rwxrwxrwx 171k gusman 30 Aug 10:24 ├── LogicAnalyzer.deps.json
.rwxrwxrwx 4.8M gusman 30 Aug 10:38 ├── LogicAnalyzer.dll
.rwxrwxrwx 361 gusman 30 Aug 10:35 ├── LogicAnalyzer.runtimeconfig.json
.rwxrwxrwx 144k gusman 30 Apr 2022 ├── Markdown.Avalonia.dll
.rwxrwxrwx 30k gusman 30 Apr 2022 ├── Markdown.Avalonia.SyntaxHigh.dll
.rwxrwxrwx 441k gusman 17 Jul 2022 ├── MessageBox.Avalonia.dll
.rwxrwxrwx 854k gusman 6 Dec 2022 ├── Microsoft.CSharp.dll
.rwxrwxrwx 16k gusman 12 Aug 2022 ├── Microsoft.Extensions.PlatformAbstractions.dll
.rwxrwxrwx 1.3M gusman 6 Dec 2022 ├── Microsoft.VisualBasic.Core.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── Microsoft.VisualBasic.dll
.rwxrwxrwx 15k gusman 6 Dec 2022 ├── Microsoft.Win32.Primitives.dll
.rwxrwxrwx 59k gusman 6 Dec 2022 ├── Microsoft.Win32.Registry.dll
.rwxrwxrwx 30k gusman 15 May 2018 ├── Microsoft.Win32.SystemEvents.dll
.rwxrwxrwx 59k gusman 6 Dec 2022 ├── mscorlib.dll
.rwxrwxrwx 101k gusman 6 Dec 2022 ├── netstandard.dll
.rwxrwxrwx 712k gusman 6 Feb 03:27 ├── Newtonsoft.Json.dll
.rwxrwxrwx 26k gusman 30 Aug 10:38 ├── SharedDriver.dll
.rwxrwxrwx 28k gusman 30 Aug 10:38 ├── SignalDescriptionLanguage.dll
.rwxrwxrwx 433k gusman 12 Aug 2022 ├── SkiaSharp.dll
.rwxrwxrwx 15k gusman 6 Dec 2022 ├── System.AppContext.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Buffers.dll
.rwxrwxrwx 245k gusman 6 Dec 2022 ├── System.Collections.Concurrent.dll
.rwxrwxrwx 265k gusman 6 Dec 2022 ├── System.Collections.dll
.rwxrwxrwx 602k gusman 6 Dec 2022 ├── System.Collections.Immutable.dll
.rwxrwxrwx 98k gusman 6 Dec 2022 ├── System.Collections.NonGeneric.dll
.rwxrwxrwx 99k gusman 6 Dec 2022 ├── System.Collections.Specialized.dll
.rwxrwxrwx 189k gusman 6 Dec 2022 ├── System.ComponentModel.Annotations.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.ComponentModel.DataAnnotations.dll
.rwxrwxrwx 19k gusman 6 Dec 2022 ├── System.ComponentModel.dll
.rwxrwxrwx 38k gusman 6 Dec 2022 ├── System.ComponentModel.EventBasedAsync.dll
.rwxrwxrwx 75k gusman 6 Dec 2022 ├── System.ComponentModel.Primitives.dll
.rwxrwxrwx 759k gusman 6 Dec 2022 ├── System.ComponentModel.TypeConverter.dll
.rwxrwxrwx 20k gusman 6 Dec 2022 ├── System.Configuration.dll
.rwxrwxrwx 216k gusman 6 Dec 2022 ├── System.Console.dll
.rwxrwxrwx 24k gusman 6 Dec 2022 ├── System.Core.dll
.rwxrwxrwx 3.1M gusman 6 Dec 2022 ├── System.Data.Common.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Data.DataSetExtensions.dll
.rwxrwxrwx 26k gusman 6 Dec 2022 ├── System.Data.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Diagnostics.Contracts.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Diagnostics.Debug.dll
.rwxrwxrwx 389k gusman 6 Dec 2022 ├── System.Diagnostics.DiagnosticSource.dll
.rwxrwxrwx 44k gusman 6 Dec 2022 ├── System.Diagnostics.FileVersionInfo.dll
.rwxrwxrwx 285k gusman 6 Dec 2022 ├── System.Diagnostics.Process.dll
.rwxrwxrwx 38k gusman 6 Dec 2022 ├── System.Diagnostics.StackTrace.dll
.rwxrwxrwx 63k gusman 6 Dec 2022 ├── System.Diagnostics.TextWriterTraceListener.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Diagnostics.Tools.dll
.rwxrwxrwx 138k gusman 6 Dec 2022 ├── System.Diagnostics.TraceSource.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Diagnostics.Tracing.dll
.rwxrwxrwx 51k gusman 6 Dec 2022 ├── System.dll
.rwxrwxrwx 654k gusman 15 May 2018 ├── System.Drawing.Common.dll
.rwxrwxrwx 21k gusman 6 Dec 2022 ├── System.Drawing.dll
.rwxrwxrwx 128k gusman 6 Dec 2022 ├── System.Drawing.Primitives.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Dynamic.Runtime.dll
.rwxrwxrwx 204k gusman 6 Dec 2022 ├── System.Formats.Asn1.dll
.rwxrwxrwx 283k gusman 6 Dec 2022 ├── System.Formats.Tar.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Globalization.Calendars.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Globalization.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Globalization.Extensions.dll
.rwxrwxrwx 80k gusman 6 Dec 2022 ├── System.IO.Compression.Brotli.dll
.rwxrwxrwx 272k gusman 6 Dec 2022 ├── System.IO.Compression.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.IO.Compression.FileSystem.dll
.rwxrwxrwx 55k gusman 6 Dec 2022 ├── System.IO.Compression.ZipFile.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.IO.dll
.rwxrwxrwx 39k gusman 6 Dec 2022 ├── System.IO.FileSystem.AccessControl.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.IO.FileSystem.dll
.rwxrwxrwx 82k gusman 6 Dec 2022 ├── System.IO.FileSystem.DriveInfo.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.IO.FileSystem.Primitives.dll
.rwxrwxrwx 105k gusman 6 Dec 2022 ├── System.IO.FileSystem.Watcher.dll
.rwxrwxrwx 80k gusman 6 Dec 2022 ├── System.IO.IsolatedStorage.dll
.rwxrwxrwx 86k gusman 6 Dec 2022 ├── System.IO.MemoryMappedFiles.dll
.rwxrwxrwx 29k gusman 6 Dec 2022 ├── System.IO.Pipes.AccessControl.dll
.rwxrwxrwx 135k gusman 6 Dec 2022 ├── System.IO.Pipes.dll
.rwxrwxrwx 70k gusman 23 Oct 2021 ├── System.IO.Ports.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.IO.UnmanagedMemoryStream.dll
.rwxrwxrwx 498k gusman 6 Dec 2022 ├── System.Linq.dll
.rwxrwxrwx 3.9M gusman 6 Dec 2022 ├── System.Linq.Expressions.dll
.rwxrwxrwx 851k gusman 6 Dec 2022 ├── System.Linq.Parallel.dll
.rwxrwxrwx 225k gusman 6 Dec 2022 ├── System.Linq.Queryable.dll
.rwxrwxrwx 157k gusman 6 Dec 2022 ├── System.Memory.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Net.dll
.rwxrwxrwx 1.8M gusman 6 Dec 2022 ├── System.Net.Http.dll
.rwxrwxrwx 102k gusman 6 Dec 2022 ├── System.Net.Http.Json.dll
.rwxrwxrwx 310k gusman 6 Dec 2022 ├── System.Net.HttpListener.dll
.rwxrwxrwx 441k gusman 6 Dec 2022 ├── System.Net.Mail.dll
.rwxrwxrwx 88k gusman 6 Dec 2022 ├── System.Net.NameResolution.dll
.rwxrwxrwx 176k gusman 6 Dec 2022 ├── System.Net.NetworkInformation.dll
.rwxrwxrwx 106k gusman 6 Dec 2022 ├── System.Net.Ping.dll
.rwxrwxrwx 231k gusman 6 Dec 2022 ├── System.Net.Primitives.dll
.rwxrwxrwx 274k gusman 6 Dec 2022 ├── System.Net.Quic.dll
.rwxrwxrwx 352k gusman 6 Dec 2022 ├── System.Net.Requests.dll
.rwxrwxrwx 753k gusman 6 Dec 2022 ├── System.Net.Security.dll
.rwxrwxrwx 37k gusman 6 Dec 2022 ├── System.Net.ServicePoint.dll
.rwxrwxrwx 612k gusman 6 Dec 2022 ├── System.Net.Sockets.dll
.rwxrwxrwx 168k gusman 6 Dec 2022 ├── System.Net.WebClient.dll
.rwxrwxrwx 60k gusman 6 Dec 2022 ├── System.Net.WebHeaderCollection.dll
.rwxrwxrwx 35k gusman 6 Dec 2022 ├── System.Net.WebProxy.dll
.rwxrwxrwx 93k gusman 6 Dec 2022 ├── System.Net.WebSockets.Client.dll
.rwxrwxrwx 189k gusman 6 Dec 2022 ├── System.Net.WebSockets.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Numerics.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Numerics.Vectors.dll
.rwxrwxrwx 70k gusman 6 Dec 2022 ├── System.ObjectModel.dll
.rwxrwxrwx 11M gusman 6 Dec 2022 ├── System.Private.CoreLib.dll
.rwxrwxrwx 2.2M gusman 6 Dec 2022 ├── System.Private.DataContractSerialization.dll
.rwxrwxrwx 258k gusman 6 Dec 2022 ├── System.Private.Uri.dll
.rwxrwxrwx 8.6M gusman 6 Dec 2022 ├── System.Private.Xml.dll
.rwxrwxrwx 413k gusman 6 Dec 2022 ├── System.Private.Xml.Linq.dll
.rwxrwxrwx 1.5M gusman 10 Nov 2020 ├── System.Reactive.dll
.rwxrwxrwx 67k gusman 6 Dec 2022 ├── System.Reflection.DispatchProxy.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Reflection.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Reflection.Emit.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Reflection.Emit.ILGeneration.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Reflection.Emit.Lightweight.dll
.rwxrwxrwx 15k gusman 6 Dec 2022 ├── System.Reflection.Extensions.dll
.rwxrwxrwx 1.1M gusman 6 Dec 2022 ├── System.Reflection.Metadata.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Reflection.Primitives.dll
.rwxrwxrwx 33k gusman 6 Dec 2022 ├── System.Reflection.TypeExtensions.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Resources.Reader.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Resources.ResourceManager.dll
.rwxrwxrwx 45k gusman 6 Dec 2022 ├── System.Resources.Writer.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Runtime.CompilerServices.Unsafe.dll
.rwxrwxrwx 21k gusman 6 Dec 2022 ├── System.Runtime.CompilerServices.VisualC.dll
.rwxrwxrwx 43k gusman 6 Dec 2022 ├── System.Runtime.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Runtime.Extensions.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Runtime.Handles.dll
.rwxrwxrwx 52k gusman 6 Dec 2022 ├── System.Runtime.InteropServices.dll
.rwxrwxrwx 39k gusman 6 Dec 2022 ├── System.Runtime.InteropServices.JavaScript.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Runtime.InteropServices.RuntimeInformation.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Runtime.Intrinsics.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Runtime.Loader.dll
.rwxrwxrwx 322k gusman 6 Dec 2022 ├── System.Runtime.Numerics.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Runtime.Serialization.dll
.rwxrwxrwx 327k gusman 6 Dec 2022 ├── System.Runtime.Serialization.Formatters.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Runtime.Serialization.Json.dll
.rwxrwxrwx 29k gusman 6 Dec 2022 ├── System.Runtime.Serialization.Primitives.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Runtime.Serialization.Xml.dll
.rwxrwxrwx 66k gusman 6 Dec 2022 ├── System.Security.AccessControl.dll
.rwxrwxrwx 94k gusman 6 Dec 2022 ├── System.Security.Claims.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Security.Cryptography.Algorithms.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Security.Cryptography.Cng.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Security.Cryptography.Csp.dll
.rwxrwxrwx 2.2M gusman 6 Dec 2022 ├── System.Security.Cryptography.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Security.Cryptography.Encoding.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Security.Cryptography.OpenSsl.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Security.Cryptography.Primitives.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Security.Cryptography.X509Certificates.dll
.rwxrwxrwx 19k gusman 6 Dec 2022 ├── System.Security.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Security.Principal.dll
.rwxrwxrwx 44k gusman 6 Dec 2022 ├── System.Security.Principal.Windows.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Security.SecureString.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.ServiceModel.Web.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.ServiceProcess.dll
.rwxrwxrwx 872k gusman 6 Dec 2022 ├── System.Text.Encoding.CodePages.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Text.Encoding.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Text.Encoding.Extensions.dll
.rwxrwxrwx 129k gusman 6 Dec 2022 ├── System.Text.Encodings.Web.dll
.rwxrwxrwx 1.5M gusman 6 Dec 2022 ├── System.Text.Json.dll
.rwxrwxrwx 973k gusman 6 Dec 2022 ├── System.Text.RegularExpressions.dll
.rwxrwxrwx 127k gusman 6 Dec 2022 ├── System.Threading.Channels.dll
.rwxrwxrwx 80k gusman 6 Dec 2022 ├── System.Threading.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Threading.Overlapped.dll
.rwxrwxrwx 529k gusman 6 Dec 2022 ├── System.Threading.Tasks.Dataflow.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Threading.Tasks.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Threading.Tasks.Extensions.dll
.rwxrwxrwx 135k gusman 6 Dec 2022 ├── System.Threading.Tasks.Parallel.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Threading.Thread.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Threading.ThreadPool.dll
.rwxrwxrwx 15k gusman 6 Dec 2022 ├── System.Threading.Timer.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Transactions.dll
.rwxrwxrwx 383k gusman 6 Dec 2022 ├── System.Transactions.Local.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.ValueTuple.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Web.dll
.rwxrwxrwx 53k gusman 6 Dec 2022 ├── System.Web.HttpUtility.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Windows.dll
.rwxrwxrwx 25k gusman 6 Dec 2022 ├── System.Xml.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Xml.Linq.dll
.rwxrwxrwx 22k gusman 6 Dec 2022 ├── System.Xml.ReaderWriter.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Xml.Serialization.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Xml.XDocument.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 ├── System.Xml.XmlDocument.dll
.rwxrwxrwx 18k gusman 6 Dec 2022 ├── System.Xml.XmlSerializer.dll
.rwxrwxrwx 16k gusman 6 Dec 2022 ├── System.Xml.XPath.dll
.rwxrwxrwx 19k gusman 6 Dec 2022 ├── System.Xml.XPath.XDocument.dll
.rwxrwxrwx 114k gusman 18 Feb 2022 ├── TextMateSharp.dll
.rwxrwxrwx 5.4M gusman 18 Feb 2022 ├── TextMateSharp.Grammars.dll
.rwxrwxrwx 193k gusman 9 Sep 2020 ├── Tmds.DBus.dll
.rwxrwxrwx 17k gusman 6 Dec 2022 └── WindowsBase.dll
Then, the final step would be creating the correct package stage, but that lies beyond my knowledge of Linux and its structure, that's upt to you :)
There are two applications, each one in its folder, "artifact/CLCapture" and "artifact/LogicAnalyzer". Keep in mind that all the files for each app should be in the same folder, so I don't think that installing these directly to "/usr/bin" is a good idea, I think it would be better to copy the folders "CLCapture" and "LogicAnalyzer" to "/usr/share" and then add links to each executable into "/usr/bin".
Some things to note:
gusman@DESKTOP-C983CQ7:/mnt/c/Users/geniw/source/repos/LogicAnalyzer/artifact/LogicAnalyzer$ ./LogicAnalyzer
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.ArgumentNullException.Throw(String paramName)
at System.IO.Path.Combine(String path1, String path2)
at LogicAnalyzer.MainWindow.LoadAnalyzers()
at LogicAnalyzer.MainWindow..ctor()
at LogicAnalyzer.App.OnFrameworkInitializationCompleted()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0() in /_/src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 181
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.Threading.Dispatcher.RunJobs() in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 73
at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 199
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
at LogicAnalyzer.Program.Main(String[] args)
Aborted
Single file apps are slower and consume more resources.
You can remove the dotnet-runtime dependency, when you specify a self-contained application the app already contains all the required libraries and it does not depend on the dotnet runtime, that's why it weights more, but I always prefer it like this as it avoids compatibility problems.
I had to remove the trim from LogicAnalyzer as Avalonia does not like it at all, when trimmed the app crashes when initializing Avalonia.
Cheers!
Here's the organized PKGBUILD file, thanks!
# Maintainer: taotieren <admin@taotieren.com>
pkgbase=logicanalyzer-git
pkgname=({logicanalyzer,clcapture}-git)
pkgver=5.0.0.0.r1.g5f95102
pkgrel=2
epoch=
pkgdesc="24 channel, 100Msps logic analyzer hardware and software "
arch=("x86_64" "aarch64")
url="https://github.com/gusmanb/logicanalyzer"
license=('GLP-3.0')
replaces=()
depends=()
makedepends=(git
dotnet-sdk
ttf-dejavu)
backup=()
options=('!strip')
install=
source=("${pkgbase}::git+${url}.git")
sha256sums=('SKIP')
noextract=()
pkgver(){
cd "${srcdir}/${pkgbase}"
git describe --long --tags | sed 's/^V//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
# cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer"
#
# if [ "$CARCH" == "aarch64" ]; then
# msg2 "build for arm64"
# dotnet publish -r linux-arm64 -c Release -o artifact
# else
# msg2 "build for x64"
# dotnet publish -r linux-x64 -c Release -o artifact
# fi
#first step, prepare the structure
mkdir -pv "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
mkdir -pv "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture"
if [ "$CARCH" == "aarch64" ]; then
msg2 "build for arm64"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SerialProtocolAnalyzer"
dotnet publish -r linux-arm64 -c Release -o artifact
cp ./artifact/SerialProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/I2CProtocolAnalyzer"
dotnet publish -r linux-arm64 -c Release -o artifact
cp ./artifact/I2CProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SPIProtocolAnalyzer"
dotnet publish -r linux-arm64 -c Release -o artifact
cp ./artifact/SPIProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
#third step, compile LogicAnalyzer
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/LogicAnalyzer"
dotnet publish -r linux-arm64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer"
#fourth step, compile CLCapture
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/CLCapture"
dotnet publish -r linux-arm64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture"
else
msg2 "build for x64"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SerialProtocolAnalyzer"
dotnet publish -r linux-x64 -c Release -o artifact
cp ./artifact/SerialProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/I2CProtocolAnalyzer"
dotnet publish -r linux-x64 -c Release -o artifact
cp ./artifact/I2CProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SPIProtocolAnalyzer"
dotnet publish -r linux-x64 -c Release -o artifact
cp ./artifact/SPIProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers"
#third step, compile LogicAnalyzer
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/LogicAnalyzer"
dotnet publish -r linux-x64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer"
#fourth step, compile CLCapture
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/CLCapture"
dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture"
fi
}
package_logicanalyzer-git() {
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/"
# install -Dm0755 LogicAnalyzer/LogicAnalyzer "${pkgdir}/usr/bin/logicanalyzer"
install -dm0755 ${pkgdir}/usr/share/${pkgname%-git}
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-git}" <<EOF
export COREHOST_TRACE=1
cd /usr/share/logicanalyzer/
LC_ALL=C ./LogicAnalyzer
EOF
cp -rv LogicAnalyzer/* ${pkgdir}/usr/share/${pkgname%-git}
install -Dm644 "$srcdir/logicanalyzer-git/Software/LogicAnalyzer/LogicAnalyzer/Assets/Logo40.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/${pkgname%-git}.png"
install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" << EOF
[Desktop Entry]
Name=${pkgname%-git}
Name[zh_CN]=${pkgname%-git}
Comment=${pkgdesc}
#MimeType=application/x-${pkgname%-git};
Exec=${pkgname%-git}
Type=Application
Categories=Development;Tool;
Terminal=false
Icon=${pkgname%-git}
Version=1
EOF
}
package_clcapture-git() {
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/"
install -Dm0755 CLCapture/CLCapture "${pkgdir}/usr/bin/clcapture"
}
I have packaged logicanalyzer in AUR repository . Now the compiled file is too fragmented, I tried to compile it into a single file and now the compilation reports an error.
PKGBUILD
build log