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.8k stars 115 forks source link

Launcher selects wrong version of executable in webdeploy directory. #160

Closed cortices closed 2 years ago

cortices commented 2 years ago

When trying to open a file recently edited on another computer (a mac), I'm told that I cannot open it, and must ask my 'system administrator' to update Fusion 360. This has been happening for a few days, including over a reinstall from the installer. Is there a way to force Fusion 360 to update? Is there some kind of mismatch of versions across platforms??

To Reproduce Steps to reproduce the behavior:

  1. Edit a file in Fusion 360 on mac, 2.0.11894 (current as of writing)
  2. Save changes and close.
  3. Try to open the same file in Fusion 360 in Wine on Linux (Debian 11), v2.0.11186
  4. Error appears.

Desktop (please complete the following information):

Additional info I have found another folder in the Autodesk/webdeploy/production folder, named 1a27f23c10bc87f7eab1f89e440a46f886b5f544, which has a version of the newer 2.0.11894 inside. Why isn't this version being launched? The executable that is run by the launcher is within the 1bc48b96e2e48e9445cd9390dcacb966164222c9 folder, which has the 2.0.11186 version.

cortices commented 2 years ago

I've found the cause, it's an error in the launcher file. It can be demonstrated as follows.

The launcher command currently, broken down by pipe sequence

> find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p"                                                                                                                  
2021-12-10+11:18:42.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1a27f23c10bc87f7eab1f89e440a46f886b5f544/Fusion360.exe2021-09-30+00:42:02.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1bc48b96e2e48e9445cd9390dcacb966164222c9/Fusion360.exe⏎                              

> find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p" | sort -r 2>&1                                                                                                   
2021-12-10+11:18:42.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1a27f23c10bc87f7eab1f89e440a46f886b5f544/Fusion360.exe2021-09-30+00:42:02.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1bc48b96e2e48e9445cd9390dcacb966164222c9/Fusion360.exe

❯ find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p" | sort -r 2>&1 | head -n 1                                                                                       
2021-12-10+11:18:42.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1a27f23c10bc87f7eab1f89e440a46f886b5f544/Fusion360.exe2021-09-30+00:42:02.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1bc48b96e2e48e9445cd9390dcacb966164222c9/Fusion360.exe

❯ find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p" | sort -r 2>&1 | head -n 1 | sed -r 's/.+0000000000 (.+)/\1/'                                                    ─╯
/home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1bc48b96e2e48e9445cd9390dcacb966164222c9/Fusion360.exe

The incorrect executable is selected above -- and in the earlier lines it can be seen that the output from find runs lines together incorrectly.

The launcher command with \n added to find output argument

> find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p\n" | sort -r                                                                                                      
2021-12-10+11:18:42.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1a27f23c10bc87f7eab1f89e440a46f886b5f544/Fusion360.exe
2021-09-30+00:42:02.0000000000 /home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1bc48b96e2e48e9445cd9390dcacb966164222c9/Fusion360.exe

> find $HOME/.wineprefixes/fusion360 -name Fusion360.exe -printf "%T+ %p\n" | sort -r 2>&1 | head -n 1 | sed -r 's/.+0000000000 (.+)/\1/'                                                  ─╯
/home/sparky/.wineprefixes/fusion360/drive_c/Program Files/Autodesk/webdeploy/production/1a27f23c10bc87f7eab1f89e440a46f886b5f544/Fusion360.exe

I'll submit a PR adding this change in a minute.