mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
Move yggdrasil.conf to ALLUSERSPROFILE
This commit is contained in:
parent
9967541627
commit
16e55992b6
@ -52,9 +52,14 @@ fi
|
|||||||
[ "${PKGARCH}" == "x86" ] && GOOS=windows GOARCH=386 CGO_ENABLED=0 ./build
|
[ "${PKGARCH}" == "x86" ] && GOOS=windows GOARCH=386 CGO_ENABLED=0 ./build
|
||||||
|
|
||||||
# Create the postinstall script
|
# Create the postinstall script
|
||||||
cat > config.bat << EOF
|
cat > updateconfig.bat << EOF
|
||||||
if not exist yggdrasil.conf (
|
if not exist %ALLUSERSPROFILE%\\Yggdrasil (
|
||||||
yggdrasil.exe -genconf > yggdrasil.conf
|
mkdir %ALLUSERSPROFILE%\\Yggdrasil
|
||||||
|
)
|
||||||
|
if not exist %ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf (
|
||||||
|
if exist yggdrasil.exe (
|
||||||
|
yggdrasil.exe -genconf > %ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf
|
||||||
|
)
|
||||||
)
|
)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -95,9 +100,10 @@ cat > wix.xml << EOF
|
|||||||
Id="*"
|
Id="*"
|
||||||
Keywords="Installer"
|
Keywords="Installer"
|
||||||
Description="Yggdrasil Network Installer"
|
Description="Yggdrasil Network Installer"
|
||||||
Comments="This is the Yggdrasil Network binary."
|
Comments="This is the Yggdrasil Network router for Windows."
|
||||||
Manufacturer="github.com/yggdrasil-network"
|
Manufacturer="github.com/yggdrasil-network"
|
||||||
InstallerVersion="200"
|
InstallerVersion="200"
|
||||||
|
InstallScope="perMachine"
|
||||||
Languages="1033"
|
Languages="1033"
|
||||||
Compressed="yes"
|
Compressed="yes"
|
||||||
Platform="${PKGARCH}"
|
Platform="${PKGARCH}"
|
||||||
@ -133,7 +139,7 @@ cat > wix.xml << EOF
|
|||||||
Name="yggdrasil"
|
Name="yggdrasil"
|
||||||
Start="auto"
|
Start="auto"
|
||||||
Type="ownProcess"
|
Type="ownProcess"
|
||||||
Arguments='-useconffile "[YggdrasilInstallFolder]yggdrasil.conf" -logto "[YggdrasilInstallFolder]yggdrasil.log"'
|
Arguments='-useconffile "%ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf" -logto "%ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.log"'
|
||||||
Vital="yes" />
|
Vital="yes" />
|
||||||
|
|
||||||
<ServiceControl
|
<ServiceControl
|
||||||
@ -158,7 +164,7 @@ cat > wix.xml << EOF
|
|||||||
Id="Configbat"
|
Id="Configbat"
|
||||||
Name="updateconfig.bat"
|
Name="updateconfig.bat"
|
||||||
DiskId="1"
|
DiskId="1"
|
||||||
Source="config.bat"
|
Source="updateconfig.bat"
|
||||||
KeyPath="yes"/>
|
KeyPath="yes"/>
|
||||||
</Component>
|
</Component>
|
||||||
</Directory>
|
</Directory>
|
||||||
@ -183,13 +189,13 @@ cat > wix.xml << EOF
|
|||||||
Directory="YggdrasilInstallFolder"
|
Directory="YggdrasilInstallFolder"
|
||||||
ExeCommand="cmd.exe /c updateconfig.bat"
|
ExeCommand="cmd.exe /c updateconfig.bat"
|
||||||
Execute="deferred"
|
Execute="deferred"
|
||||||
Impersonate="no"
|
Return="check"
|
||||||
Return="check" />
|
Impersonate="yes" />
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom
|
<Custom
|
||||||
Action="UpdateGenerateConfig"
|
Action="UpdateGenerateConfig"
|
||||||
Before="InstallServices">
|
Before="StartServices">
|
||||||
NOT Installed AND NOT REMOVE
|
NOT Installed AND NOT REMOVE
|
||||||
</Custom>
|
</Custom>
|
||||||
</InstallExecuteSequence>
|
</InstallExecuteSequence>
|
||||||
@ -202,4 +208,4 @@ EOF
|
|||||||
CANDLEFLAGS="-nologo"
|
CANDLEFLAGS="-nologo"
|
||||||
LIGHTFLAGS="-nologo -spdb -sice:ICE71 -sice:ICE61"
|
LIGHTFLAGS="-nologo -spdb -sice:ICE71 -sice:ICE61"
|
||||||
wixbin/candle $CANDLEFLAGS -out ${PKGNAME}-${PKGVERSION}-${PKGARCH}.wixobj -arch ${PKGARCH} wix.xml && \
|
wixbin/candle $CANDLEFLAGS -out ${PKGNAME}-${PKGVERSION}-${PKGARCH}.wixobj -arch ${PKGARCH} wix.xml && \
|
||||||
wixbin/light $LIGHTFLAGS -out ${PKGNAME}-${PKGVERSION}-${PKGARCH}.msi ${PKGNAME}-${PKGVERSION}-${PKGARCH}.wixobj
|
wixbin/light $LIGHTFLAGS -ext WixUtilExtension.dll -out ${PKGNAME}-${PKGVERSION}-${PKGARCH}.msi ${PKGNAME}-${PKGVERSION}-${PKGARCH}.wixobj
|
||||||
|
Loading…
Reference in New Issue
Block a user