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

Uninstall routine doesn't work `sed: invalid option -- '1'` #397

Open reneas opened 4 months ago

reneas commented 4 months ago

Description of the bug When running the uninstall.sh script in /home/USERNAME/.fusion360/bin it exits with a sed error.

To Reproduce Steps to reproduce the behavior:

  1. Navigate to /home/reneas/.fusion360/bin
  2. Execute uninstall.sh
  3. Click through the uninstall routine
  4. Finish with "Ok"
  5. Check terminal output
  6. See error

Expected behavior

  1. Navigate to /home/reneas/.fusion360/bin
  2. Execute uninstall.sh
  3. Click through the uninstall routine
  4. Have programm uninstalled

Screenshots image

image

Desktop (please complete the following information):

Additional context the terminal reads:

./uninstall.sh 
Testing presence of yad ...
Found: /usr/bin/yad
EN

TRUE
sed: invalid option -- '1'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
      --debug
                 annotate program execution
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).
  -s, --separate
                 consider files as separate rather than as a single,
                 continuous long stream.
      --sandbox
                 operate in sandbox mode (disable e/r/w commands).
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
  -z, --null-data
                 separate lines by NUL characters
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
sed: invalid option -- '1'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
      --debug
                 annotate program execution
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).
  -s, --separate
                 consider files as separate rather than as a single,
                 continuous long stream.
      --sandbox
                 operate in sandbox mode (disable e/r/w commands).
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
  -z, --null-data
                 separate lines by NUL characters
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
sed: invalid option -- '1'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
      --debug
                 annotate program execution
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).
  -s, --separate
                 consider files as separate rather than as a single,
                 continuous long stream.
      --sandbox
                 operate in sandbox mode (disable e/r/w commands).
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
  -z, --null-data
                 separate lines by NUL characters
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
rmdir: failed to remove 'customOpenGL/home/reneas/Programme/Fusion': No such file or directory
rmdir: failed to remove '/home/reneas/.local/share/applications/wine/Programs/Autodesk/Fusion360/': Directory not empty
There is at least one installed Wineprefix on your system!
There is at least one installed Wineprefix on your system!
PedroMTSilva commented 3 months ago

Hello! Today i was having this exact problem and what worked for me was completely removing the whinehq package from my system and cleaning. So would be the following (the brackets are depending on what branch you have installed):

sudo apt-get remove --purge whinehq-[stable/devel/staging] sudo apt autoremove

EDIT You should also remove the /.fusion360/ directory from your system, which should be in your home directory, just to remove the previous wine prefix that was configured for fusion. EDIT END

Then reboot.

After that, just installed the stable wine branch again and ran the script and it just worked (idk about the other branches). But now i am still having some trouble logging in, so later i'll be reffering to https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/issues/396#issuecomment-1986793103 to keep going, since this sd1337's solution seems to work.

Just to add up, the app was launching fine, even after rebooting after the instalation process, and this error probably occured to me when i decided to just delete the .fusion360 directory on home by hand and try to use the bottle approach because of the login issues. So it probably messed up some configs with wine, since i remember installing the stable branch first and just a few minutes ago i noticed my branch was actually the staging branch.

reneas commented 3 months ago

Unfortunately this didn't solve the issue for me. Initially I wanted to use the uninstall routine so that there are no leftover files in my system but now i think I might just delete the ~/.fusion360/ and my installation folder manually... Are there any other places, where this programm installed anything or created folders&files?

PedroMTSilva commented 3 months ago

Yes, besides purging wine, you should also completely remove the /.fusion360/ directory to remove it's wine prefix config. After that follow the link to the comment in my previous response (#396). I'll be up a bit more if you need more help, i already managed to get it working.

I believe the only place were it installs things besides the /.fusion360/ directory is in the wine directories, but then again, if you have the possibility to completely remove wine you should be good to go.