Think I managed to make it portable, only partially tested on windows 11,
- Download arduino-cli from GitHub.
- In file /configuration/configuration.go, change functions getDefaultArduinoDataDir() and getDefaultUserDir(). Instead of "win32.GetLocalAppDataFolder()", use "os.Getwd()". Also, comment this line “github.com/arduino/go-win32-utils”.
- Build arduino-cli.exe following this guide: How to contribute - Arduino CLI.
- Download Arduino IDE portable.
- Look in file /resources/app/node_modules/arduino-ide-extension/lib/node/theia/env-variables/env-variables-server.js line 20. Change "os_1.homedir" to "process.cwd".
- Copy arduino-cli.exe to /resources/app/node_modules/arduino-ide-extension/build.
- Start the application.
ps: delete file /.arduinoIDE/arduino-cli.yaml. when moving or copying