Skip to content

Commit 08ad38e

Browse files
authored
Merge pull request #847 from Garulf/flow-info-envs
Provide Flow Launcher program data in Environmental vars
2 parents 365f7e7 + fffaa89 commit 08ad38e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Flow.Launcher.Core/Plugin/PythonPlugin.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Diagnostics;
33
using System.IO;
44
using System.Threading;
@@ -28,6 +28,11 @@ public PythonPlugin(string filename)
2828
var path = Path.Combine(Constant.ProgramDirectory, JsonRPC);
2929
_startInfo.EnvironmentVariables["PYTHONPATH"] = path;
3030

31+
_startInfo.EnvironmentVariables["FLOW_VERSION"] = Constant.Version;
32+
_startInfo.EnvironmentVariables["FLOW_PROGRAM_DIRECTORY"] = Constant.ProgramDirectory;
33+
_startInfo.EnvironmentVariables["FLOW_APPLICATION_DIRECTORY"] = Constant.ApplicationDirectory;
34+
35+
3136
//Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable
3237
_startInfo.ArgumentList.Add("-B");
3338
}
@@ -57,4 +62,4 @@ public override Task InitAsync(PluginInitContext context)
5762
return Task.CompletedTask;
5863
}
5964
}
60-
}
65+
}

0 commit comments

Comments
 (0)