Build OpenBVE
2 posters
Page 1 of 1
Build OpenBVE
I was thinking of taking a whack at RailDriver support by reducing the number of supported buttons below 32. For instance, I could just mask off the bottom row.
Question: Can I build OpenBVE on Linux with the mono c# compiler?
If not, can I build it on Windows 7 using free tools, or do I have to buy a compiler?
I do C, Python, a bit of Java, etc., so C# doesn't seem to be all that different.
Thanks, Ed
Question: Can I build OpenBVE on Linux with the mono c# compiler?
If not, can I build it on Windows 7 using free tools, or do I have to buy a compiler?
I do C, Python, a bit of Java, etc., so C# doesn't seem to be all that different.
Thanks, Ed
edgreenberg- Posts : 27
Join date : 2017-04-13
Re: Build OpenBVE
It'll absolutely build with Mono (SharpDevelop or Xamarin studio both tested)
There is also a makefile, which uses the command-line compiler if that floats your boat
The 32-button limit:
This is internal to the current build of openTK, not openBVE itself.
To remove it (Probably):
This hasn't been implemented into the main builds, as the changes within openTK are breaking if the new DLL is copied into an older installation, and because I have no physical device with 32+ buttons to test this, just a Windows based virtual joystick emulator.
(I actually wrote the openTK patch, but I've got *no* feedback from anyone with a physical device, hence why I don't want to just chuck it into the mix. Axis are also on the list of things to increase in the same way, but again need someone with a real device to test before doing so....)
If you don't manage to get this working, just let me know, and I'll knock up a quick experimental branch, & if this tests out OK, I'll patch the axis support in openTK the same way (IIRC they support a max of 16 axis ATM) and implement both into the main branch builds.
Cheers
There is also a makefile, which uses the command-line compiler if that floats your boat
The 32-button limit:
This is internal to the current build of openTK, not openBVE itself.
To remove it (Probably):
- Build openTK from scratch ( https://github.com/opentk/opentk ) from the current development version.
- Change the reference within openBVE to the new openTK DLL.
- The signature of openTK's state has changed marginally to use an int, rather than the custom JoystickButton enum. This wants changing in openBVE; IIRC this is the only place it's called: https://github.com/leezer3/OpenBVE/blob/a45da0c94f986e757fa3bd8d6a5db4c54ba02225/source/OpenBVE/OldCode/MainLoop.cs#L264
This hasn't been implemented into the main builds, as the changes within openTK are breaking if the new DLL is copied into an older installation, and because I have no physical device with 32+ buttons to test this, just a Windows based virtual joystick emulator.
(I actually wrote the openTK patch, but I've got *no* feedback from anyone with a physical device, hence why I don't want to just chuck it into the mix. Axis are also on the list of things to increase in the same way, but again need someone with a real device to test before doing so....)
If you don't manage to get this working, just let me know, and I'll knock up a quick experimental branch, & if this tests out OK, I'll patch the axis support in openTK the same way (IIRC they support a max of 16 axis ATM) and implement both into the main branch builds.
Cheers
Re: Build OpenBVE
OK, have made the changes in this branch here:
https://github.com/leezer3/OpenBVE/commits/MaxButtons
Pre-built experimental version:
https://vps.bvecornwall.co.uk/OpenBVE/Experimental/JoystickButtonsTest.zip
https://github.com/leezer3/OpenBVE/commits/MaxButtons
Pre-built experimental version:
https://vps.bvecornwall.co.uk/OpenBVE/Experimental/JoystickButtonsTest.zip
Results of your Joystick Test BUild
I'm sorry it took a long time to get this done. It's been a busy week.
I loaded up the JoystickBUttonTest build on Windows 7 and started it with the RailDriver plugged in.
I did not get the warning message, but neither did I get a really good result The screenshot at https://imagebin.ca/v/3OqYMDCNLOHo shows the controls screen. I see many buttons, but none of them light up when I press buttons on the RD. I don't see any sliders at all.
Thanks for trying. If you have any other tests I can do, please let me know.
FYI, the rail driver states that it is a HID Compliant Consumer Control Device, and a USB Input Device.
Thanks,
Ed
I loaded up the JoystickBUttonTest build on Windows 7 and started it with the RailDriver plugged in.
I did not get the warning message, but neither did I get a really good result The screenshot at https://imagebin.ca/v/3OqYMDCNLOHo shows the controls screen. I see many buttons, but none of them light up when I press buttons on the RD. I don't see any sliders at all.
Thanks for trying. If you have any other tests I can do, please let me know.
FYI, the rail driver states that it is a HID Compliant Consumer Control Device, and a USB Input Device.
Thanks,
Ed
edgreenberg- Posts : 27
Join date : 2017-04-13
Re: Build OpenBVE
No matter
That's a little better, but something is obviously not being interpreted right.
Have you tried enabling joystick & using the joystick grab box with an axis / button?
Not sure whether you're pressing is just stuck off-screen somewhere (I suspect if you enlarge the window, the axis may appear at the end, might have to tweak that....)
Best solution I can offer (just at the minute) is to try using PIE's MacroWorks. As the sim is now happy with it plugged in, IIRC this allows it to emulate a keyboard. Not really a solution per-se, but might get things working....
That's a little better, but something is obviously not being interpreted right.
Have you tried enabling joystick & using the joystick grab box with an axis / button?
Not sure whether you're pressing is just stuck off-screen somewhere (I suspect if you enlarge the window, the axis may appear at the end, might have to tweak that....)
Best solution I can offer (just at the minute) is to try using PIE's MacroWorks. As the sim is now happy with it plugged in, IIRC this allows it to emulate a keyboard. Not really a solution per-se, but might get things working....
Similar topics
» New OpenBVE Build- Testers Please
» OpenBVE crashes in (the latest) Build 2021.02.16.
» ForestBuilder 2.0.0.1 - Build forests, villages, car parks, farms, etc easily for OpenBVE
» Camera angles in OpenBVE, possible future optimise options for OpenBVE?
» openBVE 1.4.5 + new openBVE mirror site
» OpenBVE crashes in (the latest) Build 2021.02.16.
» ForestBuilder 2.0.0.1 - Build forests, villages, car parks, farms, etc easily for OpenBVE
» Camera angles in OpenBVE, possible future optimise options for OpenBVE?
» openBVE 1.4.5 + new openBVE mirror site
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum