Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Flow.Launcher.Core/Configuration/Portable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
{
MoveUserDataFolder(DataLocation.RoamingDataPath, DataLocation.PortableDataPath);
#if !DEBUG
// Remove shortcuts and uninstaller are not required in debug mode,

Check warning on line 64 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`uninstaller` is not a recognized word. (unrecognized-spelling)
// otherwise will delete the actual installed production version
RemoveShortcuts();
RemoveUninstallerEntry();

Check warning on line 67 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Uninstaller` is not a recognized word. (unrecognized-spelling)
#endif
IndicateDeletion(DataLocation.RoamingDataPath);

Expand All @@ -86,10 +86,10 @@
portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup);
}

public void RemoveUninstallerEntry()

Check warning on line 89 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Uninstaller` is not a recognized word. (unrecognized-spelling)
{
using var portabilityUpdater = NewUpdateManager();
portabilityUpdater.RemoveUninstallerRegistryEntry();

Check warning on line 92 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Uninstaller` is not a recognized word. (unrecognized-spelling)
}

public void MoveUserDataFolder(string fromLocation, string toLocation)
Expand All @@ -111,7 +111,7 @@
portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup, false);
}

public void CreateUninstallerEntry()

Check warning on line 114 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Uninstaller` is not a recognized word. (unrecognized-spelling)
{
var uninstallRegSubKey = @"Software\Microsoft\Windows\CurrentVersion\Uninstall";

Expand All @@ -128,7 +128,7 @@

private static void IndicateDeletion(string filePathTodelete)
{
var deleteFilePath = Path.Combine(filePathTodelete, DataLocation.DeletionIndicatorFile);

Check warning on line 131 in Flow.Launcher.Core/Configuration/Portable.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Todelete` is not a recognized word. (unrecognized-spelling)
using var _ = File.CreateText(deleteFilePath);
}

Expand All @@ -139,8 +139,8 @@
public void PreStartCleanUpAfterPortabilityUpdate()
{
// Specify here so this method does not rely on other environment variables to initialise
var portableDataDir = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), "UserData");
var roamingDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
var portableDataDir = DataLocation.PortableDataPath;
var roamingDataDir = DataLocation.RoamingDataPath;

// Get full path to the .dead files for each case
var portableDataDeleteFilePath = Path.Combine(portableDataDir, DataLocation.DeletionIndicatorFile);
Expand Down
7 changes: 4 additions & 3 deletions Flow.Launcher.Core/Flow.Launcher.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
Expand Down Expand Up @@ -56,10 +56,11 @@
<ItemGroup>
<PackageReference Include="Droplex" Version="1.7.0" />
<PackageReference Include="FSharp.Core" Version="9.0.303" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.4" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.5" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
<!-- Do not upgrade this to higher version since higher version removes UpdateManager instance -->
<PackageReference Include="squirrel.windows" Version="1.9.0" NoWarn="NU1701" />
<PackageReference Include="StreamJsonRpc" Version="2.22.11" />
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion Flow.Launcher.Core/Plugin/PluginConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Flow.Launcher.Plugin;
using System.Text.Json;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.Core.Plugin
{
Expand All @@ -30,7 +31,7 @@ public static List<PluginMetadata> Parse(string[] pluginDirectories)
// todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft
foreach (var directory in directories)
{
if (File.Exists(Path.Combine(directory, "NeedDelete.txt")))
if (File.Exists(Path.Combine(directory, DataLocation.PluginDeleteFile)))
{
try
{
Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher.Core/Plugin/PluginManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -815,7 +815,7 @@ internal static async Task<bool> UninstallPluginAsync(PluginMetadata plugin, boo
}

// Marked for deletion. Will be deleted on next start up
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, DataLocation.PluginDeleteFile));

if (checkModified)
{
Expand Down
Loading
Loading