New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packager: Rename Daemon + Fix for Release
mode
#10883
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<OutputType>WinExe</OutputType> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
|
@@ -20,6 +12,7 @@ | |
<InvariantGlobalization>true</InvariantGlobalization> | ||
<RuntimeIdentifiers>win7-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers> | ||
<PathMap>$(MSBuildProjectDirectory)\=WalletWasabi.Daemon</PathMap> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
|
@@ -41,8 +34,8 @@ | |
<Product>Wasabi Wallet Fluent Daemon</Product> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\WalletWasabi\WalletWasabi.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spaces -> tabs |
||
<ProjectReference Include="..\WalletWasabi\WalletWasabi.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -25,6 +25,8 @@ namespace WalletWasabi.Packager; | |||||
public static class Program | ||||||
{ | ||||||
public const string PfxPath = "C:\\digicert.pfx"; | ||||||
|
||||||
public const string DaemonExecutableName = Constants.DaemonExecutableName; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done for consistency with the line below. |
||||||
public const string ExecutableName = Constants.ExecutableName; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better to have:
Suggested change
We can change it if you like. |
||||||
|
||||||
private const string WasabiPrivateKeyFilePath = @"C:\wasabi\Wasabi.privkey"; | ||||||
|
@@ -318,28 +320,20 @@ private static async Task PublishAsync() | |||||
} | ||||||
} | ||||||
|
||||||
// Rename the final exe. | ||||||
string oldExecutablePath; | ||||||
string newExecutablePath; | ||||||
if (target.StartsWith("win")) | ||||||
{ | ||||||
oldExecutablePath = Path.Combine(currentBinDistDirectory, "WalletWasabi.Fluent.Desktop.exe"); | ||||||
newExecutablePath = Path.Combine(currentBinDistDirectory, $"{ExecutableName}.exe"); | ||||||
|
||||||
// Delete unused executables. | ||||||
File.Delete(Path.Combine(currentBinDistDirectory, "WalletWasabi.Fluent.exe")); | ||||||
} | ||||||
else // Linux & OSX | ||||||
{ | ||||||
oldExecutablePath = Path.Combine(currentBinDistDirectory, "WalletWasabi.Fluent.Desktop"); | ||||||
newExecutablePath = Path.Combine(currentBinDistDirectory, ExecutableName); | ||||||
|
||||||
// Delete unused executables. | ||||||
File.Delete(Path.Combine(currentBinDistDirectory, "WalletWasabi.Fluent")); | ||||||
} | ||||||
// Rename WalletWasabi.Fluent.Desktop(.exe) -> wassabee(.exe). | ||||||
string executableExtension = target.StartsWith("win") ? ".exe" : ""; | ||||||
string oldExecutablePath = Path.Combine(currentBinDistDirectory, $"WalletWasabi.Fluent.Desktop{executableExtension}"); | ||||||
string newExecutablePath = Path.Combine(currentBinDistDirectory, $"{ExecutableName}{executableExtension}"); | ||||||
File.Move(oldExecutablePath, newExecutablePath); | ||||||
|
||||||
// Rename WalletWasabi.Daemon(.exe) -> wassabeed(.exe). | ||||||
oldExecutablePath = Path.Combine(currentBinDistDirectory, $"WalletWasabi.Daemon{executableExtension}"); | ||||||
newExecutablePath = Path.Combine(currentBinDistDirectory, $"{DaemonExecutableName}{executableExtension}"); | ||||||
File.Move(oldExecutablePath, newExecutablePath); | ||||||
|
||||||
// Delete unused executables. | ||||||
File.Delete(Path.Combine(currentBinDistDirectory, $"WalletWasabi.Fluent{executableExtension}")); | ||||||
|
||||||
// IF IT'S IN ONLYBINARIES MODE DON'T DO ANYTHING FANCY PACKAGING AFTER THIS!!! | ||||||
if (OnlyBinaries) | ||||||
{ | ||||||
|
@@ -413,7 +407,7 @@ private static async Task PublishAsync() | |||||
Console.WriteLine($"# Move '{publishedFolder}' to '{newFolderPath}'."); | ||||||
Directory.Move(publishedFolder, newFolderPath); | ||||||
publishedFolder = newFolderPath; | ||||||
string chmodExecutablesArgs = "-type f \\( -name 'wassabee' -o -name 'hwi' -o -name 'bitcoind' -o -name 'tor' \\) -exec chmod +x {} \\;"; | ||||||
string chmodExecutablesArgs = $$"""-type f \( -name '{{ExecutableName}}' -o -name '{{DaemonExecutableName}}' -o -name 'hwi' -o -name 'bitcoind' -o -name 'tor' \) -exec chmod +x {} \;"""; | ||||||
|
||||||
string[] commands = new string[] | ||||||
{ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WinExe is only for UI applications (eg WinForms or WPF). That's why in the Release mode the program did not wait for any console input.