Skip to content

Commit 530d2c0

Browse files
committed
Change ppy.squirrel.windows back to squirrel.windows 1.5.2:
- ppy.squirrel is not fully .net core upgraded, so it is still showing restored using .net framework - does not contain .net core runtime installer which is now required by Wox - UpdateManager.RestartApp method is throwing an OSU application specific error which Wox is unable to resolve. - Squirrel.Windows 1.5.2 still works and functionalities required by Wox are compatible. Tested RestartApp method, tested enable/disable protable mode methods and tested updating Wox to the latest version.
1 parent f1961e7 commit 530d2c0

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Scripts/post_build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function Copy-Resources ($path, $config) {
4040
Copy-Item -Recurse -Force $path\Plugins\HelloWorldPython $target\Plugins\HelloWorldPython
4141
Copy-Item -Recurse -Force $path\JsonRPC $target\JsonRPC
4242
# making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced.
43-
Copy-Item -Force $env:USERPROFILE\.nuget\packages\ppy.squirrel.windows\1.9.0.4\tools\Squirrel.exe $output\Update.exe
43+
Copy-Item -Force $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe $output\Update.exe
4444
}
4545

4646
function Delete-Unused ($path, $config) {
@@ -98,7 +98,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
9898
$icon = "$path\Wox\Resources\app.ico"
9999
Write-Host "icon: $icon"
100100
# Squirrel.com: https://github.com/Squirrel/Squirrel.Windows/issues/369
101-
New-Alias Squirrel $env:USERPROFILE\.nuget\packages\ppy.squirrel.windows\1.9.0.4\tools\Squirrel.exe -Force
101+
New-Alias Squirrel $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe -Force
102102
# why we need Write-Output: https://github.com/Squirrel/Squirrel.Windows/issues/489#issuecomment-156039327
103103
# directory of releaseDir in squirrel can't be same as directory ($nupkg) in releasify
104104
$temp = "$output\Temp"

Wox.Core/Configuration/Portable.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void DisablePortableMode()
3939
MessageBox.Show("Wox needs to restart to finish disabling portable mode, " +
4040
"after the restart your portable data profile will be deleted and roaming data profile kept");
4141

42-
UpdateManager.RestartApp();
42+
UpdateManager.RestartApp(Constant.ApplicationFileName);
4343
}
4444
catch (Exception e)
4545
{
@@ -67,7 +67,7 @@ public void EnablePortableMode()
6767
MessageBox.Show("Wox needs to restart to finish enabling portable mode, " +
6868
"after the restart your roaming data profile will be deleted and portable data profile kept");
6969

70-
UpdateManager.RestartApp();
70+
UpdateManager.RestartApp(Constant.ApplicationFileName);
7171
}
7272
catch (Exception e)
7373
{
@@ -82,10 +82,9 @@ public void RemoveShortcuts()
8282
{
8383
using (var portabilityUpdater = NewUpdateManager())
8484
{
85-
var exeName = Constant.Wox + ".exe";
86-
portabilityUpdater.RemoveShortcutsForExecutable(exeName, ShortcutLocation.StartMenu);
87-
portabilityUpdater.RemoveShortcutsForExecutable(exeName, ShortcutLocation.Desktop);
88-
portabilityUpdater.RemoveShortcutsForExecutable(exeName, ShortcutLocation.Startup);
85+
portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu);
86+
portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop);
87+
portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup);
8988
}
9089
}
9190

@@ -112,10 +111,9 @@ public void CreateShortcuts()
112111
{
113112
using (var portabilityUpdater = NewUpdateManager())
114113
{
115-
var exeName = Constant.Wox + ".exe";
116-
portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.StartMenu, false);
117-
portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.Desktop, false);
118-
portabilityUpdater.CreateShortcutsForExecutable(exeName, ShortcutLocation.Startup, false);
114+
portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu, false);
115+
portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop, false);
116+
portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup, false);
119117
}
120118
}
121119

Wox.Core/Wox.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<ItemGroup>
5555
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
5656
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
57-
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.4" />
57+
<PackageReference Include="squirrel.windows" Version="1.5.2" />
5858
<PackageReference Include="PropertyChanged.Fody" Version="2.2.4">
5959
<PrivateAssets>all</PrivateAssets>
6060
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Wox.Infrastructure/Constant.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static class Constant
99
public const string Wox = "Wox";
1010
public const string Plugins = "Plugins";
1111

12+
public const string ApplicationFileName = Wox + ".exe";
13+
1214
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
1315
public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location.NonNull()).ToString();
1416
public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, Wox + ".exe");

Wox/PublicAPIInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void RestarApp()
6363
// which will cause ungraceful exit
6464
SaveAppAllSettings();
6565

66-
UpdateManager.RestartApp();
66+
UpdateManager.RestartApp(Constant.ApplicationFileName);
6767
}
6868

6969
public void CheckForNewUpdate()

0 commit comments

Comments
 (0)