BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
314 stars 39 forks source link

Foreign characters support in path #74

Closed rchyla closed 1 year ago

rchyla commented 3 years ago

Hi.

It took few days to investigate this, i am amateur. I coudn't make run the example code as WinUAE was giving me constantly error of not finding the disk in drive DH0.

As it turned out, my windows profile contains one polish letter "ł", but the extension is transforming it to "Ĺ‚" when DH0 path for WinUAE is generated.

It is: c:\Users\Rafał\.vscode\...

should be c:\Users\Rafał\.vscode\...

Temporal solution, copy this extension folder somwhere where path doesn't contain language related characters, edit amigaDebug.ts, find the following line const dh0Path = path.join(binPath, "dh0");

replace binPath with the path to bin folder inside copied extension folder, compile and install from vsix, the path is hardcoded now into the extension.

BartmanAbyss commented 2 years ago

You got the sample project to compile? I renamed my amiga-debug directory to amiga-debugł and couldn't even compile the project. I think those unix tools (gnumake, gcc, etc.) don't really support unicode pathes on windows (see https://stackoverflow.com/questions/24136767/makefile-gcc-struggles-with-special-characters-in-path-using-windows). So, sorry about that.

rchyla commented 2 years ago

I did compile it, but i used custom path for dh0Path as something constantly is misinterpreting that unicode character, this line looks like this:

const dh0Path = path.join("E:/projects/amiga_programy/VScode/extensions/bartmanabyss.amiga-debug-1.1.0-preview42/bin", "dh0");

To reproduce this problem, you have to create an account in Windows with unicode letter and install your extension on this profile. You can't change (easily) user path in Windows after account is created, that is why i had to copy extension to different drive and hardcode the path to dh0.

BartmanAbyss commented 1 year ago

Yeah, sorry. I tried again. However there are just so many problems with the GNU tools. Even if I use a prebuilt exe in a unicode-path, objdump fails before WinUAE even starts...

rchyla commented 1 year ago

No problem, just a warning on main page about unicode paths may save someones life :)

On Wed, Nov 30, 2022 at 9:53 PM BartmanAbyss @.***> wrote:

Closed #74 https://github.com/BartmanAbyss/vscode-amiga-debug/issues/74 as completed.

— Reply to this email directly, view it on GitHub https://github.com/BartmanAbyss/vscode-amiga-debug/issues/74#event-7925633191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZHZOQ3CWHODMW2T4GBR4LWK65FVANCNFSM47YPPVAQ . You are receiving this because you authored the thread.Message ID: @.*** com>

BartmanAbyss commented 1 year ago

Fair enough. I‘ll add a check