Comments (10)
This has also been requested before so I will probably take a look at it sometime soon.
There shouldn't be any showstoppers since only the embedded effect needs to be recompiled for OpenGL. There's just the overhead of having to manage multiple projects/build configurations for multiple platforms.
from quake-console.
Sounds good, I might be able to take a look at it in the near future as well if I get some free time. I'm not sure how you're handling building and publishing to nuget right now, but there are ways you can automate your build and deploy that would certainly help.
from quake-console.
I've made available QuakeConsole and PythonInterpreter for DesktopGL through Nuget:
MonoGame.QuakeConsole.DesktopGL
MonoGame.QuakeConsole.PythonInterpreter.DesktopGL
Source code now contains separate solution and project files for WindowsDX and DesktopGL platforms.
Note that I have not tested this running on Mono!
from quake-console.
Great, I'll take a look later today.
One thing I noticed is that some of the projects are targeted for x86 instead of AnyCPU. Any particular reason for this? This locks anyone using these packages to x86 as well.
from quake-console.
Only because MonoGame project template defaulted to x86. I can't think of any reason why it can't be AnyCPU instead. Will change this at some point.
Edit: I've update all the build configurations to AnyCPU and cleaned up solution files.
from quake-console.
Awesome, everything is running great on Windows. I ran into 2 issues with the Python Interpreter while running on OS X, mono v4.2.3.4.
- Occasionally, ParamInfos are null here:
https://github.com/discosultan/quake-console/blob/master/Interpreters/PythonInterpreter/TypeLoader.cs#L132
Addingif (memberInfo.ParamInfos[i] == null) continue;
fixes this, however I don't know if there's another issue this is ignoring. - For some reason it's trying to
from System import Int32&
which is throwing an exception due to trying to import the type name with the '&' reference at the end. Adding.TrimEnd('&')
after type.Name here:
https://github.com/discosultan/quake-console/blob/master/Interpreters/PythonInterpreter/TypeLoader.cs#L154
fixes this, however again this seams like it's just hiding another issue.
Any ideas? I could submit a PR with those fixes however I'm not sure that's the best course of action.
from quake-console.
Thanks for testing on Mono!
- Seems to be an interesting issue to do with the combination of using null propagation with extension method (a bug in Mono?). The code snippet
memberInfo.ParamInfos[i]?.ForEach
should fulfill the same purpose asif (memberInfo.ParamInfos[i] != null) memberInfo.ParamInfos[i].ForEach
but that doesn't seem to be the case. I suspect due to the fact thatForEach
is defined as an extension method here. It's a very minor syntactic sugar thing and the extension method should probably be removed altogether if it causes such issues. - Seems to be a subtle difference in the type system. The & symbol most probably defines a reference type (in your case, a pass by ref int). Easiest course of action is to simply trim the symbol like you suggested. That should functionally behave as expected, it's just that the types might be loaded twice in that case (for example, once for regular Int32 and once for Int32&). That shouldn't be an issue, though.
I've also added the Python interpreter unit tests project for DesktopGL sln. I'll see if I can somehow use Visual Studio to build the tests using XBuild targeting Mono assemblies.
Edit: I managed to successfully run the tests on Mono and catch the first issue. I put a fix already in.
I am unable to reproduce the second issue, though. @ianhattendorf, do you know which Type was loaded which caused the Int32& Type to be loaded? Type loading is recursive, so it might have shown up many levels deep. I would love to write a test for this case.
from quake-console.
I ran into the issue when adding the GraphicsDeviceManager
as a variable. I also ran into the issue with a class I created with the property public bool Enabled { get; set; } = true;
trying to load a Boolean&
.
It could be unique to OS X and possibly Linux, are you testing on Windows?
from quake-console.
I'm testing on Windows. I'll take another shot at it tomorrow and if am unable to reproduce then I'll simply trim the ampersand from type name as you suggested.
Edit: Could not reproduce. Added type name trimming.
from quake-console.
Closing since supported. Has not been tested on other platforms than Windows though.
from quake-console.
Related Issues (9)
- Provide as nuget package HOT 1
- [Paradox.Console.PythonInterpreter] Automatically load types for method params HOT 1
- [PythonInterpreter] Autocomplete when working with variables declared through the console HOT 2
- Autocomplete support for accessing array type
- ManualInterpreter Example Incorrect Letter i Capitalization? HOT 2
- WindowsDX build fails HOT 1
- DesktopGL nuget package is built against .NET Framework HOT 6
- Clipboard shorcuts not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quake-console.