Run vcvarsall.bat on launch
Run vcvarsall.bat on launch
I currently use the windows terminal with a custom developer command prompt that runs vcvarsall.bat on launch. I’d like to configure FarManager to do the same but I can’t figure out how to do so. Has anyone else done this and can explain the steps needed? Thanks.
- buniak_a_h
- Posts: 4268
- Joined: Sat 20 Apr, 2013 00:17
- Location: Санкт-Петробад
- Has thanked: 222 times
- Been thanked: 644 times
- Contact:
Run vcvarsall.bat on launch
Ctreate file %FarProfile%\Macros\internal\Shell__.lua and write:
Restart Far
Code: Select all
Macro {
description="";
area="Shell"; key="_";
flags="RunAfterFARStart";
code="Keys(\"v c v a r s a l l . b a t Enter\")";
}
Run vcvarsall.bat on launch
Thanks. I should have been more specific with the vcvarsall.bat call. I need to run the full path:
However I get an error that there is an unexpected symbol near '\' in the Keys line.
I need to execute the batch script at the given path and pass it the x64 argument.
Code: Select all
Macro {
description="";
area="Shell"; key="_";
flags="RunAfterFARStart";
code="Keys(\"\"%ProgramFiles%\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64 Enter\")";
}
I need to execute the batch script at the given path and pass it the x64 argument.
-
- Posts: 6839
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 530 times
Run vcvarsall.bat on launch
amb85, make a batch file with the content like this:
Code: Select all
set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
call %VCVARSALL% x86 > nul
<path-to-Far>\Far.exe
Run vcvarsall.bat on launch
Actually, I don't think that does work. When I open a project in VSCode from FarManager with then try calling for example, it doesn't find cl on the path (which it should be if vcvarsall has run successfully).
Code: Select all
code .
Code: Select all
cl.exe
-
- Posts: 6839
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 530 times
Run vcvarsall.bat on launch
amb85, it works for me.
If I run Far directly then cl is not found. If I run the batch everything's OK.
P.S. I don't have VSCode, I run cl from the Far's command line.
If I run Far directly then cl is not found. If I run the batch everything's OK.
P.S. I don't have VSCode, I run cl from the Far's command line.
Last edited by Shmuel on Sun 12 Jun, 2022 16:24, edited 1 time in total.
Run vcvarsall.bat on launch
Do you launch the file directly or as the command from the windows terminal profile?
Run vcvarsall.bat on launch
Okay, I'll try again. I set the batch script as the entrypoint for a Windows terminal profile, so that the profile loads Far Manager on startup. Perhaps there's some issue where that vcvarsall command to nul gets discarded before Far starts?
Run vcvarsall.bat on launch
Shmuel thank you. That's very embarrassing; having changed the path to my correct VS2022 location it works. Funny that! Thanks again for your help.