Advertisement
Guest User

Untitled

a guest
Jul 28th, 2024
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. [Click here to return to readme.md](../../README.md)
  2.  
  3. Atualizado em 27-05-2024
  4. ### Desinstalando o WSL Existente
  5. ```bash
  6. wsl --list # Mostra instalações atuais
  7. wsl --unregister Ubuntu # Desinstala o "Ubuntu"
  8. ```
  9.  
  10. ### Instalando WSL e PlatformIO
  11. ```bash
  12. wsl --install Ubuntu24.04
  13. sudo apt update
  14. sudo apt upgrade
  15. sudo apt install curl
  16. cd ~
  17. curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
  18. sudo apt-get install python3.12-venv
  19. python3 get-platformio.py
  20. ```
  21.  
  22. ### Exportando PlatformIO para o PATH
  23. ```bash
  24. mkdir -p ~/.local/bin
  25. export PATH=$PATH:$HOME/.local/bin
  26. ln -s ~/.platformio/penv/bin/platformio ~/.local/bin/platformio
  27. ln -s ~/.platformio/penv/bin/pio ~/.local/bin/pio
  28. ln -s ~/.platformio/penv/bin/piodebuggdb ~/.local/bin/piodebuggdb
  29. source ~/.profile
  30. ```
  31.  
  32. ### Instalando Git (instale o git-all mesmo se o git ja estiver no sistema)
  33. ```bash
  34. sudo apt-get install git-all
  35. ```
  36.  
  37. ### Configurando Git Credential Manager
  38. Siga o guia e instale o Git Credential Manager no Windows: [Guia de Instalação](https://dev.to/equiman/sharing-git-credentials-between-windows-and-wsl-5a2a)
  39. - Link para download: https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe
  40.  
  41. #### No Terminal do Windows:
  42. ```bash
  43. git config --global credential.helper wincred
  44. ```
  45.  
  46. #### No Terminal do WSL:
  47. ```bash
  48. git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
  49. ```
  50.  
  51. ### Verificando a Instalação do Git
  52. ```bash
  53. git --version
  54. ```
  55.  
  56. ### Configurando Git e clonando o repositório
  57. ```bash
  58. git config --global user.email "[email protected]"
  59. git config --global user.name "Your Name"
  60. cd ~
  61. git clone https://github.com/italocjs/simova_smvtrack
  62. ```
  63.  
  64. ### Instalando o doxygen e g++
  65. ```bash
  66. sudo apt-get install doxygen
  67. sudo apt-get install doxygen-gui
  68. sudo apt-get install g++
  69. ```
  70.  
  71.  
  72. ### Sharing USB Port with WSL
  73. I HIGHLY recommend using the program: https://gitlab.com/alelec/wsl-usb-gui/-/releases, an working copy is available on /docs/others/WSL-USB-5.5.0.msi
  74. It makes the process much easier and has a visual interface. The USBShare scripts have the same functionality but do not have a GUI and you will need to mount the device everytime.
  75.  
  76. - Resolving Mounting Issues in the usbidpGUI program
  77. If you encounter the error `error: Mounting 'C:\Program Files\usbipd-win\WSL' within WSL failed` after rebooting the system, follow these instructions:
  78. ```bash
  79. sudo mount -t drvfs -o "ro,umask=222" "C:\Program Files\usbipd-win\WSL" "/var/run/usbipd-win"
  80. ```
  81.  
  82.  
  83. How to make this change persistent
  84.  
  85. The issue is that the `/etc/fstab` file does not recognize the Windows-style path directly. Instead, you should use the WSL-specific syntax for mounting Windows paths. Here’s the correct way to add it:
  86.  
  87. 1. Open the `/etc/fstab` file in a text editor with root privileges:
  88. ```bash
  89. sudo nano /etc/fstab
  90. ```
  91.  
  92. 2. Add the following line to the end of the file:
  93. ```plaintext
  94. C:\\Program\040Files\\usbipd-win\\WSL /var/run/usbipd-win drvfs ro,umask=222 0 0
  95. ```
  96. Please note that \040 is an escape sequence for a space. and is required, the path is not wrong. You can find it on windows under "C:\Program Files\WSL USB"
  97.  
  98. 3. Save the file and exit the editor (in nano, you can do this by pressing `Ctrl+X`, then `Y`, and `Enter`).
  99.  
  100. 4. To apply the changes without rebooting, you can run:
  101. ```bash
  102. sudo systemctl daemon-reload
  103. sudo mount -a
  104. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement