passbolt / passbolt-windows

Windows desktop application for Passbolt, the open source password manager for teams!
https://passbolt.com
48 stars 5 forks source link

Issue Running Compiled Executable on Windows: Missing Runtime Directives #3

Closed joseraeiro closed 10 months ago

joseraeiro commented 10 months ago

Hello Passbolt Team,

I recently compiled the Passbolt project for Windows, and I've encountered an issue that I hope you can assist with.

After successfully compiling the project, the resulting executable (passbolt.exe) does not produce any output or visible results when run.

Here are the details of my build environment and the issue:

Given the warning about the missing Runtime Directives (rd.xml) file, it seems that this might be related to the issue. I understand that .NET Native requires specific directives for dynamic behaviors such as reflection, which are not detected through static analysis.

Any assistance or insights you can provide would be greatly appreciated. I am looking forward to contributing to and utilizing Passbolt on the Windows platform.

Thank you for your time and support.

Gamabunta57 commented 10 months ago

Hello @joseraeiro!

Good to see you again 😄. Yes, .exe file doesn't run as-is, we had the same behaviour. It seems related to the fact that it is a UWP application.

What you will see is an application in your Windows like an application installed normally (even if it's compiled from Visual Studio). You can launch it without Visual Studio by searching the application from the Start Menu

I found this answer that confirms that (https://learn.microsoft.com/en-us/answers/questions/598497/how-could-we-start-a-uwp-program-with-click-a-*-ex):

No, you could not launch a UWP app by clicking its exe file. UWP apps have an app container and it is running in the sandbox. So you can't directly run it like desktop apps via a .exe file. The normal way to launch a UWP app is to launch it from the Start Menu after you've installed it.

joseraeiro commented 10 months ago

Hello @Gamabunta57!

Based on the information provided, it seems that several modifications are required to implement this feature, including updating the Package.appxmanifest to register a new protocol, modifying the App.xaml.cs for protocol handling, implementing data handling in the app, and setting up the ProtocolForResultsOperation.

These steps, while clear, seem quite extensive. I'm curious to know if all these changes are absolutely essential for achieving the desired functionality. Is there perhaps a more streamlined approach or a set of minimal changes that could accomplish the same goal? My aim is to implement this feature with as little alteration to the existing codebase as possible, while still ensuring robust and efficient app-to-app communication.

Any insights or alternative suggestions would be greatly appreciated. Thank you!

joseraeiro commented 10 months ago

Hello @Gamabunta57,

I'm excited to share some great news: I successfully sideloaded my UWP app! 🎉 After taking a deep dive into the process and giving it a try myself, everything fell into place perfectly.

I focused on the standard sideloading procedure – building and packaging the app in Visual Studio, ensuring my device was set up for sideloading, installing the necessary certificate, and then running the PowerShell script to install the app. It was a straightforward process, and I'm thrilled with how smoothly it went.

Seeing the app launch from the Start Menu was a satisfying moment, and it's a testament to the power and flexibility of UWP development. This experience has definitely boosted my confidence and enthusiasm for working on UWP projects.

A huge thank you to you for your guidance and support. Your insights were incredibly valuable in this journey. I'm looking forward to contributing more to this community and sharing my learnings along the way!