mirror of https://github.com/buggins/dlangui.git
fix Win32 build to avoid using version def Unicode
This commit is contained in:
parent
8eb65282eb
commit
13358200a8
|
@ -66,7 +66,7 @@
|
||||||
<debuglevel>0</debuglevel>
|
<debuglevel>0</debuglevel>
|
||||||
<debugids />
|
<debugids />
|
||||||
<versionlevel>0</versionlevel>
|
<versionlevel>0</versionlevel>
|
||||||
<versionids>Unicode</versionids>
|
<versionids />
|
||||||
<dump_source>0</dump_source>
|
<dump_source>0</dump_source>
|
||||||
<mapverbosity>0</mapverbosity>
|
<mapverbosity>0</mapverbosity>
|
||||||
<createImplib>1</createImplib>
|
<createImplib>1</createImplib>
|
||||||
|
|
3
dub.json
3
dub.json
|
@ -5,9 +5,6 @@
|
||||||
"license": "Boost",
|
"license": "Boost",
|
||||||
"authors": ["Vadim Lopatin"],
|
"authors": ["Vadim Lopatin"],
|
||||||
"targetType": "none",
|
"targetType": "none",
|
||||||
|
|
||||||
"versions": ["Unicode"],
|
|
||||||
|
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
"versions-windows": ["Unicode"],
|
"versions-windows": ["Unicode"],
|
||||||
|
|
|
@ -80,9 +80,6 @@
|
||||||
|
|
||||||
"libs-windows": ["dlanguilib", "phobos", "ole32", "kernel32", "user32", "comctl32", "comdlg32"],
|
"libs-windows": ["dlanguilib", "phobos", "ole32", "kernel32", "user32", "comctl32", "comdlg32"],
|
||||||
|
|
||||||
"versions": ["Unicode"],
|
|
||||||
|
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui:dlanguilib": "~master",
|
"dlangui:dlanguilib": "~master",
|
||||||
"derelict-sdl2": "~master",
|
"derelict-sdl2": "~master",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<debuglevel>0</debuglevel>
|
<debuglevel>0</debuglevel>
|
||||||
<debugids />
|
<debugids />
|
||||||
<versionlevel>0</versionlevel>
|
<versionlevel>0</versionlevel>
|
||||||
<versionids>Unicode</versionids>
|
<versionids />
|
||||||
<dump_source>0</dump_source>
|
<dump_source>0</dump_source>
|
||||||
<mapverbosity>3</mapverbosity>
|
<mapverbosity>3</mapverbosity>
|
||||||
<createImplib>0</createImplib>
|
<createImplib>0</createImplib>
|
||||||
|
|
|
@ -78,9 +78,6 @@
|
||||||
|
|
||||||
"libs-windows": ["dlanguilib", "phobos", "ole32", "kernel32", "user32", "comctl32", "comdlg32"],
|
"libs-windows": ["dlanguilib", "phobos", "ole32", "kernel32", "user32", "comctl32", "comdlg32"],
|
||||||
|
|
||||||
"versions": ["Unicode"],
|
|
||||||
|
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui:dlanguilib": "~master",
|
"dlangui:dlanguilib": "~master",
|
||||||
"derelict-gl3": "~master",
|
"derelict-gl3": "~master",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<debuglevel>0</debuglevel>
|
<debuglevel>0</debuglevel>
|
||||||
<debugids />
|
<debugids />
|
||||||
<versionlevel>0</versionlevel>
|
<versionlevel>0</versionlevel>
|
||||||
<versionids>Unicode USE_OPENGL USE_SDL</versionids>
|
<versionids />
|
||||||
<dump_source>0</dump_source>
|
<dump_source>0</dump_source>
|
||||||
<mapverbosity>3</mapverbosity>
|
<mapverbosity>3</mapverbosity>
|
||||||
<createImplib>0</createImplib>
|
<createImplib>0</createImplib>
|
||||||
|
|
|
@ -150,7 +150,7 @@ class Win32Window : Window {
|
||||||
ws |= WS_OVERLAPPED | WS_CAPTION | WS_CAPTION | WS_BORDER | WS_SYSMENU;
|
ws |= WS_OVERLAPPED | WS_CAPTION | WS_CAPTION | WS_BORDER | WS_SYSMENU;
|
||||||
//if (flags & WindowFlag.Fullscreen)
|
//if (flags & WindowFlag.Fullscreen)
|
||||||
// ws |= SDL_WINDOW_FULLSCREEN;
|
// ws |= SDL_WINDOW_FULLSCREEN;
|
||||||
_hwnd = CreateWindow(toUTF16z(WIN_CLASS_NAME), // window class name
|
_hwnd = CreateWindowW(toUTF16z(WIN_CLASS_NAME), // window class name
|
||||||
toUTF16z(windowCaption), // window caption
|
toUTF16z(windowCaption), // window caption
|
||||||
ws, // window style
|
ws, // window style
|
||||||
CW_USEDEFAULT, // initial x position
|
CW_USEDEFAULT, // initial x position
|
||||||
|
@ -611,7 +611,7 @@ class Win32Platform : Platform {
|
||||||
}
|
}
|
||||||
bool registerWndClass() {
|
bool registerWndClass() {
|
||||||
//MSG msg;
|
//MSG msg;
|
||||||
WNDCLASS wndclass;
|
WNDCLASSW wndclass;
|
||||||
|
|
||||||
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||||
wndclass.lpfnWndProc = &WndProc;
|
wndclass.lpfnWndProc = &WndProc;
|
||||||
|
@ -624,7 +624,7 @@ class Win32Platform : Platform {
|
||||||
wndclass.lpszMenuName = null;
|
wndclass.lpszMenuName = null;
|
||||||
wndclass.lpszClassName = toUTF16z(WIN_CLASS_NAME);
|
wndclass.lpszClassName = toUTF16z(WIN_CLASS_NAME);
|
||||||
|
|
||||||
if(!RegisterClass(&wndclass))
|
if(!RegisterClassW(&wndclass))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -696,7 +696,7 @@ class Win32Platform : Platform {
|
||||||
HGLOBAL hglb = GetClipboardData(CF_UNICODETEXT);
|
HGLOBAL hglb = GetClipboardData(CF_UNICODETEXT);
|
||||||
if (hglb != NULL)
|
if (hglb != NULL)
|
||||||
{
|
{
|
||||||
LPTSTR lptstr = cast(LPTSTR)GlobalLock(hglb);
|
LPWSTR lptstr = cast(LPWSTR)GlobalLock(hglb);
|
||||||
if (lptstr != NULL)
|
if (lptstr != NULL)
|
||||||
{
|
{
|
||||||
wstring w = fromWStringz(lptstr);
|
wstring w = fromWStringz(lptstr);
|
||||||
|
@ -726,7 +726,7 @@ class Win32Platform : Platform {
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LPTSTR lptstrCopy = cast(LPTSTR)GlobalLock(hglbCopy);
|
LPWSTR lptstrCopy = cast(LPWSTR)GlobalLock(hglbCopy);
|
||||||
for (int i = 0; i < w.length; i++) {
|
for (int i = 0; i < w.length; i++) {
|
||||||
lptstrCopy[i] = w[i];
|
lptstrCopy[i] = w[i];
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,7 @@ int DLANGUIWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||||
}
|
}
|
||||||
catch (Throwable e) // catch any uncaught exceptions
|
catch (Throwable e) // catch any uncaught exceptions
|
||||||
{
|
{
|
||||||
MessageBox(null, toUTF16z(e.toString()), "Error",
|
MessageBoxW(null, toUTF16z(e.toString()), "Error",
|
||||||
MB_OK | MB_ICONEXCLAMATION);
|
MB_OK | MB_ICONEXCLAMATION);
|
||||||
result = 0; // failed
|
result = 0; // failed
|
||||||
}
|
}
|
||||||
|
@ -945,7 +945,7 @@ LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
case WM_MOUSELEAVE:
|
case WM_MOUSELEAVE:
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
|
|
Loading…
Reference in New Issue