VSCODE runner

This is the best place to discuss about the various Oric operating systems like Sedoric, Randos, FT-Dos, and others, as well as serious software, utilities, word processors, disassemblers, etc... that runs on oric computers.
User avatar
goyo
Officer Cadet
Posts: 52
Joined: Sat Jan 12, 2019 10:16 am

VSCODE runner

Post by goyo »

I would like to run osdk_build.bat from Microsoft Visual Studio Code,

Code: Select all

{
	"version": "2.0.0",
	"key": "cmd+shift+R",
	"tasks": [
		{	
			"type":"shell",
			"label":"build osdk project",
			"command": "osdk_build.bat",
		}
	]
}
but I have this error :

Code: Select all

i have this error message : Code language not supported or defined.
ideas? :?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: VSCODE runner

Post by Dbug »

Maybe specify CMD.EXE instead of just a batch file.
User avatar
goyo
Officer Cadet
Posts: 52
Joined: Sat Jan 12, 2019 10:16 am

Re: VSCODE runner

Post by goyo »

Dbug wrote: Mon Nov 23, 2020 4:25 pm Maybe specify CMD.EXE instead of just a batch file.
thank you Dbug, but it don't seems to work.

finally I click on the context menu of osdk_execute.bat and run the code. I ll try to find how to make a key shortcut:

image22.png
image22.png (5.35 KiB) Viewed 5069 times

otherwise if someone is interested, in notepad++ the shortcut (F5) is :

Code: Select all

cmd /K cd /d  $(CURRENT_DIRECTORY) && (osdk_run.bat)&&(exit)
User avatar
retroric
Pilot Officer
Posts: 125
Joined: Sun Nov 22, 2009 4:33 pm
Location: Paris, France

Re: VSCODE runner

Post by retroric »

goyo wrote: Mon Nov 23, 2020 4:01 pm I would like to run osdk_build.bat from Microsoft Visual Studio Code,

Code: Select all

{
	"version": "2.0.0",
	"key": "cmd+shift+R",
	"tasks": [
		{	
			"type":"shell",
			"label":"build osdk project",
			"command": "osdk_build.bat",
		}
	]
}
but I have this error :

Code: Select all

i have this error message : Code language not supported or defined.
ideas? :?
Hi Goyo,

I think the error maybe because you have a superfluous comma before a closing brace, so your JSON definition file is incorrect.
If you just remove the comma after "osdk_build.bat" it should work.

Also, I believe the "key" entry is incorrect. It doesn't apply to the "'tasks.json" file as far as I know, but to the "keybindings.json" file. See https://code.visualstudio.com/docs/edit ... s-to-tasks

Now, as an example here is the (working) "tasks.json" file I use in most of my projects (as a reminder, this file must be placed in a ".vscode" subdirectory at the root of your project directory).
Also note that I renamed the scripts, e.g. I use "build.bat" instead of "osdk_build.bat":

Code: Select all

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "OSDK Build",
            "type": "shell",
            "command": "build.bat",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        },
        {
            "label": "OSDK Execute",
            "type": "shell",
            "command": "execute.bat",
            "problemMatcher": [],
            "group": {
                "kind": "execute",
                "isDefault": false
            }
        }
    ]
}
flag_fr RetrOric, aka laurentd75 flag_uk
            GitHub - RetrOric
Post Reply