Skip to content

Instantly share code, notes, and snippets.

@Kaylebor
Created September 26, 2025 10:26
Show Gist options
  • Select an option

  • Save Kaylebor/fa2eb71f629ea7bd25569284c3e9ecc9 to your computer and use it in GitHub Desktop.

Select an option

Save Kaylebor/fa2eb71f629ea7bd25569284c3e9ecc9 to your computer and use it in GitHub Desktop.
Install FL Studio with working WebViews
#!/usr/bin/env bash
set -Eeuo pipefail
# --- FL Studio + WebView2 Installation Script ---
# Complete setup: WebView2 Runtime -> Environment -> FL Studio
# --- Config ----------------------------------------------------------------
WINEPREFIX="${WINEPREFIX:-$HOME/.wine}"
WINEBIN="${WINEBIN:-wine}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "FL Studio + WebView2 Installation"
echo "=================================="
echo " Wine prefix: $WINEPREFIX"
echo " Script directory: $SCRIPT_DIR"
echo
# --- Helper functions ------------------------------------------------------
err() { echo "ERROR: $*" >&2; exit 1; }
check_file() {
local file="$1"
local desc="$2"
[[ -f "$file" ]] || err "$desc not found: $file"
echo " ✓ Found $desc"
}
# --- Check required files --------------------------------------------------
echo "Checking required installation files..."
check_file "$SCRIPT_DIR/MicrosoftEdgeWebView2RuntimeInstallerX64.exe" "WebView2 Runtime installer"
check_file "$SCRIPT_DIR/flstudio_win64_25.1.5.4976.exe" "FL Studio installer"
check_file "$SCRIPT_DIR/webview2-env-setup.sh" "WebView2 environment setup script"
echo
# --- Step 1: Install WebView2 Runtime -------------------------------------
echo "Step 1: Installing WebView2 Runtime..."
echo "======================================="
cd "$SCRIPT_DIR"
"$WINEBIN" MicrosoftEdgeWebView2RuntimeInstallerX64.exe
echo "WebView2 Runtime installation complete."
echo
# --- Step 2: Setup WebView2 Environment -----------------------------------
echo "Step 2: Setting up WebView2 environment..."
echo "==========================================="
"$SCRIPT_DIR/webview2-env-setup.sh"
echo
# --- Step 3: Install FL Studio --------------------------------------------
echo "Step 3: Installing FL Studio..."
echo "================================"
echo "Starting FL Studio installer..."
echo "Note: Complete the FL Studio installation normally."
echo "The WebView2 configuration is already set up and ready."
echo
"$WINEBIN" "$SCRIPT_DIR/flstudio_win64_25.1.5.4976.exe"
echo
echo "FL Studio installation launched."
echo
# --- Final instructions ---------------------------------------------------
echo "Installation Complete!"
echo "====================="
echo
echo "What was configured:"
echo " ✓ WebView2 Runtime installed"
echo " ✓ FL64.exe-specific WebView2 policy set"
echo " ✓ Single-context rendering enabled (prevents flickering)"
echo " ✓ FL Studio installer launched"
echo
echo "After FL Studio installation completes:"
echo " 1. Launch FL Studio normally"
echo " 2. WebViews (plugin store, samples, etc.) should work without flickering"
echo " 3. Only FL Studio will use this WebView2 configuration"
echo
echo "Troubleshooting:"
echo " - If WebViews don't work: run ./webview2-env-setup.sh again"
echo " - If flickering returns: ensure single-context rendering is enabled"
echo " - Check logs with: WINEDEBUG=+loaddll,+webview2 wine FL64.exe"
@Kaylebor
Copy link
Author

Assumptions:

  • Installers are present in the same folder
  • this script is also present in the same folder
  • Modify WINEPREFIX and WINEBIN before calling to reference actual paths if needed
  • Might need to modify if the FL Studio installer gets updated, as it references exact .exe name; I may change that in the future so it accepts another env var OR autodetects though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment