cleaned up develop branch

This commit is contained in:
vadym 2021-09-09 10:55:30 +03:00
parent bfe42d8899
commit 2d36105eeb
17 changed files with 102 additions and 817 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# This script generates an MSI file for Mesh for a given architecture. It
# This script generates an MSI file for Yggdrasil for a given architecture. It
# needs to run on Windows within MSYS2 and Go 1.13 or later must be installed on
# the system and within the PATH. This is ran currently by Appveyor (see
# appveyor.yml in the repository root) for both x86 and x64.
@ -47,7 +47,7 @@ then
)
fi
# Build Mesh!
# Build Yggdrasil!
[ "${PKGARCH}" == "x64" ] && GOOS=windows GOARCH=amd64 CGO_ENABLED=0 ./build
[ "${PKGARCH}" == "x86" ] && GOOS=windows GOARCH=386 CGO_ENABLED=0 ./build
[ "${PKGARCH}" == "arm" ] && GOOS=windows GOARCH=arm CGO_ENABLED=0 ./build
@ -55,12 +55,12 @@ fi
# Create the postinstall script
cat > updateconfig.bat << EOF
if not exist %ALLUSERSPROFILE%\\Mesh (
mkdir %ALLUSERSPROFILE%\\Mesh
if not exist %ALLUSERSPROFILE%\\Yggdrasil (
mkdir %ALLUSERSPROFILE%\\Yggdrasil
)
if not exist %ALLUSERSPROFILE%\\Mesh\\mesh.conf (
if not exist %ALLUSERSPROFILE%\\Yggdrasil\\mesh.conf (
if exist mesh.exe (
mesh.exe -genconf > %ALLUSERSPROFILE%\\Mesh\\mesh.conf
mesh.exe -genconf > %ALLUSERSPROFILE%\\Yggdrasil\\mesh.conf
)
)
EOF
@ -93,9 +93,9 @@ else
fi
if [ $PKGNAME != "master" ]; then
PKGDISPLAYNAME="Mesh Network (${PKGNAME} branch)"
PKGDISPLAYNAME="Yggdrasil Network (${PKGNAME} branch)"
else
PKGDISPLAYNAME="Mesh Network"
PKGDISPLAYNAME="Yggdrasil Network"
fi
# Generate the wix.xml file
@ -114,8 +114,8 @@ cat > wix.xml << EOF
<Package
Id="*"
Keywords="Installer"
Description="Mesh Network Installer"
Comments="Mesh Network standalone router for Windows."
Description="Yggdrasil Network Installer"
Comments="Yggdrasil Network standalone router for Windows."
Manufacturer="github.com/RiV-chain"
InstallerVersion="200"
InstallScope="perMachine"
@ -134,11 +134,11 @@ cat > wix.xml << EOF
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="${PKGINSTFOLDER}" Name="PFiles">
<Directory Id="MeshInstallFolder" Name="Mesh">
<Directory Id="YggdrasilInstallFolder" Name="Yggdrasil">
<Component Id="MainExecutable" Guid="c2119231-2aa3-4962-867a-9759c87beb24">
<File
Id="Mesh"
Id="Yggdrasil"
Name="mesh.exe"
DiskId="1"
Source="mesh.exe"
@ -153,14 +153,14 @@ cat > wix.xml << EOF
<ServiceInstall
Id="ServiceInstaller"
Account="LocalSystem"
Description="Mesh Network router process"
DisplayName="Mesh Service"
Description="Yggdrasil Network router process"
DisplayName="Yggdrasil Service"
ErrorControl="normal"
LoadOrderGroup="NetworkProvider"
Name="Mesh"
Name="Yggdrasil"
Start="auto"
Type="ownProcess"
Arguments='-useconffile "%ALLUSERSPROFILE%\\Mesh\\mesh.conf" -logto "%ALLUSERSPROFILE%\\Mesh\\mesh.log"'
Arguments='-useconffile "%ALLUSERSPROFILE%\\Yggdrasil\\mesh.conf" -logto "%ALLUSERSPROFILE%\\Yggdrasil\\mesh.log"'
Vital="yes" />
<ServiceControl
@ -173,7 +173,7 @@ cat > wix.xml << EOF
<Component Id="CtrlExecutable" Guid="a916b730-974d-42a1-b687-d9d504cbb86a">
<File
Id="Meshctl"
Id="Yggdrasilctl"
Name="meshctl.exe"
DiskId="1"
Source="meshctl.exe"
@ -192,7 +192,7 @@ cat > wix.xml << EOF
</Directory>
</Directory>
<Feature Id="MeshFeature" Title="Mesh" Level="1">
<Feature Id="YggdrasilFeature" Title="Yggdrasil" Level="1">
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="CtrlExecutable" />
<ComponentRef Id="ConfigScript" />
@ -200,7 +200,7 @@ cat > wix.xml << EOF
<CustomAction
Id="UpdateGenerateConfig"
Directory="MeshInstallFolder"
Directory="YggdrasilInstallFolder"
ExeCommand="cmd.exe /c updateconfig.bat"
Execute="deferred"
Return="check"