Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtimeDir to the launch.json #52

Closed
zero-plusplus opened this issue Sep 14, 2020 · 10 comments
Closed

Add runtimeDir to the launch.json #52

zero-plusplus opened this issue Sep 14, 2020 · 10 comments
Labels
draft Draft of new features enhancement New feature or request not implemented Not implemented.

Comments

@zero-plusplus
Copy link
Owner

Is there a demand for being able to change the default directory of the runtime?
It is currently pinned to C:\Program Files\AutoHotkey.

@zero-plusplus zero-plusplus added the draft Draft of new features label Sep 14, 2020
@SAbboushi
Copy link

What would runtimeDir offer that is different from runtime?

"launch": {
        "configurations": [
            {
                "name": "AHK V2 Debug",
                "request": "launch",
                "type": "autohotkey",  // identifies the debugger
                "runtime": "J:/StandaloneApps/AutoHotkeyV2/AutoHotkeyU64.exe",
    "launch": {
        "configurations": [
            {
                "name": "AHKv2[a118] Debug",
                "request": "launch",
                "type": "autohotkey",  // identifies the debugger
                "runtime": "J:/StandaloneApps/AutoHotkey_v2.0-a118-1e6cd8a1/AutoHotkeyU64.exe",

@zero-plusplus
Copy link
Owner Author

You can configure the current directory when you make runtime a relative path.

It is possible to set it as follows.

{
    "runtimeDir": "w:/tools/AutoHotkey",
    "runtime_v1": "AutoHotkey.exe"
    "runtime_v2": "v2/AutoHotkey.exe"

Traditionally, you would have to set it up as follows.

{
    "runtime_v1": "w:/tools/AutoHotkey/AutoHotkey.exe"
    "runtime_v2": "w:/tools/AutoHotkey/v2/AutoHotkey.exe"

It's not a big change, but it will make it somewhat easier to see.

@SAbboushi
Copy link

If I recall, I cannot do it that way because I use .ahk for both v1 and v2. Is that correct?

@zero-plusplus
Copy link
Owner Author

zero-plusplus commented Sep 14, 2020

You can use it, but it won't be of much benefit.

In your example, you can change this as follows.

"launch": {
        "configurations": [
            {
                "name": "AHK V2 Debug",
                "request": "launch",
                "type": "autohotkey",  // identifies the debugger
                "runtimeDir": "J:/StandaloneApps/AutoHotkeyV2"
                "runtime": "AutoHotkeyU64.exe",
    "launch": {
        "configurations": [
            {
                "name": "AHKv2[a118] Debug",
                "request": "launch",
                "type": "autohotkey",  // identifies the debugger
                "runtimeDir": "J:/StandaloneApps/AutoHotkey_v2.0-a118-1e6cd8a1"
                "runtime": "AutoHotkeyU64.exe",

@zero-plusplus
Copy link
Owner Author

Perhaps runtimeCwd is more appropriate than runtimeDir

@zero-plusplus zero-plusplus changed the title Add runtimeDir to the launch.json Add runtimeCwd to the launch.json Sep 25, 2020
@SAbboushi
Copy link

I am curious - what is meaning of "Cwd"?

@zero-plusplus
Copy link
Owner Author

It's an abbreviation for Current Working Directory

The relative path is converted to a full path based on this directory.

If you look here, it seems to be an appropriate name since cwd is a common option supported by the debugger.

@zero-plusplus zero-plusplus changed the title Add runtimeCwd to the launch.json Add runtimeDir to the launch.json Oct 20, 2020
@zero-plusplus
Copy link
Owner Author

I don't know what "runtime's current working directory" means, if I think about it.
Normally, There is one "current" working directory. This misleads people into thinking there's more than one it.

So if I' m going to implement it, runtimeDir seems to be a better choice.

@zero-plusplus zero-plusplus added the enhancement New feature or request label Oct 20, 2020
@zero-plusplus
Copy link
Owner Author

If the #62 is implemented, it might be a little more useful, since it requires setting the runtime path to up to five file extensions - ahk, ah2, ahk2, ahkh, and ahkh2.

@zero-plusplus
Copy link
Owner Author

Since runtime will be deprecated in the future, this draft will be discarded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft Draft of new features enhancement New feature or request not implemented Not implemented.
Projects
None yet
Development

No branches or pull requests

2 participants