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

NL_PATH doesn't get translation of a Windows system folder #1194

Open
aoor9 opened this issue Jan 22, 2024 · 2 comments
Open

NL_PATH doesn't get translation of a Windows system folder #1194

aoor9 opened this issue Jan 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@aoor9
Copy link

aoor9 commented Jan 22, 2024

Describe the bug
My app uses a bundled nodejs service as extension, and I'm deploying it as msi through InnoSetup. After installing it, I can find it inside Program Files, or Program Files (x86). But when I start the app from there, the extension isn't loaded, even though it's inside the correct path.

The NL_PATH says like this: C:/Program Files/app, which is technically correct, however it's not effective when Windows is set to another language. For example, the Program Files folder is renamed to Programmi in italian. So when I change the extensions command with a static path:

"C:\\Program Files\\app\\bin\\service.exe" // not working
"C:\\Programmi\\app\\bin\\service.exe" // working

To Reproduce

  1. Write an app which prints NL_PATH variable on console
  2. Input NL_PATH in extensions section of neutralino.config.js (eg. "${NL_PATH}/bin/service.exe")
  3. neu build (with enableInspector set to true)
  4. Move dist folder inside (translation of) Program Files folder and rename it
  5. Click the main exe

Expected behavior
NL_PATH should consider translations of system folders

Specifications

  • OS: Windows 11 x64
  • Neutralinojs version: v4.15.0
  • Neutralinojs client library version: v3.13.0
  • Neutralinojs CLI version: [e.g. v9.1.2]

Additional context
I was also trying to move the extension to another folder, like C:\app\bin\service.exe, and all I needed is the system drive (C:\). But I can't retrieve it dynamically from NL_PATH when declared inside the config file. So, any chance to export a new global variable?

@aoor9 aoor9 added the bug Something isn't working label Jan 22, 2024
@shalithasuranga
Copy link
Member

Hello, @aoor9 thanks for posting this issue. Did you try using "commandWindows": "\"${NL_PATH}/bin/service.exe\"" ?

@aoor9
Copy link
Author

aoor9 commented Jan 25, 2024

Hello, @aoor9 thanks for posting this issue. Did you try using "commandWindows": "\"${NL_PATH}/bin/service.exe\"" ?

It worked, despite the quotes inside the string being required to make it so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants