diff --git a/Source/LibationAvalonia/App.axaml.cs b/Source/LibationAvalonia/App.axaml.cs index bffcebcc..8d806fc8 100644 --- a/Source/LibationAvalonia/App.axaml.cs +++ b/Source/LibationAvalonia/App.axaml.cs @@ -30,7 +30,7 @@ namespace LibationAvalonia public static IAssetLoader AssetLoader { get; private set; } public static readonly Uri AssetUriBase = new Uri("avares://Libation/Assets/"); - public static System.IO.Stream OpenAsset(string assetRelativePath) + public static Stream OpenAsset(string assetRelativePath) => AssetLoader.Open(new Uri(AssetUriBase, assetRelativePath)); @@ -47,7 +47,7 @@ namespace LibationAvalonia var startInfo = new System.Diagnostics.ProcessStartInfo() { FileName = "/bin/xdg-open", - Arguments = path is null ? string.Empty : $"\"{System.IO.Path.GetDirectoryName(path)}\"", + Arguments = path is null ? string.Empty : $"\"{path}\"", UseShellExecute = false, //Import in Linux environments CreateNoWindow = false, RedirectStandardOutput = true, @@ -89,12 +89,16 @@ namespace LibationAvalonia config.SetLibationFiles(defaultLibationFilesDir); if (config.LibationSettingsAreValid) - return; - - var setupDialog = new SetupDialog { Config = config }; - setupDialog.Closing += Setup_Closing; - - desktop.MainWindow = setupDialog; + { + LibraryTask = Task.Run(() => DbContexts.GetLibrary_Flat_NoTracking(includeParents: true)); + ShowMainWindow(desktop); + } + else + { + var setupDialog = new SetupDialog { Config = config }; + setupDialog.Closing += Setup_Closing; + desktop.MainWindow = setupDialog; + } } else ShowMainWindow(desktop); @@ -129,7 +133,8 @@ namespace LibationAvalonia MessageBox.VerboseLoggingWarning_ShowIfTrue(); #if !DEBUG - checkForUpdate(); + //AutoUpdater.NET only works for WinForms or WPF application projects. + //checkForUpdate(); #endif // logging is init'd here AppScaffolding.LibationScaffolding.RunPostMigrationScaffolding(setupDialog.Config); diff --git a/Source/LibationAvalonia/README.md b/Source/LibationAvalonia/README.md new file mode 100644 index 00000000..caa9a054 --- /dev/null +++ b/Source/LibationAvalonia/README.md @@ -0,0 +1,59 @@ +# Run Libation on Ubuntu + +## Dependencies +### Dotnet Runtime +You must install the dotnet 6.0 runtime on your machine. + +First, add the Microsoft package signing key to your list of trusted keys and add the package repository. + +
+ Ubuntu 22.04 + + ```console + wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb + rm packages-microsoft-prod.deb + ``` +
+ +
+ Ubuntu 21.10 + + ```console + wget https://packages.microsoft.com/config/ubuntu/21.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb + rm packages-microsoft-prod.deb + ``` +
+ +
+ Ubuntu 20.04 + + ```console + wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb + rm packages-microsoft-prod.deb + ``` +
+ +Then install the dotnet 6.0 runtime + +```console +sudo apt-get update; \ + sudo apt-get install -y apt-transport-https && \ + sudo apt-get update && \ + sudo apt-get install -y dotnet-runtime-6.0 +``` +### FFMpeg (Optional) +If you want to convert your audiobooks to mp3, install FFMpeg using the following command: + +```console +sudo apt-get install -y ffmpeg +``` + +## Install Libation + +1. Download and extract the most recent linux-64 build. +2. Run Libation, either from the terminal or by double-clicking the Libation file in your desktop environment. +3. Follow the prompts to setup your installation. +4. Report bugs to https://github.com/rmcrackan/Libation/issues