mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
Build and install script update.
This commit is contained in:
parent
6ff071b375
commit
374b03f2d1
2 changed files with 14 additions and 24 deletions
4
build.sh
4
build.sh
|
|
@ -22,8 +22,8 @@ mkdir $BUILD_DIR/panels
|
||||||
mkdir $BUILD_DIR/public
|
mkdir $BUILD_DIR/public
|
||||||
|
|
||||||
# Move the generated files to the new build directory
|
# Move the generated files to the new build directory
|
||||||
mv ../be/Macrame.exe $BUILD_DIR/be/Macrame.exe
|
cp ../be/Macrame.exe $BUILD_DIR/be/Macrame.exe
|
||||||
mv ../be/Setup.exe $BUILD_DIR/be/Setup.exe
|
cp ../be/Setup.exe $BUILD_DIR/be/Setup.exe
|
||||||
cp -r ../macros/* $BUILD_DIR/macros/
|
cp -r ../macros/* $BUILD_DIR/macros/
|
||||||
cp -r ../panels/* $BUILD_DIR/panels/
|
cp -r ../panels/* $BUILD_DIR/panels/
|
||||||
mv ../public/* $BUILD_DIR/public/
|
mv ../public/* $BUILD_DIR/public/
|
||||||
|
|
|
||||||
34
install.bat
34
install.bat
|
|
@ -1,35 +1,25 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
|
||||||
|
|
||||||
REM Set paths relative to the current working directory
|
set ruleName="Macrame LAN Access"
|
||||||
|
set exePath=%~dp0be\Macrame.exe
|
||||||
|
|
||||||
$ruleName = "Macrame LAN Access"
|
:: Check if rule exists
|
||||||
$exePath = Join-Path $PSScriptRoot "be\Macrame.exe"
|
netsh advfirewall firewall show rule name=%ruleName% >nul 2>&1
|
||||||
|
if %errorlevel%==1 (
|
||||||
|
netsh advfirewall firewall add rule name=%ruleName% dir=in action=allow program=%exePath% protocol=tcp profile=private enabled=true
|
||||||
|
echo Firewall rule '%ruleName%' added for %exePath%
|
||||||
|
) else (
|
||||||
|
echo Firewall rule '%ruleName%' already exists
|
||||||
|
)
|
||||||
|
|
||||||
# Check if rule exists
|
|
||||||
$existingRule = Get-NetFirewallRule -DisplayName $ruleName -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
if (-not $existingRule) {
|
|
||||||
New-NetFirewallRule -DisplayName $ruleName `
|
|
||||||
-Direction Inbound `
|
|
||||||
-Action Allow `
|
|
||||||
-Program $exePath `
|
|
||||||
-Protocol TCP `
|
|
||||||
-Profile Private `
|
|
||||||
-Enabled True
|
|
||||||
|
|
||||||
Write-Host "Firewall rule '$ruleName' added for $exePath"
|
|
||||||
} else {
|
|
||||||
Write-Host "Firewall rule '$ruleName' already exists"
|
|
||||||
}
|
|
||||||
:: Navigate to the "be" directory
|
:: Navigate to the "be" directory
|
||||||
cd /d "%~dp0be"
|
cd /d "%~dp0be"
|
||||||
|
|
||||||
|
echo Moved to Backend directory
|
||||||
|
|
||||||
:: Run setup.exe to generate configuration and necessary files
|
:: Run setup.exe to generate configuration and necessary files
|
||||||
start /wait Setup.exe
|
start /wait Setup.exe
|
||||||
|
|
||||||
:: start /wait caddy.exe fmt --overwrite
|
|
||||||
|
|
||||||
:: Run Caddy to generate certificates and serve content
|
:: Run Caddy to generate certificates and serve content
|
||||||
:: start /wait caddy.exe start --config CaddyFile
|
:: start /wait caddy.exe start --config CaddyFile
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue