mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:52:57 +00:00
winecfg: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
01a2b9c628
commit
fe9799314b
|
@ -2,6 +2,8 @@ MODULE = winecfg.exe
|
||||||
APPMODE = -mwindows
|
APPMODE = -mwindows
|
||||||
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32
|
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32
|
||||||
|
|
||||||
|
EXTRADLLFLAGS = -mno-cygwin
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
about.c \
|
about.c \
|
||||||
appdefaults.c \
|
appdefaults.c \
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "winecfg.h"
|
#include "winecfg.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
@ -337,7 +336,7 @@ static void on_add_app_click(HWND dialog)
|
||||||
ARRAY_SIZE(selectExecutableStr));
|
ARRAY_SIZE(selectExecutableStr));
|
||||||
LoadStringW (GetModuleHandleW(NULL), IDS_EXECUTABLE_FILTER, programsFilter,
|
LoadStringW (GetModuleHandleW(NULL), IDS_EXECUTABLE_FILTER, programsFilter,
|
||||||
ARRAY_SIZE(programsFilter));
|
ARRAY_SIZE(programsFilter));
|
||||||
snprintfW( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
|
swprintf( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
|
||||||
|
|
||||||
ofn.lpstrTitle = selectExecutableStr;
|
ofn.lpstrTitle = selectExecutableStr;
|
||||||
ofn.lpstrFilter = filter;
|
ofn.lpstrFilter = filter;
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NONAMELESSUNION
|
#define NONAMELESSUNION
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -319,7 +316,7 @@ static void initAudioDlg (HWND hDlg)
|
||||||
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETITEMDATA,
|
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETITEMDATA,
|
||||||
i + 1, (LPARAM)&render_devs[i]);
|
i + 1, (LPARAM)&render_devs[i]);
|
||||||
|
|
||||||
if(reg_out_dev && !lstrcmpW(render_devs[i].id, reg_out_dev)){
|
if(reg_out_dev && !wcscmp(render_devs[i].id, reg_out_dev)){
|
||||||
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
|
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
|
||||||
SendDlgItemMessageW(hDlg, IDC_SPEAKERCONFIG_SPEAKERS, CB_SETCURSEL, render_devs[i].speaker_config, 0);
|
SendDlgItemMessageW(hDlg, IDC_SPEAKERCONFIG_SPEAKERS, CB_SETCURSEL, render_devs[i].speaker_config, 0);
|
||||||
}
|
}
|
||||||
|
@ -328,7 +325,7 @@ static void initAudioDlg (HWND hDlg)
|
||||||
0, (LPARAM)render_devs[i].name.pwszVal);
|
0, (LPARAM)render_devs[i].name.pwszVal);
|
||||||
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETITEMDATA,
|
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETITEMDATA,
|
||||||
i + 1, (LPARAM)&render_devs[i]);
|
i + 1, (LPARAM)&render_devs[i]);
|
||||||
if(reg_vout_dev && !lstrcmpW(render_devs[i].id, reg_vout_dev))
|
if(reg_vout_dev && !wcscmp(render_devs[i].id, reg_vout_dev))
|
||||||
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
|
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
|
||||||
|
|
||||||
lvitem.mask = LVIF_TEXT | LVIF_PARAM;
|
lvitem.mask = LVIF_TEXT | LVIF_PARAM;
|
||||||
|
@ -360,14 +357,14 @@ static void initAudioDlg (HWND hDlg)
|
||||||
0, (LPARAM)capture_devs[i].name.pwszVal);
|
0, (LPARAM)capture_devs[i].name.pwszVal);
|
||||||
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETITEMDATA,
|
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETITEMDATA,
|
||||||
i + 1, (LPARAM)&capture_devs[i]);
|
i + 1, (LPARAM)&capture_devs[i]);
|
||||||
if(reg_in_dev && !lstrcmpW(capture_devs[i].id, reg_in_dev))
|
if(reg_in_dev && !wcscmp(capture_devs[i].id, reg_in_dev))
|
||||||
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETCURSEL, i + 1, 0);
|
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETCURSEL, i + 1, 0);
|
||||||
|
|
||||||
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_ADDSTRING,
|
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_ADDSTRING,
|
||||||
0, (LPARAM)capture_devs[i].name.pwszVal);
|
0, (LPARAM)capture_devs[i].name.pwszVal);
|
||||||
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETITEMDATA,
|
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETITEMDATA,
|
||||||
i + 1, (LPARAM)&capture_devs[i]);
|
i + 1, (LPARAM)&capture_devs[i]);
|
||||||
if(reg_vin_dev && !lstrcmpW(capture_devs[i].id, reg_vin_dev))
|
if(reg_vin_dev && !wcscmp(capture_devs[i].id, reg_vin_dev))
|
||||||
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETCURSEL, i + 1, 0);
|
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETCURSEL, i + 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
||||||
#include <wine/unicode.h>
|
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
|
|
||||||
#include "winecfg.h"
|
#include "winecfg.h"
|
||||||
|
|
|
@ -20,26 +20,16 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#include <wine/debug.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_SYS_STAT_H
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "winecfg.h"
|
#include "winecfg.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
|
||||||
|
|
||||||
|
@ -197,7 +187,7 @@ static DWORD mode_to_id(enum dllmode mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* helper for is_builtin_only */
|
/* helper for is_builtin_only */
|
||||||
static int compare_dll( const void *ptr1, const void *ptr2 )
|
static int __cdecl compare_dll( const void *ptr1, const void *ptr2 )
|
||||||
{
|
{
|
||||||
const char * const *name1 = ptr1;
|
const char * const *name1 = ptr1;
|
||||||
const char * const *name2 = ptr2;
|
const char * const *name2 = ptr2;
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -39,7 +36,6 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
#include <wine/unicode.h>
|
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "winecfg.h"
|
#include "winecfg.h"
|
||||||
|
@ -744,13 +740,13 @@ static void init_shell_folder_listview_headers(HWND dialog) {
|
||||||
|
|
||||||
listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||||
listColumn.pszText = szShellFolder;
|
listColumn.pszText = szShellFolder;
|
||||||
listColumn.cchTextMax = strlenW(listColumn.pszText);
|
listColumn.cchTextMax = lstrlenW(listColumn.pszText);
|
||||||
listColumn.cx = width;
|
listColumn.cx = width;
|
||||||
|
|
||||||
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 0, (LPARAM) &listColumn);
|
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 0, (LPARAM) &listColumn);
|
||||||
|
|
||||||
listColumn.pszText = szLinksTo;
|
listColumn.pszText = szLinksTo;
|
||||||
listColumn.cchTextMax = strlenW(listColumn.pszText);
|
listColumn.cchTextMax = lstrlenW(listColumn.pszText);
|
||||||
listColumn.cx = viewRect.right - viewRect.left - width - 1;
|
listColumn.cx = viewRect.right - viewRect.left - width - 1;
|
||||||
|
|
||||||
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 1, (LPARAM) &listColumn);
|
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 1, (LPARAM) &listColumn);
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winreg.h>
|
#include <winreg.h>
|
||||||
#include <wine/unicode.h>
|
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
#include <wine/list.h>
|
#include <wine/list.h>
|
||||||
|
|
||||||
|
@ -623,7 +622,7 @@ static void process_setting(struct setting *s)
|
||||||
static const WCHAR softwareW[] = {'S','o','f','t','w','a','r','e','\\'};
|
static const WCHAR softwareW[] = {'S','o','f','t','w','a','r','e','\\'};
|
||||||
HKEY key;
|
HKEY key;
|
||||||
BOOL needs_wow64 = (is_win64 && s->root == HKEY_LOCAL_MACHINE && s->path &&
|
BOOL needs_wow64 = (is_win64 && s->root == HKEY_LOCAL_MACHINE && s->path &&
|
||||||
!strncmpiW(s->path, softwareW, ARRAY_SIZE(softwareW)));
|
!wcsnicmp(s->path, softwareW, ARRAY_SIZE(softwareW)));
|
||||||
|
|
||||||
if (s->value)
|
if (s->value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wine/unicode.h>
|
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
@ -78,7 +77,7 @@ static void update_gui_for_desktop_mode(HWND dialog)
|
||||||
updating_ui = TRUE;
|
updating_ui = TRUE;
|
||||||
|
|
||||||
buf = get_reg_keyW(config_key, explorer_desktopsW, desktop_name, NULL);
|
buf = get_reg_keyW(config_key, explorer_desktopsW, desktop_name, NULL);
|
||||||
if (buf && (bufindex = strchrW(buf, 'x')))
|
if (buf && (bufindex = wcschr(buf, 'x')))
|
||||||
{
|
{
|
||||||
*bufindex++ = 0;
|
*bufindex++ = 0;
|
||||||
|
|
||||||
|
@ -195,7 +194,7 @@ static void set_from_desktop_edits(HWND dialog)
|
||||||
HeapFree(GetProcessHeap(), 0, width);
|
HeapFree(GetProcessHeap(), 0, width);
|
||||||
width = strdupW(def_width);
|
width = strdupW(def_width);
|
||||||
}
|
}
|
||||||
else if (atoiW(width) < atoiW(min_width))
|
else if (wcstol(width, NULL, 10) < wcstol(min_width, NULL, 10))
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, width);
|
HeapFree(GetProcessHeap(), 0, width);
|
||||||
width = strdupW(min_width);
|
width = strdupW(min_width);
|
||||||
|
@ -204,16 +203,16 @@ static void set_from_desktop_edits(HWND dialog)
|
||||||
HeapFree(GetProcessHeap(), 0, height);
|
HeapFree(GetProcessHeap(), 0, height);
|
||||||
height = strdupW(def_height);
|
height = strdupW(def_height);
|
||||||
}
|
}
|
||||||
else if (atoiW(height) < atoiW(min_height))
|
else if (wcstol(height, NULL, 10) < wcstol(min_height, NULL, 10))
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, height);
|
HeapFree(GetProcessHeap(), 0, height);
|
||||||
height = strdupW(min_height);
|
height = strdupW(min_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
new = HeapAlloc(GetProcessHeap(), 0, (strlenW(width) + strlenW(height) + 2) * sizeof(WCHAR));
|
new = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(width) + lstrlenW(height) + 2) * sizeof(WCHAR));
|
||||||
strcpyW( new, width );
|
lstrcpyW( new, width );
|
||||||
strcatW( new, x );
|
lstrcatW( new, x );
|
||||||
strcatW( new, height );
|
lstrcatW( new, height );
|
||||||
set_reg_keyW(config_key, explorer_desktopsW, desktop_name, new);
|
set_reg_keyW(config_key, explorer_desktopsW, desktop_name, new);
|
||||||
set_reg_keyW(config_key, keypathW(explorerW), desktopW, desktop_name);
|
set_reg_keyW(config_key, keypathW(explorerW), desktopW, desktop_name);
|
||||||
|
|
||||||
|
@ -360,8 +359,8 @@ static void update_font_preview(HWND hDlg)
|
||||||
|
|
||||||
GetObjectW(hfont, sizeof(lf), &lf);
|
GetObjectW(hfont, sizeof(lf), &lf);
|
||||||
|
|
||||||
if (strcmpW(lf.lfFaceName, tahomaW) != 0)
|
if (wcscmp(lf.lfFaceName, tahomaW) != 0)
|
||||||
strcpyW(lf.lfFaceName, tahomaW);
|
lstrcpyW(lf.lfFaceName, tahomaW);
|
||||||
else
|
else
|
||||||
DeleteObject(hfont);
|
DeleteObject(hfont);
|
||||||
lf.lfHeight = MulDiv(-10, dpi, 72);
|
lf.lfHeight = MulDiv(-10, dpi, 72);
|
||||||
|
|
Loading…
Reference in a new issue