rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
14.94k stars 1.06k forks source link

Improve Visual Studio Build Process #1271

Open 64bit-awesome opened 2 years ago

64bit-awesome commented 2 years ago

Is your feature request related to a problem? Please describe. From my understanding, building lively on Visual Studio requires manually creating the plugins folder in the core project and copying over the build output from the plugins (UI, Watchdog, PlayerWebView2, PlayerWmf) every time they are modified. This must be tedious to do for every build.

Describe the solution you'd like There is an easier way to do this!

Visual Studio can take care of creating the 'Plugins' folder if it does not exist and copying the build output to the correct folder in the plugins directory automatically when re-building the solution. All that is needed is to configure the csproject files and the sln file and the UI, Watchdog, PlayerWebView2, and PlayerWmf plugins are automatically copied to the Lively plugin directory after they are built. I think this makes the process easier.

I created a pull request and linked it if you would like to incorporate my changes.

Note lively-cef and mpv plugins will still need to be manually copied over since they are not in the same visual studio solution.

rocksdanister commented 2 years ago

Hi, thank you and appreciate the help. Unfortunately there is a few edge cases like in the store build the plugins are published with .net core self-contained and others just the build is used (installer.) There is also difference in structure between the store and installer (UI\Build\Lively.exe for store.)

I wish to make the store and installer into a single project in the future, then we can take a look at this issue.

rocksdanister commented 2 years ago

Outlining the current build process

Installer (x86):

  1. Set IsMsixRelease in Build.props to false.
  2. Include default wallpaper in 'Lively\Bundle\Wallpapers\' and theme 'Lively\Bundle\Themes\' folder in filename 0.zip,1.zip..etc
  3. Build x86 browser CefSharp and place in Lively/Plugins/Cef folder.
  4. Download mpv player x86 and place in Lively/Plugins/Mpv folder.
  5. Publish win10-x86 build of Lively UI with Frame-work dependent (installer will install runtime on host system.) setting and copy to Lively/Plugins/UI/
  6. Publish win-x86 build of Lively core with Frame-work dependent setting (visual studio will copy bundle and plugins to output.)
  7. Package using Inno installer script.

Microsoft store:

  1. Set IsMsixRelease in Build.props to true.
  2. Same as installer.
  3. Same as installer.
  4. Same as installer.
  5. Publish win-x86 build of Lively core with Frame-work included setting.
  6. Copy (5) output to Lively.UI.WinUI\Build folder.
  7. Package and publish Lively.UI.WinUI into msix.
  8. Copy the msix file into src folder and convert to msixbundle file by using cmd: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\MakeAppx.exe" bundle /d "C:\src" /p C:\dest\out.msixbundle