News:

;) This forum is the property of Proton software developers

Main Menu

VSCode Positron

Started by atomix, Nov 27, 2021, 09:05 PM

Previous topic - Next topic

keytapper

Hi Atomix
I installed VScode for Archlinux. When I try to add your extension it doesn't find it.  :(
Istantanea_2024-05-21_16-37-09.png
Ignorance comes with a cost


keytapper

#222
Quote from: atomix on May 22, 2024, 04:35 AMRead this
Thank you for your well informed help.
It was last thing I could think of. I installed the code-marketplace package and that's all.

Edit

I stumbled in a issue, where are the files from the compilation?
If the source is on the folder other resulting files should be there.

To use within Kate or Notepad++ I use this bash command
#!/usr/bin/bash
var=$1
filepath=$(dirname "$var")
wine "C:\Program Files (x86)\ProtonIDE\PDS\loader.exe" "$var" -z 2>/dev/null
pbefile="${var%.*}".pbe

#if [ -f $pbefile ]; then
#    result=$(grep -ic error $pbefile)
#    xfce4-terminal -H -e cat $pbefile
#    if [ $result != 0 ]; then
#        echo "Press any key to close"
#        read -n 1
#        exit
#    fi
#    sleep 2.0
#fi

The commented part is an attempt to show the results for a little time. But I can't make it work.
Ignorance comes with a cost

atomix

Describe in more detail what exactly does not work and where.

keytapper

Sorry, I've been less specific.
I've a source on the editor and I press F9 (that I replaced by your setting just to keep closer to the original mode).
The output shows
[Running]  wine "/home/user/.wine/drive_c/Program Files (x86)/ProtonIDE/PDS/Loader.exe" "/tmp/test.Bas"
[Done] exited with code=0 in 11.6 seconds
Then I look in the folder /tmp/ and I have
ls test.*
test.Bas
Whereas if I call my compilebas I will see
compilebas test.Bas && ls test.*
    Program Compiled OK. 129 Words used from a possible 4096
    45 Variables used in the 12F1840 from a possible 240

test.asm  test.Bas  test.cof  test.hex  test.lst  test.pbe

Funny is that if I recall the command issued within VScode, it will erase all file but not the source.
So the command issued within VScode is doing as this one
wine "/home/user/.wine/drive_c/Program Files (x86)/ProtonIDE/PDS/Loader.exe" "/tmp/test.Bas" && ls -l test.*
-rw-r--r-- 1 user users 623 23 mag 21.15 test.Bas
If I do this in the shell :
wine "C:\Program Files (x86)\ProtonIDE\PDS\loader.exe" "test.Bas" -z 2>/dev/null && ls -l test.*
    Program Compiled OK. 129 Words used from a possible 4096
    45 Variables used in the 12F1840 from a possible 240
-rw-r--r-- 1 user users 12504 23 mag 21.34 test.asm
-rw-r--r-- 1 user users   623 23 mag 21.15 test.Bas
-rw-r--r-- 1 user users  2811 23 mag 21.34 test.cof
-rw-r--r-- 1 user users   818 23 mag 21.34 test.hex
-rw-r--r-- 1 user users 41565 23 mag 21.34 test.lst
-rw-r--r-- 1 user users   138 23 mag 21.34 test.pbe
It works, therefore the option -z is missing. Just tell me how I can modify the command line and there we are.
Ignorance comes with a cost

atomix

The command line can only be the path to the executable file and does not contain any arguments.

I'll try to finalize this over the weekend.

atomix

#226
New Release 2.4.7

- Added processing of command line arguments during compilation.
- Added calling the "compiler.cmd"  file instead of the compiler  if it is found in the source folder.
- Added calling the "programmer.cmd" file instead of the programmer if it is found in the source folder.

keytapper

#227
The same as I summarized to call a batch file. Which is in facts what I made for my intent as she can see at post #224.
Edit
I thought it was simpler, but probably I took the wrong path. I saw this that is what will gear a batch file within the VScode.
I tried something but I got no results. Maybe it should be formatted within VScode itself. But I'm not familiar with it.
Ignorance comes with a cost

atomix

#228
New Release 2.4.9

- Fixed processing of command file calls on Linux systems.

keytapper

Bravo! Great job!
It's strange how in Windows the command doesn't need the -z option.
I still have many things to know about VScode.
Ignorance comes with a cost

keytapper

Hi Atomix,
I found an issue that is regarding source names with spaces. How to pass the name surrounded by quote?
Ignorance comes with a cost

atomix

in more detail ...

keytapper

wine "/home/user/.wine/drive_c/Program Files (x86)/ProtonIDE/PDS/Loader.exe" "/tmp/test my pgm.Bas"
The passed in source name should be surrounded by quote, this will avoid the name splitting into words.
Ignorance comes with a cost

atomix

You can write quotes in compiler arguments.