├── .gitignore
├── snap
├── gui
│ ├── fusion360.png
│ └── fusion360.desktop
└── snapcraft.yaml
├── content
└── bin
│ ├── updater
│ └── dxvk-setup
├── LICENSE
├── hooks
├── post-install
└── pre-install
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.snap
2 | content/*.exe
3 |
--------------------------------------------------------------------------------
/snap/gui/fusion360.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thermionix/fusion360/HEAD/snap/gui/fusion360.png
--------------------------------------------------------------------------------
/snap/gui/fusion360.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Encoding=UTF-8
4 | Name=Autodesk Fusion 360
5 | Categories=Graphics
6 | Exec=fusion360
7 | Icon=${SNAP}/meta/gui/fusion360.png
8 | Terminal=false
9 | StartupNotify=true
10 | StartupWMClass=fusionlauncher.exe
11 |
--------------------------------------------------------------------------------
/content/bin/updater:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export WINEPREFIX="$SNAP_USER_COMMON/.wine"
4 |
5 | STREAMER_DIR="$WINEPREFIX/drive_c/Program Files/Autodesk/webdeploy/meta/streamer"
6 |
7 | if [[ ! -d "$STREAMER_DIR" ]]; then
8 | echo "Please run fusion360 first!"
9 | exit 1
10 | fi
11 |
12 | STREAMER_SUBDIR=$(find "$STREAMER_DIR" -maxdepth 1 -mindepth 1 -type d | sort -gr | head -n1)
13 |
14 | echo "running: streamer.exe --globalinstall --process update --quiet"
15 |
16 | BIN_DIR="$(dirname "$(realpath "$0")")"
17 | $BIN_DIR/sommelier "$STREAMER_SUBDIR/streamer.exe" --globalinstall --process update --quiet
18 |
19 | tail -n 20 "$WINEPREFIX/drive_c/users/$USER/AppData/Local/Autodesk/autodesk.webdeploy.streamer.log"
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Thermionix
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/content/bin/dxvk-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BIN_DIR="$(dirname "$(realpath "$0")")"
4 | source $BIN_DIR/sommelier winetricks -q dxvk
5 |
6 | NMACHINEOPT_DIR="$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options/"
7 | NMACHINEOPT_FILE="${NMACHINEOPT_DIR}NMachineSpecificOptions.xml"
8 |
9 | echo "Writing $NMACHINEOPT_FILE"
10 | mkdir -p "$NMACHINEOPT_DIR"
11 | cat > "$NMACHINEOPT_FILE" << "E"
12 |
13 |
14 |
15 |
16 |
17 | E
18 |
19 | wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v d3d9 /d builtin /f
20 | wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v d3d10core /d "" /f
21 | wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v d3d11 /d native /f
22 | wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v dxgi /d native /f
23 |
24 | echo "# Done installing DXVK into fusion360 snap"
25 |
--------------------------------------------------------------------------------
/hooks/post-install:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | RUN_EXE="$(find "${WINEPREFIX}" -name "FusionLauncher.exe.ini" | head -1 | xargs -I '{}' echo {} | head -c-5)"
4 | echo "### Updated SNAP RUN_EXE=${RUN_EXE}"
5 |
6 | #echo "If you suspect an installation issue, please check:"
7 | #echo "${SNAP_REAL_HOME}/snap/fusion360/common/.wine/drive_c/users/`whoami`/AppData/Local/Autodesk/autodesk.webdeploy.streamer.log"
8 |
9 | echo "### Creating mimetype link to handle login callback to Identity Manager"
10 |
11 | cat > ${SNAP_REAL_HOME}/.local/share/applications/adskidmgr-opener.desktop << EOL
12 | [Desktop Entry]
13 | Type=Application
14 | Name=adskidmgr Scheme Handler
15 | Exec=sh -c 'fusion360.wine "\$(find ${WINEPREFIX} -name "AdskIdentityManager.exe" | head -1 | xargs -I '{}' echo {})" "%u"'
16 | StartupNotify=false
17 | MimeType=x-scheme-handler/adskidmgr;
18 | EOL
19 |
20 | xdg-mime default adskidmgr-opener.desktop x-scheme-handler/adskidmgr
21 | update-desktop-database ~/.local/share/applications/
22 | update-mime-database ~/.local/share/mime/
23 |
24 | # TODO : Eventually remove this in future as ~/.local/share/applications/mimeapps.list is deprecated
25 | # Firefox is still reading: https://bugzilla.mozilla.org/show_bug.cgi?id=1580686
26 | ln -s ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list
27 |
28 | #echo "### Check default adskidmgr scheme-handler = adskidmgr-opener.desktop"
29 | #XDG_UTILS_DEBUG_LEVEL=2 xdg-mime query default x-scheme-handler/adskidmgr
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Autodesk Fusion 360
5 |
6 |
7 | This is the snap of [Autodesk Fusion 360](https://www.autodesk.com.au/products/fusion-360/overview)
8 |
9 | Fusion 360 is Integrated CAD, CAM, CAE, and PCB software. developed by Autodesk
10 |
11 | It works on Arch, Ubuntu, Fedora, Debian, and other major Linux distributions.
12 |
13 | [](https://snapcraft.io/fusion360)
14 |
15 |
16 |
17 | ## Install
18 |
19 | ````
20 | $ sudo snap install --edge fusion360 --devmode &&
21 | sudo snap connect fusion360:wine-9-devel wine-platform-9-devel-core22 &&
22 | sudo snap connect fusion360:wine-runtime-c22 wine-platform-runtime-core22 &&
23 | fusion360
24 | ````
25 |
26 | ([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
27 |
28 | ## Update the snap
29 |
30 | `$ sudo snap refresh fusion360 --devmode`
31 |
32 | ## Update Fusion360 within the snap
33 |
34 | `$ fusion360.updater`
35 |
36 | ## Known Issues:
37 |
38 | - [DXVK](https://github.com/doitsujin/dxvk) will not currently work [Wine bug# 45277](https://bugs.winehq.org/show_bug.cgi?id=45277)
39 | >006b:fixme:vulkan:X11DRV_vkCreateWin32SurfaceKHR Application requires child window rendering, which is not implemented yet!
40 |
41 | - Fusion360.exe hangs after window being closed
42 | [Wine bug# 53286](https://bugs.winehq.org/show_bug.cgi?id=53286)
43 |
44 | - Floating toolbars
45 |
--------------------------------------------------------------------------------
/snap/snapcraft.yaml:
--------------------------------------------------------------------------------
1 | name: fusion360
2 | version: '2.0'
3 | title: Autodesk Fusion 360 (Wine)
4 | summary: Integrated CAD, CAM, CAE, and PCB software.
5 | description: |
6 | _Developed by Autodesk_
7 |
8 | Features
9 | * Parametric Modelling
10 | * Program tool paths for CNC machines
11 | * 3D Rendering
12 | * Export STL models for the 3D Printer
13 |
14 | **known issues:**
15 | * Floating toolbars
16 | * Hangs on exit
17 |
18 | icon: snap/gui/fusion360.png
19 | base: core22
20 | grade: stable
21 | confinement: devmode
22 |
23 | architectures:
24 | - build-on: amd64
25 |
26 | environment:
27 | WINEDLLOVERRIDES: "mscoree,mshtml=" # disable wine-mono and wine-gecko
28 | TRICKS: "arial fontsmooth=rgb win11" # sandbox dotnet45 dotnet452 msxml4 msxml6 dotnet472 winhttp win7 win10 corefonts vcrun2017
29 | WINEESYNC: 1
30 | SOMMELIER_NO_THEME: 1
31 | SNAP_SUPPORT_URL: "https://github.com/Thermionix/fusion360/issues"
32 | #WINEDEBUG: -all
33 |
34 | apps:
35 | fusion360:
36 | extensions: [gnome]
37 | command: bin/sommelier run-exe
38 | environment:
39 | RUN_EXE: "C:/Program Files/Autodesk/webdeploy/production/6a0c9611291d45bb9226980209917c3d/FusionLauncher.exe"
40 | INSTALL_URL: "https://dl.appstreaming.autodesk.com/production/installers/Fusion%20Admin%20Install.exe"
41 | INSTALL_FLAGS: "--globalinstall --process deploy --quiet --no-auto-launch" # --verbosity DEBUG
42 | plugs: [home, network, opengl, desktop, x11, audio-playback]
43 |
44 | wine:
45 | extensions: [gnome]
46 | command: bin/sommelier
47 | plugs: [home, network]
48 |
49 | winetricks:
50 | extensions: [gnome]
51 | command: bin/sommelier winetricks
52 | plugs:
53 | - home
54 | - network
55 |
56 | updater:
57 | extensions: [gnome]
58 | command: bin/updater
59 |
60 | dxvk-setup:
61 | extensions: [gnome]
62 | command: bin/dxvk-setup
63 |
64 | parts:
65 | hooks:
66 | plugin: dump
67 | source: hooks/
68 | organize:
69 | "*": sommelier/hooks/
70 | stage:
71 | - sommelier
72 |
73 | sommelier-core:
74 | plugin: make
75 | source: https://github.com/snapcrafters/sommelier-core.git
76 | source-branch: "1.0"
77 | build-packages:
78 | - sudo
79 |
80 | content:
81 | source: content
82 | plugin: dump
83 |
84 | plugs:
85 | wine-runtime-c22:
86 | interface: content
87 | target: $SNAP/wine-runtime
88 | default-provider: wine-platform-runtime-core22
89 | wine-9-devel:
90 | interface: content
91 | target: $SNAP/wine-platform
92 | default-provider: wine-platform-9-devel-core22
93 |
--------------------------------------------------------------------------------
/hooks/pre-install:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | NMACHINEOPT_DIR="$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options/"
4 | NMACHINEOPT_FILE="${NMACHINEOPT_DIR}NMachineSpecificOptions.xml"
5 | echo "### Writing NMachineSpecificOptions.xml to force OpenGL" # OpenGL : VirtualDeviceGLCore , Dx9 : VirtualDeviceDx9
6 | mkdir -p "$NMACHINEOPT_DIR"
7 | cat > "$NMACHINEOPT_FILE" << "E"
8 |
9 |
10 |
11 |
12 |
13 | E
14 |
15 | # Use 'Fusion Admin Install.exe' in user Downloads folder if present.
16 | DL_DIR=$(xdg-user-dir DOWNLOAD)
17 | if [[ -e "${DL_DIR}/Fusion Admin Install.exe" ]]; then
18 | echo "### Using ${DL_DIR}/Fusion Admin Install.exe for installation"
19 | export INSTALL_URL=
20 | export INSTALL_EXE="${DL_DIR}/Fusion Admin Install.exe"
21 | fi
22 |
23 | # Temporary fix adsk.dls.streamer.windows.platform - WARNING :: Failed to run ie4uinit -ClearIconCache
24 | #cd "$WINEPREFIX/drive_c/windows/system32/"
25 | #cp icinfo.exe ie4uinit.exe
26 |
27 | # V109 "https://github.com/aedancullen/webview2-evergreen-standalone-installer-archive/releases/download/109.0.1518.78/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"
28 | # TODO : Find a better way to get the link from MS
29 | WEBVIEW_URL="https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/b41cf22e-bb47-420c-989b-a04b2702e36e/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"
30 |
31 | # TODO : Eventually refactor to use exe if in user dl folder, else dl to /tmp for auto purge
32 | echo "### Setting up Microsoft EdgeWebView2 for Fusion 360 Login Prompt" # /silent /install
33 | if ! [[ -e "${DL_DIR}/MicrosoftEdgeWebView2RuntimeInstallerX64.exe" ]]; then
34 | echo "### Downloading MicrosoftEdgeWebView2RuntimeInstallerX64.exe"
35 | wget -O "${DL_DIR}/MicrosoftEdgeWebView2RuntimeInstallerX64.exe" "$WEBVIEW_URL"
36 | fi
37 |
38 | if [[ -e "${DL_DIR}/MicrosoftEdgeWebView2RuntimeInstallerX64.exe" ]]; then
39 | echo "### Running MicrosoftEdgeWebView2RuntimeInstallerX64.exe"
40 | wine "${DL_DIR}/MicrosoftEdgeWebView2RuntimeInstallerX64.exe" /install
41 | fi
42 |
43 | echo "### Removing tracking metrics"
44 | wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "adpclientservice.exe" /t REG_SZ /d "" /f
45 | wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "AdCefWebBrowser.exe" /t REG_SZ /d builtin /f
46 |
47 | echo "## Using bundled Visual Studio Redist"
48 | wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "msvcp140" /t REG_SZ /d native /f
49 | wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "mfc140u" /t REG_SZ /d native /f
50 |
51 | mkdir -p "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Microsoft/Internet Explorer/Quick Launch/User Pinned/"
52 |
--------------------------------------------------------------------------------