SPB Git

spb/vquant Public MIT

VibeQuant — AI-powered institutional-grade financial intelligence platform.

TypeScript 84.3% Python 11.7% JavaScript 1.6% CSS 1.5% HTML 0.7%
3.3 KB · 96 lines shellscript
Raw Blame History
1#!/bin/bash2# =============================================================================3#  VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4# -----------------------------------------------------------------------------5#  File:      desktop/create-icon.sh6#7#  Author:    Simon-Pierre Boucher8#  Contact:   contact@spboucher.ai9#  Website:   https://www.spboucher.ai10#  Demo:      https://www.vquant.ai11#  License:   MIT (see LICENSE)12#13#  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.14# =============================================================================1516# Generate macOS .icns from SVG logo17# Requires: rsvg-convert (librsvg) and iconutil1819set -e20cd "$(dirname "$0")"2122SVG="../public/logo-vibequant.svg"23ICONSET="icons/VQuant.iconset"2425mkdir -p "$ICONSET"2627# If rsvg-convert available, use SVG; otherwise create a simple PNG28if command -v rsvg-convert &>/dev/null; then29  for SIZE in 16 32 64 128 256 512 1024; do30    rsvg-convert -w $SIZE -h $SIZE "$SVG" > "$ICONSET/icon_${SIZE}x${SIZE}.png"31  done32  cp "$ICONSET/icon_32x32.png" "$ICONSET/icon_16x16@2x.png"33  cp "$ICONSET/icon_64x64.png" "$ICONSET/icon_32x32@2x.png"34  cp "$ICONSET/icon_256x256.png" "$ICONSET/icon_128x128@2x.png"35  cp "$ICONSET/icon_512x512.png" "$ICONSET/icon_256x256@2x.png"36  cp "$ICONSET/icon_1024x1024.png" "$ICONSET/icon_512x512@2x.png"37  rm -f "$ICONSET/icon_64x64.png" "$ICONSET/icon_1024x1024.png"38elif command -v sips &>/dev/null; then39  # Use sips (macOS built-in) with a placeholder PNG40  echo "rsvg-convert not found. Creating placeholder icon with sips..."41  # Create a simple colored square as PNG using Python42  python3 -c "43import struct, zlib4445def create_png(size, r, g, b):46    raw = b''47    for y in range(size):48        raw += b'\x00'49        for x in range(size):50            cx, cy = x - size//2, y - size//251            dist = (cx*cx + cy*cy) ** 0.552            if dist < size * 0.4:53                raw += bytes([r, g, b, 255])54            elif dist < size * 0.45:55                alpha = max(0, min(255, int(255 * (1 - (dist - size*0.4) / (size*0.05)))))56                raw += bytes([r, g, b, alpha])57            else:58                raw += bytes([0, 0, 0, 0])5960    def chunk(ctype, data):61        c = ctype + data62        return struct.pack('>I', len(data)) + c + struct.pack('>I', zlib.crc32(c) & 0xFFFFFFFF)6364    header = b'\x89PNG\r\n\x1a\n'65    ihdr = chunk(b'IHDR', struct.pack('>IIBBBBB', size, size, 8, 6, 0, 0, 0))66    idat = chunk(b'IDAT', zlib.compress(raw))67    iend = chunk(b'IEND', b'')68    return header + ihdr + idat + iend6970with open('$ICONSET/icon_1024x1024.png', 'wb') as f:71    f.write(create_png(1024, 0, 113, 227))72"73  for SIZE in 16 32 128 256 512; do74    sips -z $SIZE $SIZE "$ICONSET/icon_1024x1024.png" --out "$ICONSET/icon_${SIZE}x${SIZE}.png" > /dev/null 2>&175  done76  for SIZE in 16 32 128 256 512; do77    DOUBLE=$((SIZE * 2))78    sips -z $DOUBLE $DOUBLE "$ICONSET/icon_1024x1024.png" --out "$ICONSET/icon_${SIZE}x${SIZE}@2x.png" > /dev/null 2>&179  done80  rm -f "$ICONSET/icon_1024x1024.png"81else82  echo "Cannot generate icon. Install librsvg: brew install librsvg"83  exit 184fi8586# Generate .icns87if command -v iconutil &>/dev/null; then88  iconutil -c icns "$ICONSET" -o icons/icon.icns89  echo "Created icons/icon.icns"90else91  echo "iconutil not found (macOS only)"92fi9394rm -rf "$ICONSET"95echo "Done!"96