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.95k stars 121 forks source link

Wrong working directory on Ubuntu 21.x after installing packages with apt *solved* #142

Closed smirgol closed 2 years ago

smirgol commented 2 years ago

Describe the bug After updating and installing packages with the systems package manager APT, the install script is in the wrong directory and fails to execute the rest of the script in terms of launching winetricks and the Fusion installer.

This is caused by the script to download the gpg keys for the package manager to a temp directory and changing to that directory, but it does not change back to the install directory. The rest of the script assumes that the scripts current working directory is the initial install directory $HOME/.wineprefixes/fusion360/INSTALLDIR/

To Reproduce Steps to reproduce the behavior:

  1. Run the script on an Ubuntu 21.x system
  2. Watch the log in the background
  3. After the commands of the package manager, it should run winetricks, but if will fail to locate the binary

Expected behavior The script should change back to the INSTALLDIR after installing the gpg key and continue the installation there.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context The issue persists only on Ubuntu 21.x, because these are the only OS variants that create a temp dir for a gpg key and change to that directory. A cd $HOME/.wineprefixes/fusion360/INSTALLDIR/ at the end of the functions ubuntu21 and ubuntu21_10 will fix the issue.

cryinkfly commented 2 years ago

@smirgol Thank you for your report and tip! :+1: