mirror of
https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux.git
synced 2025-10-26 00:46:09 +02:00
Update flatpak-installation.sh
This commit is contained in:
@@ -1,6 +1,30 @@
|
||||
# This script will install Autodesk Fusion in a Flatpak-Runtime!
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
####################################################################################################
|
||||
# Name: Autodesk Fusion 360 - Setup Wizard (Linux / Flatpak) #
|
||||
# Description: This script installs Autodesk Fusion 360 inside a Flatpak Wine runtime on Linux. #
|
||||
# Author: Steve Zabka #
|
||||
# Author URI: https://cryinkfly.com #
|
||||
# License: MIT #
|
||||
# Copyright (c) 2025 #
|
||||
# Time/Date: 11:15/30.08.2025 #
|
||||
# Version: 1.0.0-Alpha #
|
||||
####################################################################################################
|
||||
# Notes:
|
||||
# - Designed to run Fusion 360 within a Flatpak Wine sandbox for Linux.
|
||||
# - Handles Wine prefix setup, required libraries (via winetricks), WebView2 runtime,
|
||||
# and DLL overrides.
|
||||
# - Ensures a double-sandbox environment: Flatpak + Wine sandbox.
|
||||
# - EXE files must be placed inside the Wine prefix, as Wine cannot access $HOME directly.
|
||||
####################################################################################################
|
||||
|
||||
# CONFIGURATION OF THE COLOR SCHEME:
|
||||
RED=$'\033[0;31m'
|
||||
YELLOW=$'\033[0;33m'
|
||||
GREEN=$'\033[0;32m'
|
||||
NOCOLOR=$'\033[0m'
|
||||
|
||||
###############################################################################################################################################################
|
||||
|
||||
# URL's to download Fusion360Installer.exe files
|
||||
#AUTODESK_FUSION_INSTALLER_URL="https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Admin%20Install.exe" <-- Old Link!!!
|
||||
@@ -17,19 +41,19 @@ QT6_WEBENGINECORE_URL="https://raw.githubusercontent.com/cryinkfly/Autodesk-Fusi
|
||||
# URL to download the patched siappdll.dll file
|
||||
SIAPPDLL_URL="https://raw.githubusercontent.com/cryinkfly/Autodesk-Fusion-360-for-Linux/main/files/extras/patched-dlls/siappdll.dll"
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Debian based systems:
|
||||
# apt install p7zip-full cabextract winbind
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
flatpak install flathub org.winehq.Wine/x86_64/stable-24.08 -y # Issue solved: Similar refs found for ‘org.winehq.Wine’ in remote ‘flathub’ ...
|
||||
flatpak update org.winehq.Wine -y # Upgrade to the Latest Version
|
||||
|
||||
flatpak run org.winehq.Wine --version #Check version of wine
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Note: The winetricks "sandbox" verb only removes desktop integration (e.g. autostart entries, menu shortcuts)
|
||||
# and the Z: drive symlink that normally maps your entire home directory.
|
||||
@@ -71,12 +95,12 @@ flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/f
|
||||
flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360" org.winehq.Wine reg add "HKCU\\Software\\Wine\\DllOverrides" /v "mfc140u" /t REG_SZ /d "native" /f
|
||||
flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360" org.winehq.Wine reg add "HKCU\\Software\\Wine\\DllOverrides" /v "bcp47langs" /t REG_SZ /d "" /f
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Install 7zip inside the wineprefix fusion360
|
||||
flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360" --command="winetricks" org.winehq.Wine -q 7zip
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Download and install WebView2 to handle Login attempts, required even though we redirect to your default browser
|
||||
curl -L "$WEBVIEW2_INSTALLER_URL" -o "$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360/drive_c/users/$USER/Downloads/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"
|
||||
@@ -85,7 +109,7 @@ flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/f
|
||||
# Pre-create shortcut directory for latest re-branding Microsoft Edge WebView2
|
||||
mkdir -p "$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360/drive_c/users/$USER/AppData/Roaming/Microsoft/Internet Explorer/Quick Launch/User Pinned/"
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Create mimetype link to handle web login call backs to the Identity Manager
|
||||
cat > $HOME/.local/share/applications/adskidmgr-opener.desktop << EOL
|
||||
@@ -103,7 +127,7 @@ chmod 444 $HOME/.local/share/applications/adskidmgr-opener.desktop
|
||||
# Set the mimetype handler for the Identity Manager
|
||||
xdg-mime default adskidmgr-opener.desktop x-scheme-handler/adskidmgr
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Download the Autodesk Fusion Installer
|
||||
curl -L "$AUTODESK_FUSION_INSTALLER_URL" -o "$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360/drive_c/users/$USER/Downloads/Fusion360ClientInstaller.exe"
|
||||
@@ -120,7 +144,7 @@ timeout 60 flatpak run --env="WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/win
|
||||
# Kill Wine to ensure clean state
|
||||
flatpak kill org.winehq.Wine
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Find the Qt6WebEngineCore.dll file in the Autodesk Fusion directory
|
||||
QT6_WEBENGINECORE=$(find "$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360" -name 'Qt6WebEngineCore.dll' -printf "%T+ %p\n" | sort -r | head -n 1 | sed -r 's/^[^ ]+ //')
|
||||
@@ -147,9 +171,11 @@ cp -f "$QT6_WEBENGINECORE_DIR/siappdll.dll" "$QT6_WEBENGINECORE_DIR/siappdll.dll
|
||||
# Copy the patched siappdll.dll file to the Autodesk Fusion directory
|
||||
cp -f "$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360/drive_c/users/$USER/Downloads/siappdll.dll" "$QT6_WEBENGINECORE_DIR/siappdll.dll"
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------- #
|
||||
###############################################################################################################################################################
|
||||
|
||||
# Continue ... Plugins, ...
|
||||
|
||||
###############################################################################################################################################################
|
||||
|
||||
cd $HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/PRODUCTION-ID
|
||||
flatpak run --env=WINEDEBUG=-all --env=WINEPREFIX=$HOME/.var/app/org.winehq.Wine/data/wineprefixes/fusion360 org.winehq.Wine FusionLauncher.exe
|
||||
|
||||
# Continue ...
|
||||
|
||||
Reference in New Issue
Block a user