Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions ZXBSInstaller.Log/ServiceLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,17 +1073,35 @@ echo on
bashFile = Path.Combine(GeneralConfig.BasePath, "downloads", "zxbsinstall.sh");
bash = @"
#!/bin/bash
set -e

echo ""Updating installer...""
sleep 5

set -x
tar -xf ""{tempFile}"" -C ""{installationPath}""
rm -f ""{tempFile}""
cd ""{installationPath}"" || exit 1

# Ejecutar sin esperar (en segundo plano)
./ZXBSInstaller.exe &";
ZIP_FILE=""{tempFile}""
DEST_DIR=""{installationPath}""

extract_zip() {
if command -v unzip >/dev/null 2>&1; then
echo ""Using unzip...""
unzip -o ""$ZIP_FILE"" -d ""$DEST_DIR""
elif command -v tar >/dev/null 2>&1; then
echo ""Using tar...""
tar -xf ""$ZIP_FILE"" -C ""$DEST_DIR""
else
echo ""Error: Neither unzip nor tar is installed.""
exit 1
fi
}

extract_zip

rm -f ""$ZIP_FILE""
cd ""$DEST_DIR"" || exit 1

# Ejecutar sin esperar
./ZXBSInstaller &
";
}
bash = bash.Replace("{tempFile}", tempFile).Replace("{installationPath}", installationPath);
File.WriteAllText(bashFile, bash);
Expand Down
2 changes: 1 addition & 1 deletion ZXBSInstaller/ZXBSInstaller.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<ApplicationIcon>zxbs.ico</ApplicationIcon>
<Version>1.0.0.1</Version>
<Version>1.0.0.2</Version>
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\install.svg" />
Expand Down