@@ -23,9 +23,9 @@ protected string ThirdPartyPythonHome
2323
2424
2525 // otherwise specify the path of your python installation
26- //private string pythonHome = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/";
26+ //private string PythonHome = "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/";
2727 // on Linux an include;libs syntax is expected:
28- //private string pythonHome = "/usr/local/include/python3.6;/usr/local/lib/libpython3.6.so"
28+ //private string PythonHome = "/usr/local/include/python3.6;/usr/local/lib/libpython3.6.so"
2929
3030 //Swap python versions here
3131 private string PythonType = "Python36" ;
@@ -229,62 +229,62 @@ public UnrealEnginePython(TargetInfo Target)
229229 } ) ;
230230 }
231231
232- if ( ( Target . Platform == UnrealTargetPlatform . Win64 ) || ( Target . Platform == UnrealTargetPlatform . Win32 ) )
233- {
234- if ( UseThirdPartyPython )
235- {
236- PythonHome = ThirdPartyPythonHome ;
232+ if ( ( Target . Platform == UnrealTargetPlatform . Win64 ) || ( Target . Platform == UnrealTargetPlatform . Win32 ) )
233+ {
234+ if ( UseThirdPartyPython )
235+ {
236+ PythonHome = ThirdPartyPythonHome ;
237237
238- System . Console . WriteLine ( "Using Embedded Python at: " + PythonHome ) ;
239- PublicIncludePaths . Add ( PythonHome ) ;
240- string libPath = Path . Combine ( PythonHome , "Lib" , string . Format ( "{0}.lib" , PythonType . ToLower ( ) ) ) ;
238+ System . Console . WriteLine ( "Using Embedded Python at: " + PythonHome ) ;
239+ PublicIncludePaths . Add ( PythonHome ) ;
240+ string libPath = Path . Combine ( PythonHome , "Lib" , string . Format ( "{0}.lib" , PythonType . ToLower ( ) ) ) ;
241241
242- System . Console . WriteLine ( "full lib path: " + libPath ) ;
243- PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
244- PublicAdditionalLibraries . Add ( libPath ) ;
242+ System . Console . WriteLine ( "full lib path: " + libPath ) ;
243+ PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
244+ PublicAdditionalLibraries . Add ( libPath ) ;
245245
246246 string dllPath = Path . Combine ( BinariesPath , "Win64" , string . Format ( "{0}.dll" , PythonType . ToLower ( ) ) ) ;
247- RuntimeDependencies . Add ( new RuntimeDependency ( dllPath ) ) ;
247+ RuntimeDependencies . Add ( dllPath ) ;
248248 }
249- else if ( PythonHome == "" )
250- {
251- pythonHome = DiscoverPythonPath ( windowsKnownPaths , "Win64" ) ;
252- if ( pythonHome == "" )
253- {
254- throw new System . Exception ( "Unable to find Python installation" ) ;
255- }
256-
257- System . Console . WriteLine ( "Using Python at: " + PythonHome ) ;
258- PublicIncludePaths . Add ( PythonHome ) ;
259- string libPath = GetWindowsPythonLibFile ( PythonHome ) ;
260- PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
261- PublicAdditionalLibraries . Add ( libPath ) ;
262- }
263- }
264-
265- //other platforms
266- else
249+ else if ( PythonHome == "" )
250+ {
251+ PythonHome = DiscoverPythonPath ( windowsKnownPaths , "Win64" ) ;
252+ if ( PythonHome == "" )
253+ {
254+ throw new System . Exception ( "Unable to find Python installation" ) ;
255+ }
256+
257+ System . Console . WriteLine ( "Using Python at: " + PythonHome ) ;
258+ PublicIncludePaths . Add ( PythonHome ) ;
259+ string libPath = GetWindowsPythonLibFile ( PythonHome ) ;
260+ PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
261+ PublicAdditionalLibraries . Add ( libPath ) ;
262+ }
263+ }
264+
265+ //other platforms
266+ else
267+ {
268+ if ( PythonHome == "" )
269+ {
270+ PythonHome = DiscoverPythonPath ( macKnownPaths , "Mac" ) ;
271+ if ( PythonHome == "" )
272+ {
273+ throw new System . Exception ( "Unable to find Python installation" ) ;
274+ }
275+ System . Console . WriteLine ( "Using Python at: " + PythonHome ) ;
276+ PublicIncludePaths . Add ( PythonHome ) ;
277+ PublicAdditionalLibraries . Add ( Path . Combine ( PythonHome , "Lib" , string . Format ( "{0}.lib" , PythonType ) ) ) ;
278+ }
279+ System . Console . WriteLine ( "Using Python at: " + PythonHome ) ;
280+ PublicIncludePaths . Add ( PythonHome ) ;
281+ string libPath = GetMacPythonLibFile ( PythonHome ) ;
282+ PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
283+ PublicDelayLoadDLLs . Add ( libPath ) ;
284+ }
285+ if ( Target . Platform == UnrealTargetPlatform . Linux )
267286 {
268287 if ( PythonHome == "" )
269- {
270- pythonHome = DiscoverPythonPath ( macKnownPaths , "Mac" ) ;
271- if ( pythonHome == "" )
272- {
273- throw new System . Exception ( "Unable to find Python installation" ) ;
274- }
275- System . Console . WriteLine ( "Using Python at: " + PythonHome ) ;
276- PublicIncludePaths . Add ( PythonHome ) ;
277- PublicAdditionalLibraries . Add ( Path . Combine ( PythonHome , "Lib" , string . Format ( "{0}.lib" , PythonType ) ) ) ;
278- }
279- System . Console . WriteLine ( "Using Python at: " + pythonHome ) ;
280- PublicIncludePaths . Add ( pythonHome ) ;
281- string libPath = GetMacPythonLibFile ( pythonHome ) ;
282- PublicLibraryPaths . Add ( Path . GetDirectoryName ( libPath ) ) ;
283- PublicDelayLoadDLLs . Add ( libPath ) ;
284- }
285- else if ( Target . Platform = = UnrealTargetPlatform . Linux )
286- {
287- if ( pythonHome == "" )
288288 {
289289 string includesPath = DiscoverLinuxPythonIncludesPath ( ) ;
290290 if ( includesPath == null )
0 commit comments