hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
12.62k stars 669 forks source link

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

Open Ar4ikov opened 3 months ago

Ar4ikov commented 3 months ago

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

v-ein commented 3 months ago

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.

Ar4ikov commented 3 months ago

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

v-ein commented 3 months ago

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.

Ar4ikov commented 3 months ago

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.

v-ein commented 3 months ago

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));
dinau commented 1 month ago

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.