Description:
Preliminary addition of IronPython.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,4 +1,5 | |||||
|
1 | using System.Collections.Generic; |
|
1 | using System.Collections.Generic; |
|
|
2 | using System.Threading.Tasks; | ||
|
2 | using System.Linq; |
|
3 | using System.Linq; |
|
3 | using Microsoft.Xna.Framework; |
|
4 | using Microsoft.Xna.Framework; |
|
4 | using Microsoft.Xna.Framework.Audio; |
|
5 | using Microsoft.Xna.Framework.Audio; |
@@ -7,7 +8,6 | |||||
|
7 | using Microsoft.Xna.Framework.Media; |
|
8 | using Microsoft.Xna.Framework.Media; |
|
8 |
|
9 | ||
|
9 |
|
10 | ||
|
10 |
|
|||
|
11 | using System; |
|
11 | using System; |
|
12 | using System.IO; |
|
12 | using System.IO; |
|
13 | using SpriteFontPlus; |
|
13 | using SpriteFontPlus; |
@@ -90,6 +90,18 | |||||
|
90 | #if NETCOREAPP |
|
90 | #if NETCOREAPP |
|
91 | DllMap.Initialise(false); |
|
91 | DllMap.Initialise(false); |
|
92 | #endif |
|
92 | #endif |
|
|
93 | Microsoft.Scripting.Hosting.ScriptEngine pythonEngine = IronPython.Hosting.Python.CreateEngine(); | ||
|
|
94 | |||
|
|
95 | ICollection<string> searchPaths = pythonEngine.GetSearchPaths(); | ||
|
|
96 | // searchPaths.Add("..\\.."); | ||
|
|
97 | searchPaths.Add("..\\..\\.."); | ||
|
|
98 | searchPaths.Add("."); | ||
|
|
99 | pythonEngine.SetSearchPaths(searchPaths); | ||
|
|
100 | |||
|
|
101 | Microsoft.Scripting.Hosting.ScriptScope scope = IronPython.Hosting.Python.ImportModule(pythonEngine, "Main"); | ||
|
|
102 | |||
|
|
103 | dynamic print_test = scope.GetVariable("print_test"); | ||
|
|
104 | print_test(); | ||
|
93 | using FNAGame g = new FNAGame(); |
|
105 | using FNAGame g = new FNAGame(); |
|
94 | g.Run(); |
|
106 | g.Run(); |
|
95 | } |
|
107 | } |
@@ -25,6 +25,7 | |||||
|
25 | <Content Include="Content\**\*.*"> |
|
25 | <Content Include="Content\**\*.*"> |
|
26 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
26 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
27 | </Content> |
|
27 | </Content> |
|
|
28 | <Content Include="Main.py" CopyToOutputDirectory="PreserveNewest" /> | ||
|
28 | </ItemGroup> |
|
29 | </ItemGroup> |
|
29 | <ItemGroup> |
|
30 | <ItemGroup> |
|
30 | <ProjectReference Include="..\FNA\FNA.Core.csproj" /> |
|
31 | <ProjectReference Include="..\FNA\FNA.Core.csproj" /> |
@@ -51,6 +52,7 | |||||
|
51 | <!-- <Import Project="..\build\CopyFNALibs.targets"/> --> |
|
52 | <!-- <Import Project="..\build\CopyFNALibs.targets"/> --> |
|
52 | <ItemGroup> |
|
53 | <ItemGroup> |
|
53 | <PackageReference Include="ImGui.NET" Version="1.78.0" /> |
|
54 | <PackageReference Include="ImGui.NET" Version="1.78.0" /> |
|
|
55 | <PackageReference Include="IronPython" Version="2.7.11" /> | ||
|
54 | <PackageReference Include="Tracery.Net" Version="1.0.0" /> |
|
56 | <PackageReference Include="Tracery.Net" Version="1.0.0" /> |
|
55 | <PackageReference Include="YamlDotNet" Version="9.1.4" /> |
|
57 | <PackageReference Include="YamlDotNet" Version="9.1.4" /> |
|
56 | </ItemGroup> |
|
58 | </ItemGroup> |
@@ -85,6 +85,7 | |||||
|
85 | <Content Include="cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" /> |
|
85 | <Content Include="cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" /> |
|
86 | <Content Include="cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.dylib" /> |
|
86 | <Content Include="cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.dylib" /> |
|
87 | <Content Include="cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.so" /> |
|
87 | <Content Include="cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.so" /> |
|
|
88 | <Content Include="Main.py" CopyToOutputDirectory="PreserveNewest" /> | ||
|
88 |
|
89 | ||
|
89 | <None Include="fnalibs\README.txt" /> |
|
90 | <None Include="fnalibs\README.txt" /> |
|
90 | <None Include="fnalibs\lib64\libFAudio.so.0" /> |
|
91 | <None Include="fnalibs\lib64\libFAudio.so.0" /> |
@@ -166,6 +167,15 | |||||
|
166 | <Reference Include="System.ServiceProcess" /> |
|
167 | <Reference Include="System.ServiceProcess" /> |
|
167 | <Reference Include="System.Transactions" /> |
|
168 | <Reference Include="System.Transactions" /> |
|
168 | <Reference Include="WindowsBase" /> |
|
169 | <Reference Include="WindowsBase" /> |
|
|
170 | <Reference Include="IronPython"> | ||
|
|
171 | <!-- <HintPath>..\packages\IronPython.2.7.11\lib\Net45\IronPython.dll</HintPath> --> | ||
|
|
172 | </Reference> | ||
|
|
173 | <Reference Include="Microsoft.Dynamic"> | ||
|
|
174 | <!-- <HintPath>..\packages\IronPython.2.7.11\lib\Net45\Microsoft.Dynamic.dll</HintPath> --> | ||
|
|
175 | </Reference> | ||
|
|
176 | <Reference Include="Microsoft.Scripting"> | ||
|
|
177 | <!-- <HintPath>..\packages\IronPython.2.7.11\lib\Net45\Microsoft.Scripting.dll</HintPath> --> | ||
|
|
178 | </Reference> | ||
|
169 | </ItemGroup> |
|
179 | </ItemGroup> |
|
170 | <ItemGroup> |
|
180 | <ItemGroup> |
|
171 | <Folder Include="Utils\" /> |
|
181 | <Folder Include="Utils\" /> |
@@ -10,5 +10,6 | |||||
|
10 | <package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net461" /> |
|
10 | <package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net461" /> |
|
11 | <package id="YamlDotNet" version="9.1.4" targetFramework="net461" /> |
|
11 | <package id="YamlDotNet" version="9.1.4" targetFramework="net461" /> |
|
12 | <package id="Tracery.Net" version="1.0.0" targetFramework="net461" /> |
|
12 | <package id="Tracery.Net" version="1.0.0" targetFramework="net461" /> |
|
|
13 | <package id="IronPython" version="2.7.11" targetFramework="net461" /> | ||
|
13 | <!-- <package id="YamlDotNet" version="4.0.0" targetFramework="net461" /> --> |
|
14 | <!-- <package id="YamlDotNet" version="4.0.0" targetFramework="net461" /> --> |
|
14 | </packages> |
|
15 | </packages> |
You need to be logged in to leave comments.
Login now