Make packager able to package for linux, too
Add repo and license to package.json
MODIFY
HiddenWallet.Gui/package.json
HiddenWallet.Gui/package.json
"version": "0.6.0",
"description": "HiddenWallet.Gui",
"main": "main.js",
+ "repository": "https://github.com/nopara73/HiddenWallet/",
+ "license": "MIT",
"author": {
"name": "nopara73 <adam.ficsor73@gmail.com>"
},
},
"scripts": {
"start": "electron .",
- "pack": "build --dir",
+ "pack": "build --dir -wl",
"dist": "build"
},
"build": {

MODIFY
HiddenWallet.Packager/Program.cs
HiddenWallet.Packager/Program.cs
@@ -25,9 +25,11 @@ namespace HiddenWallet.Packager
var version = packageJson.SelectToken("version").Value<string>();
// https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog
+ // by the packager currently only windows and linux suppported and only x64
string[] targets =
{
- "win-x64"
+ "win-x64",
+ "linux-x64"
};
await UpdateCsprojAsync(daemonProjectDirectory, targets);
@@ -50,6 +52,8 @@ namespace HiddenWallet.Packager
}
Directory.CreateDirectory(currDistDir);
+ if(target.StartsWith("win", StringComparison.OrdinalIgnoreCase))
+ {
var torFolderPath = Path.Combine(currDistDir, "tor");
Console.WriteLine("Replacing tor...");
if (Directory.Exists(torFolderPath))
@@ -65,6 +69,7 @@ namespace HiddenWallet.Packager
await Task.Delay(100);
ZipFile.ExtractToDirectory(Path.Combine(packagerProjectDirectory, "tor.zip"), currDistDir);
}
+ }
var psiPublish = new ProcessStartInfo
{
@@ -103,7 +108,14 @@ namespace HiddenWallet.Packager
string targetWithoutArch = target.Remove(target.Length - 4);
string currentDistributionDirectory = Path.Combine(distDir, "HiddenWallet-" + version + "-" + targetWithoutArch);
+ if(target.StartsWith("win"))
+ {
CloneDirectory(Path.Combine(distDir, "win-unpacked"), currentDistributionDirectory);
+ }
+ else
+ {
+ CloneDirectory(Path.Combine(distDir, "linux-unpacked"), currentDistributionDirectory);
+ }
string currTargDir = Path.Combine(currentDistributionDirectory, "resources\\HiddenWallet.Daemon\\bin\\dist\\current-target");
Directory.CreateDirectory(currTargDir);
var apiTargetDir = Path.Combine(daemonProjectDirectory, "bin\\dist", target);
@@ -114,6 +126,7 @@ namespace HiddenWallet.Packager
}
await DeleteDirectoryRecursivelyAsync(Path.Combine(distDir, "win-unpacked"));
+ await DeleteDirectoryRecursivelyAsync(Path.Combine(distDir, "linux-unpacked"));
Console.WriteLine("Finished. Press key to exit...");
Console.ReadKey();

Make packager able to package for linux, too
Add repo and license to package.json