lc-soft/LCUI

Add support for xp #234

Felixmaker posted onGitHub

would it be possible to support xp?


This is possible if VCPkg supports compilation of dependent libraries for Windows XP. Otherwise, you need to manually use the XP compilation toolchain to compile LCUI and its dependent libraries.

posted by lc-soft almost 4 years ago

I tried to build LCUI using /MT option, but it failed. Link error 2001 @_BrotliDecoderDecompress (freetype).

posted by Felixmaker almost 4 years ago

You need to link to the Brotli library because FreeType depends on it.

posted by lc-soft almost 4 years ago

Thank you! I have built the dll, but when I replace the dll in my project, the program run failed, it does not show in screen and needs to kill in the task manager. Have you met with this situation?

posted by Felixmaker almost 4 years ago

You didn't provide your build environment and build methods, so I couldn't give a solution.

Maybe you can run the program with debugging tools.

posted by lc-soft almost 4 years ago

Sorry, I use VS2019 and MSVC V142 (both are the latest version) to build LCUI.dll etc and use lcpkg to install all dependcies. The first time I built the program, the compiler can not include some header files. So I change those lines. In platform.h, before

#if defined(WINAPI_PARTITION_APP)
    #define LCUI_APP_H <LCUI/platform/windows/uwp.h>
#else
    #define LCUI_EVENTS_H <LCUI/platform/windows/windows_events.h>
    #define LCUI_MOUSE_H <LCUI/platform/windows/windows_mouse.h>
    #define LCUI_KEYBOARD_H <LCUI/platform/windows/windows_keyboard.h>
    #define LCUI_DISPLAY_H <LCUI/platform/windows/windows_display.h>
#endif

after

#define LCUI_EVENTS_H <LCUI/platform/windows/windows_events.h>
#define LCUI_MOUSE_H <LCUI/platform/windows/windows_mouse.h>
#define LCUI_KEYBOARD_H <LCUI/platform/windows/windows_keyboard.h>
#define LCUI_DISPLAY_H <LCUI/platform/windows/windows_display.h>

Then I built the program, but when I replace it in my project, it doesn't work.

posted by Felixmaker almost 4 years ago

I use VS2019 and MSVC V142 (both are the latest version) to build LCUI.dll etc

v142? Why not use v142_xp? You said you want to support windows XP, then you should use v142_xp.

In the solution configuration of LCUI, the platform toolset has selected v141_xp, you can switch to v142_xp, so you don't need to modify the platform.h file.

image

the program run failed, it does not show in screen and needs to kill in the task manager. ... Then I built the program, but when I replace it in my project, it doesn't work.

Are you using VS2019 to build your project? If so, please use vs2019 to debug it. The general steps are as follows:

  1. Add a breakpoint on the line of code below LCUI_Init(). image
  2. Click "Local windows debugger". image
  3. Check local variables. image
  4. Click "Continue". image
  5. If nothing is displayed, click โ€œBreak Allโ€. image
  6. Check Threads and Call stack. image
posted by lc-soft almost 4 years ago

Thank you! I switch to v141_xp toolchain and build the program successful. I checked my project, maybe when I test the program in XP, I forgot to move the .xml file at the same time, so the window do not show.

๐Ÿ‘ I have tested the program, it just works fine! ๐Ÿ‘

run in xp

PS: If we want to support XP, we need to disable the touch support first in config.h (maybe XP do not support touch!) and then use v141_xp toolchain to build.

posted by Felixmaker almost 4 years ago

It seems that the problem has been solved and this issue can be closed.

posted by lc-soft almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests