Author: dreimer
Date: Sun Sep 30 13:29:25 2007
New Revision: 29305
URL:
http://svn.reactos.org/svn/reactos?rev=29305&view=rev
Log:
Part II of Piere Schweitzer's Patch:
- Added French translation.
- Added the possibility to choose MingW directory.
- Added support for WinXP style.
- Added the support of C99.
- Fixed warnings.
Small Modification by me: added -s and went from -O3 to -O2 in Makefile.
Added:
trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc
trunk/tools/RosBE-Windows/Tools/config/options.exe.Manifest
Modified:
trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc
trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc
trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc
trunk/tools/RosBE-Windows/Tools/config/makefile
trunk/tools/RosBE-Windows/Tools/config/options.c
trunk/tools/RosBE-Windows/Tools/config/options.rc
trunk/tools/RosBE-Windows/Tools/config/resources.h
trunk/tools/RosBE-Windows/Tools/config/todo.txt
Modified: trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc (original)
+++ trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc Sun Sep 30 13:29:25 2007
@@ -1,6 +1,6 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
-ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 175
+ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 192
STYLE DS_MODALFRAME | DS_CENTER | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "RosBE Einstellungen"
FONT 8, "MS Shell Dlg"
@@ -15,6 +15,8 @@
CONTROL "Logs speichern", ID_SAVELOGS, "button", BS_AUTOCHECKBOX |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 85, 60, 21
EDITTEXT ID_LOGDIR, 10, 110, 200, 13, WS_TABSTOP
PUSHBUTTON "...", ID_BROWSE, 215, 110, 30, 13, WS_TABSTOP
- PUSHBUTTON "Speichern", ID_OK, 63, 138, 59, 26, WS_TABSTOP
- PUSHBUTTON "Abbrechen", ID_CANCEL, 133, 138, 59, 26, WS_TABSTOP
+ EDITTEXT ID_MGWDIR, 10, 127, 200, 13, WS_TABSTOP
+ PUSHBUTTON "...", ID_BROWSEMGW, 215, 127, 30, 13, WS_TABSTOP
+ PUSHBUTTON "Speichern", ID_OK, 63, 155, 59, 26, WS_TABSTOP
+ PUSHBUTTON "Abbrechen", ID_CANCEL, 133, 155, 59, 26, WS_TABSTOP
}
Modified: trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc (original)
+++ trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc Sun Sep 30 13:29:25 2007
@@ -1,6 +1,6 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 175
+ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 192
STYLE DS_MODALFRAME | DS_CENTER | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "RosBE Settings"
FONT 8, "MS Shell Dlg"
@@ -15,6 +15,8 @@
CONTROL "Save Logs", ID_SAVELOGS, "button", BS_AUTOCHECKBOX |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 85, 60, 21
EDITTEXT ID_LOGDIR, 10, 110, 200, 13, WS_TABSTOP
PUSHBUTTON "...", ID_BROWSE, 215, 110, 30, 13, WS_TABSTOP
- PUSHBUTTON "Save", ID_OK, 63, 138, 59, 26, WS_TABSTOP
- PUSHBUTTON "Cancel", ID_CANCEL, 133, 138, 59, 26, WS_TABSTOP
+ EDITTEXT ID_MGWDIR, 10, 127, 200, 13, WS_TABSTOP
+ PUSHBUTTON "...", ID_BROWSEMGW, 215, 127, 30, 13, WS_TABSTOP
+ PUSHBUTTON "Save", ID_OK, 63, 155, 59, 26, WS_TABSTOP
+ PUSHBUTTON "Cancel", ID_CANCEL, 133, 155, 59, 26, WS_TABSTOP
}
Added: trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc (added)
+++ trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc Sun Sep 30 13:29:25 2007
@@ -1,0 +1,22 @@
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 192
+STYLE DS_MODALFRAME | DS_CENTER | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Paramètre du RosBE"
+FONT 8, "MS Shell Dlg"
+{
+ // x, pos_hight, width, hight
+ LTEXT "Paramètres de l'Environnement de Compilation de ReactOS", 0x0, 10,
10, 140, 13
+ LTEXT "Couleur d'arrière plan", 0x0, 10, 35, 60, 12
+ COMBOBOX IDC_FONT, 100, 35, 110, 100, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL |
CBS_DROPDOWNLIST
+ LTEXT "Couleur de la police", 0x0, 10, 60, 60, 12
+ COMBOBOX IDC_BACK, 100, 60, 110, 100, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL |
CBS_DROPDOWNLIST
+ CONTROL "Montrer le temps de compilation", ID_SHOWBUILDTIME,
"button", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 85, 90, 21
+ CONTROL "Sauvegarder le journal", ID_SAVELOGS, "button",
BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 85, 60, 21
+ EDITTEXT ID_LOGDIR, 10, 110, 200, 13, WS_TABSTOP
+ PUSHBUTTON "...", ID_BROWSE, 215, 110, 30, 13, WS_TABSTOP
+ EDITTEXT ID_MGWDIR, 10, 127, 200, 13, WS_TABSTOP
+ PUSHBUTTON "...", ID_BROWSEMGW, 215, 127, 30, 13, WS_TABSTOP
+ PUSHBUTTON "Sauvegarder", ID_OK, 63, 155, 59, 26, WS_TABSTOP
+ PUSHBUTTON "Annuler", ID_CANCEL, 133, 155, 59, 26, WS_TABSTOP
+}
Modified: trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc (original)
+++ trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc Sun Sep 30 13:29:25 2007
@@ -1,6 +1,6 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 175
+ID_DIALOG DIALOGEX DISCARDABLE 0, 0, 255, 192
STYLE DS_MODALFRAME | DS_CENTER | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Óñòàíîâêè RosBE"
FONT 8, "MS Shell Dlg"
@@ -15,6 +15,8 @@
CONTROL "Âåñòè Ëîãè", ID_SAVELOGS, "button", BS_AUTOCHECKBOX |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 85, 60, 21
EDITTEXT ID_LOGDIR, 10, 110, 200, 13, WS_TABSTOP
PUSHBUTTON "...", ID_BROWSE, 215, 110, 30, 13, WS_TABSTOP
- PUSHBUTTON "Ñîõðàíèòü", ID_OK, 63, 138, 59, 26, WS_TABSTOP
- PUSHBUTTON "Îòìåíèòü", ID_CANCEL, 133, 138, 59, 26, WS_TABSTOP
+ EDITTEXT ID_MGWDIR, 10, 127, 200, 13, WS_TABSTOP
+ PUSHBUTTON "...", ID_BROWSEMGW, 215, 127, 30, 13, WS_TABSTOP
+ PUSHBUTTON "Ñîõðàíèòü", ID_OK, 63, 155, 59, 26, WS_TABSTOP
+ PUSHBUTTON "Îòìåíèòü", ID_CANCEL, 133, 155, 59, 26, WS_TABSTOP
}
Modified: trunk/tools/RosBE-Windows/Tools/config/makefile
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/m…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/makefile (original)
+++ trunk/tools/RosBE-Windows/Tools/config/makefile Sun Sep 30 13:29:25 2007
@@ -5,8 +5,8 @@
all: $(TARGET)
CPP=mingw32-gcc
-CFLAGS := -DWIN32 -DUNICODE -O3
-LFLAGS := -mwindows
+CFLAGS := -DWIN32 -DUNICODE -O2 -std=c99
+LFLAGS := -mwindows -s
LIBS :=
SRCS := options.c
Modified: trunk/tools/RosBE-Windows/Tools/config/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/options.c (original)
+++ trunk/tools/RosBE-Windows/Tools/config/options.c Sun Sep 30 13:29:25 2007
@@ -2,6 +2,7 @@
* RosBE Options Dialog (options.c)
*
* Copyright 2007 by Maarten Bosma
+ * Pierre Schweitzer
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -21,7 +22,10 @@
#include <windows.h>
#include <stdio.h>
#include <shlobj.h>
+#include <wchar.h>
#include "resources.h"
+
+#define MINGWVERSION L"\\4.1.3"
// note: do not change the order - theses are the color under winxp they might differ in
another OSes
WCHAR *Colors[] = { L"black", L"dark blue", L"green",
L"turquoise", L"dark red", L"purple",
@@ -31,18 +35,19 @@
HINSTANCE hInstance;
-int
+VOID
WriteSettings(HWND hwnd)
{
int foreground, background;
BOOL showtime, writelog;
- WCHAR logpath[MAX_PATH];
+ WCHAR logpath[MAX_PATH], mingwpath[MAX_PATH];
showtime = SendMessage(GetDlgItem(hwnd, ID_SHOWBUILDTIME), BM_GETCHECK, 0, 0) ==
BST_CHECKED;
writelog = SendMessage(GetDlgItem(hwnd, ID_SAVELOGS), BM_GETCHECK, 0, 0) ==
BST_CHECKED;
foreground = SendMessage(GetDlgItem(hwnd, IDC_BACK), CB_GETCURSEL, 0, 0);
background = SendMessage(GetDlgItem(hwnd, IDC_FONT), CB_GETCURSEL, 0, 0);
GetDlgItemText(hwnd, ID_LOGDIR, logpath, MAX_PATH);
+ GetDlgItemText(hwnd, ID_MGWDIR, mingwpath, MAX_PATH);
FILE *pFile = fopen("options.cmd", "w");
@@ -51,6 +56,7 @@
fprintf(pFile, "set ROSBE_SHOWTIME=%d\n", showtime);
fprintf(pFile, "set ROSBE_WRITELOG=%d\n", writelog);
fprintf(pFile, "set ROSBE_LOGPATH=%S\n", logpath);
+ fprintf(pFile, "set ROSBE_MINGWPATH=%S\n", mingwpath);
fclose(pFile);
}
@@ -58,7 +64,7 @@
INT_PTR CALLBACK
DlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- int i = 0;
+ WCHAR defaultmingwpath[MAX_PATH];
static HICON hIcon;
switch (Msg)
@@ -74,13 +80,16 @@
if(hIcon)
SendMessage(Dlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
- for(i = 0; i < sizeof(Colors) / sizeof(char *); i++)
+ for(unsigned int i = 0; i < sizeof(Colors) / sizeof(char *); i++)
{
SendMessage(GetDlgItem(Dlg, IDC_BACK), CB_ADDSTRING, 0, (LPARAM)
(Colors[i]));
SendMessage(GetDlgItem(Dlg, IDC_FONT), CB_ADDSTRING, 0, (LPARAM)
(Colors[i]));
}
SendMessage(GetDlgItem(Dlg, IDC_BACK), CB_SETCURSEL, 0xA, 0);
SendMessage(GetDlgItem(Dlg, IDC_FONT), CB_SETCURSEL, 0, 0);
+ GetCurrentDirectory(MAX_PATH, defaultmingwpath);
+ wcscat(defaultmingwpath, MINGWVERSION);
+ SetDlgItemText(Dlg, ID_MGWDIR, defaultmingwpath);
EnableWindow(GetDlgItem(Dlg, ID_BROWSE), FALSE);
EnableWindow(GetDlgItem(Dlg, ID_LOGDIR), FALSE);
return TRUE;
@@ -100,12 +109,34 @@
else if (wParam == ID_BROWSE)
{
WCHAR Path[MAX_PATH];
- BROWSEINFO PathInfo = { 0 };
+ BROWSEINFO PathInfo;
+ ZeroMemory(&PathInfo, sizeof(BROWSEINFO));
PathInfo.hwndOwner = Dlg;
PathInfo.lpszTitle = L"Please choose a directory where the the logs
should be stored:";
LPITEMIDLIST pidl = SHBrowseForFolder(&PathInfo);
if (pidl && SHGetPathFromIDList(pidl, Path))
SetDlgItemText(Dlg, ID_LOGDIR, Path);
+ }
+ else if (wParam == ID_BROWSEMGW)
+ {
+ WCHAR MGWPath[MAX_PATH];
+ BROWSEINFO PathInfo;
+ ZeroMemory(&PathInfo, sizeof(BROWSEINFO));
+/* Fails with IShellFolder interface */
+#if 0
+ LPSHELLFOLDER psf = NULL;
+ HRESULT hr;
+ hr = SHGetDesktopFolder(&psf);
+ LPITEMIDLIST pidlRoot;
+ hr = psf->ParseDisplayName(NULL, NULL, defaultmingwpath, NULL,
&pidlRoot, NULL);
+ psf->Release();
+ PathInfo.pidlRoot = pidlRoot;
+#endif
+ PathInfo.hwndOwner = Dlg;
+ PathInfo.lpszTitle = L"Please choose the directory where MingW is
located:";
+ LPITEMIDLIST pidl = SHBrowseForFolder(&PathInfo);
+ if (pidl && SHGetPathFromIDList(pidl, MGWPath))
+ SetDlgItemText(Dlg, ID_MGWDIR, MGWPath);
}
else if (wParam == ID_SAVELOGS)
{
Added: trunk/tools/RosBE-Windows/Tools/config/options.exe.Manifest
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/options.exe.Manifest (added)
+++ trunk/tools/RosBE-Windows/Tools/config/options.exe.Manifest Sun Sep 30 13:29:25 2007
@@ -1,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
+<assemblyIdentity
+ name="ReactOS.options"
+ processorArchitecture="x86"
+ version="1.1.0.0"
+ type="win32"/>
+<description>Config Tool</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="x86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly>
Modified: trunk/tools/RosBE-Windows/Tools/config/options.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/options.rc (original)
+++ trunk/tools/RosBE-Windows/Tools/config/options.rc Sun Sep 30 13:29:25 2007
@@ -3,9 +3,11 @@
ID_OPTICON ICON "reactos.ico"
+1 24 "options.exe.Manifest"
+
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,0
- PRODUCTVERSION 1,0,0,0
+ FILEVERSION 1,1,0,0
+ PRODUCTVERSION 1,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -20,14 +22,14 @@
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "CompanyName", "Marteen Bosma / Daniel Reimer\0"
+ VALUE "CompanyName", "Marteen Bosma / Daniel Reimer / Pierre
Schweitzer\0"
VALUE "FileDescription", "Config Tool for RosBE\0"
- VALUE "FileVersion", "1.0.0.0\0"
+ VALUE "FileVersion", "1.1.0.0\0"
VALUE "InternalName", "options\0"
VALUE "LegalCopyright", "Copyright © Daniel Reimer
2007\0"
VALUE "OriginalFilename", "options.exe\0"
VALUE "ProductName", "Config Tool for RosBE\0"
- VALUE "ProductVersion", "1.0.0.0\0"
+ VALUE "ProductVersion", "1.1.0.0\0"
END
END
BLOCK "VarFileInfo"
@@ -36,6 +38,7 @@
END
END
+#include "lang/de-DE.rc"
#include "lang/en-US.rc"
-#include "lang/de-DE.rc"
+#include "lang/fr-FR.rc"
#include "lang/ru-RU.rc"
Modified: trunk/tools/RosBE-Windows/Tools/config/resources.h
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/r…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/resources.h (original)
+++ trunk/tools/RosBE-Windows/Tools/config/resources.h Sun Sep 30 13:29:25 2007
@@ -8,3 +8,5 @@
#define ID_SHOWBUILDTIME 0x6
#define ID_LOGDIR 0x7
#define ID_BROWSE 0x7
+#define ID_MGWDIR 0x8
+#define ID_BROWSEMGW 0x9
Modified: trunk/tools/RosBE-Windows/Tools/config/todo.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/t…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/config/todo.txt (original)
+++ trunk/tools/RosBE-Windows/Tools/config/todo.txt Sun Sep 30 13:29:25 2007
@@ -2,6 +2,5 @@
- Load old settings
- Disable Save button if there are no changes
- Check validity of log path before saving
-- Use styled controls (uxtheme) for dialog
- Find out how to disable ... button
- Font preview