cryinkfly / Autodesk-Fusion-360-for-Linux

This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/wiki
MIT License
1.78k stars 115 forks source link

FUSION_IDSDK doesn't work anymore *Solved* #381

Closed zakutin closed 4 months ago

zakutin commented 5 months ago

It looks like the FUSION_IDSDK flag doesn't work anymore with the January 2024 version of Fusion. With FUSION_IDSDK=false passed it shows WebView login screen.

Can anyone confirm that?

FYI, they have new admin installer link! Info here #380.

Dytique commented 5 months ago

I can confirm, just installed it today with the new admin installer link and I have the WebView login screen.

cryinkfly commented 4 months ago

Somehow I can't shake the feeling that every workaround that the community and I find here to get this program running under Linux will be invalidated with every new update. When I imagine how well the program ran at the beginning or when it was founded with this project here on Github and what was broken by all these updates... It's kind of a shame... Because it just takes more and more time...

aseiger commented 4 months ago

Autodesk can't even update fusion without problems...

I still hold out hope - and do my own tinkering to solve the various issues when I can. Fuion360 is the only reason I still use Windows, and this project lets me untether from that sometimes, which I deeply appreciate.

str0g commented 4 months ago

This variable has been deprecated. it seems that we are missing WebView2 program from microsoft to make it working.

sinux-l5d commented 4 months ago

Hi there, I'm trying to make it work with the link provided by fusion 360 : https://developer.microsoft.com/fr-fr/microsoft-edge/webview2/?form=MA13LH#download So far, I've copied the Evergreen Standalone Installer x64 in the winepath, and tried running the following:

WINEPREFIX=/home/myuser/.fusion360/wineprefixes/default wine 'C:\Users\myuser\Downloads\MicrosoftEdgeWebView2RuntimeInstallerX64.exe'

But I'm stuck with a WebView2 Runtime waiting screen, endlessly...

Any tips?

str0g commented 4 months ago

Hi there, I'm trying to make it work with the link provided by fusion 360 : https://developer.microsoft.com/fr-fr/microsoft-edge/webview2/?form=MA13LH#download So far, I've copied the Evergreen Standalone Installer x64 in the winepath, and tried running the following:

WINEPREFIX=/home/myuser/.fusion360/wineprefixes/default wine 'C:\Users\myuser\Downloads\MicrosoftEdgeWebView2RuntimeInstallerX64.exe'

But I'm stuck with a WebView2 Runtime waiting screen, endlessly...

Any tips?

Its not going to work due to this crap is trying to download something and it fails to do so. I am trying to integrate cab version but have to recreate register entries.

Imagine 273mb installer which still needs to download something while cab is litter smaller and theoretically have everything. Only microsh*t can do stuff like that.

cryinkfly commented 4 months ago

@sinux-l5d I think yo can kill the task after some minute's ... Or think ...

cryinkfly commented 4 months ago

We can testing this code:

 WINEPREFIX=/home/$USER/.fusion360/wineprefixes/default wine 'C:\Users\$USER\Downloads\MicrosoftEdgeWebView2RuntimeInstallerX64.exe' -p deploy -g -f log.txt --quiet 
str0g commented 4 months ago

Probably this is the case 0558:err:ole:create_server class {08d832b9-d2fd-481f-98cf-904d00df63cc} not registered 0558:err:ole:com_get_class_object no class object {08d832b9-d2fd-481f-98cf-904d00df63cc} could be created for context 0x4

---- rest of logs--- 0558:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0558:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 790C2131, 42) stub 0558:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0558:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0558:fixme:userenv:GetProfileType 0053FE08 0558:fixme:wer:WerReportSetParameter (00B9C9A0, 0, L"ApplicationName ", L"MicrosoftEdgeUpdate.exe") :stub 0558:fixme:wer:WerReportSetParameter (00B9C9A0, 1, L"ApplicationVersion ", L"1.3.181.5") :stub 0558:fixme:wer:WerReportSetParameter (00B9C9A0, 2, L"Source", L"InstallError") :stub 0558:fixme:wer:WerReportSetParameter (00B9C9A0, 3, L"SubCode ", L"0x80040c01") :stub 0558:fixme:wer:WerReportAddFile (00B9C9A0, L"C:\ProgramData\Microsoft\EdgeUpdate\Log\MicrosoftEdgeUpdate.log", 5, 0x0) :stub 0558:fixme:wer:WerReportSubmit (00B9C9A0, 1, 0x20, 0053FD58) :stub 0558:err:ole:create_server class {08d832b9-d2fd-481f-98cf-904d00df63cc} not registered 0558:err:ole:com_get_class_object no class object {08d832b9-d2fd-481f-98cf-904d00df63cc} could be created for context 0x4 0558:fixme:oleacc:AccPropServices_SetHwndPropStr (000200D2 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Microsoft Edge logo") 0558:fixme:oleacc:AccPropServices_SetHwndPropStr (000200F2 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Minimize") 0558:fixme:oleacc:AccPropServices_SetHwndPropStr (000200EE 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Close") 0558:fixme:oleacc:AccPropServices_ClearHwndProps (000200D2 4294967292 0 0053EFC0 1) 0558:fixme:oleacc:AccPropServices_ClearHwndProps (000200EE 4294967292 0 0053EEA4 1) 0558:fixme:oleacc:AccPropServices_ClearHwndProps (000200F2 4294967292 0 0053EEA4 1) 0558:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC 054c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0B0FFECC

str0g commented 4 months ago

Normal installation attempt

most important problem i think 0420:fixme:ras:RasEnumConnectionsW RAS support is not implemented! Configure program to use LAN connection/winsock instead!

---rest o logs---

0348:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0348:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 78B52131, 42) stub 0348:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0348:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 034c:fixme:oleacc:AccPropServices_SetHwndPropStr (0001009A 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Microsoft Edge WebView2 Runtime logo") 034c:fixme:oleacc:AccPropServices_SetHwndPropStr (000100A4 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Minimize") 034c:fixme:oleacc:AccPropServices_SetHwndPropStr (000100A8 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Close") 0354:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0354:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 0354:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0354:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0354:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC 0348:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 0348:fixme:wldp:WldpQueryWindowsLockdownMode 0053F64C 0348:fixme:exec:SHELL_execute flags ignored: 0x00000100 035c:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 035c:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 035c:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 035c:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0368:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 00F7FF18 036c:fixme:netprofm:list_manager_GetConnectivity 00BDE0E0, 018EFE58 036c:fixme:netprofm:cost_manager_GetCost 00BDE0E4, 018EFE5C, 00000000 035c:fixme:combase:RoGetActivationFactory (L"Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient", {9bf3f25d-d5c3-4eea-8dbe-9c8dbb0d9d8f}, 0053F438): semi-stub 035c:err:combase:RoGetActivationFactory Failed to find library for L"Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient" 035c:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00BAB4E8, 59) stub 035c:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 035c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 035c:fixme:ras:RasEnumConnectionsW (00BF9090,0053F900,01A60004),stub! 035c:fixme:ras:RasEnumConnectionsW RAS support is not implemented! Configure program to use LAN connection/winsock instead! 0364:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0364:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 0364:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0364:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0364:fixme:ole:CoInitializeSecurity 00000000, -1, 00000000, 00000000, 6, 3, 00000000, 64, 00000000 stub 0384:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0384:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 0384:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0384:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0384:fixme:userenv:GetProfileType 0053FE08 03c0:fixme:advapi:RegisterEventSourceW ((null),L"edgeupdate"): stub 03c0:fixme:advapi:ReportEventW (CAFE4242,0x0004,0x0000,0x00000000,00000000,0x0001,0x00000000,0128FCD8,00000000): stub 03c0:fixme:advapi:DeregisterEventSource (CAFE4242) stub 0384:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC 03d4:fixme:wintrust:HTTPSCertificateTrust (00C22370) 03d4:fixme:wintrust:HTTPSFinalProv (00C22370) 03c8:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 03c8:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 03c8:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 03c8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 03c8:fixme:userenv:GetProfileType 0053FE08 03c8:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC 035c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC 0364:fixme:ole:com_get_class_object CLSCTX_REMOTE_SERVER not supported 0364:err:ole:com_get_class_object no class object {cecddd22-2e72-4832-9606-a9b0e5e344b2} could be created for context 0x17 0364:err:ole:CoSetProxyBlanket -- failed with 0x80004002. 0364:fixme:security:ImpersonateLoggedOnUser (00000094) 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100F8 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Microsoft Edge WebView2 Runtime logo") 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (00010102 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Minimize") 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (00010106 4294967292 0 {c3a6921b-4a99-44f1-bca6-61187052c431} L"Close") 0364:fixme:oleacc:AccPropServices_SetHwndProp (000100E8 4294967292 0 {c12bcd8e-2a8e-4950-8ae7-3625111d58eb} 0053F400 {VT_I4: 1}) 0364:fixme:oleacc:AccPropServices_SetHwndProp (000100EA 4294967292 0 {c12bcd8e-2a8e-4950-8ae7-3625111d58eb} 0053F400 {VT_I4: 1}) 0364:fixme:oleacc:AccPropServices_SetHwndProp (000100E6 4294967292 0 {c12bcd8e-2a8e-4950-8ae7-3625111d58eb} 0053F400 {VT_I4: 1}) 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E6 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Initializing\2026") 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E6 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Connecting to the Internet\2026") 03e8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176FB84 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176FCAC 034c:fixme:oleacc:AccPropServices_ClearHwndProps (0001009A 4294967292 0 00F8F834 1) 034c:fixme:oleacc:AccPropServices_ClearHwndProps (000100A8 4294967292 0 00F8F6EC 1) 034c:fixme:oleacc:AccPropServices_ClearHwndProps (000100A4 4294967292 0 00F8F6EC 1) 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 0364:fixme:wldp:WldpQueryWindowsLockdownMode 0053F5AC 03e8:fixme:wtsapi:WTSEnumerateSessionsW 00000000 0x00000000 0x00000001 0176FCBC 0176FCC8 semi-stub. 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176FB9C 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E6 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Downloading Microsoft Edge WebView2 Runtime\2026") 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176FB9C 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E8 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Installing Microsoft Edge WebView2 Runtime") 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E6 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Waiting to install Microsoft Edge WebView2 Runtime\2026") 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176F96C 0364:fixme:oleacc:AccPropServices_SetHwndPropStr (000100E6 4294967292 0 {608d3df8-8128-4aa7-a428-f55e49267291} L"Installing Microsoft Edge WebView2 Runtime\2026") 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 03e8:fixme:wldp:WldpQueryWindowsLockdownMode 0176F90C 0094:fixme:mountmgr:query_property Unsupported property 0x7 0094:fixme:mountmgr:query_property Unsupported property 0x8 0364:fixme:wldp:WldpQueryWindowsLockdownMode 0053F52C 0420:fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0053FCCC 0053FCD0 0420:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 791E2131, 42) stub 0420:fixme:process:SetProcessShutdownParameters (00000280, 00000001): partial stub. 0420:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented! 0424:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 0107FF18 0428:fixme:netprofm:list_manager_GetConnectivity 00A42598, 019EFE58 0428:fixme:netprofm:cost_manager_GetCost 00A4259C, 019EFE5C, 00000000 0420:fixme:combase:RoGetActivationFactory (L"Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient", {9bf3f25d-d5c3-4eea-8dbe-9c8dbb0d9d8f}, 0053F438): semi-stub 0420:err:combase:RoGetActivationFactory Failed to find library for L"Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient" 0420:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00A0F8C8, 59) stub 0420:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 0420:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 0420:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 0420:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 0420:fixme:ntdll:EtwEventWriteTransfer deadbeef, 0053F6F0, (null), (null), 3, 0053F800: stub 0420:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0420:fixme:ras:RasEnumConnectionsW (00A784C0,0053F900,01B60004),stub! 0420:fixme:ras:RasEnumConnectionsW RAS support is not implemented! Configure program to use LAN connection/winsock instead! 0454:fixme:wintrust:HTTPSCertificateTrust (00A8C628) 0454:fixme:wintrust:HTTPSFinalProv (00A8C628) 0420:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0053FECC

Farouk123456 commented 4 months ago

@cryinkfly can we in the meantime use an older version of "Fusion Admin Install.exe" and if so does anyone have a link for an older version that pre 2024 update

str0g commented 4 months ago

I can upload it somewhere but its 1.6gb.

gnrgui commented 4 months ago

I can upload it somewhere but its 1.6gb.

That would be great. I'm having the same problem, I need to get some work done and can't, it's really frustrating...

str0g commented 4 months ago

link https://we.tl/t-G79OmIpgsu you can also use my variation of installer https://github.com/str0g/Autodesk-Fusion360-Linux its in fire and forget style. Create folder .fusion360/cache/ and copy exe to it rest will happen automatically.

Farouk123456 commented 4 months ago

@str0g thx i also found this incredible python application that searches archive.org and downloads the Installer file as replacement for streamer .exe https://pypi.org/project/fusion360-streamer/ maybe this could be adopted into this project so the .install bash file doesnt just break when autodesk changes the url of the admin installer .exe file

aedancullen commented 4 months ago

Victory! I have the latest 2024 release running (v.2.0.18220).

(Disclaimer: All of these shenanigans can break easily on different systems. Things mentioned here may be outright incorrect for your system, so you may have to fiddle around ~a bit~ a lot.)

There are three potential problems along the road to getting the new login flow (AdskIdentityManager) to work, which come up in this order:

  1. Lack of support for the legacy CAPIPRIVATEBLOB in the bcrypt.dll implementation in older Wine versions
  2. Issues with Edge WebView2
  3. Passing the "login response" base64 value from the web-based login interface back to AdskIdentityManager.exe

1. CAPIPRIVATEBLOB

Symptom: You click the login button in the Autodesk Fusion GUI, but absolutely nothing else appears except for the text near the button telling you to look at your web browser.

Resolution: Use a Wine version that is new enough to include this commit.

When resolved: A small dialog now pops up telling you that Edge WebView2 is not installed when you click the login button.

2. WebView2

Symptom: The small dialog tells you that Edge WebView2 is not installed. You try to use the Evergreen Standalone Installer from Microsoft's website, but the newest version (121.0.2277.98 currently) hangs indefinitely on the "installing" phase.

Resolution: Use version 109.0.1518.78 of the Evergreen Standalone Installer, from before Microsoft broke something around fall 2023. It should hopefully run and succeed.

When resolved: A web browser (native Chromium for me!?!) should pop open with the login window upon clicking the login button in the Fusion GUI.

3. Login response

Symptom: Clicking the button in the browser that is supposed to "return you to the Fusion application" after login does nothing.

Resolution:

Right-click on that button in the browser, copy the URL, and notice that it's a custom protocol which is meant to be handled by AdskIdentityManager.exe. It has the format adskidmgr:/login?code={bunch of base64}.

Usually, the Windows registry key HKEY_CURRENT_USER\Software\Classes\adskidmgr\shell\open\command would tell the system to invoke AdskIdentityManager.exe and pass it that exact URL as an argument. But since this link is in a native Linux browser (at least for me), of course xdg-open has no idea what to do with the custom URL protocol.

The proper way to handle this is to use a .desktop file to define the adskidmgr: protocol, and get xdg-open to start up Wine for AdskIdentityManager.exe. In my case, to quickly prove that it works, I just manually-executed AdskIdentityManager.exe with that copied URL, while Fusion was open and waiting for the login to complete.

This looked something like the following:

"C:/Program Files/Autodesk/webdeploy/production/99249ee497b13684a43f5bacd5f1f09974049c6b/Autodesk Identity Manager/AdskIdentityManager.exe" "adskidmgr:/login?code={bunch of base64}"

When resolved: The open Fusion GUI window instantly changes to the logged-in splash screen when you run that AdskIdentityManager.exe command "behind its back".


Footnote: I don't know how we've gotten to the point where applications install a whole 100MB+ web browser just to make some call that pops open an existing browser installed on the machine...

alextrical commented 4 months ago

I can take a look at putting a script together to test and automate that as much as possible. Once we can reliably get that installing with your findings we can get it integrated back into the main branch code

alextrical commented 4 months ago

@aedancullen do you have any reading material on how to configure the ".desktop file to define the adskidmgr: protocol" If I know what that file should look like I can get it in a script and see if we can get an install working to build a clean WinePrefix from scratch

To answer my own question, this looks like a good place to start https://unix.stackexchange.com/questions/497146/create-a-custom-url-protocol-handler

alextrical commented 4 months ago

@cryinkfly Working proof of concept to get the latest Fusion installed and allowing logins. Still need to get the link association working for the link callback. Thank you for making me aware that Wine had fixed the bug we reported. It looks like Wine 8.14 or above are all safe to use (Currently I'm using Wine 9.0)

Edited: to fix Mimetype issues, Fully working install script and login

export env ROOTFOLDER=~/.fusion
mkdir {$ROOTFOLDER,$ROOTFOLDER/wineprefixes,$ROOTFOLDER/Downloads}
rm -r $ROOTFOLDER/wineprefixes/default
export env WINEPREFIX=$ROOTFOLDER/wineprefixes/default
export env WINEDEBUG=fixme-all #Hide the fixme messages intended for Wine developers
SP_FUSION360_INSTALLER_URL="https://dl.appstreaming.autodesk.com/production/installers/Fusion%20Admin%20Install.exe"
SP_WEBVIEW2_INSTALLER_URL="https://github.com/aedancullen/webview2-evergreen-standalone-installer-archive/releases/download/109.0.1518.78/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"

#Wine version checking, warn user if their wine install is out of date
WINE_VERSION="$(wine --version  | cut -d ' ' -f1 | sed -e 's/wine-//' -e 's/-rc.*//')"
WINE_VERSION_MINIMUM=8.14
if (( $(echo "$WINE_VERSION < $WINE_VERSION_MINIMUM" | bc -l) )); then
    echo "Your version of wine ${WINE_VERSION} is too old and will not work with Autodesk Fusion. You should upgrade to at least ${WINE_VERSION_MINIMUM}"
fi

#Install required Font, the Navigation bar will not work without this font.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O $ROOTFOLDER/Downloads/winetricks
chmod +x $ROOTFOLDER/Downloads/winetricks
$ROOTFOLDER/Downloads/winetricks arial
wine winecfg -v win10

#Remove tracking metrics/calling home
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "adpclientservice.exe" /t REG_SZ /d "" /f
#Navigation bar does not work well with anything other than the wine builtin DX9
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "AdCefWebBrowser.exe" /t REG_SZ /d builtin /f
#Use Visual Studio Redist that is bundled with the application
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "msvcp140" /t REG_SZ /d native /f
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "mfc140u" /t REG_SZ /d native /f

cat > $ROOTFOLDER/Downloads/NMachineSpecificOptions.xml << EOL
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<OptionGroups>
  <BootstrapOptionsGroup SchemaVersion="2" ToolTip="Special preferences that require the application to be restarted after a change." UserName="Bootstrap">
    <driverOptionId ToolTip="The driver used to display the graphics" UserName="Graphics driver" Value="VirtualDeviceDx9"/></BootstrapOptionsGroup>
</OptionGroups>
EOL

#Download and install WebView2 to handle Login attempts, required even though we redirect to your default browser
wget -N $SP_WEBVIEW2_INSTALLER_URL -P $ROOTFOLDER/Downloads
wine $ROOTFOLDER/Downloads/MicrosoftEdgeWebView2RuntimeInstallerX64.exe /install #/silent

#Download latest Admin Install, only if the file has changes since last time we connected to the server
wget -N $SP_FUSION360_INSTALLER_URL -P $ROOTFOLDER/Downloads

#Extract the icon from the installer, this will give the latest icon without breaking any distribution licenses
wrestool -x --output=$ROOTFOLDER/Downloads/Fusion360.ico -t14 "${ROOTFOLDER}/Downloads/Fusion Admin Install.exe"

#Install the application, the UI doesn't work for us, so install in the background. Could do with tracking folder size to get a progress bar for the user here
wine $ROOTFOLDER/Downloads/Fusion\ Admin\ Install.exe --quiet

mkdir -p "${ROOTFOLDER}/wineprefixes/default/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options"

cp $ROOTFOLDER/Downloads/NMachineSpecificOptions.xml "${ROOTFOLDER}/wineprefixes/default/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options"

#Disable Debug messages on regular runs, we dont have a terminal, so speed up the system by not wasting time prining them into the Void
sed -i 's/=env WINEPREFIX=/=env WINEDEBUG=-all env WINEPREFIX=/g' "$HOME/.local/share/applications/wine/Programs/Autodesk/Autodesk Fusion.desktop"

#Cleanup any shortcuts created we dont want, though they seem to work well now
#rm -f "$HOME/.config/menus/applications-merged/wine-Programs-Autodesk-Autodesk Fusion.menu"
#rm -rf "$HOME/.local/share/applications/wine/Programs/Autodesk/Autodesk Fusion.desktop"

#Create mimetype link to handle web login call backs to the Identity Manager
cat > $HOME/.local/share/applications/adskidmgr-opener.desktop << EOL
[Desktop Entry]
Type=Application
Name=adskidmgr Scheme Handler
Exec=env WINEPREFIX="$ROOTFOLDER/wineprefixes/default" wine "C:\Program Files\Autodesk\webdeploy\production\99249ee497b13684a43f5bacd5f1f09974049c6b\Autodesk Identity Manager\AdskIdentityManager.exe" %u
StartupNotify=false
MimeType=x-scheme-handler/adskidmgr;
EOL
xdg-mime default adskidmgr-opener.desktop x-scheme-handler/adskidmgr

Latest Fusion install as of 4th Jan 2024 on Wine 9.0 image

The only thing left to do is get the .desktop file setup for the Mime Type association, something like this, but still not working quite right

cat > $HOME/.local/share/applications/adskidmgr-opener.desktop << EOL
[Desktop Entry]
Type=Application
Name=adskidmgr Scheme Handler
Exec=env WINEPREFIX="/home/alextrical/.wfusion360/wineprefixes/default" wine C:\\\\Program\\ Files\\\\Autodesk\\\\webdeploy\\\\production\\\\99249ee497b13684a43f5bacd5f1f09974049c6b\\\\Autodesk Identity Manager\\\\AdskIdentityManager.exe %u
StartupNotify=false
MimeType=x-scheme-handler/adskidmgr;
EOL
xdg-mime default adskidmgr-opener.desktop x-scheme-handler/adskidmgr
aedancullen commented 4 months ago

@alextrical That .desktop looks decent to me though I haven't had the chance to try that part myself. Perhaps try quoting the path with spaces following wine.

If it helps, you can check C:/users/<user>/AppData/Local/Autodesk/Identity Services/Log/IdServices.log to see whether AdskIdentityManager.exe is being run and what it thinks its arguments are. Every additional invocation just appends to that log. The line:

[AdskIdentityManager INFO] Custom URI: Found valid http route: /login

is an indication that it understood the login data. You can also watch for the earlier line

[AdskIdentityManager INFO] Starting Autodesk IDSDK Server process

as an indication that a new instance is actually being run in the first place (even if it failed and exited quickly.)

(The main Fusion application does run an initial instance of the identity manager, so there will already be an earlier server startup in that log even before the browser tries to run the manager again with the login data.)

poon-holder commented 4 months ago

This is brilliantly healthy! Keep it up, we are all appreciative if nothing else!

Farouk123456 commented 4 months ago

I had to install AdSSO.msi from https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/A785RG35hP8oUR96WrYkn.html to get the login screen to open on Firefox it won't open on brave, and it doesn't redirect back to the application here are some notable logs and errors in C:/users//AppData/Local/Autodesk/Identity Services/Log/IdServices.log how can i overcome these issues:

2024-02-04T13:11:50.898Z [Fusion360:372, 376] [AdskIdentitySDK INFO] Unable to get AdskIdentityManager path from registry, failed with error: 2

2024-02-04T13:11:51.086Z [Fusion360:372, 684] [IdSDKPlugin.Ipc INFO] EventClient:Autodesk.IDSDK.DefaultServer-v2.Events:0:0:000000002E3F86C0: Server info not found in shared memory

2024-02-04T13:11:51.685Z [AdskIdentityManager:676, 680] [AdskIdentityManager WARN] Read from Registry value=0

2024-02-04T13:12:06.538Z [AdskIdentityManager:676, 680] [IdServicesCore.Proxy WARN] Proxy information data is NOT restored. detail: 3046

2024-02-04T13:12:21.120Z [Fusion360:372, 688] [IdSDKPlugin INFO] Finished request without response HeartBeat.

2024-02-04T13:28:46.366Z [AdskIdentityManager:252, 344] [IdServicesCore.Session INFO] Failed to refresh token. Not logged in

PS. also now you can't close the launcher you have to terminate it and all its processes from a system monitor which is very inconvenient

str0g commented 4 months ago

I've put everything together. https://github.com/str0g/Autodesk-Fusion360-Linux

later will add desktop integration, cheers

Farouk123456 commented 4 months ago

Alright so it turns out that the .desktop file that @alextrical made doesn't work, so to login I inspected the login button and got the URL:

adskidmgr:/login?code=kfeIty8io0Wr-SCPg7Pi2sXFbNkCCHXj0XxQOKvc&state=VzRPelVCUnJDVXRsVlJJZ0FSYnY1clJJS01IZTdkWHAuM3hURTF2dW5sbWJueWRCeS1MdElBQWh5VEFaN0FqM3pSRlh1LUswV29Lby51c2VyLXByb2ZpbGUlM0FyZWFkJTIwdXNlciUzQXJlYWQlMjB1c2VyJTNBd3JpdGUlMjB2aWV3YWJsZXMlM0FyZWFkJTIwZGF0YSUzQXJlYWQlMjBkYXRhJTNBd3JpdGUlMjBkYXRhJTNBY3JlYXRlJTIwZGF0YSUzQXNlYXJjaCUyMGJ1Y2tldCUzQWNyZWF0ZSUyMGJ1Y2tldCUzQXJlYWQlMjBidWNrZXQlM0F1cGRhdGUlMjBidWNrZXQlM0FkZWxldGUlMjBjb2RlJTNBYWxsJTIwYWNjb3VudCUzQXJlYWQlMjBhY2NvdW50JTNBd3JpdGUlMjBvcGVuaWQlMjBkZXZpY2Vfc3NvLnVzZV9hbHRlcm5hdGl2ZV9wcm9kdWN0X3BhdGg=

Which i then manually ran adskIdentityManager.exe with:

env ROOTFOLDER=~/.fusion360 WINEPREFIX=/home/farouk/.fusion360/wineprefixes/default WINEDEBUG=fixme-all wine /home/farouk/.fusion360/wineprefixes/default/drive_c/Program\ Files/Autodesk/webdeploy/production/99249ee497b13684a43f5bacd5f1f09974049c6b/Autodesk\ Identity\ Manager/AdskIdentityManager.exe "adskidmgr:/login?code=kfeIty8io0Wr-SCPg7Pi2sXFbNkCCHXj0XxQOKvc&state=VzRPelVCUnJDVXRsVlJJZ0FSYnY1clJJS01IZTdkWHAuM3hURTF2dW5sbWJueWRCeS1MdElBQWh5VEFaN0FqM3pSRlh1LUswV29Lby51c2VyLXByb2ZpbGUlM0FyZWFkJTIwdXNlciUzQXJlYWQlMjB1c2VyJTNBd3JpdGUlMjB2aWV3YWJsZXMlM0FyZWFkJTIwZGF0YSUzQXJlYWQlMjBkYXRhJTNBd3JpdGUlMjBkYXRhJTNBY3JlYXRlJTIwZGF0YSUzQXNlYXJjaCUyMGJ1Y2tldCUzQWNyZWF0ZSUyMGJ1Y2tldCUzQXJlYWQlMjBidWNrZXQlM0F1cGRhdGUlMjBidWNrZXQlM0FkZWxldGUlMjBjb2RlJTNBYWxsJTIwYWNjb3VudCUzQXJlYWQlMjBhY2NvdW50JTNBd3JpdGUlMjBvcGVuaWQlMjBkZXZpY2Vfc3NvLnVzZV9hbHRlcm5hdGl2ZV9wcm9kdWN0X3BhdGg="

And finally it worked !!

Thanks to @alextrical you're great

alextrical commented 4 months ago

Edit: see below Unfortunately the desktop link isn't working yet. (Burned some midnight oil from, woke up at 12-4am to get this fix scripted, thanks to @aedancullen for the outline of how to get the fix working) That's next on the list to see what we can do to get that added to the script and adding that final layer of polish for the end users. I'm just glad the issue we initially saw last year with the login last year (Post SSO issue) has been fixed by the Wine team, allowing us to now get the system working here now the Legacy login system has been End of Life'd

If anyone can get the .desktop integration for the adskidmgr mimetype working, please shout out and we can look at getting a pull request made to make the main installer work for everyone again. Thanks all for your work so far, it's given me hope that Fusion can work on Linux again. (Still think we have that pesky save corruption bug around, and could do with getting an installer working with Flatpak wine (needs to be 8.14 or higher now, Flathub only has 8.0.2) again )

Farouk123456 commented 4 months ago

Maybe someone should write a temporary warning in the README of this project so people trying to install f360 don't go through the pain I went through

But all in all I'm so glad this community exists that's fighting the idiosyncrasy of MS

alextrical commented 4 months ago

Good point, Possibly an idea to put in the discussion, some sort of health check when the install is run, for when outages like this inevitably happen again in the future.

Edit: I'm pretty much of the M$ platform, at least for personal use and collaborative community projects (I work with M$ Azure for a Day job) The only tools left that keep me using a remote workstation in the loft running Server 2019 (was Fusion 360) Some data recovery tools, the odd hardware/HDD configuration tool that only works with windows, STL repair tools such as Prusa Slicer(For repair via Autodesk Netfabb) and Photoshop, on the days I cant quite get Kritta to behave for my needs. (still trying to move over to fully FLOSS aplications)

alextrical commented 4 months ago

@alextrical That .desktop looks decent to me though I haven't had the chance to try that part myself. Perhaps try quoting the path with spaces following wine. That solved it.

We have lift off 🚀, Mime type desktop definition is now up and running ^_^

Complete code Proof Of Concept (Minimal clean code, re-run does a clean re-install/update, customize install location by changing the top line, but No UI) to get a Working up to date install with Login below, Tested to work on Ubuntu, running Wine 9.0 (you need at least 8.14, the script will check and warn, though it should probably raise an error to stop the install in the future)

export env ROOTFOLDER=~/.fusion
mkdir {$ROOTFOLDER,$ROOTFOLDER/wineprefixes,$ROOTFOLDER/Downloads}
rm -r $ROOTFOLDER/wineprefixes/default
export env WINEPREFIX=$ROOTFOLDER/wineprefixes/default
export env WINEDEBUG=fixme-all #Hide the fixme messages intended for Wine developers
SP_FUSION360_INSTALLER_URL="https://dl.appstreaming.autodesk.com/production/installers/Fusion%20Admin%20Install.exe"
SP_WEBVIEW2_INSTALLER_URL="https://github.com/aedancullen/webview2-evergreen-standalone-installer-archive/releases/download/109.0.1518.78/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"

#Wine version checking, warn user if their wine install is out of date
WINE_VERSION="$(wine --version  | cut -d ' ' -f1 | sed -e 's/wine-//' -e 's/-rc.*//')"
WINE_VERSION_MINIMUM=8.14
if (( $(echo "$WINE_VERSION < $WINE_VERSION_MINIMUM" | bc -l) )); then
    echo "Your version of wine ${WINE_VERSION} is too old and will not work with Autodesk Fusion. You should upgrade to at least ${WINE_VERSION_MINIMUM}"
fi

#Install required Font, the Navigation bar will not work without this font.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O $ROOTFOLDER/Downloads/winetricks
chmod +x $ROOTFOLDER/Downloads/winetricks
$ROOTFOLDER/Downloads/winetricks arial
wine winecfg -v win10

#Remove tracking metrics/calling home
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "adpclientservice.exe" /t REG_SZ /d "" /f
#Navigation bar does not work well with anything other than the wine builtin DX9
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "AdCefWebBrowser.exe" /t REG_SZ /d builtin /f
#Use Visual Studio Redist that is bundled with the application
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "msvcp140" /t REG_SZ /d native /f
wine REG ADD "HKCU\Software\Wine\DllOverrides" /v "mfc140u" /t REG_SZ /d native /f

cat > $ROOTFOLDER/Downloads/NMachineSpecificOptions.xml << EOL
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<OptionGroups>
  <BootstrapOptionsGroup SchemaVersion="2" ToolTip="Special preferences that require the application to be restarted after a change." UserName="Bootstrap">
    <driverOptionId ToolTip="The driver used to display the graphics" UserName="Graphics driver" Value="VirtualDeviceDx9"/></BootstrapOptionsGroup>
</OptionGroups>
EOL

#Download and install WebView2 to handle Login attempts, required even though we redirect to your default browser
wget -N $SP_WEBVIEW2_INSTALLER_URL -P $ROOTFOLDER/Downloads
wine $ROOTFOLDER/Downloads/MicrosoftEdgeWebView2RuntimeInstallerX64.exe /install #/silent

#Download latest Admin Install, only if the file has changes since last time we connected to the server
wget -N $SP_FUSION360_INSTALLER_URL -P $ROOTFOLDER/Downloads

#Extract the icon from the installer, this will give the latest icon without breaking any distribution licenses
wrestool -x --output=$ROOTFOLDER/Downloads/Fusion360.ico -t14 "${ROOTFOLDER}/Downloads/Fusion Admin Install.exe"

#Install the application, the UI doesn't work for us, so install in the background. Could do with tracking folder size to get a progress bar for the user here
wine $ROOTFOLDER/Downloads/Fusion\ Admin\ Install.exe --quiet

mkdir -p "${ROOTFOLDER}/wineprefixes/default/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options"

cp $ROOTFOLDER/Downloads/NMachineSpecificOptions.xml "${ROOTFOLDER}/wineprefixes/default/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform/Options"

#Disable Debug messages on regular runs, we dont have a terminal, so speed up the system by not wasting time prining them into the Void
sed -i 's/=env WINEPREFIX=/=env WINEDEBUG=-all env WINEPREFIX=/g' "$HOME/.local/share/applications/wine/Programs/Autodesk/Autodesk Fusion.desktop"

#Cleanup any shortcuts created we dont want, though they seem to work well now
#rm -f "$HOME/.config/menus/applications-merged/wine-Programs-Autodesk-Autodesk Fusion.menu"
#rm -rf "$HOME/.local/share/applications/wine/Programs/Autodesk/Autodesk Fusion.desktop"

#Create mimetype link to handle web login call backs to the Identity Manager
cat > $HOME/.local/share/applications/adskidmgr-opener.desktop << EOL
[Desktop Entry]
Type=Application
Name=adskidmgr Scheme Handler
Exec=env WINEPREFIX="$ROOTFOLDER/wineprefixes/default" wine "C:\Program Files\Autodesk\webdeploy\production\99249ee497b13684a43f5bacd5f1f09974049c6b\Autodesk Identity Manager\AdskIdentityManager.exe" %u
StartupNotify=false
MimeType=x-scheme-handler/adskidmgr;
EOL
xdg-mime default adskidmgr-opener.desktop x-scheme-handler/adskidmgr
cryinkfly commented 4 months ago

Thank you very much for your quick support!!! :100:

zakutin commented 4 months ago

Thank you everyone! I can confirm the solution is working!

Grumium commented 4 months ago

Amazing! It is running for me as well!

cryinkfly commented 4 months ago

I'm currently rebuilding the script! 😅

Update: @alextrical I have added your code in an adapted form! :1st_place_medal:

And then the whole thing flows into the Python installer version.

cryinkfly commented 4 months ago

Oh, by the way, as a reminder... I try as best as I can to display all supporters on my website! So that others can also see who supports me with all the projects. ❤️

alextrical commented 4 months ago

@cryinkfly Credit also should go to @aedancullen without their posts I wouldn't have been able to create the proof of concept script.

I'm glad that you where able to use that as a basis to merge into the main repo

Aus-gez commented 4 months ago

Nice one! It was very uplifting watching project community band together to solve this problem. Wine v9.3 just released with the mime fix for the login, and a link back to this issue for credit. https://bugs.winehq.org/show_bug.cgi?id=54794

I've not had a chance to try it yet, but I'm excited to.

mosfeets commented 4 months ago

Thank you for everyone efforts on this. After a fresh install via the updated script and adding the mime type handler, I was able to complete the login process without any issues. I'm using Wine 9.3 and Linux Mint 21.3. I made one small change to the path on the entry for the mimetype since I noticed the folder had changed.
My path is: ~/.fusion360/wineprefixes/default/drive_c/Program Files/Autodesk/webdeploy/production/0a22ca515421cec8a3addbf5f00fde68499915d7/Autodesk Identity Manager/AdskIdentityManager.exe

michaelcadilhac commented 3 months ago

Somehow, Wine was complaining a nonsense error (saying that WINEPREFIX wasn't an absolute path, while it definitely was). I ended up changing the mime-type association to just Exec=echo %u, and start my browser in a console, so that I could see the argument passed to AdskIdentityManager.exe. Then I started the latter by hand with that argument. Worked like a charm!

zakutin commented 1 month ago

Just FYI, the installation of the latest MicrosoftEdgeWebView2RuntimeInstallerX64.exe downloaded directly from Microsoft Edge WebView2 (choose Evergreen Standalone Installer x64) is working under wine-devel 9.9.

image