32-Bit for .NET Binding

Started by Ruthacury, 06 December 2018, 20:34:41

Ruthacury

Hi,
I'm wondering if there are any plans for a 32-bit version of the .NET binding of TGUI?
Thanks :)

Ruthacury

I just saw that you wrote this in another post. Is this why there isn't 32-bit?
QuoteTGUI.Net doesn't have all the features that exist in TGUI because the C interface used to communicate to TGUI can't do everything. There are some things that are possible but which I just decided not to spend time on them until someone requests them though. But the things you request seems to have technical limitations.

texus

Although that quote was about the C# code itself, it is indeed because I never took the effort to support it and nobody asked for it until now.

Is there a reason why you need to use 32-bit? I guess there are still too many people with old computers out there who are using it, but I would think almost anyone who would be interested in running new software would have a 64-bit pc.

Although there is no technical limitation for 32-bit, you will have to change a few files to get it working because I hardcoded the x64 value to keep things simple.
You will have to start by checking out the TGUI.Net project with git (i.e. "git clone https://github.com/texus/TGUI.Net").
Open extlibs/build.bat and change the 3 occurrences of "vcvars64.bat" to "vcvars32.bat". There are also 3 occurrences of "x64" in that file, leave the "...Tools.x86.x64" on top alone, but change the ones in the cmake and msbuild lines to "x86".
Go back to the root folder and open build/TGUI.Net.sln with a text editor. Replace all occurrences of "x64" with "x86".

That should be enough to get 32-bit working. If you update the submodules and run the build.bat file in the build directory as described in the readme then it should build 32-bit libraries (this will take several minutes). Let me know if it works or not. If it works then I'll try to come up with a way to let you choose 32 or 64 bit without having to change the scripts manually.

Ruthacury

Thanks very much for your help! :)

Ruthacury

Hmm.. I can't seem to be able to update the submodules I just get this error with git.
D:\TGUI.Net 32\TGUI.Net-master>git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git

texus

#5
You have to clone the project with git, not just download the source code from github.

Ruthacury

Oh okay thanks :) I'm not that experienced with github

texus

I have updated the scripts to be able to build 32-bit libraries, it involved a bit more changes than I originally though.

The steps to download and compile them are as follows:
Code (batch) Select
git clone https://github.com/texus/TGUI.Net
git submodule update --init --recursive
cd build
build.bat x86


I haven't actually been able to test the 32-bit libraries though as I don't know how to get an x86 dotnet program working on my 64-bit windows (I know very little about dotnet). So you are on your own for that part.

Ruthacury


Ruthacury

:/ I can't seem to get this to work, I'm just gonna remake the program with tgui in c++ instead. It's not really a complicated program so it's not like it will take long. Thanks for your help!