Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable version #4

Open
r15ch13 opened this issue Mar 23, 2017 · 6 comments
Open

Portable version #4

r15ch13 opened this issue Mar 23, 2017 · 6 comments

Comments

@r15ch13
Copy link

r15ch13 commented Mar 23, 2017

Hi, will the next release also include a portable version?
I would like to add DeadLock to Scoop as an replacement for Unlocker (ScoopInstaller/Extras#356).
A simple *.zip or *.7z file would be easier to install than the current setup executable. 😄

@CodeDead
Copy link
Owner

Definitely! We've discussed software portability in a blog post here:
http://codedead.com/?p=1294

@r15ch13
Copy link
Author

r15ch13 commented Mar 23, 2017

Nice! Watching the repo to add it as soon it's released 👍

@CodeDead CodeDead reopened this Nov 7, 2017
@CodeDead CodeDead self-assigned this Nov 7, 2017
@CodeDead
Copy link
Owner

CodeDead commented Nov 7, 2017

This will be made possible in the upcoming WPF remake!

@BinToss
Copy link

BinToss commented Apr 18, 2022

As far as I know, a .NET portable app can be made in two ways with a stable SDK release:
A. Require the system already have .NET Framework and its dependencies. Framework 4.8 is pre-installed and continually updated on most Windows systems. It can run .NET Framework apps compiled for any previous 4.x runtime with minor differences where the API had a breaking change. I an imagine that some domain/organization-managed systems might not have the Framework installed for NUCs.
B. The app is published its own copy of the .NET runtime via Self-Contained.

[One problem with the latter is trim-incompatibility] of WPF and WinForms](https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/incompatibilities). Without IL trimming, the entire .NET Runtime is included with the build artifacts and leads to a 100MiB+ deployment. This might change with .NET 7 .NET 8(?) if these libraries are updated to use trim-compatible code.

  • WPF uses a lot of assembly Reflection and run-time code inspection. The member-level trimmer of .NET 5 and even 6 cannot walk certain uses of Reflection. See WPF is not trim-compatible dotnet/wpf#3811 for updates.
  • Similarly, WinForms uses a bit of Reflection in addition to lots of built-in COM marshalling. When all of its reflection and COM marshalling is switched out for COM wrappers, it will become significantly more trim-compatible. Not completely, though. See Epic - Make WinForms trim compatible dotnet/winforms#4649 for updates.

Note: .NET 7 appears to be introducing native-code Ahead Of Time compilation. I haven't looked into it enough to know if the resulting assemblies could be considered portable or if they would still have platform-specific runtime prerequisites.

@BinToss BinToss mentioned this issue Apr 18, 2022
14 tasks
@Symbai
Copy link

Symbai commented Apr 18, 2022

NET 7 appears to be introducing native-code Ahead Of Time compilation.

WPF does not support AOT and it's very unclear if it will be supported in the future at all. Winforms support AOT unofficial with some workarounds according to users. Avalonia (WPF-like cross platform UI) however supports AOT already. Unfortunately the portable AOT version of an Avalonia app is quite big in size.

@CodeDead
Copy link
Owner

I'm thinking more of a radically different approach. In the sense that something like Tauri + Rust and a React frontend are perfectly capable of providing small binaries, which are portable, in addition to providing the same (or slightly different) user interface that our users are already used to. It would completely remove the requirement of .NET and be modern and maintainable.

A dotnet library for DeadLock could also be made available, and I'm working on one right now for developers as a NuGet package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants