windows installer fixes
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 22 KiB |
@@ -31,16 +31,9 @@
|
||||
fill="none" stroke="#162A45" stroke-width="3" stroke-dasharray="8 6"/>
|
||||
|
||||
<!-- Stylized L and Log Streams -->
|
||||
<!-- Main Left Spine -->
|
||||
<rect x="140" y="140" width="46" height="232" rx="10" fill="url(#cyanGrad)" filter="url(#glow)"/>
|
||||
|
||||
<!-- Base Log Floor -->
|
||||
<rect x="140" y="326" width="220" height="46" rx="10" fill="url(#cyanGrad)" filter="url(#glow)"/>
|
||||
|
||||
<!-- Telemetry Pulse Wave 1 -->
|
||||
<rect x="220" y="210" width="36" height="80" rx="8" fill="url(#emeraldGrad)"/>
|
||||
|
||||
<!-- Telemetry Pulse Wave 2 -->
|
||||
<rect x="286" y="150" width="36" height="140" rx="8" fill="url(#cyanGrad)"/>
|
||||
|
||||
<!-- Connection Nodes / Spark Points -->
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
@@ -88,15 +88,13 @@ def draw_logo_rgba(x: int, y: int, w: int, h: int) -> tuple:
|
||||
if dist > 0.98:
|
||||
return 0, 0, 0, 0
|
||||
|
||||
# Background rounded container / shield
|
||||
# Hexagon radius
|
||||
# Hexagon radius formula
|
||||
angle = math.atan2(ny, nx)
|
||||
hex_radius = 0.88 / (math.cos((angle % (math.pi / 3)) - (math.pi / 6)) + 0.001)
|
||||
|
||||
if dist > hex_radius:
|
||||
# Subtle anti-aliased edge
|
||||
if dist < hex_radius + 0.05:
|
||||
alpha = max(0.0, min(1.0, (hex_radius + 0.05 - dist) / 0.05))
|
||||
if dist < hex_radius + 0.04:
|
||||
alpha = max(0.0, min(1.0, (hex_radius + 0.04 - dist) / 0.04))
|
||||
return 11, 25, 44, int(alpha * 255)
|
||||
return 0, 0, 0, 0
|
||||
|
||||
@@ -107,7 +105,7 @@ def draw_logo_rgba(x: int, y: int, w: int, h: int) -> tuple:
|
||||
bg_b = int(48 * (1 - grad_t) + 32 * grad_t)
|
||||
|
||||
# Hexagon outer border (Cyber Cyan / Emerald highlight)
|
||||
if dist > hex_radius - 0.06:
|
||||
if dist > hex_radius - 0.07:
|
||||
glow_t = (nx + 1) / 2
|
||||
br = int(0 * (1 - glow_t) + 0 * glow_t)
|
||||
bg = int(229 * (1 - glow_t) + 160 * glow_t)
|
||||
@@ -115,9 +113,8 @@ def draw_logo_rgba(x: int, y: int, w: int, h: int) -> tuple:
|
||||
return br, bg, bb, 255
|
||||
|
||||
# Center stylized 'L' log symbol and dynamic telemetry bars
|
||||
# Bar 1 (Left Log Stream): x in [-0.45, -0.25], y in [-0.5, 0.4]
|
||||
# Bar 1 (Left Log Stream): x in [-0.42, -0.22], y in [-0.45, 0.45]
|
||||
if -0.42 <= nx <= -0.22 and -0.45 <= ny <= 0.45:
|
||||
# Cyan gradient
|
||||
v = (ny + 0.45) / 0.9
|
||||
return int(0), int(220 * (1 - v) + 140 * v), int(255), 255
|
||||
|
||||
@@ -134,7 +131,7 @@ def draw_logo_rgba(x: int, y: int, w: int, h: int) -> tuple:
|
||||
if 0.18 <= nx <= 0.36 and -0.50 <= ny <= 0.12:
|
||||
return 0, 180, 255, 255
|
||||
|
||||
# Subtle inner grid dots / pulse nodes
|
||||
# Subtle inner grid dots
|
||||
grid_x = (nx * 10) % 1
|
||||
grid_y = (ny * 10) % 1
|
||||
if 0.45 <= grid_x <= 0.55 and 0.45 <= grid_y <= 0.55:
|
||||
@@ -143,38 +140,57 @@ def draw_logo_rgba(x: int, y: int, w: int, h: int) -> tuple:
|
||||
return bg_r, bg_g, bg_b, 255
|
||||
|
||||
|
||||
def draw_wizard_header_bgr(x: int, y: int, w: int, h: int) -> tuple:
|
||||
"""Renders 150x57 BMP header graphic."""
|
||||
# Dark modern gradient background
|
||||
t = x / w
|
||||
r = int(14 * (1 - t) + 8 * t)
|
||||
g = int(24 * (1 - t) + 16 * t)
|
||||
b = int(44 * (1 - t) + 30 * t)
|
||||
def draw_wizard_header_white_bgr(x: int, y: int, w: int, h: int) -> tuple:
|
||||
"""
|
||||
Renders header BMP graphic with a pure white background (255, 255, 255)
|
||||
matching the installer wizard dialog background seamlessly.
|
||||
The logo is positioned on the left with clean alpha-blended edges.
|
||||
"""
|
||||
bg_r, bg_g, bg_b = 255, 255, 255
|
||||
|
||||
# Right-aligned emblem icon in header
|
||||
icon_center_x = w - 35
|
||||
# Position emblem cleanly on the left (center x = 30, center y = h / 2)
|
||||
icon_center_x = 28
|
||||
icon_center_y = h / 2
|
||||
dx = (x - icon_center_x) / 22
|
||||
dy = (y - icon_center_y) / 22
|
||||
icon_radius = 22
|
||||
dx = (x - icon_center_x) / icon_radius
|
||||
dy = (y - icon_center_y) / icon_radius
|
||||
d = math.sqrt(dx * dx + dy * dy)
|
||||
|
||||
if d < 0.95:
|
||||
# Render miniature emblem
|
||||
if d < 1.0:
|
||||
er, eg, eb, ea = draw_logo_rgba(int((dx + 1) * 32), int((dy + 1) * 32), 64, 64)
|
||||
if ea > 128:
|
||||
return er, eg, eb
|
||||
|
||||
# Decorative bottom accent line (Cyan gradient)
|
||||
if y >= h - 2:
|
||||
return 0, int(200 * t + 55), 255
|
||||
|
||||
alpha = ea / 255.0
|
||||
r = int(er * alpha + bg_r * (1.0 - alpha))
|
||||
g = int(eg * alpha + bg_g * (1.0 - alpha))
|
||||
b = int(eb * alpha + bg_b * (1.0 - alpha))
|
||||
return r, g, b
|
||||
|
||||
return bg_r, bg_g, bg_b
|
||||
|
||||
|
||||
def draw_wizard_small_bgr(x: int, y: int, w: int, h: int) -> tuple:
|
||||
"""Renders 55x55 square header BMP with centered logo on pure white background."""
|
||||
bg_r, bg_g, bg_b = 255, 255, 255
|
||||
cx = w / 2
|
||||
cy = h / 2
|
||||
rad = (min(w, h) / 2) - 4
|
||||
dx = (x - cx) / rad
|
||||
dy = (y - cy) / rad
|
||||
d = math.sqrt(dx * dx + dy * dy)
|
||||
|
||||
if d < 1.0:
|
||||
er, eg, eb, ea = draw_logo_rgba(int((dx + 1) * 32), int((dy + 1) * 32), 64, 64)
|
||||
alpha = ea / 255.0
|
||||
r = int(er * alpha + bg_r * (1.0 - alpha))
|
||||
g = int(eg * alpha + bg_g * (1.0 - alpha))
|
||||
b = int(eb * alpha + bg_b * (1.0 - alpha))
|
||||
return r, g, b
|
||||
|
||||
return bg_r, bg_g, bg_b
|
||||
|
||||
|
||||
def draw_wizard_sidebar_bgr(x: int, y: int, w: int, h: int) -> tuple:
|
||||
"""Renders 164x314 BMP sidebar graphic for NSIS / Inno Setup."""
|
||||
t_y = y / h
|
||||
t_x = x / w
|
||||
|
||||
# Deep cyber navy to midnight blue vertical gradient
|
||||
r = int(10 * (1 - t_y) + 4 * t_y)
|
||||
@@ -281,16 +297,9 @@ def generate_svg_logo() -> str:
|
||||
fill="none" stroke="#162A45" stroke-width="3" stroke-dasharray="8 6"/>
|
||||
|
||||
<!-- Stylized L and Log Streams -->
|
||||
<!-- Main Left Spine -->
|
||||
<rect x="140" y="140" width="46" height="232" rx="10" fill="url(#cyanGrad)" filter="url(#glow)"/>
|
||||
|
||||
<!-- Base Log Floor -->
|
||||
<rect x="140" y="326" width="220" height="46" rx="10" fill="url(#cyanGrad)" filter="url(#glow)"/>
|
||||
|
||||
<!-- Telemetry Pulse Wave 1 -->
|
||||
<rect x="220" y="210" width="36" height="80" rx="8" fill="url(#emeraldGrad)"/>
|
||||
|
||||
<!-- Telemetry Pulse Wave 2 -->
|
||||
<rect x="286" y="150" width="36" height="140" rx="8" fill="url(#cyanGrad)"/>
|
||||
|
||||
<!-- Connection Nodes / Spark Points -->
|
||||
@@ -328,14 +337,21 @@ def main():
|
||||
f.write(ico_data)
|
||||
print(f"[+] Saved Windows Icon (.ico): {ico_path}")
|
||||
|
||||
# 4. Generate NSIS / Inno Setup Wizard Header Bitmap (150x57)
|
||||
# 4. Generate NSIS / Inno Setup Wizard Header Bitmap (150x57) with seamless white background
|
||||
header_bmp_path = os.path.join(ASSETS_DIR, "wizard_header.bmp")
|
||||
header_bmp_data = create_bmp_24bit(150, 57, draw_wizard_header_bgr)
|
||||
header_bmp_data = create_bmp_24bit(150, 57, draw_wizard_header_white_bgr)
|
||||
with open(header_bmp_path, "wb") as f:
|
||||
f.write(header_bmp_data)
|
||||
print(f"[+] Saved Wizard Header Bitmap: {header_bmp_path}")
|
||||
print(f"[+] Saved Wizard Header Bitmap (White Background): {header_bmp_path}")
|
||||
|
||||
# 5. Generate NSIS / Inno Setup Wizard Sidebar Bitmap (164x314)
|
||||
# 5. Generate Inno Setup Small Wizard Bitmap (55x55) with seamless white background
|
||||
small_bmp_path = os.path.join(ASSETS_DIR, "wizard_small.bmp")
|
||||
small_bmp_data = create_bmp_24bit(55, 55, draw_wizard_small_bgr)
|
||||
with open(small_bmp_path, "wb") as f:
|
||||
f.write(small_bmp_data)
|
||||
print(f"[+] Saved Small Wizard Bitmap (55x55): {small_bmp_path}")
|
||||
|
||||
# 6. Generate NSIS / Inno Setup Wizard Sidebar Bitmap (164x314)
|
||||
sidebar_bmp_path = os.path.join(ASSETS_DIR, "wizard_sidebar.bmp")
|
||||
sidebar_bmp_data = create_bmp_24bit(164, 314, draw_wizard_sidebar_bgr)
|
||||
with open(sidebar_bmp_path, "wb") as f:
|
||||
|
||||
@@ -14,7 +14,7 @@ SolidCompression=yes
|
||||
WizardStyle=modern
|
||||
SetupIconFile=assets\logo.ico
|
||||
WizardImageFile=assets\wizard_sidebar.bmp
|
||||
WizardSmallImageFile=assets\wizard_header.bmp
|
||||
WizardSmallImageFile=assets\wizard_small.bmp
|
||||
VersionInfoCompany=LOGAR Security Systems
|
||||
VersionInfoDescription=LOGAR Windows Edge Log Forwarder Setup
|
||||
VersionInfoVersion=0.3.2.0
|
||||
|
||||
@@ -14,7 +14,7 @@ SolidCompression=yes
|
||||
WizardStyle=modern
|
||||
SetupIconFile=assets\logo.ico
|
||||
WizardImageFile=assets\wizard_sidebar.bmp
|
||||
WizardSmallImageFile=assets\wizard_header.bmp
|
||||
WizardSmallImageFile=assets\wizard_small.bmp
|
||||
VersionInfoCompany=LOGAR Security Systems
|
||||
VersionInfoDescription=LOGAR Cloud Hub & TCP Ingestion Server Setup
|
||||
VersionInfoVersion=0.3.2.0
|
||||
|
||||
@@ -1312,7 +1312,7 @@ def login_page(request: Request):
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
|
||||
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 36px; width: 100%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); }
|
||||
.logo-header { text-align: center; margin-bottom: 24px; }
|
||||
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 12px; }
|
||||
.logo-icon { width: 56px; height: 56px; background: transparent; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
|
||||
h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
|
||||
.subtitle { font-size: 13px; color: var(--text-muted); }
|
||||
.form-group { margin-bottom: 18px; text-align: left; }
|
||||
@@ -2278,11 +2278,8 @@ def serve_webui(request: Request = None):
|
||||
.logo-group {{ display: flex; align-items: center; gap: 14px; }}
|
||||
.logo-icon {{
|
||||
width: 44px; height: 44px;
|
||||
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
|
||||
border-radius: 12px;
|
||||
background: transparent;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 22px; font-weight: 800; color: #fff;
|
||||
box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
|
||||
}}
|
||||
h1 {{ font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }}
|
||||
.subtitle {{ font-size: 13px; color: var(--text-muted); margin-top: 2px; }}
|
||||
|
||||