You are browsing as a guest. Sign up (or log in) to start making projects!

4h 18m 35s logged

Devlog #16: Distributables

Surprisingly, the hardest part about this project might just be getting a working distributable.

First, there was the problem of making a distributable in the first place. StorageStandby has a decoupled architecture where the backend and WPF shell run independently. In such a case, it is not viable to just bundle everything together into one executable (believe me, I tried).

I decided to try using Inno Setup, which gives me plenty of flexibility for setting up and configuring the final distributable. It allowed me to:

  • bundle the WebView2 depndencies, the Vite React dist folder, and the WPF shell into one directory
  • implement the backend into a separate directory
  • add uninstall scripts for the Windows operating system

Seeing as to how I was completely new to Inno Setup, I relied a lot on AI to help me configure the .iss files and ensure I had all the prerequisites (e.g. dotnet publications and npm vite builds) organized in the right locations.


And then, there was the cascade of functionality that just started breaking as soon as I moved from development to production. For one, the frontend stopped loading due to an invalid reference to a stylesheet, which did not exist in the final dist/ folder. I used crypto.randomUUID() to generate identifiers in parts of the code, but it turns out that method doesn’t really work in a built dist/ bundle.

Additionally, all the API requests kept failing as the API shared the same origin as the Virtual UI. This did not cause a problem in development versions (likely because I was using local ports), but in the prod versions, this ended up causing the Virtual UI origin to swallow any API requests and prevent them from reaching the backend, so I needed to spend time to separate the two origins.

0
8

Comments 0

No comments yet. Be the first!