$ProjectFileDir$ is empty when used in 'External tool'

Answered

I added a pre-make step to run $ProjectFileDir$/build_native.sh, which builds all my ndk stuff. But IntelliJ dumps

Error running build ndk: Cannot run program "/build_native.sh"

so $ProjectFileDir$ translates to empty. Is there anything I have to do before using IntelliJ variables?

Thanks,

7 comments

Sorry for trouble, it is a bug: http://youtrack.jetbrains.com/issue/IDEA-103303

Welcome to vote and comment.

Regards,
Alexander.

0

Upvoted. Is it possible to bump its priority? It seems quite critical since any external build relying on project variables would fail.

0

I've changed to Major, but this is actually not essential. The developer should make his decision.

Alexander.

0

Although it says the bug is fixed: https://youtrack.jetbrains.com/issue/IDEA-103303, it is not.

It is replacing $ProjectFileDir$ with an empty string.

This is in the Run/Debug Configurations -> Before launch -> Run External Tool -> Edit Tool -> Tool settings

It would be greatly appreciated to be fixed because these configurations are shared between the developers.

We also tried other macros and they are all replaced by an empty string.

The version we are using is:

IntelliJ IDEA 2017.3 (Community Edition)
Build #IC-173.3727.127, built on November 27, 2017
JRE: 1.8.0_152-release-1024-b6 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

 

Thank you! Your work is always much appreciated.

 

2

Hello,

Could you please add steps to reproduce the issue? What IDE version do you use?

0

Please sign in to leave a comment.