DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

A guildline how to build DearPyGui with Windows 32-bit systems

Open Ar4ikov opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe. Hello there! 've stuck with my project at compilation and building with Windows 32-bit system. I need more information (or something like a guidline) about building DearPyGui from source.

It would be wonderful if we could find a way to resolve this without any unnecessary bloodshed. Preferred OS: Windows 10 32-bit

Ar4ikov avatar Mar 18 '24 15:03 Ar4ikov

What's your target OS? I'm not a build expert and most probably won't help, but anyone willing to help will absolutely need to know your build target.

v-ein avatar Mar 18 '24 16:03 v-ein

@v-ein Sorry for XY, Updated! Preferred OS: Windows 10 32-bit

Ar4ikov avatar Mar 18 '24 16:03 Ar4ikov

What have you tried so far? Doesn't this work for you? If so, what error messages do you get? https://github.com/hoffstadt/DearPyGui/wiki/Local-Wheel

Google says CMake should be targeting 32-bit build on a 32-bit host, so should be working out of the box; I can't check it on a 32-bit Windows though.

v-ein avatar Mar 18 '24 17:03 v-ein

Okay. I've already tried this article

https://github.com/hoffstadt/DearPyGui/wiki/Local-Wheel

and I've got unknown (for me) issues at the some code creation stage. Traceback is here: https://pastebin.com/4mGDE4k4 My purpose is to build DearPyGui for Windows 10 32bit for Python 3.11 What I noticed before the run:

  1. bdist_wheel is unrecognized option for setuptools. Building was started with bdist.
  2. To create a build, I used this: python -m setup bdist --plat-name win32 --dist-dir dist (changed platform name to win32)
  3. Also I changed platform name in setup.py at build command and now it looks from this:
command.append('cmake .. -G "Visual Studio 16 2019" -A "x64" -DMVDIST_ONLY=True -DMVDPG_VERSION=')

To this

command.append('cmake .. -G "Visual Studio 16 2019" -A "win32" -DMVDIST_ONLY=True -DMVDPG_VERSION=')

I also installed all nessesary dependencies from the article (all needed developments for c++), git and cmake.

Ar4ikov avatar Mar 21 '24 11:03 Ar4ikov

Traceback is here: https://pastebin.com/4mGDE4k4

It's probably better to attach it directly to the ticket.

I've got unknown (for me) issues at the some code creation stage.

Weird. Looks like your compiler doesn't understand this piece of code:

	viewportData->wc = {
		sizeof(WNDCLASSEX),
		CS_CLASSDC,
		mvHandleMsg,
		0L,
		0L,
		GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr,
		_T(viewport.title.c_str()), nullptr
	};

Which is basically assigning a new WNDCLASSEX to another WNDCLASSEX instance, and somehow works for the rest of us. I'm not sure if it's an issue in the compiler, or some optional behavior, or what. You can try to rewrite this piece of code in a way that it creates a local WNDCLASSEX and then does memcpy into viewportData->wc. Something along these lines (haven't tried myself):

	WNDCLASSEX wc {
		sizeof(WNDCLASSEX),
		CS_CLASSDC,
		mvHandleMsg,
		0L,
		0L,
		GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr,
		_T(viewport.title.c_str()), nullptr
	};
	memcpy(&viewportData->wc, &wc, sizeof(viewportData->wc));

v-ein avatar Mar 21 '24 16:03 v-ein

Hi, @v-ein and @Ar4ikov

I've tried to generate DearPyGui for win32 above mentioned accordingly.
Now DearPyGui for win32 works well.

Windows10 32bit, Python 3.11
https://github.com/dinau/DearPyGui32 (win32 branch)

Binary install


If someone wants to install from binary whl file without build process,
download dearpygui-1.11.0-cp311-cp311-win32.whl, (for Windows10 32bit, Python 3.11) then

pip install dearpygui-1.11.0-cp311-cp311-win32.whl

Build steps


  1. Prerequisite

    pip install wheel
    
  2. Build

    git clone --recursive -b 1.11.0-1_win32 https://github.com/dinau/DearPyGui32
    cd DeerPyGui32
    build_win32.bat
    

dearpygui_win32

Thank you all developers.

dinau avatar May 13 '24 06:05 dinau