ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2007
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
380 discussions
Start a n
N
ew thread
[spetreolle] 26583: forgot this file
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Apr 30 01:32:27 2007 New Revision: 26583 URL:
http://svn.reactos.org/svn/reactos?rev=26583&view=rev
Log: forgot this file Modified: trunk/reactos/include/psdk/winnls.h Modified: trunk/reactos/include/psdk/winnls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnls.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/winnls.h (original) +++ trunk/reactos/include/psdk/winnls.h Mon Apr 30 01:32:27 2007 @@ -598,6 +598,8 @@ BOOL WINAPI SetLocaleInfoA(LCID,LCTYPE,LPCSTR); BOOL WINAPI SetLocaleInfoW(LCID,LCTYPE,LPCWSTR); BOOL WINAPI SetThreadLocale(LCID); +BOOL WINAPI SetUserDefaultLCID(LCID); +BOOL WINAPI SetUserDefaultUILanguage(LANGID); BOOL WINAPI SetUserGeoID(GEOID); int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); #if (WINVER >= 0x0500)
17 years, 9 months
1
0
0
0
[spetreolle] 26582: translate start menu & desktop links display 2nd stage install in system language original patch by Pierre Schweitzer
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Apr 30 01:29:41 2007 New Revision: 26582 URL:
http://svn.reactos.org/svn/reactos?rev=26582&view=rev
Log: translate start menu & desktop links display 2nd stage install in system language original patch by Pierre Schweitzer Modified: trunk/reactos/dll/win32/kernel32/kernel32.def trunk/reactos/dll/win32/kernel32/kernel32.rbuild trunk/reactos/dll/win32/kernel32/misc/lang.c trunk/reactos/dll/win32/syssetup/install.c trunk/reactos/dll/win32/syssetup/lang/cs-CZ.rc trunk/reactos/dll/win32/syssetup/lang/de-DE.rc trunk/reactos/dll/win32/syssetup/lang/en-US.rc trunk/reactos/dll/win32/syssetup/lang/es-ES.rc trunk/reactos/dll/win32/syssetup/lang/fr-FR.rc trunk/reactos/dll/win32/syssetup/lang/hu-HU.rc trunk/reactos/dll/win32/syssetup/lang/id-ID.rc trunk/reactos/dll/win32/syssetup/lang/it-IT.rc trunk/reactos/dll/win32/syssetup/lang/ja-JP.rc trunk/reactos/dll/win32/syssetup/lang/nb-NO.rc trunk/reactos/dll/win32/syssetup/lang/nl-NL.rc trunk/reactos/dll/win32/syssetup/lang/pl-PL.rc trunk/reactos/dll/win32/syssetup/lang/uk-UA.rc trunk/reactos/dll/win32/syssetup/resource.h trunk/reactos/dll/win32/syssetup/syssetup.rbuild Modified: trunk/reactos/dll/win32/kernel32/kernel32.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.def (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.def Mon Apr 30 01:29:41 2007 @@ -890,6 +890,8 @@ SetTimerQueueTimer@24 SetTimeZoneInformation@4 SetUnhandledExceptionFilter@4 +SetUserDefaultLCID@4 +SetUserDefaultUILanguage@4 SetUserGeoID@4 SetVDMCurrentDirectories@8 SetVolumeLabelA@8 Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.rbuild (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild Mon Apr 30 01:29:41 2007 @@ -1,4 +1,4 @@ -<module name="kernel32_base" type="objectlibrary"> +<module name="kernel32_base" type="objectlibrary" allowwarnings="true"> <include base="kernel32_base">.</include> <include base="kernel32_base">include</include> <include base="ReactOS">include/reactos/subsys</include> Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c Mon Apr 30 01:29:41 2007 @@ -1574,6 +1574,42 @@ /* + * @implemented + */ +BOOL STDCALL +SetUserDefaultLCID(LCID lcid) +{ + NTSTATUS Status; + + Status = NtSetDefaultLocale(TRUE, lcid); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return 0; + } + return 1; +} + + +/* + * @implemented + */ +BOOL STDCALL +SetUserDefaultUILanguage(LANGID LangId) +{ + NTSTATUS Status; + + Status = NtSetDefaultUILanguage(LangId); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return 0; + } + return 1; +} + + +/* * @unimplemented */ BOOL Modified: trunk/reactos/dll/win32/syssetup/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install…
============================================================================== --- trunk/reactos/dll/win32/syssetup/install.c (original) +++ trunk/reactos/dll/win32/syssetup/install.c Mon Apr 30 01:29:41 2007 @@ -49,6 +49,8 @@ #include "globals.h" #include "resource.h" +#include <debug.h> + DWORD WINAPI CMP_WaitNoPendingInstallEvents(DWORD dwTimeout); @@ -136,10 +138,11 @@ static BOOL -CreateShortcut(int csidl, LPCTSTR folder, LPCTSTR linkName, LPCTSTR command, UINT nIdTitle) +CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nIdTitle) { TCHAR path[MAX_PATH]; TCHAR title[256]; + TCHAR name[256]; LPTSTR p = path; if (!SHGetSpecialFolderPath(0, path, csidl, TRUE)) @@ -152,7 +155,10 @@ } p = PathAddBackslash(p); - _tcscpy(p, linkName); + + if(!LoadString(hDllInstance, nIdName, name, 256)) + return FALSE; + _tcscpy(p, name); if (!LoadString(hDllInstance, nIdTitle, title, 256)) return FALSE; @@ -524,50 +530,52 @@ } CoInitialize(NULL); + SetUserDefaultLCID(GetSystemDefaultLCID()); + SetThreadLocale(GetSystemDefaultLCID()); /* create desktop shortcuts */ - CreateShortcut(CSIDL_DESKTOP, NULL, _T("Command Prompt.lnk"), _T("cmd.exe"), IDS_CMT_CMD); + CreateShortcut(CSIDL_DESKTOP, NULL, IDS_SHORT_CMD, _T("cmd.exe"), IDS_CMT_CMD); /* create program startmenu shortcuts */ - CreateShortcut(CSIDL_PROGRAMS, NULL, _T("ReactOS Explorer.lnk"), _T("explorer.exe"), IDS_CMT_EXPLORER); + CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_EXPLORER, _T("explorer.exe"), IDS_CMT_EXPLORER); /* workaround to stop empty links for trunk builds */ if(GetSystemDirectory(szBuffer, MAX_PATH)) { _tcscpy(Path, szBuffer); if((_taccess(_tcscat(Path, _T("\\downloader.exe")), 0 )) != -1) - CreateShortcut(CSIDL_PROGRAMS, NULL, _T("Download !.lnk"), _T("downloader.exe"), IDS_CMT_DOWNLOADER); + CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_DOWNLOADER, _T("downloader.exe"), IDS_CMT_DOWNLOADER); _tcscpy(Path, szBuffer); if((_taccess(_tcscat(Path, _T("\\getfirefox.exe")), 0 )) != -1) - CreateShortcut(CSIDL_PROGRAMS, NULL, _T("Get Firefox.lnk"), _T("getfirefox.exe"), IDS_CMT_GETFIREFOX); + CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_FIREFOX, _T("getfirefox.exe"), IDS_CMT_GETFIREFOX); } /* create administritive tools startmenu shortcuts */ - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, _T("Service Manager.lnk"), _T("servman.exe"), IDS_CMT_SERVMAN); - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, _T("Device Manager.lnk"), _T("devmgmt.exe"), IDS_CMT_DEVMGMT); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_SERVICE, _T("servman.exe"), IDS_CMT_SERVMAN); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_DEVICE, _T("devmgmt.exe"), IDS_CMT_DEVMGMT); /* create and fill Accessories subfolder */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_ACCESSORIES, sAccessories, 256)) { - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Calculator.lnk"), _T("calc.exe"), IDS_CMT_CALC); - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Command Prompt.lnk"), _T("cmd.exe"), IDS_CMT_CMD); - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Notepad.lnk"), _T("notepad.exe"), IDS_CMT_NOTEPAD); - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT); - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("WordPad.lnk"), _T("wordpad.exe"), IDS_CMT_WORDPAD); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_CALC, _T("calc.exe"), IDS_CMT_CALC); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_CMD, _T("cmd.exe"), IDS_CMT_CMD); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_NOTEPAD, _T("notepad.exe"), IDS_CMT_NOTEPAD); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_REGEDIT, _T("regedit.exe"), IDS_CMT_REGEDIT); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_WORDPAD, _T("wordpad.exe"), IDS_CMT_WORDPAD); if(GetSystemDirectory(szBuffer, MAX_PATH)) { _tcscpy(Path, szBuffer); if((_taccess(_tcscat(Path, _T("\\screenshot.exe")), 0 )) != -1) - CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("SnapShot.lnk"), _T("screenshot.exe"), IDS_CMT_SCREENSHOT); + CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_SNAP, _T("screenshot.exe"), IDS_CMT_SCREENSHOT); } } /* create Games subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256)) { - CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); - CreateShortcut(CSIDL_PROGRAMS, sGames, _T("WineMine.lnk"), _T("winemine.exe"), IDS_CMT_WINEMINE); + CreateShortcut(CSIDL_PROGRAMS, sGames, IDS_SHORT_SOLITAIRE, _T("sol.exe"), IDS_CMT_SOLITAIRE); + CreateShortcut(CSIDL_PROGRAMS, sGames, IDS_SHORT_WINEMINE, _T("winemine.exe"), IDS_CMT_WINEMINE); } CoUninitialize(); Modified: trunk/reactos/dll/win32/syssetup/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/cs…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/cs-CZ.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/cs-CZ.rc Mon Apr 30 01:29:41 2007 @@ -194,4 +194,20 @@ IDS_CMT_WINEMINE "WineMine" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/de…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/de-DE.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/de-DE.rc Mon Apr 30 01:29:41 2007 @@ -219,4 +219,20 @@ IDS_REASON_UNKNOWN "Grund unbekannt" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/en…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/en-US.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/en-US.rc Mon Apr 30 01:29:41 2007 @@ -220,4 +220,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/es…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/es-ES.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/es-ES.rc Mon Apr 30 01:29:41 2007 @@ -200,4 +200,20 @@ IDS_PROCESSSUBTITLE "Process page subtitle" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/fr…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/fr-FR.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/fr-FR.rc Mon Apr 30 01:29:41 2007 @@ -18,7 +18,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 @@ -220,4 +220,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Invite de commandes.lnk" + IDS_SHORT_EXPLORER "Explorateur ReactOS.lnk" + IDS_SHORT_DOWNLOADER "Télécharger !.lnk" + IDS_SHORT_FIREFOX "Rélécharger FireFox.lnk" + IDS_SHORT_SERVICE "Gestionnaire de services.lnk" + IDS_SHORT_DEVICE "Gestionnaire de périphériques.lnk" + IDS_SHORT_CALC "Calculatrice.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "Capture d'écran.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/hu…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/hu-HU.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/hu-HU.rc Mon Apr 30 01:29:41 2007 @@ -227,4 +227,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/id…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/id-ID.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/id-ID.rc Mon Apr 30 01:29:41 2007 @@ -1,221 +1,237 @@ -/* - * Copyright (C) 2007 Zaenal Mutaqin (Indonesian translation) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT - -IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "This wizard installs ReactOS on your computer. The wizard "\ - "needs to gather some information about you and your computer "\ - "to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 - LTEXT "Click Next to continue with Setup.", IDC_STATIC, 115, 169, 195, 17 -END - - -IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, "\ - "(parts of) which were used to create ReactOS:", - IDC_STATIC,15,7,286,19 - LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute "\ - "(parts of) it you must respect the GPL", - IDC_STATIC,15,110,227,19 - PUSHBUTTON "&View GPL...",IDC_VIEWGPL,251,110,50,19 - LTEXT "Click Next to continue with Setup.",IDC_STATIC,15,136, - 195,17 -END - - -IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Type your full name and the name of your company or organization.", - IDC_STATIC, 54, 7, 242, 21 - LTEXT "Na&me:", IDC_STATIC, 54, 37, 44, 8 - EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&Organization:", IDC_STATIC, 54, 57, 44, 8 - EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL -END - - -IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Type a name for your computer that is 63 characters or less. "\ - "If you are on a network, your computer name must be unique.", - IDC_STATIC, 54, 7, 250, 24 - LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE - LTEXT "Setup will create a user account on your computer called Administrator. "\ - "You can use this account if you need full access to your computer.", - IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 14 characters or less.", - IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD -END - - -IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Setup ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Lokal sistem harus sama bahasa dari aplikasi "\ - "yang ingin anda gunakan. Pengguna lokal mengontrol bagaimana "\ - "angka, kurs, dan tampilan tanggal.", IDC_STATIC, 53, 7, 253, 20 - LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 - LTEXT "Untuk mengubah sistem atau setelan lokal pengguna, klik Kustomisasi.", - IDC_STATIC, 53, 60, 184, 8 - PUSHBUTTON "&Kustomisasi...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 - LTEXT "Tata letak keyboard mengontrol karakter yang muncul ketika anda ketik.", - IDC_STATIC, 53, 86, 253, 8 - LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 - LTEXT "Untuk mengubah tata letak keyboard, klik Kustomisasi.", - IDC_STATIC, 53, 126, 184, 8 - PUSHBUTTON "K&ustomisasi...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14 -END - - -IDD_DATETIMEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Setup ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Tanggal dan Jam", IDC_STATIC, 53, 7, 253, 8 - CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", - DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 - CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", - DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 - LTEXT "Zonawaktu", IDC_STATIC, 53, 42, 253, 8 - COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, - CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - AUTOCHECKBOX "Otomatis menyesuaikan waktu atas perubahan &daylight saving", - IDC_AUTODAYLIGHT, 53, 124, 201, 10 -END - - -IDD_PROCESSPAGE DIALOG 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Setup ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 - LTEXT "", IDC_ITEM, 53, 29, 253, 20 - CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", - PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 -END - - -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Menyelesaikan Setup ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Menyelesaikan Bimbingan Setup ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Anda telah sukses menyelesaikan Setup ReactOS.\n\n" \ - "Saat anda mengklik Selesai, komputer anda akan dimulai lagi.", IDC_STATIC, 115, 40, 195, 100 - CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Jika ada CD di dalam drive, keluarkan. Lalu, untuk memulai lagi "\ - "komputer anda, klik Selesai.", IDC_STATIC, 115, 169, 195, 17 -END - - -IDD_GPL DIALOG 0, 0, 333, 230 -STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "GNU General Public License" -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_GPL_TEXT,7,7,319,190,ES_MULTILINE | ES_AUTOHSCROLL | - ES_READONLY | WS_VSCROLL - DEFPUSHBUTTON "OK",IDOK,141,209,50,14 -END - - -STRINGTABLE -BEGIN - IDS_ACKTITLE "Pengakuan" - IDS_ACKSUBTITLE "Tempat berdisi ReactOS dan informasi lisensi" - IDS_OWNERTITLE "Personalisai Software anda" - IDS_OWNERSUBTITLE "Setup menggunakan informasi ini mengenai diri anda untuk mempersonalisasi ReactOS." - IDS_COMPUTERTITLE "Nama Komputer dan Kata sandi Administrator" - IDS_COMPUTERSUBTITLE "Anda harus menyediakan nama dan Kata sandi Administrator untuk komputer anda." - IDS_LOCALETITLE "Setelan Regional" - IDS_LOCALESUBTITLE "Anda bisa mengkustomisasi ReactOS untuk regional dan bahasa berbeda." - IDS_DATETIMETITLE "Tanggal dan Jam" - IDS_DATETIMESUBTITLE "Setel tanggal dan jam yang benar untuk komputer anda." - IDS_PROCESSTITLE "Judul halaman proses" - IDS_PROCESSSUBTITLE "Subjudul halaman proses" -END - -STRINGTABLE -BEGIN - IDS_CMT_WINEFILE "Jalankan Winefile" - IDS_CMT_IBROWSER "Jalankan iBrowser" - IDS_CMT_GETFIREFOX "Download/instalasi Firefox" - IDS_CMT_DOWNLOADER "Download dan instalasi berbagai aplikasi" -END - -STRINGTABLE -BEGIN - IDS_ACCESSORIES "Aksesoris" - IDS_CMT_CALC "Jalankan Kalkulator" - IDS_CMT_CMD "Buka prompt perintah" - IDS_CMT_EXPLORER "Jalankan Explorer" - IDS_CMT_NOTEPAD "Jalankan Editor Teks" - IDS_CMT_REGEDIT "Jalankan Editor Registri" - IDS_CMT_WORDPAD "Jalankan Editor Dokumen" - IDS_CMT_SCREENSHOT "Ambil foto layar" -END - -STRINGTABLE -BEGIN - IDS_GAMES "Games" - IDS_CMT_SOLITAIRE "Solitaire" - IDS_CMT_WINEMINE "WineMine" -END - -STRINGTABLE -BEGIN - IDS_REACTOS_SETUP "Setup ReactOS" - IDS_UNKNOWN_ERROR "Kesalahan tidak dikenal" - IDS_REGISTERING_COMPONENTS "Meregister komponen..." - IDS_LOADLIBRARY_FAILED "LoadLibrary gagal: " - IDS_GETPROCADDR_FAILED "GetProcAddr gagal: " - IDS_REGSVR_FAILED "DllRegisterServer gagal: " - IDS_DLLINSTALL_FAILED "DllInstall gagal: " - IDS_TIMEOUT "Kehabisan waktu selama registrasi" - IDS_REASON_UNKNOWN "" -END - -/* EOF */ +/* + * Copyright (C) 2007 Zaenal Mutaqin (Indonesian translation) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT + +IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Setup" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 + LTEXT "This wizard installs ReactOS on your computer. The wizard "\ + "needs to gather some information about you and your computer "\ + "to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Click Next to continue with Setup.", IDC_STATIC, 115, 169, 195, 17 +END + + +IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Setup" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, "\ + "(parts of) which were used to create ReactOS:", + IDC_STATIC,15,7,286,19 + LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | + LBS_NOINTEGRALHEIGHT | WS_VSCROLL + LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute "\ + "(parts of) it you must respect the GPL", + IDC_STATIC,15,110,227,19 + PUSHBUTTON "&View GPL...",IDC_VIEWGPL,251,110,50,19 + LTEXT "Click Next to continue with Setup.",IDC_STATIC,15,136, + 195,17 +END + + +IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Setup" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Type your full name and the name of your company or organization.", + IDC_STATIC, 54, 7, 242, 21 + LTEXT "Na&me:", IDC_STATIC, 54, 37, 44, 8 + EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL + LTEXT "&Organization:", IDC_STATIC, 54, 57, 44, 8 + EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL +END + + +IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Setup" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Type a name for your computer that is 63 characters or less. "\ + "If you are on a network, your computer name must be unique.", + IDC_STATIC, 54, 7, 250, 24 + LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Setup will create a user account on your computer called Administrator. "\ + "You can use this account if you need full access to your computer.", + IDC_STATIC, 54, 57, 250, 25 + LTEXT "Type an Administrator Password that is 14 characters or less.", + IDC_STATIC, 54, 87, 250, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD +END + + +IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Setup ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Lokal sistem harus sama bahasa dari aplikasi "\ + "yang ingin anda gunakan. Pengguna lokal mengontrol bagaimana "\ + "angka, kurs, dan tampilan tanggal.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 + LTEXT "Untuk mengubah sistem atau setelan lokal pengguna, klik Kustomisasi.", + IDC_STATIC, 53, 60, 184, 8 + PUSHBUTTON "&Kustomisasi...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 + LTEXT "Tata letak keyboard mengontrol karakter yang muncul ketika anda ketik.", + IDC_STATIC, 53, 86, 253, 8 + LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 + LTEXT "Untuk mengubah tata letak keyboard, klik Kustomisasi.", + IDC_STATIC, 53, 126, 184, 8 + PUSHBUTTON "K&ustomisasi...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14 +END + + +IDD_DATETIMEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Setup ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Tanggal dan Jam", IDC_STATIC, 53, 7, 253, 8 + CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", + DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 + CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", + DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 + LTEXT "Zonawaktu", IDC_STATIC, 53, 42, 253, 8 + COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, + CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL + AUTOCHECKBOX "Otomatis menyesuaikan waktu atas perubahan &daylight saving", + IDC_AUTODAYLIGHT, 53, 124, 201, 10 +END + + +IDD_PROCESSPAGE DIALOG 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Setup ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 + CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", + PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 +END + + +IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Menyelesaikan Setup ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Menyelesaikan Bimbingan Setup ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "Anda telah sukses menyelesaikan Setup ReactOS.\n\n" \ + "Saat anda mengklik Selesai, komputer anda akan dimulai lagi.", IDC_STATIC, 115, 40, 195, 100 + CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 + LTEXT "Jika ada CD di dalam drive, keluarkan. Lalu, untuk memulai lagi "\ + "komputer anda, klik Selesai.", IDC_STATIC, 115, 169, 195, 17 +END + + +IDD_GPL DIALOG 0, 0, 333, 230 +STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "GNU General Public License" +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_GPL_TEXT,7,7,319,190,ES_MULTILINE | ES_AUTOHSCROLL | + ES_READONLY | WS_VSCROLL + DEFPUSHBUTTON "OK",IDOK,141,209,50,14 +END + + +STRINGTABLE +BEGIN + IDS_ACKTITLE "Pengakuan" + IDS_ACKSUBTITLE "Tempat berdisi ReactOS dan informasi lisensi" + IDS_OWNERTITLE "Personalisai Software anda" + IDS_OWNERSUBTITLE "Setup menggunakan informasi ini mengenai diri anda untuk mempersonalisasi ReactOS." + IDS_COMPUTERTITLE "Nama Komputer dan Kata sandi Administrator" + IDS_COMPUTERSUBTITLE "Anda harus menyediakan nama dan Kata sandi Administrator untuk komputer anda." + IDS_LOCALETITLE "Setelan Regional" + IDS_LOCALESUBTITLE "Anda bisa mengkustomisasi ReactOS untuk regional dan bahasa berbeda." + IDS_DATETIMETITLE "Tanggal dan Jam" + IDS_DATETIMESUBTITLE "Setel tanggal dan jam yang benar untuk komputer anda." + IDS_PROCESSTITLE "Judul halaman proses" + IDS_PROCESSSUBTITLE "Subjudul halaman proses" +END + +STRINGTABLE +BEGIN + IDS_CMT_WINEFILE "Jalankan Winefile" + IDS_CMT_IBROWSER "Jalankan iBrowser" + IDS_CMT_GETFIREFOX "Download/instalasi Firefox" + IDS_CMT_DOWNLOADER "Download dan instalasi berbagai aplikasi" +END + +STRINGTABLE +BEGIN + IDS_ACCESSORIES "Aksesoris" + IDS_CMT_CALC "Jalankan Kalkulator" + IDS_CMT_CMD "Buka prompt perintah" + IDS_CMT_EXPLORER "Jalankan Explorer" + IDS_CMT_NOTEPAD "Jalankan Editor Teks" + IDS_CMT_REGEDIT "Jalankan Editor Registri" + IDS_CMT_WORDPAD "Jalankan Editor Dokumen" + IDS_CMT_SCREENSHOT "Ambil foto layar" +END + +STRINGTABLE +BEGIN + IDS_GAMES "Games" + IDS_CMT_SOLITAIRE "Solitaire" + IDS_CMT_WINEMINE "WineMine" +END + +STRINGTABLE +BEGIN + IDS_REACTOS_SETUP "Setup ReactOS" + IDS_UNKNOWN_ERROR "Kesalahan tidak dikenal" + IDS_REGISTERING_COMPONENTS "Meregister komponen..." + IDS_LOADLIBRARY_FAILED "LoadLibrary gagal: " + IDS_GETPROCADDR_FAILED "GetProcAddr gagal: " + IDS_REGSVR_FAILED "DllRegisterServer gagal: " + IDS_DLLINSTALL_FAILED "DllInstall gagal: " + IDS_TIMEOUT "Kehabisan waktu selama registrasi" + IDS_REASON_UNKNOWN "" +END + +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END +/* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/it…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/it-IT.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/it-IT.rc Mon Apr 30 01:29:41 2007 @@ -211,4 +211,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/ja…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/ja-JP.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/ja-JP.rc Mon Apr 30 01:29:41 2007 @@ -198,4 +198,20 @@ IDS_CMT_WINEMINE "WineMine" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/nb…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/nb-NO.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/nb-NO.rc Mon Apr 30 01:29:41 2007 @@ -222,4 +222,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/nl…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/nl-NL.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/nl-NL.rc Mon Apr 30 01:29:41 2007 @@ -198,4 +198,20 @@ IDS_CMT_WINEMINE "WineMine" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/pl…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/pl-PL.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/pl-PL.rc Mon Apr 30 01:29:41 2007 @@ -1,226 +1,242 @@ -/* - * translated by Caemyr - */ -/* - * Copyright (C) 2004 Filip Navara - * Copyright (C) 2004 Eric Kohl - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL - - -IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Witamy w programie instalacyjnym ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Ten program pomo¿e w instalacji systemu ReactOS. W tym celu "\ - "konieczne bêdzie zebranie informacji o twoim komputerze, by "\ - "prawid³owo skonfigurowaæ system operacyjny.", IDC_STATIC, 115, 40, 195, 100 - LTEXT "Nacinij Dalej by kontynuowaæ.", IDC_STATIC, 115, 169, 195, 17 -END - - -IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "Twórcy ReactOS chcieliby podziêkowaæ nastêpuj¹cym projektom Open Source, "\ - "których to fragmenty zosta³y wykorzystane do stworzenia ReactOS:", - IDC_STATIC,15,7,286,19 - LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS oparty jest na licencji GPL, wieæ by w ca³oci lub czêciowo wykorzystaæ ród³a "\ - "ReactOS, musisz przestrzegaæ postanowieñ licencji.", - IDC_STATIC,15,110,227,19 - PUSHBUTTON "Poka¿ &GPL..",IDC_VIEWGPL,251,110,50,19 - LTEXT "Nacinij Dalej by kontynuowaæ.",IDC_STATIC,15,136, - 195,17 -END - - -IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Podaj swoje imiê i nazwisko, a tak¿e nazwê twojej firmy b¹d organizacji.", - IDC_STATIC, 54, 7, 242, 21 - LTEXT "Na&zwa:", IDC_STATIC, 54, 37, 44, 8 - EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&Organizacja:", IDC_STATIC, 54, 57, 44, 8 - EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL -END - - -IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Podaj nazwê komputera, nie d³u¿sz¹ ni¿ 63 znaki. "\ - "Jeli chcesz pracowaæ w sieci, nazwa musi pozostaæ unikalna.", - IDC_STATIC, 54, 7, 250, 24 - LTEXT "&Nazwa komputera:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE - LTEXT "Program konfiguracyjny stworzy konto Administrator. "\ - "Dziêki niemu uzyskasz, w razie potrzeby, pe³en dostêp do systemu.", - IDC_STATIC, 54, 57, 250, 25 - LTEXT "Podaj Has³o Administratora, nie d³u¿sze ni¿ 14 znaków.", - IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Has³o Administratora:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Potwierdzenie Has³a:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD -END - - -IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Lokalizacja systemu powinna byæ zgodna (jêzykowo) z aplikacjami, "\ - "których planujesz u¿ywaæ. Lokalizacja odpowiada równie¿ za wywietlanie "\ - "danych, liczb i walut.", IDC_STATIC, 53, 7, 253, 20 - LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 - LTEXT "By zmieniæ lokalizacjê systemu, nacinij Ustaw.", - IDC_STATIC, 53, 60, 184, 8 - PUSHBUTTON "&Ustaw...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 - LTEXT "Uk;ad klawiatury decyduje o przyporzadkowaniu znaków pod klawisze.", - IDC_STATIC, 53, 86, 253, 8 - LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 - LTEXT "Aby zmieniæ uk³ad klawiatury, nacinij Ustaw.", - IDC_STATIC, 53, 126, 184, 8 - PUSHBUTTON "U&staw...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14 -END - - -IDD_DATETIMEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Data i Czas", IDC_STATIC, 53, 7, 253, 8 - CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", - DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 - CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", - DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 - LTEXT "Strefa czasowa", IDC_STATIC, 53, 42, 253, 8 - COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, - CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - AUTOCHECKBOX "Automatycznie ustaw zegar przy &Zmianie Czasu(DST)", - IDC_AUTODAYLIGHT, 53, 124, 201, 10 -END - - -IDD_PROCESSPAGE DIALOG 0, 0, 317, 143 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 - LTEXT "", IDC_ITEM, 53, 29, 253, 20 - CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", - PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 -END - - -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Zakoñczenie instalacji ReactOS" -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Konfiguracja ReactOS ukoñczona.", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "To ju¿ koniec ustawieñ ReactOS.\n\n" \ - "Teraz nacinij Koniec, by ponownie uruchomiæ komputer.", IDC_STATIC, 115, 40, 195, 100 - CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Upewnij siê, czy w napêdach CD/DVD nie pozosta³ ¿aden nonik. "\ - "Jeli tak, to wyjmij go przed naciniêciem Koniec.", IDC_STATIC, 115, 169, 195, 17 -END - - -IDD_GPL DIALOG 0, 0, 333, 230 -STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Powszechna Licencja Publiczna GNU" -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_GPL_TEXT,7,7,319,190,ES_MULTILINE | ES_AUTOHSCROLL | - ES_READONLY | WS_VSCROLL - DEFPUSHBUTTON "OK",IDOK,141,209,50,14 -END - - -STRINGTABLE -BEGIN - IDS_ACKTITLE "Podziêkowania" - IDS_ACKSUBTITLE "Wszyscy, bez których nie by³oby ReactOS, a tak¿e informacje o Licencji " - IDS_OWNERTITLE "Personifikacja systemu" - IDS_OWNERSUBTITLE "Program konfiguracyjny wykorzysta te informacje do lepszego ustawienia systemu." - IDS_COMPUTERTITLE "Nazwa komputera i Has³o Administratora" - IDS_COMPUTERSUBTITLE "Musisz podaæ nazwê swojego komputera a tak¿e Has³o Administratora." - IDS_LOCALETITLE "Ustawienia Regionalne" - IDS_LOCALESUBTITLE "Mo¿esz ustawiæ ReactOS pod k¹tem jêzyka i sposobu wywietlania danych." - IDS_DATETIMETITLE "Data i Czas" - IDS_DATETIMESUBTITLE "Ustaw prawid³ow¹ datê i czas." - IDS_PROCESSTITLE "Tytu³ strony" - IDS_PROCESSSUBTITLE "Podtytu³ strony" -END - -STRINGTABLE -BEGIN - IDS_CMT_WINEFILE "Uruchom Winefile" - IDS_CMT_IBROWSER "Uruchom iBrowser" - IDS_CMT_GETFIREFOX "ci¹gnij/zainstaluj Firefoxa" - IDS_CMT_DOWNLOADER "ci¹gnij i zainstaluj inne aplikacje" -END - -STRINGTABLE -BEGIN - IDS_ACCESSORIES "Akcesoria" - IDS_CMT_CALC "Uruchom Kalkulator" - IDS_CMT_CMD "Uruchom konsolê" - IDS_CMT_EXPLORER "Uruchom Explorera" - IDS_CMT_NOTEPAD "Uruchom Edytor Tekstu" - IDS_CMT_REGEDIT "Uruchom Edytor Rejestru" - IDS_CMT_WORDPAD "Uruchom Wordpada" - IDS_CMT_SCREENSHOT "Zrzut ekranu" -END - -STRINGTABLE -BEGIN - IDS_GAMES "Gry" - IDS_CMT_SOLITAIRE "Pasjans" - IDS_CMT_WINEMINE "Saper" -END - -STRINGTABLE -BEGIN - IDS_REACTOS_SETUP "Ustawienia ReactOS" - IDS_UNKNOWN_ERROR "Nieznany b³¹d" - IDS_REGISTERING_COMPONENTS "Rejestracja sk³adników..." - IDS_LOADLIBRARY_FAILED "Nieudane LoadLibrary : " - IDS_GETPROCADDR_FAILED "Nieudane GetProcAddr : " - IDS_REGSVR_FAILED "Nieudane DllRegisterServer: " - IDS_DLLINSTALL_FAILED "Nieudane DllInstall: " - IDS_TIMEOUT "Up³yn¹³ czas rejestracji" - IDS_REASON_UNKNOWN "" -END - -/* EOF */ +/* + * translated by Caemyr + */ +/* + * Copyright (C) 2004 Filip Navara + * Copyright (C) 2004 Eric Kohl + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL + + +IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Witamy w programie instalacyjnym ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 + LTEXT "Ten program pomo¿e w instalacji systemu ReactOS. W tym celu "\ + "konieczne bêdzie zebranie informacji o twoim komputerze, by "\ + "prawid³owo skonfigurowaæ system operacyjny.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Nacinij Dalej by kontynuowaæ.", IDC_STATIC, 115, 169, 195, 17 +END + + +IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Twórcy ReactOS chcieliby podziêkowaæ nastêpuj¹cym projektom Open Source, "\ + "których to fragmenty zosta³y wykorzystane do stworzenia ReactOS:", + IDC_STATIC,15,7,286,19 + LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | + LBS_NOINTEGRALHEIGHT | WS_VSCROLL + LTEXT "ReactOS oparty jest na licencji GPL, wieæ by w ca³oci lub czêciowo wykorzystaæ ród³a "\ + "ReactOS, musisz przestrzegaæ postanowieñ licencji.", + IDC_STATIC,15,110,227,19 + PUSHBUTTON "Poka¿ &GPL..",IDC_VIEWGPL,251,110,50,19 + LTEXT "Nacinij Dalej by kontynuowaæ.",IDC_STATIC,15,136, + 195,17 +END + + +IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Podaj swoje imiê i nazwisko, a tak¿e nazwê twojej firmy b¹d organizacji.", + IDC_STATIC, 54, 7, 242, 21 + LTEXT "Na&zwa:", IDC_STATIC, 54, 37, 44, 8 + EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL + LTEXT "&Organizacja:", IDC_STATIC, 54, 57, 44, 8 + EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL +END + + +IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Podaj nazwê komputera, nie d³u¿sz¹ ni¿ 63 znaki. "\ + "Jeli chcesz pracowaæ w sieci, nazwa musi pozostaæ unikalna.", + IDC_STATIC, 54, 7, 250, 24 + LTEXT "&Nazwa komputera:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Program konfiguracyjny stworzy konto Administrator. "\ + "Dziêki niemu uzyskasz, w razie potrzeby, pe³en dostêp do systemu.", + IDC_STATIC, 54, 57, 250, 25 + LTEXT "Podaj Has³o Administratora, nie d³u¿sze ni¿ 14 znaków.", + IDC_STATIC, 54, 87, 250, 8 + LTEXT "&Has³o Administratora:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Potwierdzenie Has³a:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD +END + + +IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Lokalizacja systemu powinna byæ zgodna (jêzykowo) z aplikacjami, "\ + "których planujesz u¿ywaæ. Lokalizacja odpowiada równie¿ za wywietlanie "\ + "danych, liczb i walut.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 + LTEXT "By zmieniæ lokalizacjê systemu, nacinij Ustaw.", + IDC_STATIC, 53, 60, 184, 8 + PUSHBUTTON "&Ustaw...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 + LTEXT "Uk;ad klawiatury decyduje o przyporzadkowaniu znaków pod klawisze.", + IDC_STATIC, 53, 86, 253, 8 + LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 + LTEXT "Aby zmieniæ uk³ad klawiatury, nacinij Ustaw.", + IDC_STATIC, 53, 126, 184, 8 + PUSHBUTTON "U&staw...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14 +END + + +IDD_DATETIMEPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Data i Czas", IDC_STATIC, 53, 7, 253, 8 + CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", + DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 + CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", + DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 + LTEXT "Strefa czasowa", IDC_STATIC, 53, 42, 253, 8 + COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, + CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL + AUTOCHECKBOX "Automatycznie ustaw zegar przy &Zmianie Czasu(DST)", + IDC_AUTODAYLIGHT, 53, 124, 201, 10 +END + + +IDD_PROCESSPAGE DIALOG 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalator ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 + CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", + PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 +END + + +IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Zakoñczenie instalacji ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Konfiguracja ReactOS ukoñczona.", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "To ju¿ koniec ustawieñ ReactOS.\n\n" \ + "Teraz nacinij Koniec, by ponownie uruchomiæ komputer.", IDC_STATIC, 115, 40, 195, 100 + CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 + LTEXT "Upewnij siê, czy w napêdach CD/DVD nie pozosta³ ¿aden nonik. "\ + "Jeli tak, to wyjmij go przed naciniêciem Koniec.", IDC_STATIC, 115, 169, 195, 17 +END + + +IDD_GPL DIALOG 0, 0, 333, 230 +STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Powszechna Licencja Publiczna GNU" +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_GPL_TEXT,7,7,319,190,ES_MULTILINE | ES_AUTOHSCROLL | + ES_READONLY | WS_VSCROLL + DEFPUSHBUTTON "OK",IDOK,141,209,50,14 +END + + +STRINGTABLE +BEGIN + IDS_ACKTITLE "Podziêkowania" + IDS_ACKSUBTITLE "Wszyscy, bez których nie by³oby ReactOS, a tak¿e informacje o Licencji " + IDS_OWNERTITLE "Personifikacja systemu" + IDS_OWNERSUBTITLE "Program konfiguracyjny wykorzysta te informacje do lepszego ustawienia systemu." + IDS_COMPUTERTITLE "Nazwa komputera i Has³o Administratora" + IDS_COMPUTERSUBTITLE "Musisz podaæ nazwê swojego komputera a tak¿e Has³o Administratora." + IDS_LOCALETITLE "Ustawienia Regionalne" + IDS_LOCALESUBTITLE "Mo¿esz ustawiæ ReactOS pod k¹tem jêzyka i sposobu wywietlania danych." + IDS_DATETIMETITLE "Data i Czas" + IDS_DATETIMESUBTITLE "Ustaw prawid³ow¹ datê i czas." + IDS_PROCESSTITLE "Tytu³ strony" + IDS_PROCESSSUBTITLE "Podtytu³ strony" +END + +STRINGTABLE +BEGIN + IDS_CMT_WINEFILE "Uruchom Winefile" + IDS_CMT_IBROWSER "Uruchom iBrowser" + IDS_CMT_GETFIREFOX "ci¹gnij/zainstaluj Firefoxa" + IDS_CMT_DOWNLOADER "ci¹gnij i zainstaluj inne aplikacje" +END + +STRINGTABLE +BEGIN + IDS_ACCESSORIES "Akcesoria" + IDS_CMT_CALC "Uruchom Kalkulator" + IDS_CMT_CMD "Uruchom konsolê" + IDS_CMT_EXPLORER "Uruchom Explorera" + IDS_CMT_NOTEPAD "Uruchom Edytor Tekstu" + IDS_CMT_REGEDIT "Uruchom Edytor Rejestru" + IDS_CMT_WORDPAD "Uruchom Wordpada" + IDS_CMT_SCREENSHOT "Zrzut ekranu" +END + +STRINGTABLE +BEGIN + IDS_GAMES "Gry" + IDS_CMT_SOLITAIRE "Pasjans" + IDS_CMT_WINEMINE "Saper" +END + +STRINGTABLE +BEGIN + IDS_REACTOS_SETUP "Ustawienia ReactOS" + IDS_UNKNOWN_ERROR "Nieznany b³¹d" + IDS_REGISTERING_COMPONENTS "Rejestracja sk³adników..." + IDS_LOADLIBRARY_FAILED "Nieudane LoadLibrary : " + IDS_GETPROCADDR_FAILED "Nieudane GetProcAddr : " + IDS_REGSVR_FAILED "Nieudane DllRegisterServer: " + IDS_DLLINSTALL_FAILED "Nieudane DllInstall: " + IDS_TIMEOUT "Up³yn¹³ czas rejestracji" + IDS_REASON_UNKNOWN "" +END + +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END +/* EOF */ Modified: trunk/reactos/dll/win32/syssetup/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/lang/uk…
============================================================================== --- trunk/reactos/dll/win32/syssetup/lang/uk-UA.rc (original) +++ trunk/reactos/dll/win32/syssetup/lang/uk-UA.rc Mon Apr 30 01:29:41 2007 @@ -208,4 +208,20 @@ IDS_REASON_UNKNOWN "" END +STRINGTABLE +BEGIN + IDS_SHORT_CMD "Command Prompt.lnk" + IDS_SHORT_EXPLORER "ReactOS Explorer.lnk" + IDS_SHORT_DOWNLOADER "Download !.lnk" + IDS_SHORT_FIREFOX "Get Firefox.lnk" + IDS_SHORT_SERVICE "Service Manager.lnk" + IDS_SHORT_DEVICE "Device Manager.lnk" + IDS_SHORT_CALC "Calculator.lnk" + IDS_SHORT_REGEDIT "Regedit.lnk" + IDS_SHORT_NOTEPAD "Notepad.lnk" + IDS_SHORT_WORDPAD "WordPad.lnk" + IDS_SHORT_SNAP "SnapShot.lnk" + IDS_SHORT_SOLITAIRE "Solitaire.lnk" + IDS_SHORT_WINEMINE "WineMine.lnk" +END /* EOF */ Modified: trunk/reactos/dll/win32/syssetup/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/resourc…
============================================================================== --- trunk/reactos/dll/win32/syssetup/resource.h (original) +++ trunk/reactos/dll/win32/syssetup/resource.h Mon Apr 30 01:29:41 2007 @@ -113,6 +113,20 @@ #define IDS_TIMEOUT 3307 #define IDS_REASON_UNKNOWN 3308 +#define IDS_SHORT_CMD 3400 +#define IDS_SHORT_EXPLORER 3401 +#define IDS_SHORT_DOWNLOADER 3402 +#define IDS_SHORT_FIREFOX 3403 +#define IDS_SHORT_SERVICE 3404 +#define IDS_SHORT_DEVICE 3405 +#define IDS_SHORT_CALC 3406 +#define IDS_SHORT_REGEDIT 3407 +#define IDS_SHORT_NOTEPAD 3408 +#define IDS_SHORT_WORDPAD 3409 +#define IDS_SHORT_SNAP 3410 +#define IDS_SHORT_SOLITAIRE 3411 +#define IDS_SHORT_WINEMINE 3412 + #define IDR_GPL 4000 #endif /* RESOURCE_H */ Modified: trunk/reactos/dll/win32/syssetup/syssetup.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/syssetu…
============================================================================== --- trunk/reactos/dll/win32/syssetup/syssetup.rbuild (original) +++ trunk/reactos/dll/win32/syssetup/syssetup.rbuild Mon Apr 30 01:29:41 2007 @@ -1,9 +1,7 @@ -<module name="syssetup" type="win32dll" baseaddress="${BASEADDRESS_SYSSETUP}" installbase="system32" installname="syssetup.dll"> +<module name="syssetup" type="win32dll" baseaddress="${BASEADDRESS_SYSSETUP}" installbase="system32" installname="syssetup.dll" unicode="yes" allowwarnings="true"> <importlibrary definition="syssetup.def" /> <include base="syssetup">.</include> <define name="__USE_W32API" /> - <define name="UNICODE" /> - <define name="_UNICODE" /> <define name="_WIN32_IE">0x0600</define> <define name="_WIN32_WINNT">0x0501</define> <define name="_SETUPAPI_VER">0x0501</define>
17 years, 9 months
1
0
0
0
[ekohl] 26581: - Replace CHECKBOXes by AUTOCHECKBOXes. - Add a sticky keys configuration dialog (not finished yet). - Remove "Properties for" from the title. - Remove the property sheet callback function.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 29 18:53:57 2007 New Revision: 26581 URL:
http://svn.reactos.org/svn/reactos?rev=26581&view=rev
Log: - Replace CHECKBOXes by AUTOCHECKBOXes. - Add a sticky keys configuration dialog (not finished yet). - Remove "Properties for" from the title. - Remove the property sheet callback function. Modified: trunk/reactos/dll/cpl/access/access.c trunk/reactos/dll/cpl/access/keyboard.c trunk/reactos/dll/cpl/access/lang/cs-CZ.rc trunk/reactos/dll/cpl/access/lang/de-DE.rc trunk/reactos/dll/cpl/access/lang/en-US.rc trunk/reactos/dll/cpl/access/lang/es-ES.rc trunk/reactos/dll/cpl/access/lang/fr-FR.rc trunk/reactos/dll/cpl/access/lang/hu-HU.rc trunk/reactos/dll/cpl/access/lang/id-ID.rc trunk/reactos/dll/cpl/access/lang/it-IT.rc trunk/reactos/dll/cpl/access/lang/ja-JP.rc trunk/reactos/dll/cpl/access/lang/nl-NL.rc trunk/reactos/dll/cpl/access/lang/pl-PL.rc trunk/reactos/dll/cpl/access/lang/ru-RU.rc trunk/reactos/dll/cpl/access/resource.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/cpl/access/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/access.c?re…
Modified: trunk/reactos/dll/cpl/access/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/keyboard.c?…
Modified: trunk/reactos/dll/cpl/access/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/cs-CZ.…
Modified: trunk/reactos/dll/cpl/access/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/de-DE.…
Modified: trunk/reactos/dll/cpl/access/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/en-US.…
Modified: trunk/reactos/dll/cpl/access/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/es-ES.…
Modified: trunk/reactos/dll/cpl/access/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/fr-FR.…
Modified: trunk/reactos/dll/cpl/access/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/hu-HU.…
Modified: trunk/reactos/dll/cpl/access/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/id-ID.…
Modified: trunk/reactos/dll/cpl/access/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/it-IT.…
Modified: trunk/reactos/dll/cpl/access/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/ja-JP.…
Modified: trunk/reactos/dll/cpl/access/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/nl-NL.…
Modified: trunk/reactos/dll/cpl/access/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/pl-PL.…
Modified: trunk/reactos/dll/cpl/access/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/ru-RU.…
Modified: trunk/reactos/dll/cpl/access/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/resource.h?…
17 years, 9 months
1
0
0
0
[ekohl] 26580: - Remove "Properties for" from title. - Fix page order. - Disable first year edittext control on the "Date" page. - Add missing (english) dialogs to the polish resource file. - Fix coding style.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 29 17:45:10 2007 New Revision: 26580 URL:
http://svn.reactos.org/svn/reactos?rev=26580&view=rev
Log: - Remove "Properties for" from title. - Fix page order. - Disable first year edittext control on the "Date" page. - Add missing (english) dialogs to the polish resource file. - Fix coding style. Modified: trunk/reactos/dll/cpl/intl_new/intl.c trunk/reactos/dll/cpl/intl_new/lang/en-US.rc trunk/reactos/dll/cpl/intl_new/lang/fr-FR.rc trunk/reactos/dll/cpl/intl_new/lang/id-ID.rc trunk/reactos/dll/cpl/intl_new/lang/it-IT.rc trunk/reactos/dll/cpl/intl_new/lang/pl-PL.rc trunk/reactos/dll/cpl/intl_new/locale.c Modified: trunk/reactos/dll/cpl/intl_new/intl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/intl.c?re…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/intl.c (original) +++ trunk/reactos/dll/cpl/intl_new/intl.c Sun Apr 29 17:45:10 2007 @@ -49,7 +49,6 @@ APIENTRY Applet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam) { - PROPSHEETPAGE PsPage[NUM_SHEETS]; PROPSHEETHEADER psh; TCHAR Caption[MAX_STR_SIZE]; @@ -63,7 +62,7 @@ ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); psh.dwSize = sizeof(PROPSHEETHEADER); - psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USECALLBACK | PSH_PROPTITLE; + psh.dwFlags = PSH_PROPSHEETPAGE; psh.hwndParent = NULL; psh.hInstance = hApplet; psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON)); @@ -73,8 +72,8 @@ psh.ppsp = PsPage; InitPropSheetPage(&PsPage[0], IDD_REGOPTSPAGE, RegOptsProc); - InitPropSheetPage(&PsPage[1], IDD_EXTRAOPTSPAGE, ExtraOptsProc); - InitPropSheetPage(&PsPage[2], IDD_LANGSOPTSPAGE, LangsOptsProc); + InitPropSheetPage(&PsPage[1], IDD_LANGSOPTSPAGE, LangsOptsProc); + InitPropSheetPage(&PsPage[2], IDD_EXTRAOPTSPAGE, ExtraOptsProc); return (LONG)(PropertySheet(&psh) != -1); } Modified: trunk/reactos/dll/cpl/intl_new/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/lang/en-U…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/lang/en-US.rc (original) +++ trunk/reactos/dll/cpl/intl_new/lang/en-US.rc Sun Apr 29 17:45:10 2007 @@ -136,7 +136,7 @@ LTEXT "Time afternoon notation (PM):", -1, 10, 104, 147, 10 COMBOBOX IDC_TIMEPM_COMBO, 161, 102, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE GROUPBOX "", IDC_GROUPBOX, 7, 132, 238, 80 - LTEXT "The designation of the time format\nh = hour m = minute s = second t = or \n\nh = 12-hour day format\nH = 24-hour day format\n\nhh, mm, ss = with zeroes in beginning\nh, m, s = without zeroes", -1, 13, 141, 226, 65 + LTEXT "The designation of the time format\nh = hour m = minute s = second t = AM or PM\n\nh = 12-hour day format\nH = 24-hour day format\n\nhh, mm, ss = with zeroes in beginning\nh, m, s = without zeroes", -1, 13, 141, 226, 65 END IDD_DATEOPTSSETUP DIALOGEX 0, 0, 252, 236 @@ -146,7 +146,7 @@ BEGIN GROUPBOX "Calendar", IDC_GROUPBOX, 5, 7, 242, 74 LTEXT "If year typed as two digits, then show it as year between:", -1, 13, 18, 225, 8 - EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED LTEXT "and", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 Modified: trunk/reactos/dll/cpl/intl_new/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/lang/fr-F…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/lang/fr-FR.rc (original) +++ trunk/reactos/dll/cpl/intl_new/lang/fr-FR.rc Sun Apr 29 17:45:10 2007 @@ -146,7 +146,7 @@ BEGIN GROUPBOX "Calendrier", IDC_GROUPBOX, 5, 7, 242, 74 LTEXT "Si l'année est saisie sur 2 chiffres, l'afficher en tant qu'année entre:", -1, 13, 18, 225, 8 - EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED LTEXT "et", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 Modified: trunk/reactos/dll/cpl/intl_new/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/lang/id-I…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/lang/id-ID.rc (original) +++ trunk/reactos/dll/cpl/intl_new/lang/id-ID.rc Sun Apr 29 17:45:10 2007 @@ -146,7 +146,7 @@ BEGIN GROUPBOX "Kalender", IDC_GROUPBOX, 5, 7, 242, 74 LTEXT "Jika tahun diketik sebagai dua digit, maka tampilkan sebagai tahun antara:", -1, 13, 18, 225, 8 - EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED LTEXT "dan", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 Modified: trunk/reactos/dll/cpl/intl_new/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/lang/it-I…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/lang/it-IT.rc (original) +++ trunk/reactos/dll/cpl/intl_new/lang/it-IT.rc Sun Apr 29 17:45:10 2007 @@ -146,7 +146,7 @@ BEGIN GROUPBOX "Calendario", IDC_GROUPBOX, 5, 7, 242, 74 LTEXT "Se l'anno è scritto su due cifre, visualizzare come anni compresi tra :", -1, 13, 18, 225, 8 - EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED LTEXT "e", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 Modified: trunk/reactos/dll/cpl/intl_new/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/lang/pl-P…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/lang/pl-PL.rc (original) +++ trunk/reactos/dll/cpl/intl_new/lang/pl-PL.rc Sun Apr 29 17:45:10 2007 @@ -1,8 +1,8 @@ -/* +/* * translated by xrogers -* xxrogers(a)users.sourceforge.net -*
https://sourceforge.net/projects/reactospl
-*/ +* xxrogers(a)users.sourceforge.net +*
https://sourceforge.net/projects/reactospl
+*/ LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL IDD_REGOPTSPAGE DIALOGEX 0, 0, 252, 236 @@ -46,6 +46,138 @@ GROUPBOX "&Tabele konwersji stron kodowych", -1, 5, 101, 242, 88 END +IDD_LANGSOPTSPAGE DIALOGEX 0, 0, 252, 236 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Languages" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Text input languages and services", IDC_GROUPBOX, 5, 3, 242, 52 + LTEXT "To view or change language or text input methods press ""Detail...""", -1, 12, 13, 230, 18 + PUSHBUTTON "De&tail...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 + GROUPBOX "Additional language support", IDC_GROUPBOX, 5, 60, 242, 82 + /* TODO: add other components*/ +END + +IDD_NUMSOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Numbers" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Samples", IDC_GROUPBOX, 5, 7, 242, 48 + LTEXT "Positive:", -1, 11, 20, 28, 10 + EDITTEXT IDC_NUM_EDIT, 42, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Negative:", -1, 128, 20, 31, 10 + EDITTEXT IDC_NEGNUM_EDIT, 162, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Positive:", -1, 11, 38, 28, 10 + EDITTEXT IDC_NUM1_EDIT, 42, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Negative:", -1, 128, 38, 31, 10 + EDITTEXT IDC_NEGNUM1_EDIT, 162, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Whole and fractional part separator:", -1, 18, 61, 126, 9 + COMBOBOX IDC_NUMDECIMALSEP_COMBO, 147, 59, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Number of fractional symbols:", -1, 18, 77, 126, 9 + COMBOBOX IDC_NUMFRACSYBMS_COMBO, 147, 75, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Field separator:", -1, 18, 93, 126, 9 + COMBOBOX IDC_NUMFIELDSEP_COMBO, 147, 91, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Number of digits in field:", -1, 18, 109, 126, 9 + COMBOBOX IDC_NUMDIGFIELD_COMBO, 147, 107, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Negative number sign:", -1, 18, 125, 126, 9 + COMBOBOX IDC_NUMNEGSIGN_COMBO, 147, 123, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Negative numbers format:", -1, 18, 141, 126, 9 + COMBOBOX IDC_NUMNEGFMT_COMBO, 147, 139, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Leading zeroes:", -1, 18, 157, 126, 9 + COMBOBOX IDC_NUMLEADZERO_COMBO, 147, 155, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Elements list separator:", -1, 18, 173, 126, 9 + COMBOBOX IDC_NUMELEMLISTSEP_COMBO, 147, 171, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "System of units:", -1, 18, 189, 126, 9 + COMBOBOX IDC_NUMUNITSSYS_COMBO, 147, 187, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Region corresponding digits:", -1, 18, 205, 126, 9 + COMBOBOX IDC_NUMREGDIG_COMBO, 147, 203, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Digit replacement:", -1, 18, 221, 126, 9 + COMBOBOX IDC_NUMDIGREPL_COMBO, 147, 219, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + +IDD_CURRENCYOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Currency" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Samples", IDC_GROUPBOX, 5, 7, 242, 40 + LTEXT "Positive:", -1, 10, 25, 30, 10 + EDITTEXT IDC_CURRENCY_EDIT, 42, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Negative:", -1, 128, 25, 31, 10 + EDITTEXT IDC_NEGCURRENCY_EDIT, 162, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Monetary unit:", -1, 20, 61, 126, 9 + COMBOBOX IDC_CURRENCYUNIT_COMBO, 148, 59, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Positive sum of money format:", -1, 20, 78, 126, 9 + COMBOBOX IDC_POSCURRENCYSUM_COMBO, 148, 76, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Negative sum of money format:", -1, 20, 95, 126, 9 + COMBOBOX IDC_NEGCURRENCYSUM_COMBO, 148, 93, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Whole and fractional part separator:", -1, 20, 121, 126, 9 + COMBOBOX IDC_WHOLEFRACTSEP_COMBO, 148, 119, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Number of fractional symbols:", -1, 20, 137, 126, 9 + COMBOBOX IDC_FRACSYMBSNUM_COMBO, 148, 136, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Field separator:", -1, 20, 166, 126, 9 + COMBOBOX IDC_FIELDSEP_COMBO, 148, 164, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Number of digits in field:", -1, 20, 183, 126, 9 + COMBOBOX IDC_DIGINFIELDNUM_COMBO, 148, 181, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + +IDD_TIMEOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Time" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Samples", IDC_GROUPBOX, 5, 7, 242, 33 + LTEXT "Sample:", -1, 13, 21, 52, 10 + EDITTEXT IDC_TIME_EDIT, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_UNKNOWN_EDIT, 156, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Time format:", -1, 10, 52, 147, 10 + COMBOBOX IDC_TIMEFMT_COMBO, 161, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Time components separator:", -1, 10, 69, 147, 10 + COMBOBOX IDC_TIMESEP_COMBO, 161, 67, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Time about midday notation (AM):", -1, 10, 86, 147, 10 + COMBOBOX IDC_TIMEAM_COMBO, 161, 84, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Time afternoon notation (PM):", -1, 10, 104, 147, 10 + COMBOBOX IDC_TIMEPM_COMBO, 161, 102, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + GROUPBOX "", IDC_GROUPBOX, 7, 132, 238, 80 + LTEXT "The designation of the time format\nh = hour m = minute s = second t = AM or PM\n\nh = 12-hour day format\nH = 24-hour day format\n\nhh, mm, ss = with zeroes in beginning\nh, m, s = without zeroes", -1, 13, 141, 226, 65 +END + +IDD_DATEOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Date" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Calendar", IDC_GROUPBOX, 5, 7, 242, 74 + LTEXT "If year typed as two digits, then show it as year between:", -1, 13, 18, 225, 8 + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED + LTEXT "and", -1, 55, 32, 17, 8 + EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP + CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 + LTEXT "Calendar type:", -1, 13, 48, 56, 10 + COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED + LTEXT "Muslim Calendar:", -1, 13, 59, 60, 16 + COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED + GROUPBOX "Short date format", IDC_GROUPBOX, 7, 83, 238, 81 + LTEXT "Sample:", -1, 13, 95, 63, 10 + EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Sample - right to left read:", -1, 13, 109, 60, 16 + EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED + LTEXT "Short format:", -1, 13, 131, 60, 10 + COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Date components separator:", -1, 13, 148, 113, 10 + COMBOBOX IDC_SHRTDATESEP_COMBO, 187, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + GROUPBOX "Long date format", IDC_GROUPBOX, 7, 167, 238, 64 + LTEXT "Sample:", -1, 13, 179, 61, 10 + EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Sample - right to left read:", -1, 13, 193, 61, 16 + EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED + LTEXT "Long format:", -1, 13, 215, 60, 10 + COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + STRINGTABLE BEGIN IDS_CPLNAME "Opcje regionalne i jêzykowe" Modified: trunk/reactos/dll/cpl/intl_new/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/locale.c?…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/locale.c (original) +++ trunk/reactos/dll/cpl/intl_new/locale.c Sun Apr 29 17:45:10 2007 @@ -59,7 +59,7 @@ EnumSystemGeoID(GEOCLASS_NATION, 0, LocationsEnumProc); - // Select current location + /* Select current location */ userGeoID = GetUserGeoID(GEOCLASS_NATION); GetGeoInfo(userGeoID, GEO_FRIENDLYNAME, @@ -109,7 +109,7 @@ EnumSystemLocalesW(LocalesEnumProc, LCID_INSTALLED); - // Select current locale + /* Select current locale */ GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, @@ -175,7 +175,7 @@ //SetUserDefaultLCID(LcidLocale); // Not implemented in MS :( - if(!IsValidLocale(LcidLocale, LCID_INSTALLED)) + if(!IsValidLocale(LcidLocale, LCID_INSTALLED)) { MessageBoxW(NULL, L"Invalid locale.", L"Critical error", MB_OK | MB_ICONERROR); @@ -230,7 +230,7 @@ CreateLanguagesList(GetDlgItem(hwndDlg, IDC_SETREG_COMBO)); /* Update locale samples */ UpdateLocaleSample(hwndDlg, LOCALE_USER_DEFAULT); - break; + break; case WM_COMMAND: switch (LOWORD(wParam))
17 years, 9 months
1
0
0
0
[arty] 26579: Suppress peer warnings about abuse of C++ code (thanks? w3seek)
by arty@svn.reactos.org
Author: arty Date: Sun Apr 29 13:37:17 2007 New Revision: 26579 URL:
http://svn.reactos.org/svn/reactos?rev=26579&view=rev
Log: Suppress peer warnings about abuse of C++ code (thanks? w3seek) Added: branches/powerpc/reactos/tools/mkhive/binhive.cpp - copied, changed from r26531, branches/powerpc/reactos/tools/mkhive/binhive.c branches/powerpc/reactos/tools/mkhive/mkhive.cpp - copied unchanged from r26531, branches/powerpc/reactos/tools/mkhive/mkhive.c branches/powerpc/reactos/tools/mkhive/reginf.cpp - copied unchanged from r26531, branches/powerpc/reactos/tools/mkhive/reginf.c branches/powerpc/reactos/tools/mkhive/registry.cpp - copied unchanged from r26529, branches/powerpc/reactos/tools/mkhive/registry.c Removed: branches/powerpc/reactos/tools/mkhive/binhive.c branches/powerpc/reactos/tools/mkhive/mkhive.c branches/powerpc/reactos/tools/mkhive/reginf.c branches/powerpc/reactos/tools/mkhive/registry.c Modified: branches/powerpc/reactos/tools/mkhive/mkhive.mak Removed: branches/powerpc/reactos/tools/mkhive/binhive.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/bi…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/binhive.c (original) +++ branches/powerpc/reactos/tools/mkhive/binhive.c (removed) @@ -1,1440 +1,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003, 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* $Id$ - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/binhive.c - * PURPOSE: Binary hive export code - * PROGRAMMER: Eric Kohl - */ - -/* INCLUDES *****************************************************************/ - -//#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "mkhive.h" -#include "binhive.h" -#include "registry.h" - -using namespace ReactosBytesex; - -#define REG_HIVE_ID 0x66676572 -#define REG_BIN_ID 0x6e696268 -#define REG_KEY_CELL_ID 0x6b6e -#define REG_HASH_TABLE_CELL_ID 0x666c -#define REG_VALUE_CELL_ID 0x6b76 - -#define REG_BLOCK_SIZE 4096 -#define REG_HBIN_DATA_OFFSET 32 -#define REG_INIT_BLOCK_LIST_SIZE 32 -#define REG_INIT_HASH_TABLE_SIZE 3 -#define REG_EXTEND_HASH_TABLE_SIZE 4 -#define REG_VALUE_LIST_CELL_MULTIPLE 4 - -#define ROUND_UP_POW2(N,S) (((N) + (S) - 1) & ~((S) - 1)) -#define ROUND_DOWN_POW2(N,S) ((N) & ~((S) - 1)) - -#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) - - -// BLOCK_OFFSET = offset in file after header block -typedef E_ULONG BLOCK_OFFSET, *PBLOCK_OFFSET; - -#ifdef _MSC_VER -typedef unsigned __int64 FILETIME; -#else -typedef unsigned long long FILETIME; -#endif - -#ifdef _MSC_VER -#pragma pack ( push, hive_header, 1 ) -#endif//_MSC_VER - -/* header for registry hive file : */ -typedef struct _HIVE_HEADER -{ - /* Hive identifier "regf" (0x66676572) */ - E_ULONG BlockId; - - /* Update counter */ - E_ULONG UpdateCounter1; - - /* Update counter */ - E_ULONG UpdateCounter2; - - /* When this hive file was last modified */ - E_FILETIME DateModified; - - /* Registry format major version (1) */ - E_ULONG MajorVersion; - - /* Registry format minor version (3) - Version 3 added fast indexes, version 5 has large value optimizations */ - E_ULONG MinorVersion; - - /* Registry file type (0 - Primary, 1 - Log) */ - E_ULONG Type; - - /* Registry format (1 is the only defined value so far) */ - E_ULONG Format; - - /* Offset into file from the byte after the end of the base block. - If the hive is volatile, this is the actual pointer to the KEY_CELL */ - BLOCK_OFFSET RootKeyOffset; - - /* Size of each hive block ? */ - E_ULONG BlockSize; - - /* (1?) */ - E_ULONG Unused7; - - /* Name of hive file */ - E_WCHAR FileName[32]; - - E_ULONG Reserved[99]; - - /* Checksum of first 0x200 bytes */ - E_ULONG Checksum; -} GCC_PACKED HIVE_HEADER, *PHIVE_HEADER; - -typedef struct _HBIN -{ - /* Bin identifier "hbin" (0x6E696268) */ - E_ULONG HeaderId; - - /* Block offset of this bin */ - BLOCK_OFFSET BinOffset; - - /* Size in bytes, multiple of the block size (4KB) */ - E_ULONG BinSize; - - E_ULONG Reserved[2]; - - /* When this bin was last modified */ - E_FILETIME DateModified; - - /* ? (In-memory only) */ - E_ULONG MemAlloc; -} GCC_PACKED HBIN, *PHBIN; - -typedef struct _CELL_HEADER -{ - /* <0 if used, >0 if free */ - E_LONG CellSize; -} GCC_PACKED CELL_HEADER, *PCELL_HEADER; - -typedef struct _KEY_CELL -{ - /* Size of this cell */ - E_LONG CellSize; - - /* Key cell identifier "kn" (0x6b6e) */ - E_USHORT Id; - - /* ? */ - E_USHORT Type; - - /* Time of last flush */ - E_FILETIME LastWriteTime; - - /* ? */ - E_ULONG UnUsed1; - - /* Block offset of parent key cell */ - BLOCK_OFFSET ParentKeyOffset; - - /* Count of sub keys for the key in this key cell */ - E_ULONG NumberOfSubKeys; - - /* ? */ - E_ULONG UnUsed2; - - /* Block offset of has table for FIXME: subkeys/values? */ - BLOCK_OFFSET HashTableOffset; - - /* ? */ - E_ULONG UnUsed3; - - /* Count of values contained in this key cell */ - E_ULONG NumberOfValues; - - /* Block offset of VALUE_LIST_CELL */ - BLOCK_OFFSET ValueListOffset; - - /* Block offset of security cell */ - BLOCK_OFFSET SecurityKeyOffset; - - /* Block offset of registry key class */ - BLOCK_OFFSET ClassNameOffset; - - /* ? */ - E_ULONG Unused4[5]; - - /* Size in bytes of key name */ - E_USHORT NameSize; - - /* Size of class name in bytes */ - E_USHORT ClassSize; - - /* Name of key (not zero terminated) */ - CHAR Name[0]; -} GCC_PACKED KEY_CELL, *PKEY_CELL; - -/* KEY_CELL.Type constants */ -#define REG_LINK_KEY_CELL_TYPE 0x10 -#define REG_KEY_CELL_TYPE 0x20 -#define REG_ROOT_KEY_CELL_TYPE 0x2c - - -// hash record : -// HashValue=four letters of value's name -typedef struct _HASH_RECORD -{ - BLOCK_OFFSET KeyOffset; - E_ULONG HashValue; -} GCC_PACKED HASH_RECORD, *PHASH_RECORD; - -typedef struct _HASH_TABLE_CELL -{ - E_LONG CellSize; - E_USHORT Id; - E_USHORT HashTableSize; - HASH_RECORD Table[0]; -} GCC_PACKED HASH_TABLE_CELL, *PHASH_TABLE_CELL; - -typedef struct _VALUE_LIST_CELL -{ - E_LONG CellSize; - BLOCK_OFFSET ValueOffset[0]; -} GCC_PACKED VALUE_LIST_CELL, *PVALUE_LIST_CELL; - -typedef struct _VALUE_CELL -{ - E_LONG CellSize; - E_USHORT Id; // "kv" - E_USHORT NameSize; // length of Name - E_ULONG DataSize; // length of datas in the cell pointed by DataOffset - BLOCK_OFFSET DataOffset;// datas are here if high bit of DataSize is set - E_ULONG DataType; - E_USHORT Flags; - E_USHORT Unused1; - CHAR Name[0]; /* warning : not zero terminated */ -} GCC_PACKED VALUE_CELL, *PVALUE_CELL; - -/* VALUE_CELL.Flags constants */ -#define REG_VALUE_NAME_PACKED 0x0001 - -/* VALUE_CELL.DataSize mask constants */ -#define REG_DATA_SIZE_MASK 0x7FFFFFFF -#define REG_DATA_IN_OFFSET 0x80000000 - -typedef struct _DATA_CELL -{ - E_LONG CellSize; - CHAR Data[0]; -} GCC_PACKED DATA_CELL, *PDATA_CELL; - -#ifdef _MSC_VER -#pragma pack ( pop, hive_header ) -#endif//_MSC_VER - -typedef struct _REGISTRY_HIVE -{ - ULONG FileSize; - PHIVE_HEADER HiveHeader; - ULONG BlockListSize; - PHBIN *BlockList; - ULONG FreeListSize; - ULONG FreeListMax; - PCELL_HEADER *FreeList; - BLOCK_OFFSET *FreeListOffset; -} REGISTRY_HIVE, *PREGISTRY_HIVE; - -/* FUNCTIONS ****************************************************************/ - -static VOID -memexpand (PWCHAR Dst, - PCHAR Src, - ULONG Length) -{ - ULONG i; - E_WCHAR *DstE = (E_WCHAR*)Dst; - - for (i = 0; i < Length; i++) - DstE[i] = (WCHAR)Src[i]; -} - - -static VOID -CmiCreateDefaultHiveHeader (PHIVE_HEADER Header) -{ - assert (Header); - memset (Header, 0, REG_BLOCK_SIZE); - Header->BlockId = REG_HIVE_ID; - Header->UpdateCounter1 = 0; - Header->UpdateCounter2 = 0; - Header->DateModified = 0; - Header->MajorVersion = 1; - Header->MinorVersion = 3; - Header->Type = 0; - Header->Format = 1; - Header->Unused7 = 1; - Header->RootKeyOffset = -1; - Header->BlockSize = REG_BLOCK_SIZE; - Header->Checksum = 0; -} - - -static VOID -CmiCreateDefaultBinCell(PHBIN BinCell) -{ - assert (BinCell); - memset (BinCell, 0, REG_BLOCK_SIZE); - BinCell->HeaderId = REG_BIN_ID; - BinCell->DateModified = 0; - BinCell->BinSize = REG_BLOCK_SIZE; -} - - -static VOID -CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell, PCHAR KeyName) -{ - PCHAR BaseKeyName; - USHORT NameSize; - ULONG CellSize; - - assert (RootKeyCell); - - BaseKeyName = strrchr(KeyName, '\\') + 1; - NameSize = strlen(BaseKeyName); - CellSize = ROUND_UP_POW2(sizeof(KEY_CELL) + NameSize - 1, 16); - - memset (RootKeyCell, 0, CellSize); - RootKeyCell->CellSize = (ULONG)-(LONG)CellSize; - RootKeyCell->Id = REG_KEY_CELL_ID; - RootKeyCell->Type = REG_ROOT_KEY_CELL_TYPE; - RootKeyCell->LastWriteTime = 0; - RootKeyCell->ParentKeyOffset = 0; - RootKeyCell->NumberOfSubKeys = 0; - RootKeyCell->HashTableOffset = -1; - RootKeyCell->NumberOfValues = 0; - RootKeyCell->ValueListOffset = -1; - RootKeyCell->SecurityKeyOffset = 0; - RootKeyCell->ClassNameOffset = -1; - RootKeyCell->NameSize = NameSize; - RootKeyCell->ClassSize = 0; - memcpy (RootKeyCell->Name, - BaseKeyName, - NameSize); -} - - -static PREGISTRY_HIVE -CmiCreateRegistryHive (PCHAR KeyName) -{ - PREGISTRY_HIVE Hive; - PCELL_HEADER FreeCell; - PKEY_CELL RootKeyCell; - PHBIN BinCell; - - Hive = (PREGISTRY_HIVE) malloc (sizeof(REGISTRY_HIVE)); - if (Hive == NULL) - { - return NULL; - } - memset (Hive, 0, sizeof(REGISTRY_HIVE)); - - DPRINT("Hive %p\n", Hive); - - /* Create hive beader (aka 'base block') */ - Hive->HiveHeader = (PHIVE_HEADER) malloc (REG_BLOCK_SIZE); - if (Hive->HiveHeader == NULL) - { - free (Hive); - return NULL; - } - CmiCreateDefaultHiveHeader (Hive->HiveHeader); - Hive->FileSize = REG_BLOCK_SIZE; - - /* Allocate block list */ - Hive->BlockListSize = 1; - Hive->BlockList = (PHBIN*)malloc (sizeof(PHBIN) * Hive->BlockListSize); - if (Hive->BlockList == NULL) - { - free (Hive->HiveHeader); - free (Hive); - return NULL; - } - - /* Allocate free cell list */ - Hive->FreeListMax = 32; - Hive->FreeList = (PCELL_HEADER*)malloc(sizeof(PCELL_HEADER) * Hive->FreeListMax); - if (Hive->FreeList == NULL) - { - free (Hive->BlockList); - free (Hive->HiveHeader); - free (Hive); - return NULL; - } - Hive->FreeListOffset = (PBLOCK_OFFSET)malloc(sizeof(BLOCK_OFFSET) * Hive->FreeListMax); - if (Hive->FreeListOffset == NULL) - { - free (Hive->FreeList); - free (Hive->BlockList); - free (Hive->HiveHeader); - free (Hive); - return NULL; - } - - /* Allocate first bin */ - Hive->BlockList[0] = (PHBIN) malloc (REG_BLOCK_SIZE); - if (Hive->BlockList[0] == NULL) - { - free (Hive->FreeListOffset); - free (Hive->FreeList); - free (Hive->BlockList); - free (Hive->HiveHeader); - free (Hive); - return NULL; - } - Hive->FileSize += REG_BLOCK_SIZE; - - /* Init first bin */ - BinCell = (PHBIN)Hive->BlockList[0]; - CmiCreateDefaultBinCell (BinCell); - BinCell->BinOffset = 0; - - /* Init root key cell */ - RootKeyCell = (PKEY_CELL)((ULONG_PTR)BinCell + REG_HBIN_DATA_OFFSET); - CmiCreateDefaultRootKeyCell (RootKeyCell, KeyName); - Hive->HiveHeader->RootKeyOffset = REG_HBIN_DATA_OFFSET; - - /* Init free cell */ - FreeCell = (PCELL_HEADER)((ULONG_PTR)RootKeyCell - RootKeyCell->CellSize); - FreeCell->CellSize = REG_BLOCK_SIZE - (REG_HBIN_DATA_OFFSET - RootKeyCell->CellSize); - - Hive->FreeList[0] = FreeCell; - Hive->FreeListOffset[0] = REG_HBIN_DATA_OFFSET - RootKeyCell->CellSize; - Hive->FreeListSize++; - - return Hive; -} - - -static VOID -CmiDestroyRegistryHive (PREGISTRY_HIVE Hive) -{ - PHBIN Bin; - ULONG i; - - if (Hive == NULL) - return; - - /* Release free offset list */ - if (Hive->FreeListOffset != NULL) - free (Hive->FreeListOffset); - - /* Release free list */ - if (Hive->FreeList != NULL) - free (Hive->FreeList); - - if (Hive->BlockList != NULL) - { - /* Release bins */ - Bin = NULL; - for (i = 0; i < Hive->BlockListSize; i++) - { - if ((Hive->BlockList[i] != NULL) && - (Hive->BlockList[i] != Bin)) - { - Bin = Hive->BlockList[i]; - - DPRINT ("Bin[%lu]: Offset 0x%lx Size 0x%lx\n", - i, Bin->BinOffset, Bin->BinSize); - - free (Bin); - } - } - - /* Release block list */ - free (Hive->BlockList); - } - - /* Release hive header */ - if (Hive->HiveHeader != NULL) - free (Hive->HiveHeader); - - /* Release hive */ - free (Hive); -} - - -static PVOID -CmiGetCell (PREGISTRY_HIVE Hive, - BLOCK_OFFSET BlockOffset, - PHBIN * ppBin) -{ - PHBIN pBin; - ULONG BlockIndex; - - if (ppBin) - *ppBin = NULL; - - if (BlockOffset == (ULONG_PTR) -1) - return NULL; - - BlockIndex = BlockOffset / 4096; - if (BlockIndex >= Hive->BlockListSize) - return NULL; - - pBin = Hive->BlockList[BlockIndex]; - if (ppBin) - *ppBin = pBin; - - return (PVOID)((ULONG_PTR)pBin + (BlockOffset - pBin->BinOffset)); -} - - -static BOOL -CmiMergeFree(PREGISTRY_HIVE RegistryHive, - PCELL_HEADER FreeBlock, - BLOCK_OFFSET FreeOffset) -{ - BLOCK_OFFSET BlockOffset; - BLOCK_OFFSET BinOffset; - ULONG BlockSize; - ULONG BinSize; - PHBIN Bin; - ULONG i; - - DPRINT("CmiMergeFree(Block %p Offset %lx Size %lx) called\n", - FreeBlock, FreeOffset, FreeBlock->CellSize); - - CmiGetCell (RegistryHive, - FreeOffset, - &Bin); - DPRINT("Bin %p\n", Bin); - if (Bin == NULL) - return FALSE; - - BinOffset = Bin->BinOffset; - BinSize = Bin->BinSize; - DPRINT("Bin %p Offset %lx Size %lx\n", Bin, BinOffset, BinSize); - - for (i = 0; i < RegistryHive->FreeListSize; i++) - { - BlockOffset = RegistryHive->FreeListOffset[i]; - BlockSize = RegistryHive->FreeList[i]->CellSize; - if (BlockOffset > BinOffset && - BlockOffset < BinOffset + BinSize) - { - DPRINT("Free block: Offset %lx Size %lx\n", - BlockOffset, BlockSize); - - if ((i < (RegistryHive->FreeListSize - 1)) && - (BlockOffset + BlockSize == FreeOffset) && - (FreeOffset + FreeBlock->CellSize == RegistryHive->FreeListOffset[i + 1])) - { - DPRINT("Merge current block with previous and next block\n"); - - RegistryHive->FreeList[i]->CellSize += - (FreeBlock->CellSize + RegistryHive->FreeList[i + 1]->CellSize); - - FreeBlock->CellSize = 0; - RegistryHive->FreeList[i + 1]->CellSize = 0; - - - if ((i + 2) < RegistryHive->FreeListSize) - { - memmove (&RegistryHive->FreeList[i + 1], - &RegistryHive->FreeList[i + 2], - sizeof(RegistryHive->FreeList[0]) - * (RegistryHive->FreeListSize - i - 2)); - memmove (&RegistryHive->FreeListOffset[i + 1], - &RegistryHive->FreeListOffset[i + 2], - sizeof(RegistryHive->FreeListOffset[0]) - * (RegistryHive->FreeListSize - i - 2)); - } - RegistryHive->FreeListSize--; - - return TRUE; - } - else if (BlockOffset + BlockSize == FreeOffset) - { - DPRINT("Merge current block with previous block\n"); - - RegistryHive->FreeList[i]->CellSize += FreeBlock->CellSize; - FreeBlock->CellSize = 0; - - return TRUE; - } - else if (FreeOffset + FreeBlock->CellSize == BlockOffset) - { - DPRINT("Merge current block with next block\n"); - - FreeBlock->CellSize += RegistryHive->FreeList[i]->CellSize; - RegistryHive->FreeList[i]->CellSize = 0; - RegistryHive->FreeList[i] = FreeBlock; - RegistryHive->FreeListOffset[i] = FreeOffset; - - return TRUE; - } - } - } - - return FALSE; -} - - -static BOOL -CmiAddFree(PREGISTRY_HIVE RegistryHive, - PCELL_HEADER FreeBlock, - BLOCK_OFFSET FreeOffset, - BOOL MergeFreeBlocks) -{ - PCELL_HEADER *tmpList; - BLOCK_OFFSET *tmpListOffset; - LONG minInd; - LONG maxInd; - LONG medInd; - - assert(RegistryHive); - assert(FreeBlock); - - DPRINT("FreeBlock %p FreeOffset %.08lx\n", - FreeBlock, FreeOffset); - - /* Merge free blocks */ - if (MergeFreeBlocks == TRUE) - { - if (CmiMergeFree(RegistryHive, FreeBlock, FreeOffset)) - return TRUE; - } - - if ((RegistryHive->FreeListSize + 1) > RegistryHive->FreeListMax) - { - tmpList = (PCELL_HEADER*)malloc (sizeof(PCELL_HEADER) * (RegistryHive->FreeListMax + 32)); - if (tmpList == NULL) - { - return FALSE; - } - - tmpListOffset = (PBLOCK_OFFSET)malloc (sizeof(BLOCK_OFFSET) * (RegistryHive->FreeListMax + 32)); - if (tmpListOffset == NULL) - { - free (tmpList); - return FALSE; - } - - if (RegistryHive->FreeListMax) - { - memmove (tmpList, - RegistryHive->FreeList, - sizeof(PCELL_HEADER) * (RegistryHive->FreeListMax)); - memmove (tmpListOffset, - RegistryHive->FreeListOffset, - sizeof(BLOCK_OFFSET) * (RegistryHive->FreeListMax)); - free (RegistryHive->FreeList); - free (RegistryHive->FreeListOffset); - } - RegistryHive->FreeList = tmpList; - RegistryHive->FreeListOffset = tmpListOffset; - RegistryHive->FreeListMax += 32; - } - - /* Add new offset to free list, maintaining list in ascending order */ - if ((RegistryHive->FreeListSize == 0) - || (RegistryHive->FreeListOffset[RegistryHive->FreeListSize-1] < FreeOffset)) - { - /* Add to end of list */ - RegistryHive->FreeList[RegistryHive->FreeListSize] = FreeBlock; - RegistryHive->FreeListOffset[RegistryHive->FreeListSize++] = FreeOffset; - } - else if (RegistryHive->FreeListOffset[0] > FreeOffset) - { - /* Add to begin of list */ - memmove (&RegistryHive->FreeList[1], - &RegistryHive->FreeList[0], - sizeof(RegistryHive->FreeList[0]) * RegistryHive->FreeListSize); - memmove (&RegistryHive->FreeListOffset[1], - &RegistryHive->FreeListOffset[0], - sizeof(RegistryHive->FreeListOffset[0]) * RegistryHive->FreeListSize); - RegistryHive->FreeList[0] = FreeBlock; - RegistryHive->FreeListOffset[0] = FreeOffset; - RegistryHive->FreeListSize++; - } - else - { - /* Search where to insert */ - minInd = 0; - maxInd = RegistryHive->FreeListSize - 1; - while ((maxInd - minInd) > 1) - { - medInd = (minInd + maxInd) / 2; - if (RegistryHive->FreeListOffset[medInd] > FreeOffset) - maxInd = medInd; - else - minInd = medInd; - } - - /* Insert before maxInd */ - memmove (&RegistryHive->FreeList[maxInd+1], - &RegistryHive->FreeList[maxInd], - sizeof(RegistryHive->FreeList[0]) * (RegistryHive->FreeListSize - minInd)); - memmove (&RegistryHive->FreeListOffset[maxInd + 1], - &RegistryHive->FreeListOffset[maxInd], - sizeof(RegistryHive->FreeListOffset[0]) * (RegistryHive->FreeListSize-minInd)); - RegistryHive->FreeList[maxInd] = FreeBlock; - RegistryHive->FreeListOffset[maxInd] = FreeOffset; - RegistryHive->FreeListSize++; - } - - return TRUE; -} - - -static BOOL -CmiAddBin(PREGISTRY_HIVE RegistryHive, - ULONG BlockCount, - PVOID *NewBlock, - PBLOCK_OFFSET NewBlockOffset) -{ - PCELL_HEADER tmpBlock; - PHBIN * tmpBlockList; - PHBIN tmpBin; - ULONG BinSize; - ULONG i; - - BinSize = BlockCount *REG_BLOCK_SIZE; - tmpBin = (PHBIN)malloc (BinSize); - if (tmpBin == NULL) - { - return FALSE; - } - memset (tmpBin, 0, BinSize); - - tmpBin->HeaderId = REG_BIN_ID; - tmpBin->BinOffset = RegistryHive->FileSize - REG_BLOCK_SIZE; - RegistryHive->FileSize += BinSize; - tmpBin->BinSize = BinSize; - tmpBin->DateModified = 0; - tmpBin->MemAlloc = 0; - - /* Increase size of list of blocks */ - tmpBlockList = (PHBIN *)malloc (sizeof(PHBIN) * (RegistryHive->BlockListSize + BlockCount)); - if (tmpBlockList == NULL) - { - free (tmpBin); - return FALSE; - } - - if (RegistryHive->BlockListSize > 0) - { - memcpy (tmpBlockList, - RegistryHive->BlockList, - sizeof(PHBIN) * RegistryHive->BlockListSize); - free (RegistryHive->BlockList); - } - - RegistryHive->BlockList = tmpBlockList; - for (i = 0; i < BlockCount; i++) - RegistryHive->BlockList[RegistryHive->BlockListSize + i] = tmpBin; - RegistryHive->BlockListSize += BlockCount; - - /* Initialize a free block in this heap : */ - tmpBlock = (PCELL_HEADER)((ULONG_PTR) tmpBin + REG_HBIN_DATA_OFFSET); - tmpBlock->CellSize = (REG_BLOCK_SIZE - REG_HBIN_DATA_OFFSET); - - *NewBlock = (PVOID) tmpBlock; - - if (NewBlockOffset) - *NewBlockOffset = tmpBin->BinOffset + REG_HBIN_DATA_OFFSET; - - return TRUE; -} - - -static BOOL -CmiAllocateCell (PREGISTRY_HIVE RegistryHive, - LONG CellSize, - PVOID *Block, - PBLOCK_OFFSET pBlockOffset) -{ - PCELL_HEADER NewBlock; - ULONG i; - - *Block = NULL; - - /* Round to 16 bytes multiple */ - CellSize = ROUND_UP_POW2(CellSize, 16); - - /* first search in free blocks */ - NewBlock = NULL; - for (i = 0; i < RegistryHive->FreeListSize; i++) - { - if (RegistryHive->FreeList[i]->CellSize >= CellSize) - { - NewBlock = RegistryHive->FreeList[i]; - if (pBlockOffset) - *pBlockOffset = RegistryHive->FreeListOffset[i]; - - if ((i + 1) < RegistryHive->FreeListSize) - { - memmove (&RegistryHive->FreeList[i], - &RegistryHive->FreeList[i + 1], - sizeof(RegistryHive->FreeList[0]) - * (RegistryHive->FreeListSize - i - 1)); - memmove (&RegistryHive->FreeListOffset[i], - &RegistryHive->FreeListOffset[i + 1], - sizeof(RegistryHive->FreeListOffset[0]) - * (RegistryHive->FreeListSize - i - 1)); - } - RegistryHive->FreeListSize--; - break; - } - } - - /* Need to extend hive file : */ - if (NewBlock == NULL) - { - /* Add a new block */ - if (!CmiAddBin(RegistryHive, - ((sizeof(HBIN) + CellSize - 1) / REG_BLOCK_SIZE) + 1, - (PVOID *)&NewBlock, - pBlockOffset)) - return FALSE; - } - - *Block = NewBlock; - - /* Split the block in two parts */ - if (NewBlock->CellSize > CellSize) - { - NewBlock = (PCELL_HEADER) ((ULONG_PTR) NewBlock + CellSize); - NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize; - ((PCELL_HEADER) (*Block))->CellSize = CellSize; - BLOCK_OFFSET NewFree; - NewFree = *pBlockOffset + CellSize; - CmiAddFree (RegistryHive, - NewBlock, - NewFree, - TRUE); - } - else if (NewBlock->CellSize < CellSize) - { - return FALSE; - } - - memset((PVOID)((ULONG_PTR)*Block + sizeof(CELL_HEADER)), 0, - CellSize - sizeof(CELL_HEADER)); - ((PCELL_HEADER)(*Block))->CellSize *= -1; - - return TRUE; -} - - -static BOOL -CmiAllocateHashTableCell (PREGISTRY_HIVE Hive, - PBLOCK_OFFSET HBOffset, - USHORT SubKeyCount) -{ - PHASH_TABLE_CELL HashCell; - ULONG NewHashSize; - BOOL Status; - - NewHashSize = sizeof(HASH_TABLE_CELL) + - (SubKeyCount * sizeof(HASH_RECORD)); - Status = CmiAllocateCell (Hive, - NewHashSize, - (PVOID*) &HashCell, - HBOffset); - if ((HashCell == NULL) || (Status == FALSE)) - { - return FALSE; - } - - HashCell->Id = REG_HASH_TABLE_CELL_ID; - HashCell->HashTableSize = SubKeyCount; - - return TRUE; -} - - -static BOOL -CmiAddKeyToParentHashTable (PREGISTRY_HIVE Hive, - BLOCK_OFFSET ParentKeyOffset, - PKEY_CELL NewKeyCell, - BLOCK_OFFSET NKBOffset) -{ - PHASH_TABLE_CELL HashBlock; - PKEY_CELL ParentKeyCell; - ULONG i; - - ParentKeyCell = (PKEY_CELL)CmiGetCell (Hive, - ParentKeyOffset, - NULL); - if (ParentKeyCell == NULL) - { - DPRINT1 ("CmiGetBlock() failed\n"); - return FALSE; - } - - HashBlock = (PHASH_TABLE_CELL)CmiGetCell (Hive, - ParentKeyCell->HashTableOffset, - NULL); - if (HashBlock == NULL) - { - DPRINT1 ("CmiGetBlock() failed\n"); - return FALSE; - } - - for (i = 0; i < HashBlock->HashTableSize; i++) - { - if (HashBlock->Table[i].KeyOffset == 0) - { - HashBlock->Table[i].KeyOffset = NKBOffset; - memcpy (&HashBlock->Table[i].HashValue, - NewKeyCell->Name, - 4); - ParentKeyCell->NumberOfSubKeys++; - return TRUE; - } - } - - return FALSE; -} - - -static BOOL -CmiAllocateValueListCell (PREGISTRY_HIVE Hive, - PBLOCK_OFFSET ValueListOffset, - ULONG ValueCount) -{ - PVALUE_LIST_CELL ValueListCell; - ULONG ValueListSize; - BOOL Status; - - ValueListSize = sizeof(VALUE_LIST_CELL) + - (ValueCount * sizeof(BLOCK_OFFSET)); - Status = CmiAllocateCell (Hive, - ValueListSize, - (PVOID*)&ValueListCell, - ValueListOffset); - if ((ValueListCell == NULL) || (Status == FALSE)) - { - DPRINT1 ("CmiAllocateBlock() failed\n"); - return FALSE; - } - - return TRUE; -} - - -static BOOL -CmiAllocateValueCell(PREGISTRY_HIVE Hive, - PVALUE_CELL *ValueCell, - BLOCK_OFFSET *ValueCellOffset, - PCHAR ValueName) -{ - PVALUE_CELL NewValueCell; - USHORT NameSize; - BOOL Status; - - NameSize = (ValueName == NULL) ? 0 : strlen (ValueName); - Status = CmiAllocateCell (Hive, - sizeof(VALUE_CELL) + NameSize, - (PVOID*)&NewValueCell, - ValueCellOffset); - if ((NewValueCell == NULL) || (Status == FALSE)) - { - DPRINT1 ("CmiAllocateBlock() failed\n"); - return FALSE; - } - - NewValueCell->Id = REG_VALUE_CELL_ID; - NewValueCell->NameSize = NameSize; - if (NameSize > 0) - { - memcpy (NewValueCell->Name, - ValueName, - NameSize); - NewValueCell->Flags = REG_VALUE_NAME_PACKED; - } - NewValueCell->DataType = 0; - NewValueCell->DataSize = 0; - NewValueCell->DataOffset = -1; - - *ValueCell = NewValueCell; - - return TRUE; -} - - -static BOOL -CmiAddValueToKeyValueList(PREGISTRY_HIVE Hive, - BLOCK_OFFSET KeyCellOffset, - BLOCK_OFFSET ValueCellOffset) -{ - PVALUE_LIST_CELL ValueListCell; - PKEY_CELL KeyCell; - - KeyCell = (PKEY_CELL)CmiGetCell (Hive, KeyCellOffset, NULL); - if (KeyCell == NULL) - { - DPRINT1 ("CmiGetBlock() failed\n"); - return FALSE; - } - - ValueListCell = (PVALUE_LIST_CELL)CmiGetCell (Hive, KeyCell->ValueListOffset, NULL); - if (ValueListCell == NULL) - { - DPRINT1 ("CmiGetBlock() failed\n"); - return FALSE; - } - - ValueListCell->ValueOffset[KeyCell->NumberOfValues] = ValueCellOffset; - KeyCell->NumberOfValues++; - - return TRUE; -} - - -static BOOL -CmiExportValue (PREGISTRY_HIVE Hive, - BLOCK_OFFSET KeyCellOffset, - HKEY Key, - PVALUE Value) -{ - BLOCK_OFFSET ValueCellOffset; - BLOCK_OFFSET DataCellOffset; - PVALUE_CELL ValueCell; - PDATA_CELL DataCell; - ULONG SrcDataSize; - ULONG DstDataSize; - ULONG DataType; - PCHAR Data; - BOOL Expand = FALSE; - - DPRINT ("CmiExportValue('%s') called\n", (Value == NULL) ? "<default>" : (PCHAR)Value->Name); - DPRINT ("DataSize %lu\n", (Value == NULL) ? Key->DataSize : Value->DataSize); - - /* Allocate value cell */ - if (!CmiAllocateValueCell(Hive, &ValueCell, &ValueCellOffset, (Value == NULL) ? NULL : Value->Name)) - { - return FALSE; - } - - if (!CmiAddValueToKeyValueList(Hive, KeyCellOffset, ValueCellOffset)) - { - return FALSE; - } - - if (Value == NULL) - { - DataType = Key->DataType; - SrcDataSize = Key->DataSize; - Data = Key->Data; - } - else - { - DataType = Value->DataType; - SrcDataSize = Value->DataSize; - Data = Value->Data; - } - - DstDataSize = SrcDataSize; - if (DataType == REG_SZ || - DataType == REG_EXPAND_SZ || - DataType == REG_MULTI_SZ) - { - DstDataSize *= sizeof(WCHAR); - Expand = TRUE; - } - - if ((DstDataSize & REG_DATA_SIZE_MASK) <= sizeof(BLOCK_OFFSET)) - { - ValueCell->DataSize = DstDataSize | REG_DATA_IN_OFFSET; - ValueCell->DataType = DataType; - if (Expand) - { - memexpand ((PWCHAR)&ValueCell->DataOffset, - (PCHAR)&Data, - SrcDataSize); - } - else - { - memcpy (&ValueCell->DataOffset, - &Data, - SrcDataSize); - } - } - else - { - /* Allocate data cell */ - if (!CmiAllocateCell (Hive, - sizeof(CELL_HEADER) + DstDataSize, - (PVOID *)&DataCell, - &DataCellOffset)) - { - return FALSE; - } - - ValueCell->DataOffset = DataCellOffset; - ValueCell->DataSize = DstDataSize & REG_DATA_SIZE_MASK; - ValueCell->DataType = DataType; - - if (Expand) - { - if (SrcDataSize <= sizeof(BLOCK_OFFSET)) - { - memexpand ((PWCHAR)DataCell->Data, - (PCHAR)&Data, - SrcDataSize); - } - else - { - memexpand ((PWCHAR)DataCell->Data, - Data, - SrcDataSize); - } - } - else - { - memcpy (DataCell->Data, - Data, - SrcDataSize); - } - } - - return TRUE; -} - - -static BOOL -CmiExportSubKey (PREGISTRY_HIVE Hive, - BLOCK_OFFSET ParentKeyOffset, - HKEY ParentKey, - HKEY Key) -{ - BLOCK_OFFSET NKBOffset; - PKEY_CELL NewKeyCell; - ULONG KeyCellSize; - USHORT SubKeyCount; - ULONG ValueCount; - PLIST_ENTRY Entry; - HKEY SubKey; - PVALUE Value; - - DPRINT ("CmiExportSubKey('%s') called\n", Key->Name); - - /* Don't export links */ - if (Key->DataType == REG_LINK) - return TRUE; - - /* Allocate key cell */ - KeyCellSize = sizeof(KEY_CELL) + Key->NameSize - 1; - if (!CmiAllocateCell (Hive, KeyCellSize, (PVOID*)&NewKeyCell, &NKBOffset)) - { - DPRINT1 ("CmiAllocateBlock() failed\n"); - return FALSE; - } - - /* Initialize key cell */ - NewKeyCell->Id = REG_KEY_CELL_ID; - NewKeyCell->Type = REG_KEY_CELL_TYPE; - NewKeyCell->LastWriteTime = 0; - NewKeyCell->ParentKeyOffset = ParentKeyOffset; - NewKeyCell->NumberOfSubKeys = 0; - NewKeyCell->HashTableOffset = -1; - NewKeyCell->NumberOfValues = 0; - NewKeyCell->ValueListOffset = -1; - NewKeyCell->SecurityKeyOffset = -1; - NewKeyCell->NameSize = Key->NameSize - 1; - NewKeyCell->ClassNameOffset = -1; - memcpy (NewKeyCell->Name, - Key->Name, - Key->NameSize - 1); - - /* Add key cell to the parent key's hash table */ - if (!CmiAddKeyToParentHashTable (Hive, - ParentKeyOffset, - NewKeyCell, - NKBOffset)) - { - DPRINT1 ("CmiAddKeyToParentHashTable() failed\n"); - return FALSE; - } - - ValueCount = RegGetValueCount (Key); - DPRINT ("ValueCount: %lu\n", ValueCount); - if (ValueCount > 0) - { - /* Allocate value list cell */ - CmiAllocateValueListCell (Hive, - &NewKeyCell->ValueListOffset, - ValueCount); - - if (Key->DataSize != 0) - { - if (!CmiExportValue (Hive, NKBOffset, Key, NULL)) - return FALSE; - } - - /* Enumerate values */ - Entry = Key->ValueList.Flink; - while (Entry != &Key->ValueList) - { - Value = CONTAINING_RECORD(Entry, - VALUE, - ValueList); - - if (!CmiExportValue (Hive, NKBOffset, Key, Value)) - return FALSE; - - Entry = Entry->Flink; - } - } - - SubKeyCount = RegGetSubKeyCount (Key); - DPRINT ("SubKeyCount: %lu\n", SubKeyCount); - if (SubKeyCount > 0) - { - /* Allocate hash table cell */ - CmiAllocateHashTableCell (Hive, - &NewKeyCell->HashTableOffset, - SubKeyCount); - - /* Enumerate subkeys */ - Entry = Key->SubKeyList.Flink; - while (Entry != &Key->SubKeyList) - { - SubKey = CONTAINING_RECORD(Entry, - KEY, - KeyList); - - if (!CmiExportSubKey (Hive, NKBOffset, Key, SubKey)) - return FALSE; - - Entry = Entry->Flink; - } - } - - return TRUE; -} - - -static VOID -CmiCalcHiveChecksum (PREGISTRY_HIVE Hive) -{ - PULONG Buffer; - ULONG Sum; - ULONG i; - - Buffer = (PULONG)Hive->HiveHeader; - Sum = 0; - for (i = 0; i < 127; i++) - Sum ^= Buffer[i]; - if (Sum == (ULONG)-1) - Sum = (ULONG)-2; - if (Sum == 0) - Sum = 1; - - Hive->HiveHeader->Checksum = Sum; -} - - -BOOL -CmiExportHive (PREGISTRY_HIVE Hive, - PCHAR KeyName) -{ - PKEY_CELL KeyCell; - HKEY Key; - USHORT SubKeyCount; - ULONG ValueCount; - PLIST_ENTRY Entry; - HKEY SubKey; - PVALUE Value; - - DPRINT ("CmiExportHive(%p, '%s') called\n", Hive, KeyName); - - if (RegOpenKey (NULL, KeyName, &Key) != ERROR_SUCCESS) - { - DPRINT1 ("RegOpenKey() failed\n"); - return FALSE; - } - - DPRINT ("Name: %s\n", KeyName); - - KeyCell = (PKEY_CELL)CmiGetCell (Hive, - Hive->HiveHeader->RootKeyOffset, - NULL); - if (KeyCell == NULL) - { - DPRINT1 ("CmiGetCell() failed\n"); - return FALSE; - } - - ValueCount = RegGetValueCount (Key); - DPRINT ("ValueCount: %lu\n", ValueCount); - if (ValueCount > 0) - { - /* Allocate value list cell */ - CmiAllocateValueListCell (Hive, - &KeyCell->ValueListOffset, - ValueCount); - - if (Key->DataSize != 0) - { - if (!CmiExportValue (Hive, Hive->HiveHeader->RootKeyOffset, Key, NULL)) - return FALSE; - } - - /* Enumerate values */ - Entry = Key->ValueList.Flink; - while (Entry != &Key->ValueList) - { - Value = CONTAINING_RECORD(Entry, - VALUE, - ValueList); - - if (!CmiExportValue (Hive, Hive->HiveHeader->RootKeyOffset, Key, Value)) - return FALSE; - - Entry = Entry->Flink; - } - } - - SubKeyCount = RegGetSubKeyCount (Key); - DPRINT ("SubKeyCount: %lu\n", SubKeyCount); - if (SubKeyCount > 0) - { - /* Allocate hash table cell */ - CmiAllocateHashTableCell (Hive, - &KeyCell->HashTableOffset, - SubKeyCount); - - /* Enumerate subkeys */ - Entry = Key->SubKeyList.Flink; - while (Entry != &Key->SubKeyList) - { - SubKey = CONTAINING_RECORD(Entry, - KEY, - KeyList); - - if (!CmiExportSubKey (Hive, Hive->HiveHeader->RootKeyOffset, Key, SubKey)) - return FALSE; - - Entry = Entry->Flink; - } - } - - CmiCalcHiveChecksum (Hive); - - return TRUE; -} - - -static BOOL -CmiWriteHive(PREGISTRY_HIVE Hive, - PCHAR FileName) -{ - PHBIN Bin; - FILE *File; - ULONG i; - -#if 0 - /* Check for existing hive file */ - File = fopen (FileName, "rb"); - if (File != NULL) - { - printf (" File already exists\n"); - fclose (File); - return TRUE; - } -#endif - - /* Create new hive file */ - File = fopen (FileName, "w+b"); - if (File == NULL) - { - printf(" Error creating/opening file\n"); - return FALSE; - } - - fseek (File, 0, SEEK_SET); - - /* Calculate header checksum */ - CmiCalcHiveChecksum (Hive); - - /* Write hive header */ - fwrite (Hive->HiveHeader, REG_BLOCK_SIZE, 1, File); - - Bin = NULL; - for (i = 0; i < Hive->BlockListSize; i++) - { - if (Hive->BlockList[i] != Bin) - { - Bin = Hive->BlockList[i]; - - DPRINT ("Bin[%lu]: Offset 0x%lx Size 0x%lx\n", - i, Bin->BinOffset, Bin->BinSize); - - fwrite (Bin, Bin->BinSize, 1, File); - } - } - - fclose (File); - - return TRUE; -} - - -BOOL -ExportBinaryHive (PCHAR FileName, - PCHAR KeyName) -{ - PREGISTRY_HIVE Hive; - - printf (" Creating binary hive: %s\n", FileName); - - Hive = CmiCreateRegistryHive (KeyName); - if (Hive == NULL) - return FALSE; - - if (!CmiExportHive (Hive, KeyName)) - { - CmiDestroyRegistryHive (Hive); - return FALSE; - } - - if (!CmiWriteHive (Hive, FileName)) - { - CmiDestroyRegistryHive (Hive); - return FALSE; - } - - CmiDestroyRegistryHive (Hive); - - return TRUE; -} - -/* EOF */ Copied: branches/powerpc/reactos/tools/mkhive/binhive.cpp (from r26531, branches/powerpc/reactos/tools/mkhive/binhive.c) URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/bi…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/binhive.c (original) +++ branches/powerpc/reactos/tools/mkhive/binhive.cpp Sun Apr 29 13:37:17 2007 @@ -113,7 +113,7 @@ E_ULONG Reserved[99]; /* Checksum of first 0x200 bytes */ - E_ULONG Checksum; + ULONG Checksum; } GCC_PACKED HIVE_HEADER, *PHIVE_HEADER; typedef struct _HBIN Removed: branches/powerpc/reactos/tools/mkhive/mkhive.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/mk…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/mkhive.c (original) +++ branches/powerpc/reactos/tools/mkhive/mkhive.c (removed) @@ -1,194 +1,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* $Id$ - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/mkhive.c - * PURPOSE: Hive maker - * PROGRAMMER: Eric Kohl - */ - -#include <limits.h> -#include <string.h> -#include <stdio.h> - -#include "mkhive.h" -#include "registry.h" -#include "reginf.h" -#include "binhive.h" - -EndianOrder order; - -#ifdef _MSC_VER -#include <stdlib.h> -#define PATH_MAX _MAX_PATH -#endif//_MSC_VER - -#ifndef WIN32 -#ifndef PATH_MAX -#define PATH_MAX 260 -#endif -#define DIR_SEPARATOR_CHAR '/' -#define DIR_SEPARATOR_STRING "/" -#else -#define DIR_SEPARATOR_CHAR '\\' -#define DIR_SEPARATOR_STRING "\\" -#endif - - -void usage (void) -{ - printf ("Usage: mkhive <srcdir> <dstdir> [addinf]\n\n"); - printf (" srcdir - inf files are read from this directory\n"); - printf (" dstdir - binary hive files are created in this directory\n"); - printf (" addinf - additional inf files with full path\n"); -} - -void convert_path(char *dst, char *src) -{ - int i; - - i = 0; - while (src[i] != 0) - { -#ifdef WIN32 - if (src[i] == '/') - { - dst[i] = '\\'; - } -#else - if (src[i] == '\\') - { - dst[i] = '/'; - } -#endif - else - { - dst[i] = src[i]; - } - - i++; - } - dst[i] = 0; -} - - -int main (int argc, char *argv[]) -{ - char FileName[PATH_MAX]; - int Param; - - printf ("Binary hive maker\n"); - - if (argc < 3) - { - usage (); - return 1; - } - - order = LE; - if (!strcmp(argv[1], "-be")) - { - order = BE; - argc--; - argv++; - } - else if(!strcmp(argv[1], "-le")) - { - order = LE; - argc--; - argv++; - } - - RegInitializeRegistry (); - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivesys.inf"); - ImportRegistryFile (FileName, "AddReg", FALSE); - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivecls.inf"); - ImportRegistryFile (FileName, "AddReg", FALSE); - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivesft.inf"); - ImportRegistryFile (FileName, "AddReg", FALSE); - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivedef.inf"); - ImportRegistryFile (FileName, "AddReg", FALSE); - - for (Param = 3; Param < argc; Param++) - { - convert_path (FileName, argv[Param]); - ImportRegistryFile (FileName, "AddReg", FALSE); - } - - convert_path (FileName, argv[2]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "system"); - if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SYSTEM")) - { - return 1; - } - - convert_path (FileName, argv[2]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "software"); - if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SOFTWARE")) - { - return 1; - } - - convert_path (FileName, argv[2]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "sam"); - if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SAM")) - { - return 1; - } - - convert_path (FileName, argv[2]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "security"); - if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SECURITY")) - { - return 1; - } - - convert_path (FileName, argv[2]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "default"); - if (!ExportBinaryHive (FileName, "\\Registry\\User\\.DEFAULT")) - { - return 1; - } - -// RegShutdownRegistry (); - - printf (" Done.\n"); - - return 0; -} - -/* EOF */ Modified: branches/powerpc/reactos/tools/mkhive/mkhive.mak URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/mk…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/mkhive.mak (original) +++ branches/powerpc/reactos/tools/mkhive/mkhive.mak Sun Apr 29 13:37:17 2007 @@ -19,16 +19,16 @@ $(EXEPREFIX)$(MKHIVE_OUT_)mkhive$(EXEPOSTFIX) MKHIVE_SOURCES = $(addprefix $(MKHIVE_BASE_), \ - binhive.c \ - mkhive.c \ - reginf.c \ - registry.c \ + binhive.cpp \ + mkhive.cpp \ + reginf.cpp \ + registry.cpp \ ) MKHIVE_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o)) + $(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.cpp=.o)) -MKHIVE_HOST_CFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -g3 -xc++ +MKHIVE_HOST_CXXFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -g3 MKHIVE_HOST_LFLAGS = $(xTOOLS_LFLAGS) -g3 -lstdc++ @@ -39,21 +39,21 @@ $(ECHO_LD) ${host_gcc} $(MKHIVE_OBJECTS) $(INFLIB_HOST_OBJECTS) $(MKHIVE_HOST_LFLAGS) -o $@ -$(MKHIVE_INT_)binhive.o: $(MKHIVE_BASE_)binhive.c | $(MKHIVE_INT) +$(MKHIVE_INT_)binhive.o: $(MKHIVE_BASE_)binhive.cpp | $(MKHIVE_INT) $(ECHO_CC) - ${host_gcc} $(MKHIVE_HOST_CFLAGS) -c $< -o $@ + ${host_gpp} $(MKHIVE_HOST_CXXFLAGS) -c $< -o $@ -$(MKHIVE_INT_)mkhive.o: $(MKHIVE_BASE_)mkhive.c | $(MKHIVE_INT) +$(MKHIVE_INT_)mkhive.o: $(MKHIVE_BASE_)mkhive.cpp | $(MKHIVE_INT) $(ECHO_CC) - ${host_gcc} $(MKHIVE_HOST_CFLAGS) -c $< -o $@ + ${host_gpp} $(MKHIVE_HOST_CXXFLAGS) -c $< -o $@ -$(MKHIVE_INT_)reginf.o: $(MKHIVE_BASE_)reginf.c | $(MKHIVE_INT) +$(MKHIVE_INT_)reginf.o: $(MKHIVE_BASE_)reginf.cpp | $(MKHIVE_INT) $(ECHO_CC) - ${host_gcc} $(MKHIVE_HOST_CFLAGS) -c $< -o $@ + ${host_gpp} $(MKHIVE_HOST_CXXFLAGS) -c $< -o $@ -$(MKHIVE_INT_)registry.o: $(MKHIVE_BASE_)registry.c | $(MKHIVE_INT) +$(MKHIVE_INT_)registry.o: $(MKHIVE_BASE_)registry.cpp | $(MKHIVE_INT) $(ECHO_CC) - ${host_gcc} $(MKHIVE_HOST_CFLAGS) -c $< -o $@ + ${host_gpp} $(MKHIVE_HOST_CXXFLAGS) -c $< -o $@ .PHONY: mkhive_clean mkhive_clean: Removed: branches/powerpc/reactos/tools/mkhive/reginf.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/re…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/reginf.c (original) +++ branches/powerpc/reactos/tools/mkhive/reginf.c (removed) @@ -1,482 +1,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* $Id$ - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/reginf.h - * PURPOSE: Inf file import code - * PROGRAMMER: Eric Kohl - */ - -/* INCLUDES *****************************************************************/ - -#include <string.h> -#include <stdlib.h> -#include <stdio.h> - -#include "mkhive.h" -#include "registry.h" -#include <infhost.h> - - - -#define FLG_ADDREG_BINVALUETYPE 0x00000001 -#define FLG_ADDREG_NOCLOBBER 0x00000002 -#define FLG_ADDREG_DELVAL 0x00000004 -#define FLG_ADDREG_APPEND 0x00000008 -#define FLG_ADDREG_KEYONLY 0x00000010 -#define FLG_ADDREG_OVERWRITEONLY 0x00000020 -#define FLG_ADDREG_TYPE_SZ 0x00000000 -#define FLG_ADDREG_TYPE_MULTI_SZ 0x00010000 -#define FLG_ADDREG_TYPE_EXPAND_SZ 0x00020000 -#define FLG_ADDREG_TYPE_BINARY (0x00000000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_DWORD (0x00010000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_NONE (0x00020000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_MASK (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE) - - -/* FUNCTIONS ****************************************************************/ - -static BOOL -GetRootKey (PCHAR Name) -{ - if (!strcasecmp (Name, "HKCR")) - { - strcpy (Name, "\\Registry\\Machine\\SOFTWARE\\Classes\\"); - return TRUE; - } - - if (!strcasecmp (Name, "HKCU")) - { - strcpy (Name, "\\Registry\\User\\.DEFAULT\\"); - return TRUE; - } - - if (!strcasecmp (Name, "HKLM")) - { - strcpy (Name, "\\Registry\\Machine\\"); - return TRUE; - } - - if (!strcasecmp (Name, "HKU")) - { - strcpy (Name, "\\Registry\\User\\"); - return TRUE; - } - -#if 0 - if (!strcasecmp (Name, "HKR")) - return FALSE; -#endif - - return FALSE; -} - - -/*********************************************************************** - * AppendMultiSzValue - * - * Append a multisz string to a multisz registry value. - */ -static VOID -AppendMultiSzValue (HKEY KeyHandle, - PCHAR ValueName, - PCHAR Strings, - ULONG StringSize) -{ - ULONG Size; - ULONG Type; - ULONG Total; - PCHAR Buffer; - PCHAR p; - int len; - LONG Error; - - Error = RegQueryValue (KeyHandle, - ValueName, - &Type, - NULL, - &Size); - if ((Error != ERROR_SUCCESS) || - (Type != REG_MULTI_SZ)) - return; - - Buffer = (char *)malloc (Size + StringSize); - if (Buffer == NULL) - return; - - Error = RegQueryValue (KeyHandle, - ValueName, - NULL, - (PCHAR)Buffer, - &Size); - if (Error != ERROR_SUCCESS) - goto done; - - /* compare each string against all the existing ones */ - Total = Size; - while (*Strings != 0) - { - len = strlen (Strings) + 1; - - for (p = Buffer; *p != 0; p += strlen (p) + 1) - if (!strcasecmp (p, Strings)) - break; - - if (*p == 0) /* not found, need to append it */ - { - memcpy (p, Strings, len); - p[len] = 0; - Total += len; - } - Strings += len; - } - - if (Total != Size) - { - DPRINT ("setting value %s to %s\n", ValueName, Buffer); - RegSetValue (KeyHandle, - ValueName, - REG_MULTI_SZ, - (PCHAR)Buffer, - Total); - } - -done: - free (Buffer); -} - - -/*********************************************************************** - * do_reg_operation - * - * Perform an add/delete registry operation depending on the flags. - */ -static BOOL -do_reg_operation(HKEY KeyHandle, - PCHAR ValueName, - PINFCONTEXT Context, - ULONG Flags) -{ - CHAR EmptyStr = (CHAR)0; - ULONG Type; - ULONG Size; - LONG Error; - - if (Flags & FLG_ADDREG_DELVAL) /* deletion */ - { - if (ValueName) - { - RegDeleteValue (KeyHandle, - ValueName); - } - else - { - RegDeleteKey (KeyHandle, - NULL); - } - - return TRUE; - } - - if (Flags & FLG_ADDREG_KEYONLY) - return TRUE; - - if (Flags & (FLG_ADDREG_NOCLOBBER | FLG_ADDREG_OVERWRITEONLY)) - { - Error = RegQueryValue (KeyHandle, - ValueName, - NULL, - NULL, - NULL); - if ((Error == ERROR_SUCCESS) && - (Flags & FLG_ADDREG_NOCLOBBER)) - return TRUE; - - if ((Error != ERROR_SUCCESS) && - (Flags & FLG_ADDREG_OVERWRITEONLY)) - return TRUE; - } - - switch (Flags & FLG_ADDREG_TYPE_MASK) - { - case FLG_ADDREG_TYPE_SZ: - Type = REG_SZ; - break; - - case FLG_ADDREG_TYPE_MULTI_SZ: - Type = REG_MULTI_SZ; - break; - - case FLG_ADDREG_TYPE_EXPAND_SZ: - Type = REG_EXPAND_SZ; - break; - - case FLG_ADDREG_TYPE_BINARY: - Type = REG_BINARY; - break; - - case FLG_ADDREG_TYPE_DWORD: - Type = REG_DWORD; - break; - - case FLG_ADDREG_TYPE_NONE: - Type = REG_NONE; - break; - - default: - Type = Flags >> 16; - break; - } - - if (!(Flags & FLG_ADDREG_BINVALUETYPE) || - (Type == REG_DWORD && InfHostGetFieldCount (Context) == 5)) - { - PCHAR Str = NULL; - - if (Type == REG_MULTI_SZ) - { - if (InfHostGetMultiSzField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Str = (char *)malloc (Size); - if (Str == NULL) - return FALSE; - - InfHostGetMultiSzField (Context, 5, Str, Size, NULL); - } - - if (Flags & FLG_ADDREG_APPEND) - { - if (Str == NULL) - return TRUE; - - AppendMultiSzValue (KeyHandle, - ValueName, - Str, - Size); - - free (Str); - return TRUE; - } - /* else fall through to normal string handling */ - } - else - { - if (InfHostGetStringField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Str = (char *)malloc (Size); - if (Str == NULL) - return FALSE; - - InfHostGetStringField (Context, 5, Str, Size, NULL); - } - } - - if (Type == REG_DWORD) - { - ULONG dw = Str ? strtoul (Str, NULL, 0) : 0; - - DPRINT("setting dword %s to %lx\n", ValueName, dw); - - RegSetValue (KeyHandle, - ValueName, - Type, - (char *)&dw, - sizeof(ULONG)); - } - else - { - DPRINT("setting value %s to %s\n", ValueName, Str); - - if (Str) - { - RegSetValue (KeyHandle, - ValueName, - Type, - (char *)Str, - Size); - } - else - { - RegSetValue (KeyHandle, - ValueName, - Type, - (char *)&EmptyStr, - sizeof(CHAR)); - } - } - free (Str); - } - else /* get the binary data */ - { - PCHAR Data = NULL; - - if (InfHostGetBinaryField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Data = (char *)malloc (Size); - if (Data == NULL) - return FALSE; - - DPRINT("setting binary data %s len %lu\n", ValueName, Size); - InfHostGetBinaryField (Context, 5, (unsigned char *)Data, Size, NULL); - } - - RegSetValue (KeyHandle, - ValueName, - Type, - (char *)Data, - Size); - - free (Data); - } - - return TRUE; -} - - -/*********************************************************************** - * registry_callback - * - * Called once for each AddReg and DelReg entry in a given section. - */ -static BOOL -registry_callback (HINF hInf, PCHAR Section, BOOL Delete) -{ - CHAR Buffer[MAX_INF_STRING_LENGTH]; - PCHAR ValuePtr; - ULONG Flags; - ULONG Length; - - PINFCONTEXT Context = NULL; - HKEY KeyHandle; - BOOL Ok; - - - Ok = InfHostFindFirstLine (hInf, Section, NULL, &Context) == 0; - if (!Ok) - return TRUE; /* Don't fail if the section isn't present */ - - for (;Ok; Ok = (InfHostFindNextLine (Context, Context) == 0)) - { - /* get root */ - if (InfHostGetStringField (Context, 1, Buffer, MAX_INF_STRING_LENGTH, NULL) != 0) - continue; - if (!GetRootKey (Buffer)) - continue; - - /* get key */ - Length = strlen (Buffer); - if (InfHostGetStringField (Context, 2, Buffer + Length, MAX_INF_STRING_LENGTH - Length, NULL) != 0) - *Buffer = 0; - - DPRINT("KeyName: <%s>\n", Buffer); - - if (Delete) - { - Flags = FLG_ADDREG_DELVAL; - } - else - { - /* get flags */ - if (InfHostGetIntField (Context, 4, (PULONG)&Flags) != 0) - Flags = 0; - } - - DPRINT("Flags: %lx\n", Flags); - - if (Delete || (Flags & FLG_ADDREG_OVERWRITEONLY)) - { - if (RegOpenKey (NULL, Buffer, &KeyHandle) != ERROR_SUCCESS) - { - DPRINT("RegOpenKey(%s) failed\n", Buffer); - continue; /* ignore if it doesn't exist */ - } - } - else - { - if (RegCreateKey (NULL, Buffer, &KeyHandle) != ERROR_SUCCESS) - { - DPRINT("RegCreateKey(%s) failed\n", Buffer); - continue; - } - } - - /* get value name */ - if (InfHostGetStringField (Context, 3, Buffer, MAX_INF_STRING_LENGTH, NULL) == 0) - { - ValuePtr = Buffer; - } - else - { - ValuePtr = NULL; - } - - /* and now do it */ - if (!do_reg_operation (KeyHandle, ValuePtr, Context, Flags)) - { - return FALSE; - } - } - - InfHostFreeContext(Context); - - return TRUE; -} - - -BOOL -ImportRegistryFile(PCHAR FileName, - PCHAR Section, - BOOL Delete) -{ - HINF hInf; - ULONG ErrorLine; - - /* Load inf file from install media. */ - if (InfHostOpenFile(&hInf, FileName, &ErrorLine) != 0) - { - DPRINT1 ("InfHostOpenFile() failed\n"); - return FALSE; - } - - if (!registry_callback (hInf, "DelReg", TRUE)) - { - DPRINT1 ("registry_callback() failed\n"); - } - - if (!registry_callback (hInf, "AddReg", FALSE)) - { - DPRINT1 ("registry_callback() failed\n"); - } - - InfHostCloseFile (hInf); - - return TRUE; -} - -/* EOF */ Removed: branches/powerpc/reactos/tools/mkhive/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/mkhive/re…
============================================================================== --- branches/powerpc/reactos/tools/mkhive/registry.c (original) +++ branches/powerpc/reactos/tools/mkhive/registry.c (removed) @@ -1,706 +1,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* $Id$ - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/registry.c - * PURPOSE: Registry code - * PROGRAMMER: Eric Kohl - */ - -/* - * TODO: - * - Implement RegDeleteKey(). - * - Fix RegEnumValue(). - */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> - -#include "mkhive.h" -#include "registry.h" - - -static HKEY RootKey; - - -VOID -RegInitializeRegistry(VOID) -{ - HKEY ControlSetKey; - HKEY LinkKey; - - /* Create root key */ - RootKey = (HKEY)malloc(sizeof(KEY)); - - InitializeListHead(&RootKey->SubKeyList); - InitializeListHead(&RootKey->ValueList); - InitializeListHead(&RootKey->KeyList); - - RootKey->SubKeyCount = 0; - RootKey->ValueCount = 0; - - RootKey->NameSize = 2; - RootKey->Name = (PCHAR)malloc(2); - strcpy(RootKey->Name, "\\"); - - RootKey->DataType = 0; - RootKey->DataSize = 0; - RootKey->Data = NULL; - - /* Create SYSTEM key */ - RegCreateKey(RootKey, - "Registry\\Machine\\SYSTEM", - NULL); - - /* Create link 'CurrentControlSet' --> 'ControlSet001' */ - RegCreateKey(RootKey, - "Registry\\Machine\\SYSTEM\\ControlSet001", - &ControlSetKey); - - RegCreateKey(RootKey, - "Registry\\Machine\\SYSTEM\\CurrentControlSet", - &LinkKey); - - RegSetValue(LinkKey, - NULL, - REG_LINK, - (PCHAR)&ControlSetKey, - sizeof(PVOID)); - - /* Create HARDWARE key */ - RegCreateKey(RootKey, - "Registry\\Machine\\HARDWARE", - NULL); - - /* Create SAM key */ - RegCreateKey(RootKey, - "Registry\\Machine\\SAM", - NULL); - - /* Create SECURITY key */ - RegCreateKey(RootKey, - "Registry\\Machine\\SECURITY", - NULL); - - /* Create SOFTWARE key */ - RegCreateKey(RootKey, - "Registry\\Machine\\SOFTWARE", - NULL); - - /* Create DEFAULT key */ - RegCreateKey(RootKey, - "Registry\\User\\.DEFAULT", - NULL); -} - - -LONG -RegCreateKey(HKEY ParentKey, - PCHAR KeyName, - PHKEY Key) -{ - PLIST_ENTRY Ptr; - HKEY SearchKey = INVALID_HANDLE_VALUE; - HKEY CurrentKey; - HKEY NewKey; - PCHAR p; - PCHAR name; - int subkeyLength; - int stringLength; - - DPRINT ("RegCreateKey('%s')\n", KeyName); - - if (*KeyName == '\\') - { - KeyName++; - CurrentKey = RootKey; - } - else if (ParentKey == NULL) - { - CurrentKey = RootKey; - } - else - { - CurrentKey = ParentKey; - } - - /* Check whether current key is a link */ - if (CurrentKey->DataType == REG_LINK) - { - CurrentKey = (HKEY)CurrentKey->Data; - } - - while (*KeyName != 0) - { - DPRINT ("KeyName '%s'\n", KeyName); - - if (*KeyName == '\\') - KeyName++; - p = strchr (KeyName, '\\'); - if ((p != NULL) && (p != KeyName)) - { - subkeyLength = p - KeyName; - stringLength = subkeyLength + 1; - name = KeyName; - } - else - { - subkeyLength = strlen (KeyName); - stringLength = subkeyLength; - name = KeyName; - } - - Ptr = CurrentKey->SubKeyList.Flink; - while (Ptr != &CurrentKey->SubKeyList) - { - DPRINT ("Ptr 0x%p\n", Ptr); - - SearchKey = CONTAINING_RECORD(Ptr, - KEY, - KeyList); - DPRINT ("SearchKey 0x%p\n", SearchKey); - DPRINT ("Searching '%s'\n", SearchKey->Name); - if (strncasecmp (SearchKey->Name, name, subkeyLength) == 0) - break; - - Ptr = Ptr->Flink; - } - - if (Ptr == &CurrentKey->SubKeyList) - { - /* no key found -> create new subkey */ - NewKey = (HKEY)malloc (sizeof(KEY)); - if (NewKey == NULL) - return ERROR_OUTOFMEMORY; - - InitializeListHead (&NewKey->SubKeyList); - InitializeListHead (&NewKey->ValueList); - - NewKey->SubKeyCount = 0; - NewKey->ValueCount = 0; - - NewKey->DataType = 0; - NewKey->DataSize = 0; - NewKey->Data = NULL; - - InsertTailList (&CurrentKey->SubKeyList, &NewKey->KeyList); - CurrentKey->SubKeyCount++; - - NewKey->NameSize = subkeyLength + 1; - NewKey->Name = (PCHAR)malloc (NewKey->NameSize); - if (NewKey->Name == NULL) - return(ERROR_OUTOFMEMORY); - memcpy(NewKey->Name, name, subkeyLength); - NewKey->Name[subkeyLength] = 0; - - DPRINT ("NewKey 0x%p\n", NewKey); - DPRINT ("NewKey '%s' Length %ld\n", NewKey->Name, NewKey->NameSize); - - CurrentKey = NewKey; - } - else - { - CurrentKey = SearchKey; - - /* Check whether current key is a link */ - if (CurrentKey->DataType == REG_LINK) - { - CurrentKey = (HKEY)CurrentKey->Data; - } - } - - KeyName = KeyName + stringLength; - } - - if (Key != NULL) - *Key = CurrentKey; - - return ERROR_SUCCESS; -} - - -LONG -RegDeleteKey(HKEY Key, - PCHAR Name) -{ - if (Name != NULL && strchr(Name, '\\') != NULL) - return(ERROR_INVALID_PARAMETER); - - DPRINT1("FIXME!\n"); - - return(ERROR_SUCCESS); -} - - -LONG -RegEnumKey(HKEY Key, - ULONG Index, - PCHAR Name, - PULONG NameSize) -{ - PLIST_ENTRY Ptr; - HKEY SearchKey; - ULONG Count = 0; - ULONG Size; - - Ptr = Key->SubKeyList.Flink; - while (Ptr != &Key->SubKeyList) - { - if (Index == Count) - break; - - Count++; - Ptr = Ptr->Flink; - } - - if (Ptr == &Key->SubKeyList) - return(ERROR_NO_MORE_ITEMS); - - SearchKey = CONTAINING_RECORD(Ptr, - KEY, - KeyList); - - DPRINT ("Name '%s' Length %ld\n", SearchKey->Name, SearchKey->NameSize); - - Size = min(SearchKey->NameSize, *NameSize); - *NameSize = Size; - memcpy(Name, SearchKey->Name, Size); - - return(ERROR_SUCCESS); -} - - -LONG -RegOpenKey(HKEY ParentKey, - PCHAR KeyName, - PHKEY Key) -{ - PLIST_ENTRY Ptr; - HKEY SearchKey = INVALID_HANDLE_VALUE; - HKEY CurrentKey; - PCHAR p; - PCHAR name; - int subkeyLength; - int stringLength; - - DPRINT("KeyName '%s'\n", KeyName); - - *Key = NULL; - - if (*KeyName == '\\') - { - KeyName++; - CurrentKey = RootKey; - } - else if (ParentKey == NULL) - { - CurrentKey = RootKey; - } - else - { - CurrentKey = ParentKey; - } - - /* Check whether current key is a link */ - if (CurrentKey->DataType == REG_LINK) - { - CurrentKey = (HKEY)CurrentKey->Data; - } - - while (*KeyName != 0) - { - DPRINT ("KeyName '%s'\n", KeyName); - - if (*KeyName == '\\') - KeyName++; - p = strchr(KeyName, '\\'); - if ((p != NULL) && (p != KeyName)) - { - subkeyLength = p - KeyName; - stringLength = subkeyLength + 1; - name = KeyName; - } - else - { - subkeyLength = strlen(KeyName); - stringLength = subkeyLength; - name = KeyName; - } - - Ptr = CurrentKey->SubKeyList.Flink; - while (Ptr != &CurrentKey->SubKeyList) - { - DPRINT ("Ptr 0x%p\n", Ptr); - - SearchKey = CONTAINING_RECORD(Ptr, - KEY, - KeyList); - - DPRINT ("SearchKey 0x%p\n", SearchKey); - DPRINT ("Searching '%s'\n", SearchKey->Name); - - if (strncasecmp(SearchKey->Name, name, subkeyLength) == 0) - break; - - Ptr = Ptr->Flink; - } - - if (Ptr == &CurrentKey->SubKeyList) - { - return(ERROR_PATH_NOT_FOUND); - } - else - { - CurrentKey = SearchKey; - - /* Check whether current key is a link */ - if (CurrentKey->DataType == REG_LINK) - { - CurrentKey = (HKEY)CurrentKey->Data; - } - } - - KeyName = KeyName + stringLength; - } - - if (Key != NULL) - *Key = CurrentKey; - - return(ERROR_SUCCESS); -} - - -LONG -RegSetValue(HKEY Key, - PCHAR ValueName, - ULONG Type, - PCHAR Data, - ULONG DataSize) -{ - PLIST_ENTRY Ptr; - PVALUE Value = NULL; - - DPRINT ("Key 0x%x, ValueName '%s', Type %d, Data 0x%x, DataSize %d\n", - (int)Key, ValueName, (int)Type, (int)Data, (int)DataSize); - - if ((ValueName == NULL) || (*ValueName == 0)) - { - /* set default value */ - if ((Key->Data != NULL) && (Key->DataSize > sizeof(PCHAR))) - { - free(Key->Data); - } - - if (DataSize <= sizeof(PCHAR)) - { - Key->DataSize = DataSize; - Key->DataType = Type; - memcpy(&Key->Data, Data, DataSize); - } - else - { - Key->Data = (PCHAR)malloc(DataSize); - Key->DataSize = DataSize; - Key->DataType = Type; - memcpy(Key->Data, Data, DataSize); - } - } - else - { - /* set non-default value */ - Ptr = Key->ValueList.Flink; - while (Ptr != &Key->ValueList) - { - Value = CONTAINING_RECORD(Ptr, - VALUE, - ValueList); - - DPRINT ("Value->Name '%s'\n", Value->Name); - - if (strcasecmp(Value->Name, ValueName) == 0) - break; - - Ptr = Ptr->Flink; - } - - if (Ptr == &Key->ValueList) - { - /* add new value */ - DPRINT("No value found - adding new value\n"); - - Value = (PVALUE)malloc(sizeof(VALUE)); - if (Value == NULL) - return(ERROR_OUTOFMEMORY); - InsertTailList(&Key->ValueList, &Value->ValueList); - Key->ValueCount++; - Value->NameSize = strlen(ValueName)+1; - Value->Name = (PCHAR)malloc(Value->NameSize); - if (Value->Name == NULL) - return(ERROR_OUTOFMEMORY); - strcpy(Value->Name, ValueName); - Value->DataType = REG_NONE; - Value->DataSize = 0; - Value->Data = NULL; - } - - /* set new value */ - if ((Value->Data != NULL) && (Value->DataSize > sizeof(PCHAR))) - { - free(Value->Data); - } - - if (DataSize <= sizeof(PCHAR)) - { - Value->DataSize = DataSize; - Value->DataType = Type; - memcpy(&Value->Data, Data, DataSize); - } - else - { - Value->Data = (PCHAR)malloc(DataSize); - if (Value->Data == NULL) - return(ERROR_OUTOFMEMORY); - Value->DataType = Type; - Value->DataSize = DataSize; - memcpy(Value->Data, Data, DataSize); - } - } - return(ERROR_SUCCESS); -} - - -LONG -RegQueryValue(HKEY Key, - PCHAR ValueName, - PULONG Type, - PCHAR Data, - PULONG DataSize) -{ - ULONG Size; - PLIST_ENTRY Ptr; - PVALUE Value = NULL; - - if ((ValueName == NULL) || (*ValueName == 0)) - { - /* query default value */ - if (Key->Data == NULL) - return(ERROR_INVALID_PARAMETER); - - if (Type != NULL) - *Type = Key->DataType; - if ((Data != NULL) && (DataSize != NULL)) - { - if (Key->DataSize <= sizeof(PCHAR)) - { - Size = min(Key->DataSize, *DataSize); - memcpy(Data, &Key->Data, Size); - *DataSize = Size; - } - else - { - Size = min(Key->DataSize, *DataSize); - memcpy(Data, Key->Data, Size); - *DataSize = Size; - } - } - else if ((Data == NULL) && (DataSize != NULL)) - { - *DataSize = Key->DataSize; - } - } - else - { - /* query non-default value */ - Ptr = Key->ValueList.Flink; - while (Ptr != &Key->ValueList) - { - Value = CONTAINING_RECORD(Ptr, - VALUE, - ValueList); - - DPRINT("Searching for '%s'. Value name '%s'\n", ValueName, Value->Name); - - if (strcasecmp(Value->Name, ValueName) == 0) - break; - - Ptr = Ptr->Flink; - } - - if (Ptr == &Key->ValueList) - return(ERROR_INVALID_PARAMETER); - - if (Type != NULL) - *Type = Value->DataType; - if ((Data != NULL) && (DataSize != NULL)) - { - if (Value->DataSize <= sizeof(PCHAR)) - { - Size = min(Value->DataSize, *DataSize); - memcpy(Data, &Value->Data, Size); - *DataSize = Size; - } - else - { - Size = min(Value->DataSize, *DataSize); - memcpy(Data, Value->Data, Size); - *DataSize = Size; - } - } - else if ((Data == NULL) && (DataSize != NULL)) - { - *DataSize = Value->DataSize; - } - } - - return(ERROR_SUCCESS); -} - - -LONG -RegDeleteValue(HKEY Key, - PCHAR ValueName) -{ - PLIST_ENTRY Ptr; - PVALUE Value = NULL; - - if ((ValueName == NULL) || (*ValueName == 0)) - { - /* delete default value */ - if (Key->Data != NULL) - free(Key->Data); - Key->Data = NULL; - Key->DataSize = 0; - Key->DataType = 0; - } - else - { - /* delete non-default value */ - Ptr = Key->ValueList.Flink; - while (Ptr != &Key->ValueList) - { - Value = CONTAINING_RECORD(Ptr, - VALUE, - ValueList); - if (strcasecmp(Value->Name, ValueName) == 0) - break; - - Ptr = Ptr->Flink; - } - - if (Ptr == &Key->ValueList) - return(ERROR_INVALID_PARAMETER); - - /* delete value */ - Key->ValueCount--; - if (Value->Name != NULL) - free(Value->Name); - Value->Name = NULL; - Value->NameSize = 0; - - if (Value->DataSize > sizeof(PCHAR)) - { - if (Value->Data != NULL) - free(Value->Data); - } - Value->Data = NULL; - Value->DataSize = 0; - Value->DataType = 0; - - RemoveEntryList(&Value->ValueList); - free(Value); - } - return(ERROR_SUCCESS); -} - - -LONG -RegEnumValue(HKEY Key, - ULONG Index, - PCHAR ValueName, - PULONG NameSize, - PULONG Type, - PCHAR Data, - PULONG DataSize) -{ - PLIST_ENTRY Ptr; - PVALUE Value; - ULONG Count = 0; - - if (Key->Data != NULL) - { - if (Index > 0) - { - Index--; - } - else - { - /* enumerate default value */ - if (ValueName != NULL) - *ValueName = 0; - if (Type != NULL) - *Type = Key->DataType; - if (DataSize != NULL) - *DataSize = Key->DataSize; - - /* FIXME: return more values */ - } - } - - Ptr = Key->ValueList.Flink; - while (Ptr != &Key->ValueList) - { - if (Index == Count) - break; - - Count++; - Ptr = Ptr->Flink; - } - - if (Ptr == &Key->ValueList) - return(ERROR_NO_MORE_ITEMS); - - Value = CONTAINING_RECORD(Ptr, - VALUE, - ValueList); - - /* FIXME: return values */ - - return(ERROR_SUCCESS); -} - - -USHORT -RegGetSubKeyCount (HKEY Key) -{ - return Key->SubKeyCount; -} - - -ULONG -RegGetValueCount (HKEY Key) -{ - if (Key->DataSize != 0) - return Key->ValueCount + 1; - - return Key->ValueCount; -} - -/* EOF */
17 years, 9 months
1
0
0
0
[arty] 26578: Some additions: - Make sure translations are on after we set the new SDR - Add some new prep hardware Despite its weaknesses, I'm indebted to my thinkpad 860 for teaching me about PCI controllers, and giving me confidence on PPC hardware
by arty@svn.reactos.org
Author: arty Date: Sun Apr 29 13:12:55 2007 New Revision: 26578 URL:
http://svn.reactos.org/svn/reactos?rev=26578&view=rev
Log: Some additions: - Make sure translations are on after we set the new SDR - Add some new prep hardware Despite its weaknesses, I'm indebted to my thinkpad 860 for teaching me about PCI controllers, and giving me confidence on PPC hardware Added: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h branches/powerpc/reactos/tools/ppc.lost+found/link-freeldr Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c Sun Apr 29 13:12:55 2007 @@ -210,8 +210,9 @@ (ULONG_PTR)MmAllocateMemory(128*1024); DIRECTORY_ENTRY *Entry; LoaderBlock.ArchExtra = (ULONG)LocalBootInfo; - - printf("Translation map: %x\n", TranslationMap); + int msr = GetMSR(); + + printf("Translation map: %x (msr %x)\n", TranslationMap, msr); NewMapSdr = XROUNDUP(NewMapSdr,64*1024); printf("New SDR1 value will be %x\n", NewMapSdr); @@ -257,9 +258,12 @@ /* Tell them we're booting */ DrawNumber(LocalBootInfo,(ULONG)&LoaderBlock,10,100); + + SetSDR1( NewMapSdr ); + msr |= 0x30; + printf("About to set msr (%x)!!!\n", msr); + __asm__("mtmsr %0" : : "r" (msr) ); DrawNumber(LocalBootInfo,(ULONG)KernelEntryAddress,100,100); - - SetSDR1( NewMapSdr ); KernelEntryAddress( (void*)&LoaderBlock ); /* Nothing more */ while(1); Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c Sun Apr 29 13:12:55 2007 @@ -62,7 +62,9 @@ void PpcPrepVideoPrepareForReactOS() { + pci_setup(&pci1_desc); } + ULONG PpcPrepGetMemoryMap( PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize ) { Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h Sun Apr 29 13:12:55 2007 @@ -1,7 +1,12 @@ #ifndef FREELDR_ARCH_POWERPC_PREP_H #define FREELDR_ARCH_POWERPC_PREP_H +extern struct _pci_desc pci1_desc; extern struct _idectl_desc ide1_desc; +extern struct _vga_desc vga1_desc; +struct _pci_bar { + unsigned long data; +}; void sync(); void PpcPrepInit(); @@ -9,4 +14,11 @@ int ide_read( void *extension, char *buffer, int bytes ); void ide_setup( void *extension ); +void print_bar( struct _pci_bar *bar ); +void pci_setup( struct _pci_desc *pci_desc ); +void pci_read_bar( struct _pci_desc *pci_desc, int bus, int dev, int fn, int bar, struct _pci_bar *bar_data ); + +void vga_setup( struct _pci_desc *pci_desc, struct _vga_desc *vga_desc, + int bus, int dev, int fn ); + #endif//FREELDR_ARCH_POWERPC_PREP_H Added: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c (added) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c Sun Apr 29 13:12:55 2007 @@ -1,0 +1,127 @@ +#include <freeldr.h> +#include "prep.h" + +typedef struct _pci_cfg { + unsigned long addr; + unsigned long data; +} pci_cfg; + +typedef struct _pci_desc { + pci_cfg *cfg; +} pci_desc; + +pci_desc pci1_desc = { (void *)0x80000cf8 }; +#define rev16(x) ((((x)>>8)&0xff)|(((x)&0xff)<<8)) +#define rev32(x) ((((x)>>24)&0xff)|(((x)>>8)&0xff00)|(((x)&0xff00)<<8)|(((x)&0xff)<<24)) +#define pci_addr(bus,dev,fn,reg) \ + (0x80000000 | \ + ((bus & 0xff) << 16) | \ + ((dev & 0x1f) << 11) | \ + ((fn & 7) << 8) | \ + (reg & 0xfc)) +#if 0 +#define pci_cfg_addr(bus,dev,fn,reg) \ + ((bus == 0) ? \ + ((1 << (dev + 16)) | \ + (dev << 11) | \ + (fn << 8) | \ + ((reg & 0xfc) | 1)) : pci_addr(bus,dev,fn,reg)) +#else +#define pci_cfg_addr(bus,dev,fn,reg) pci_addr(bus,dev,fn,reg) +#endif + unsigned long pci_read( pci_desc *desc, int bus, int dev, int fn, int reg, int len ) { + sync(); + unsigned long save_state = desc->cfg->addr, ret = 0; + unsigned long addr = pci_cfg_addr(bus,dev,fn,reg); + unsigned long offset = reg & 3; + desc->cfg->addr = rev32(addr); + sync(); + switch( len ) { + case 4: + ret = desc->cfg->data; + break; + case 2: + ret = desc->cfg->data; + ret = (ret >> (offset << 3)) & 0xffff; + break; + case 1: + ret = desc->cfg->data; + ret = (ret >> (offset << 3)) & 0xff; + break; + } + desc->cfg->addr = save_state; + sync(); + return ret; + } + +void pci_read_bar( pci_desc *desc, int bus, int dev, int fn, int bar, + struct _pci_bar *bar_data ) { + bar_data->data = pci_read( desc, bus, dev, fn, 0x10 + (bar * 4), 4 ); +} + +/* + * Imagine: offset 3, len 1 + * let oldval = 0x12345678 and val = 0xabcd1234; + * mask = ((1 << 8) - 1) << 24; // 0xff000000 + * oldval = (0x12345678 & 0x00ffffff) | (0xabcd1234 & 0xff000000) = 0xab345678; + */ +void pci_write( pci_desc *desc, int bus, int dev, int fn, int reg, int len, int val ) { + unsigned long save_state = desc->cfg->addr; + unsigned long addr = pci_cfg_addr(bus,dev,fn,reg); + unsigned long offset = reg & 3; + unsigned long oldval = pci_read( desc, bus, dev, fn, reg & ~3, 4 ); + unsigned long mask = ((1 << (len * 8)) - 1) << (offset << 3); + oldval = (oldval & ~mask) | ((val << (offset << 3)) & mask); + desc->cfg->addr = rev32(addr); + sync(); + desc->cfg->data = rev32(oldval); + sync(); + desc->cfg->addr = save_state; + sync(); +} + +void pci_write_bar( pci_desc *desc, int bus, int dev, int fn, int bar, struct _pci_bar *bar_data ) { + pci_write( desc, bus, dev, fn, 0x10 + (bar * 4), 4, bar_data->data ); +} + +void print_bar( struct _pci_bar *bar ) { + printf("BAR: %x\n", bar->data); +} + +#define PCI_VENDORID 0 +#define PCI_DEVICEID 2 +#define PCI_HEADER_TYPE 0xe +#define PCI_BASECLASS 0xb + +void pci_setup( pci_desc *desc ) { + unsigned char type; + unsigned short vendor, device, devclass; + int funcs, bus, dev, fn; + + pci1_desc.cfg = (pci_cfg *)0x80000cf8; + + printf("PCI Bus:\n"); + for( bus = 0; bus < 1; bus++ ) { + for( dev = 0; dev < 32; dev++ ) { + type = pci_read(desc,bus,dev,0,PCI_HEADER_TYPE,1); + vendor = pci_read(desc,bus,dev,0,PCI_VENDORID,2); + device = pci_read(desc,bus,dev,0,PCI_DEVICEID,2); + + if(vendor == 0 || vendor == 0xffff) continue; + if(type & 0x80) funcs = 8; else funcs = 1; + + for( fn = 0; fn < funcs; fn++ ) { + devclass = pci_read(desc,bus,dev,fn,PCI_BASECLASS,1); + printf(" %d:%d -> vendor:device:class %x:%x:%x\n", + bus, dev, vendor, device, devclass); + + if( devclass == 3 ) { + printf("Setting up vga...\n"); + vga_setup(desc,&vga1_desc,bus,dev,fn); + printf("Done with vga\n"); + } + } + } + } + printf("^-- end PCI\n"); +} Added: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c (added) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c Sun Apr 29 13:12:55 2007 @@ -1,0 +1,26 @@ +#include <freeldr.h> +#include "prep.h" + +struct _vga_desc { + char *port; + char *addr; +}; + +#define VGA_WIDTH 1024 +#define VGA_HEIGHT 768 +struct _vga_desc vga1_desc = { (char *)0x800003c0 }; + +void vga_setup( struct _pci_desc *desc, struct _vga_desc *vga_desc, + int bus, int dev, int fn ) { + struct _pci_bar bar_data; + int i; + + for( i = 0; i < 6; i++ ) { + pci_read_bar( desc, bus, dev, fn, i, &bar_data ); + print_bar( &bar_data ); + if( (bar_data.data > 0x10000) || ((bar_data.data&1) == 1) ) { + vga_desc->addr = (char *)(0xc0000000 + (bar_data.data & ~0x7ff)); + break; + } + } +} Modified: branches/powerpc/reactos/tools/ppc.lost+found/link-freeldr URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc.lost%…
============================================================================== --- branches/powerpc/reactos/tools/ppc.lost+found/link-freeldr (original) +++ branches/powerpc/reactos/tools/ppc.lost+found/link-freeldr Sun Apr 29 13:12:55 2007 @@ -55,6 +55,8 @@ obj-ppc/boot/freeldr/freeldr/arch/powerpc/mboot.o \ obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep.o \ obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_ide.o \ + obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_pci.o \ + obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_vga.o \ obj-ppc/boot/freeldr/freeldr/bootmgr.o \ obj-ppc/boot/freeldr/freeldr/drivemap.o \ obj-ppc/boot/freeldr/freeldr/miscboot.o \
17 years, 9 months
1
0
0
0
[weiden] 26577: Fix typo. Thanks to PeterK See issue #2208 for more details.
by weiden@svn.reactos.org
Author: weiden Date: Sun Apr 29 12:43:49 2007 New Revision: 26577 URL:
http://svn.reactos.org/svn/reactos?rev=26577&view=rev
Log: Fix typo. Thanks to PeterK See issue #2208 for more details. Modified: trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif Sun Apr 29 12:43:49 2007 @@ -69,7 +69,7 @@ [Display] ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp> -vga = "VGA Display (640x480x8)",,Vga,640,480,8 +vga = "VGA Display (640x480x4)",,Vga,640,480,4 vbe_640x480x8 = "VESA Display (640x480x8)",,VBE,640,480,8 vbe_640x480x16 = "VESA Display (640x480x16)",,VBE,640,480,16 vbe_640x480x32 = "VESA Display (640x480x32)",,VBE,640,480,32
17 years, 9 months
1
0
0
0
[dgorbachev] 26576: Terminate hWnd list.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Apr 29 12:20:39 2007 New Revision: 26576 URL:
http://svn.reactos.org/svn/reactos?rev=26576&view=rev
Log: Terminate hWnd list. Modified: trunk/reactos/dll/win32/user32/windows/mdi.c Modified: trunk/reactos/dll/win32/user32/windows/mdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/mdi.c (original) +++ trunk/reactos/dll/win32/user32/windows/mdi.c Sun Apr 29 12:20:39 2007 @@ -160,6 +160,8 @@ HeapFree ( hHeap, 0, pHwnd ); return 0; } + + pHwnd[dwCount] = (HWND) 0; return pHwnd; }
17 years, 9 months
1
0
0
0
[jimtabor] 26575: ReactOS is now using NtGdiOpenDCW for CreateD*IC. Tested with Qemu and real hardware.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Apr 29 10:50:36 2007 New Revision: 26575 URL:
http://svn.reactos.org/svn/reactos?rev=26575&view=rev
Log: ReactOS is now using NtGdiOpenDCW for CreateD*IC. Tested with Qemu and real hardware. Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/dc.c Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c Sun Apr 29 10:50:36 2007 @@ -15,12 +15,16 @@ { UNICODE_STRING Device, Output; HDC hDC = NULL; - BOOL Display = FALSE; + BOOL Display = FALSE, Default = TRUE; ULONG UMdhpdev = 0; HANDLE hspool = NULL; - if ((!lpwszDevice) && (!lpwszDriver)) return hDC; + if ((!lpwszDevice) && (!lpwszDriver)) + { + Default = FALSE; // Ask Win32k to set Default device. + Display = TRUE; // Most likely to be DISPLAY. + } else { if (lpwszDevice) // First @@ -47,14 +51,14 @@ DPRINT1("Not a DISPLAY device! %wZ\n", &Device); } - hDC = NtGdiOpenDCW( &Device, + hDC = NtGdiOpenDCW( (Default ? &Device : NULL), (PDEVMODEW) lpInitData, (lpwszOutput ? &Output : NULL), iType, // DCW 0 and ICW 1. hspool, (PVOID) NULL, // NULL for now. (PVOID) &UMdhpdev ); - +#if 0 // Handle something other than a normal dc object. if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) { @@ -68,8 +72,9 @@ Dc_Attr->pvLDC = pLDC; pLDC->hDC = hDC; pLDC->iType = LDC_LDC; // 1 (init) local DC, 2 EMF LDC + DbgPrint("DC_ATTR Allocated -> 0x%x\n",Dc_Attr); } - +#endif return hDC; } @@ -83,67 +88,58 @@ LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, - CONST DEVMODEA * lpInitData + CONST DEVMODEA * lpdvmInit ) { - ANSI_STRING DriverA, DeviceA, OutputA; - UNICODE_STRING DriverU, DeviceU, OutputU; - HDC hDC; - DEVMODEW *lpInitDataW; - - /* - * If needed, convert to Unicode - * any string parameter. - */ - - if (NULL != lpszDriver) - { - RtlInitAnsiString(&DriverA, (LPSTR)lpszDriver); - RtlAnsiStringToUnicodeString(&DriverU, &DriverA, TRUE); - } else - DriverU.Buffer = NULL; - if (NULL != lpszDevice) - { - RtlInitAnsiString(&DeviceA, (LPSTR)lpszDevice); - RtlAnsiStringToUnicodeString(&DeviceU, &DeviceA, TRUE); - } else - DeviceU.Buffer = NULL; - if (NULL != lpszOutput) - { - RtlInitAnsiString(&OutputA, (LPSTR)lpszOutput); - RtlAnsiStringToUnicodeString(&OutputU, &OutputA, TRUE); - } else - OutputU.Buffer = NULL; - - if (NULL != lpInitData) - { -// lpInitDataW = HeapAllocMem( - } else - lpInitDataW = NULL; - - /* - * Call the Unicode version - * of CreateDC. - */ - - hDC = CreateDCW ( - DriverU.Buffer, - DeviceU.Buffer, - OutputU.Buffer, - NULL); -// lpInitDataW); - /* - * Free Unicode parameters. - */ - RtlFreeUnicodeString(&DriverU); - RtlFreeUnicodeString(&DeviceU); - RtlFreeUnicodeString(&OutputU); - - /* - * Return the possible DC handle. - */ - - return hDC; + ANSI_STRING DriverA, DeviceA, OutputA; + UNICODE_STRING DriverU, DeviceU, OutputU; + LPDEVMODEW dvmInitW = NULL; + HDC hDC; + +/* + * If needed, convert to Unicode + * any string parameter. + */ + + if (NULL != lpszDriver) + { + RtlInitAnsiString(&DriverA, (LPSTR)lpszDriver); + RtlAnsiStringToUnicodeString(&DriverU, &DriverA, TRUE); + } else + DriverU.Buffer = NULL; + if (NULL != lpszDevice) + { + RtlInitAnsiString(&DeviceA, (LPSTR)lpszDevice); + RtlAnsiStringToUnicodeString(&DeviceU, &DeviceA, TRUE); + } else + DeviceU.Buffer = NULL; + if (NULL != lpszOutput) + { + RtlInitAnsiString(&OutputA, (LPSTR)lpszOutput); + RtlAnsiStringToUnicodeString(&OutputU, &OutputA, TRUE); + } else + OutputU.Buffer = NULL; + + if ( lpdvmInit ) + dvmInitW = GdiConvertToDevmodeW((LPDEVMODEA)lpdvmInit); + + hDC = IntCreateDICW ( DriverU.Buffer, + DeviceU.Buffer, + OutputU.Buffer, + lpdvmInit ? dvmInitW : NULL, + 0 ); + HEAP_free (dvmInitW); +/* + * Free Unicode parameters. + */ + RtlFreeUnicodeString(&DriverU); + RtlFreeUnicodeString(&DeviceU); + RtlFreeUnicodeString(&OutputU); + +/* + * Return the possible DC handle. + */ + return hDC; } @@ -156,39 +152,15 @@ LPCWSTR lpwszDriver, LPCWSTR lpwszDevice, LPCWSTR lpwszOutput, - CONST DEVMODEW * lpInitData + CONST DEVMODEW *lpInitData ) { - UNICODE_STRING Driver, Device, Output; - - if(lpwszDriver) - RtlInitUnicodeString(&Driver, lpwszDriver); - if(lpwszDevice) - RtlInitUnicodeString(&Driver, lpwszDevice); - if(lpwszOutput) - RtlInitUnicodeString(&Driver, lpwszOutput); - - HDC hDC = NtGdiCreateDC((lpwszDriver ? &Driver : NULL), - (lpwszDevice ? &Device : NULL), - (lpwszOutput ? &Output : NULL), - (PDEVMODEW)lpInitData); -/* DC_ATTR Tests. - if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC) - { - PDC_ATTR Dc_Attr; - - GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr); - DPRINT1("Test DC_ATTR -> ! 0x%x\n", Dc_Attr); - - DPRINT1("Test DC_ATTR access! 0x%x\n", Dc_Attr->pvLDC); - Dc_Attr->pvLDC = (PVOID)1; - DPRINT1("Test DC_ATTR access! 0x%x\n", Dc_Attr->pvLDC); - Dc_Attr->pvLDC = (PVOID)0; - DPRINT1("Test DC_ATTR access! 0x%x\n", Dc_Attr->pvLDC); - - } - */ - return hDC; + + return IntCreateDICW ( lpwszDriver, + lpwszDevice, + lpwszOutput, + (PDEVMODEW) lpInitData, + 0 ); } @@ -198,24 +170,17 @@ HDC STDCALL CreateICW( - LPCWSTR lpszDriver, - LPCWSTR lpszDevice, - LPCWSTR lpszOutput, - CONST DEVMODEW * lpdvmInit + LPCWSTR lpszDriver, + LPCWSTR lpszDevice, + LPCWSTR lpszOutput, + CONST DEVMODEW *lpdvmInit ) { - UNICODE_STRING Driver, Device, Output; - - if(lpszDriver) - RtlInitUnicodeString(&Driver, lpszDriver); - if(lpszDevice) - RtlInitUnicodeString(&Device, lpszDevice); - if(lpszOutput) - RtlInitUnicodeString(&Output, lpszOutput); - return NtGdiCreateIC ((lpszDriver ? &Driver : NULL), - (lpszDevice ? &Device : NULL), - (lpszOutput ? &Output : NULL), - (CONST PDEVMODEW)lpdvmInit ); + return IntCreateDICW ( lpszDriver, + lpszDevice, + lpszOutput, + (PDEVMODEW) lpdvmInit, + 1 ); } @@ -225,22 +190,21 @@ HDC STDCALL CreateICA( - LPCSTR lpszDriver, - LPCSTR lpszDevice, - LPCSTR lpszOutput, - CONST DEVMODEA * lpdvmInit + LPCSTR lpszDriver, + LPCSTR lpszDevice, + LPCSTR lpszOutput, + CONST DEVMODEA *lpdvmInit ) { - NTSTATUS Status; - LPWSTR lpszDriverW, lpszDeviceW, lpszOutputW; - UNICODE_STRING Driver, Device, Output; - LPDEVMODEW dvmInitW = NULL; - HDC rc = 0; - - Status = HEAP_strdupA2W ( &lpszDriverW, lpszDriver ); - if (!NT_SUCCESS (Status)) + NTSTATUS Status; + LPWSTR lpszDriverW, lpszDeviceW, lpszOutputW; + LPDEVMODEW dvmInitW = NULL; + HDC rc = 0; + + Status = HEAP_strdupA2W ( &lpszDriverW, lpszDriver ); + if (!NT_SUCCESS (Status)) SetLastError (RtlNtStatusToDosError(Status)); - else + else { Status = HEAP_strdupA2W ( &lpszDeviceW, lpszDevice ); if (!NT_SUCCESS (Status)) @@ -253,23 +217,21 @@ else { if ( lpdvmInit ) - dvmInitW = GdiConvertToDevmodeW((LPDEVMODEA)lpdvmInit); + dvmInitW = GdiConvertToDevmodeW((LPDEVMODEA)lpdvmInit); - RtlInitUnicodeString(&Driver, lpszDriverW); - RtlInitUnicodeString(&Device, lpszDeviceW); - RtlInitUnicodeString(&Output, lpszOutputW); - rc = NtGdiCreateIC ( &Driver, - &Device, - &Output, - lpdvmInit ? dvmInitW : NULL ); - HEAP_free (dvmInitW); + rc = IntCreateDICW ( lpszDriverW, + lpszDeviceW, + lpszOutputW, + lpdvmInit ? dvmInitW : NULL, + 1 ); + HEAP_free (dvmInitW); HEAP_free ( lpszOutputW ); } HEAP_free ( lpszDeviceW ); } HEAP_free ( lpszDriverW ); } - return rc; + return rc; } Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Sun Apr 29 10:50:36 2007 @@ -1105,7 +1105,6 @@ Status = IntSafeCopyUnicodeString(&SafeDevice, Device); if(!NT_SUCCESS(Status)) { - RtlFreeUnicodeString(&SafeDevice); SetLastNtError(Status); return NULL; } @@ -2340,7 +2339,7 @@ NewDC->vportExtY = 1.0f; NewDC->w.textColor = 0; -// NewDC->pDc_Attr->ulForegroundClr = 0; Already Zero +// NewDC->pDc_Attr->ulForegroundClr = 0; // Already Zero // NewDC->pDc_Attr->crForegroundClr = 0; NewDC->w.backgroundColor = 0xffffff;
17 years, 9 months
1
0
0
0
[arty] 26574: Start of a simple ELF PE augmenter.
by arty@svn.reactos.org
Author: arty Date: Sun Apr 29 08:05:11 2007 New Revision: 26574 URL:
http://svn.reactos.org/svn/reactos?rev=26574&view=rev
Log: Start of a simple ELF PE augmenter. Added: branches/powerpc/reactos/tools/ppc-build/elfpe/ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-dlltool.in (with props) branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-gcc.in branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-ld.in branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-windres.in branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr.cpp branches/powerpc/reactos/tools/ppc-build/elfpe/fork_execvp.h (with props) branches/powerpc/reactos/tools/ppc-build/elfpe/fork_unix.cpp (with props) branches/powerpc/reactos/tools/ppc-build/elfpe/fork_win32.cpp (with props) branches/powerpc/reactos/tools/ppc-build/elfpe/header.cpp branches/powerpc/reactos/tools/ppc-build/elfpe/header.h branches/powerpc/reactos/tools/ppc-build/elfpe/makefile branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.cpp branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.h branches/powerpc/reactos/tools/ppc-build/elfpe/pedef.h branches/powerpc/reactos/tools/ppc-build/elfpe/util.cpp branches/powerpc/reactos/tools/ppc-build/elfpe/util.h Added: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-dlltool.in URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-dlltool.in (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-dlltool.in Sun Apr 29 08:05:11 2007 @@ -1,0 +1,7 @@ +#!/bin/sh + +DIR=@PREFIX@ +BPREFIX=@BPREFIX@ +TARGET=@TARGET@ + +${BPREFIX}dlltool -S $DIR/bin/${TARGET}as -L $DIR/bin/${TARGET}ld $* Propchange: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-dlltool.in ------------------------------------------------------------------------------ svn:executable = * Added: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-gcc.in URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-gcc.in (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-gcc.in Sun Apr 29 08:05:11 2007 @@ -1,0 +1,58 @@ +#!/bin/sh + +DIR=@PREFIX@ +CPREFIX=@CPREFIX@ +TARGET=@TARGET@ + +if [ "x$*" = "x-v" ] ; then + exec ${CPREFIX}gcc -v +fi + +includes="-isystem $DIR/lib/mingw-crt-headers -isystem $DIR/lib/gcc-core-headers" + +argstr="" +for arg in $* ; do + if [ x"$arg" = x-mingw ] ; then + argstr="$argstr -isystem $DIR/lib/windows-headers" + else + argstr="$argstr $arg" + fi +done + +TEMP=`mktemp -d` +export TEMP +if [ ! -d $TEMP ] ; then + echo "Could not make temp dir $TEMP" + exit 1 +fi +TMP=$TEMP + +`dirname $0`/${TARGET}driver-gcc \ + -nostdinc \ + -D__cdecl__= \ + -D__stdcall__= \ + -D__fastcall__= \ + -D__declspec\(x\)= \ + -D__cdecl= \ + -D__stdcall= \ + -D__fastcall= \ + -Dcdecl= \ + -Dstdcall= \ + -Dfastcall= \ + -Ddllimport= \ + -Ddllexport= \ + -Du_short=unsigned\ short \ + -Du_long=unsigned\ long \ + -Du_int=unsigned\ int \ + -Du_char=unsigned\ char \ + -ldscript ${DIR}/lib/ldscript \ + -gcc-name ${CPREFIX}gcc \ + -link-stage-name ${DIR}/bin/${TARGET}ld \ + -mingw-lib-dir $DIR/lib \ + $includes \ + $argstr </dev/null + +RES=$? + +rm -rf $TEMP +exit $RES Added: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-ld.in URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-ld.in (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-ld.in Sun Apr 29 08:05:11 2007 @@ -1,0 +1,28 @@ +#!/bin/sh + +DIR=@PREFIX@ +BPREFIX=@BPREFIX@ +TARGET=@TARGET@ + +if [ "x$*" = x-v ] ; then + exec ${BPREFIX}ld -v +fi + +TEMP=`mktemp -d` +export TEMP +if [ ! -d $TEMP ] ; then + echo "Could not make temp dir $TEMP" + exit 1 +fi +TMP=$TEMP + +`dirname $0`/${TARGET}driver-ld \ + -ldscript ${DIR}/lib/ldscript \ + -mingw-lib-dir ${DIR}/lib \ + -link-stage-name ${BPREFIX}ld \ + $* + +RES=$? + +rm -rf $TEMP +exit $RES Added: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-windres.in URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-windres.in (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr-windres.in Sun Apr 29 08:05:11 2007 @@ -1,0 +1,7 @@ +#!/bin/sh + +DIR=@PREFIX@ +BPREFIX=@BPREFIX@ +TARGET=@TARGET@ + +exec ${BPREFIX}windres -F elf32-powerpc $* Added: branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/compdvr.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,336 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <fcntl.h> +#include <list> +#include <string> +#include <vector> +#include <sstream> +#include <algorithm> +#include "objectfile.h" +#include "header.h" +#include "fork_execvp.h" + +#define TYPE_PEHEADER (SHT_LOOS + 1) + +/* tool for transforming gcc -### output and using it to drive the compiler + * elements ourselves. Most importantly, we need to know what file gcc asks + * the linker to input and output, and add an intermediate stage with alink. + */ + +typedef enum { empty, found_q, found_bs } break_t; + +template <class T> +T break_arguments( const std::string &line ) { + break_t state = empty; + T args; + std::string arg; + + for( size_t i = 0; i < line.size(); i++ ) { + switch( state ) { + case empty: + if( line[i] == '\"' ) { + state = found_q; + } + break; + + case found_q: + if( line[i] == '\\' ) state = found_bs; + else if( line[i] == '\"' ) { + state = empty; + args.push_back(arg); + arg = ""; + } else arg += line[i]; + break; + + case found_bs: + state = found_q; + arg += line[i]; + break; + } + } + + return args; +} + +template <class T> +std::vector<char *> get_arg_ptrs +( const T &arg_strings ) { + std::vector<char *> arg_out; + for( size_t i = 0; i < arg_strings.size(); i++ ) + arg_out.push_back( (char *)arg_strings[i].c_str() ); + arg_out.push_back(0); + return arg_out; +} + +int execute_command( bool verbose, const std::vector<std::string> &args ) { + std::string error; + std::vector<char *> args_ptrs; + const char *tag = "executable"; + + if( verbose ) { + fprintf( stderr, "<command>\n" ); + for( size_t i = 0; i < args.size(); i++ ) { + fprintf( stderr, "<%s>%s</%s>\n", tag, args[i].c_str(), tag ); + tag = "argument"; + } + } + + Process p = fork_execvp( args ); + + while( p && p->ProcessStarted() && !p->EndOfStream() ) + fprintf( stderr, "%s", p->ReadStdError().c_str() ); + + if( verbose ) { + fprintf( stderr, "<status>%d</status>\n", p->GetStatus() ); + fprintf( stderr, "</command>\n" ); + } + + return p ? p->GetStatus() : -1; +} + +std::string make_tmp_name() { + int fd; + std::string name; + + while( true ) { + name = tmpnam(NULL); + name += ".obj"; + if( (fd = creat( name.c_str(), 0644 )) != -1 ) { + close(fd); + return name; + } + } +} + +void recognize_arg( std::vector<std::string> &args, + std::string &result, + size_t &i, + const std::string &argname, + const std::string &short_argname = "" ) { + if( (short_argname.size() && (args[i] == short_argname)) || + (args[i] == argname) ) { + result = args[i+1]; + args.erase(args.begin()+i); + args.erase(args.begin()+i--); + } else if( args[i].substr(0,argname.size()+1) == argname + "=" ) { + result = args[i].substr(argname.size()+1); + args.erase(args.begin()+i--); + } +} + +int run_ld( bool verbose, bool nostdlib, bool nostartfiles, bool is_dll, + bool make_map, + const std::string &lib_dir, + const std::string &ldscript, + const std::vector<std::string> &arg_vect ) { + bool use_libgcc = false; + std::vector<std::string> args = arg_vect; + std::string real_output, + entry_point = "0x1000", + image_base = "0x400000", subsystem = "windows", + make_dll, + file_align = "0x1000", + section_align = "0x1000", base_file; + std::vector<std::string>::iterator i = + std::find(args.begin(),args.end(),"-lgcc"); + + if( i != args.end() ) { + args.erase( i ); + use_libgcc = true; + } + + if( !nostartfiles ) { + if( make_dll.size() ) + args.push_back(lib_dir + "/dllcrt2.o"); + else + args.push_back(lib_dir + "/crt2.o"); + } + + if( !nostdlib ) { + args.push_back(std::string("-L") + lib_dir); + args.push_back("-lkernel32"); + args.push_back("-lmsvcrt"); + args.push_back("-lcrtdll"); + args.push_back("-lmingw32"); + } + if( use_libgcc ) + args.push_back(lib_dir + "/libgcc.a"); + + if( verbose ) + args.insert(args.begin()+1,"-v"); + + args.insert(args.begin()+1,"-T"); + args.insert(args.begin()+2,ldscript); + args.insert(args.begin()+1,"-r"); + args.insert(args.begin()+1,"--start-group"); + args.push_back("--end-group"); + + for( size_t i = 0; i < args.size(); i++ ) { + if( args[i] == "-o" && i < args.size()-1 ) { + real_output = args[++i]; + } else if( args[i].substr(0,4) == "-mdll" ) { + args.erase(args.begin()+i--); + make_dll = "-dll"; + } + + recognize_arg( args, entry_point, i, "--entry", "-e" ); + recognize_arg( args, image_base, i, "--image-base" ); + recognize_arg( args, subsystem, i, "--subsystem" ); + recognize_arg( args, file_align, i, "--file-alignment" ); + recognize_arg( args, section_align, i, "--section-alignment" ); + recognize_arg( args, base_file, i, "--base-file" ); + } + + if( execute_command( verbose, args ) ) + return 1; + + if( base_file.size() ) { + FILE *f = fopen(base_file.c_str(), "wb"); + if( !f ) { + fprintf(stderr, "<error>\n"); + perror(base_file.c_str()); + fprintf(stderr, "</error>\n"); + return 1; + } + fclose(f); + } + + /* Ok fixup the elf object file */ + ElfObjectFile eof(real_output); + + if(!eof) return 1; + + ElfPeHeader header + (strtoul(image_base.c_str(), 0, 0), + strtoul(section_align.c_str(), 0, 0), + strtoul(file_align.c_str(), 0, 0), + 0x10000, + 0x100000, + 0x10000, + 0x100000, + is_dll, + atoi(subsystem.c_str()), + &eof); + + eof.addSection(".peheader", header.getData(), TYPE_PEHEADER); + + return 0; +} + +int main( int argc, char **argv ) { + bool verbose = false, ld_mode = false, nostdlib = false, + nostartfiles = false, is_dll = false, make_map = false; + int err_fd[2], read_len, child_pid_gcc, child_pid_command, status = 0; + std::string gcc_name, gcc_hash_output, gcc_line, linker_name = "ld", + mingw_lib_dir, ldscript; + std::vector<std::string> gcc_args_str, + subcmd_args; + std::vector<char *> arguments_for_gcc; + char buf[1024]; + + for( int i = 1; i < argc; i++ ) { + if( std::string("-gcc-name") == argv[i] && i < argc-1 ) { + gcc_name = argv[++i]; + } else if( std::string("-ldscript") == argv[i] && i < argc-1 ) { + ldscript = argv[++i]; + } else if( std::string("-link-stage-name") == argv[i] && i < argc-1 ) { + linker_name = argv[++i]; + } else if( std::string("-mingw-lib-dir") == argv[i] && i < argc-1 ) { + mingw_lib_dir = argv[++i]; + } else if( std::string("-v") == argv[i] ) { + verbose = true; + } else if( std::string("-pipe") == argv[i] ) { + /* ignore */ + } else if( std::string("-T") == argv[i] ) { + /* ignore */ + i++; + } else if( std::string("-nostdlib") == argv[i] ) { + nostdlib = true; + } else if( std::string("-nostartfiles") == argv[i] ) { + nostartfiles = true; + } else if( std::string("-shared") == argv[i] ) { + is_dll = true; + } else if( std::string("-map") == argv[i] ) { + make_map = true; + } else { + gcc_args_str.push_back(argv[i]); + } + } + + /* We never use the system start files or standard libs */ + gcc_args_str.insert(gcc_args_str.begin()+1,"-nostdlib"); + gcc_args_str.insert(gcc_args_str.begin()+1,"-nostartfiles"); + + if( std::string(argv[0]).find("ld") != std::string::npos ) { + gcc_args_str.insert + ( gcc_args_str.begin(), linker_name ); + return run_ld + ( verbose, nostdlib, nostartfiles, is_dll, make_map, mingw_lib_dir, + ldscript, gcc_args_str ); + } + if( verbose ) fprintf( stderr, "<compiler-driver>\n" ); + + // Stack on driver name and dump commands flag + gcc_args_str.insert(gcc_args_str.begin(),std::string("-###")); + gcc_args_str.insert(gcc_args_str.begin(),gcc_name); + + /* Redirect stderr to our pipe */ + if( verbose ) { + const char *tag = "executable"; + fprintf( stderr, "<gcc>\n" ); + for( size_t i = 0; i < gcc_args_str.size(); i++ ) { + fprintf( stderr, " <%s>%s</%s>\n", + tag, gcc_args_str[i].c_str(), + tag ); + tag = "arg"; + } + fprintf( stderr, "</gcc>\n" ); + } + + Process p = fork_execvp( gcc_args_str ); + + while( p && p->ProcessStarted() && !p->EndOfStream() ) + gcc_hash_output += p->ReadStdError(); + + std::istringstream iss( gcc_hash_output ); + + if( p->GetStatus() ) goto final; + + while( std::getline( iss, gcc_line, '\n' ) ) { + // command line + if( gcc_line.size() > 2 && gcc_line[0] == ' ' ) { + subcmd_args = + break_arguments<std::vector<std::string> >( gcc_line ); + + if( subcmd_args.size() < 1 ) continue; + + if( subcmd_args[0].find("collect2") != std::string::npos || + subcmd_args[0].find("ld") != std::string::npos ) { + if( run_ld( verbose, nostdlib, nostartfiles, is_dll, make_map, + mingw_lib_dir, ldscript, subcmd_args ) ) + goto final; + else + continue; + } + + if( verbose ) + subcmd_args.insert(subcmd_args.begin()+1,"-v"); + + if( execute_command + ( verbose, subcmd_args ) ) + goto final; + } else if( verbose ) + fprintf( stderr, "<error>%s</error>\n", gcc_line.c_str() ); + } + goto theend; + + final: + status = 1; + theend: + if( verbose ) { + fprintf( stderr, "<status>%d</status>\n", status ); + fprintf( stderr, "</compiler-driver>\n" ); + } + return status; +} Added: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_execvp.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/fork_execvp.h (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/fork_execvp.h Sun Apr 29 08:05:11 2007 @@ -1,0 +1,28 @@ +#ifndef FORK_EXECVP_H +#define FORK_EXECVP_H + +#include <string> +#include <vector> + +class ProcessHolder { +public: + virtual ~ProcessHolder() { } + virtual std::string ReadStdError() = 0; + virtual bool ProcessStarted() const = 0; + virtual bool EndOfStream() const = 0; + virtual int GetStatus() const = 0; +}; + +class Process { +public: + Process( ProcessHolder *h ) : holder(h) { } + ~Process() { delete holder; } + ProcessHolder *operator -> () const { return holder; } + operator ProcessHolder *() const { return (holder && holder->ProcessStarted()) ? holder : NULL; } +private: + ProcessHolder *holder; +}; + +ProcessHolder *fork_execvp( const std::vector<std::string> &args ); + +#endif//FORK_EXECVP_H Propchange: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_execvp.h ------------------------------------------------------------------------------ svn:executable = * Added: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_unix.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/fork_unix.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/fork_unix.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,66 @@ +#include <stdio.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/wait.h> +#include "fork_execvp.h" + +class UnixProcessHolder : public ProcessHolder { +public: + UnixProcessHolder( const std::vector<std::string> &args ) + : read_fd(-1), child_pid(-1), at_end(false), status(-1) { + std::vector<char *> argvect(args.size()+1); + for( size_t i = 0; i < args.size(); i++ ) + argvect[i] = (char *)args[i].c_str(); + argvect[args.size()] = 0; + + int err_fd[2]; + + if( pipe( err_fd ) == -1 ) + return; + + fflush(stdout); + + child_pid = fork(); + + if( !child_pid ) { + dup2( err_fd[1], 2 ); + close( err_fd[0] ); + close( err_fd[1] ); + + execvp(args[0].c_str(), &argvect[0] ); + exit(1); + } else { + close( err_fd[1] ); + read_fd = err_fd[0]; + } + } + + ~UnixProcessHolder() { + close( read_fd ); + } + + std::string ReadStdError() { + char buf[1024]; + int rl = read( read_fd, buf, sizeof(buf) ); + if( rl < 1 ) { + at_end = true; + waitpid( child_pid, &status, 0 ); + return ""; + } + return std::string(buf, rl); + } + + bool ProcessStarted() const { return child_pid != -1; } + bool EndOfStream() const { return at_end; } + int GetStatus() const { return status; } + +private: + bool at_end; + int read_fd; + int child_pid; + int status; +}; + +ProcessHolder *fork_execvp( const std::vector<std::string> &args ) { + return new UnixProcessHolder( args ); +} Propchange: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_unix.cpp ------------------------------------------------------------------------------ svn:executable = * Added: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_win32.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/fork_win32.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/fork_win32.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,109 @@ +#include <windows.h> +#include "fork_execvp.h" + +class Win32ProcessHolder : public ProcessHolder { +public: + Win32ProcessHolder( const std::string &args ) + : ErrorRead(INVALID_HANDLE_VALUE), + ProcessHandle(INVALID_HANDLE_VALUE), + StreamEnded(false) { + HANDLE ErrorWrite = NULL, ErrorReadTemp = NULL; + PROCESS_INFORMATION pi = { }; + SECURITY_ATTRIBUTES sa = { }; + STARTUPINFO si = { }; + + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + + if(!CreatePipe(&ErrorReadTemp, &ErrorWrite, &sa, 0)) return; + + if(!DuplicateHandle(GetCurrentProcess(), ErrorReadTemp, + GetCurrentProcess(), &ErrorRead, + 0, FALSE, + DUPLICATE_SAME_ACCESS)) return; + + CloseHandle(ErrorReadTemp); + + si.cb = sizeof(si); + si.dwFlags = STARTF_USESTDHANDLES; + si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); + si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + si.hStdError = ErrorWrite; + + if(!CreateProcess(NULL, (char *)args.c_str(), NULL, NULL, TRUE, + 0, NULL, NULL, &si, &pi)) return; + + ProcessHandle = pi.hProcess; + + CloseHandle(ErrorWrite); + } + + ~Win32ProcessHolder() { + CloseHandle( ErrorRead ); + CloseHandle( ProcessHandle ); + } + + std::string ReadStdError() { + char Buf[1024]; + DWORD ReadBytes; + + if( StreamEnded ) return ""; + + StreamEnded = + !ReadFile(ErrorRead, Buf, sizeof(Buf), &ReadBytes, NULL) || + !ReadBytes; + + if( !StreamEnded ) return std::string(Buf, ReadBytes); + else return ""; + } + + bool EndOfStream() const { + return StreamEnded; + } + + bool ProcessStarted() const { + return ProcessHandle != INVALID_HANDLE_VALUE; + } + + int GetStatus() const { + DWORD Status = 1; + if( ProcessHandle != INVALID_HANDLE_VALUE ) { + WaitForSingleObject( ProcessHandle, INFINITE ); + GetExitCodeProcess( ProcessHandle, &Status ); + } + return Status; + } + +private: + bool StreamEnded; + HANDLE ErrorRead, ProcessHandle; +}; + +std::string quote_escape( const std::string &_str ) { + std::string str = _str; + size_t q; + + q = str.find('\"'); + while( q != std::string::npos ) { + str.replace(q, 1, "\\\""); + q = str.find('\"'); + } + + return std::string("\"") + str + "\""; +} + +ProcessHolder *fork_execvp( const std::vector<std::string> &args ) { + std::string argstring; + ProcessHolder *holder; + + for( std::vector<std::string>::const_iterator i = args.begin(); + i != args.end(); + i++ ) { + if( i != args.begin() ) + argstring += " "; + argstring += quote_escape(*i); + } + + return new Win32ProcessHolder( argstring ); +} Propchange: branches/powerpc/reactos/tools/ppc-build/elfpe/fork_win32.cpp ------------------------------------------------------------------------------ svn:executable = * Added: branches/powerpc/reactos/tools/ppc-build/elfpe/header.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/header.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/header.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,176 @@ +#include <time.h> +#include "util.h" +#include "header.h" + +ElfPeHeader::ElfPeHeader + (uint32_t imagebase, + uint32_t filealign, + uint32_t sectionalign, + uint32_t stackreserve, + uint32_t stackcommit, + uint32_t heapreserve, + uint32_t heapcommit, + int subsysid, + bool dll, + ElfObjectFile *eof) : + imagebase(imagebase), + sectionalign(sectionalign), + stackreserve(stackreserve), + stackcommit(stackcommit), + heapreserve(heapreserve), + heapcommit(heapcommit), + subsysid(subsysid), + eof(eof) +{ + data.resize(computeSize()); + createHeaderSection(); +} + +int ElfPeHeader::computeSize() const +{ + return sectionalign; /* We'll compute it for real later */ +} + +void ElfPeHeader::createHeaderSection() +{ + data[0] = 'M'; data[1] = 'Z'; + uint8_t *dataptr = &data[0x3c]; + uint32_t coffHeaderSize, optHeaderSizeMember; + le32write_postinc(dataptr, 0x80); + dataptr = &data[0x80]; + le32write_postinc(dataptr, 0x4550); + le16write_postinc(dataptr, getPeArch()); + le16write_postinc(dataptr, getNumSections()); + le32write_postinc(dataptr, time(NULL)); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, 0); + optHeaderSizeMember = dataptr - &data[0]; + le16write_postinc(dataptr, 0); // Will fixup sizeof opt header + le16write_postinc(dataptr, getExeFlags()); + coffHeaderSize = dataptr - &data[0]; + le16write_postinc(dataptr, 0); + le16write_postinc(dataptr, 0x100); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, getEntryPoint()); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, imagebase); + le32write_postinc(dataptr, sectionalign); + le32write_postinc(dataptr, filealign); + le16write_postinc(dataptr, 4); + le16write_postinc(dataptr, 0); + le16write_postinc(dataptr, 1); + le16write_postinc(dataptr, 0); + le16write_postinc(dataptr, 4); + le16write_postinc(dataptr, 0); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, getImageSize()); + le32write_postinc(dataptr, computeSize()); + le32write_postinc(dataptr, 0); // No checksum yet + le16write_postinc(dataptr, subsysid); + le16write_postinc(dataptr, getDllFlags()); + le32write_postinc(dataptr, stackreserve); + le32write_postinc(dataptr, stackcommit); + le32write_postinc(dataptr, heapreserve); + le32write_postinc(dataptr, heapcommit); + le32write_postinc(dataptr, 0); + le32write_postinc(dataptr, 10); // # Directories + // "Directories" + le32pwrite_postinc(dataptr, getExportInfo()); + le32pwrite_postinc(dataptr, getImportInfo()); + le32pwrite_postinc(dataptr, getResourceInfo()); + le32pwrite_postinc(dataptr, getExceptionInfo()); + le32pwrite_postinc(dataptr, getSecurityInfo()); + le32pwrite_postinc(dataptr, getRelocInfo()); + le32pwrite_postinc(dataptr, getDebugInfo()); + le32pwrite_postinc(dataptr, getDescrInfo()); + le32pwrite_postinc(dataptr, getMachInfo()); + le32pwrite_postinc(dataptr, getTlsInfo()); + // Fixup size of optional header + le16write + (&data[0] + optHeaderSizeMember, + (dataptr - &data[0]) - coffHeaderSize); +} + +const std::vector<uint8_t> &ElfPeHeader::getData() const { return data; } + +uint32_t ElfPeHeader::getImageSize() const +{ + uint32_t start = 0; + uint32_t limit = 0; + for(int i = 0; i < eof->getNumSections(); i++) { + { + const ElfObjectFile::Section § = eof->getSection(i); + limit = roundup(start + sect.logicalSize(), sectionalign); + } + start = limit; + } + + return limit; +} + +uint16_t ElfPeHeader::getPeArch() const +{ + return IMAGE_FILE_MACHINE_POWERPCBE; /* for now */ +} + +u32pair_t getNamedSectionInfo(ElfObjectFile *eof, const std::string &name) +{ + const ElfObjectFile::Section *sect = eof->getNamedSection(name); + if(sect) + return std::make_pair(sect->getStartRva(), sect->logicalSize()); + else + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getExportInfo() const +{ + return getNamedSectionInfo(eof, ".edata"); +} + +u32pair_t ElfPeHeader::getImportInfo() const +{ + return getNamedSectionInfo(eof, ".idata"); +} + +u32pair_t ElfPeHeader::getResourceInfo() const +{ + return getNamedSectionInfo(eof, ".rsrc"); +} + +u32pair_t ElfPeHeader::getExceptionInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getSecurityInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getRelocInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getDebugInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getDescrInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getTlsInfo() const +{ + return std::make_pair(0,0); +} + +u32pair_t ElfPeHeader::getMachInfo() const +{ + return std::make_pair(0,0); +} Added: branches/powerpc/reactos/tools/ppc-build/elfpe/header.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/header.h (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/header.h Sun Apr 29 08:05:11 2007 @@ -1,0 +1,58 @@ +#ifndef COMPDVR_ELFHEADER_H +#define COMPDVR_ELFHEADER_H + +#include <vector> +#include <utility> +#include "pedef.h" +#include "util.h" +#include "objectfile.h" + +class ElfPeHeader { +public: + ElfPeHeader + (uint32_t imagebase, + uint32_t imagealign, + uint32_t filealign, + uint32_t stackreserve, + uint32_t stackcommit, + uint32_t heapreserve, + uint32_t heapcommit, + int subsysid, + bool dll, + ElfObjectFile *eof); + const ElfObjectFile::secdata_t &getData() const; + +private: + void createHeaderSection(); + int getNumSections() const { return eof->getNumSections(); } + int computeSize() const; + int getExeFlags() const { return 0; } + int getDllFlags() const { return dll ? IMAGE_FILE_DLL : 0; } + u32pair_t getExportInfo() const; + u32pair_t getImportInfo() const; + u32pair_t getResourceInfo() const; + u32pair_t getExceptionInfo() const; + u32pair_t getSecurityInfo() const; + u32pair_t getRelocInfo() const; + u32pair_t getDebugInfo() const; + u32pair_t getDescrInfo() const; + u32pair_t getMachInfo() const; + u32pair_t getTlsInfo() const; + uint32_t getEntryPoint() const { return eof->getEntryPoint(); } + uint32_t getImageSize() const; + uint16_t getPeArch() const; + uint32_t saToRva(int section, uint32_t offset) const; + uint32_t vaToRva(uint32_t source_addr) const; + + uint32_t + imagebase, filealign, sectionalign, + stackreserve, stackcommit, + heapreserve, heapcommit; + bool dll; + int subsysid; + ElfObjectFile *eof; + std::vector<uint8_t> data; + static const char *mzHeader; +}; + +#endif//COMPDVR_ELFHEADER_H Added: branches/powerpc/reactos/tools/ppc-build/elfpe/makefile URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/makefile (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/makefile Sun Apr 29 08:05:11 2007 @@ -1,0 +1,7 @@ +all: compdvr + +%.o: %.cpp + g++ -g -o $@ $< + +compdvr: compdvr.cpp fork_unix.cpp header.cpp objectfile.cpp util.cpp + g++ -g -o $@ $^ -lelf Added: branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,83 @@ +#include <libelf/libelf.h> +#include <fcntl.h> +#include "objectfile.h" + +ElfObjectFile::ElfObjectFile(const std::string &filename) : fd(-1) +{ + Elf_Scn *s = 0; + Elf32_Ehdr *ehdr; + fd = open(filename.c_str(), O_RDWR, 0); + if(fd >= 0) { + if(elf_version(EV_CURRENT) == EV_NONE) { + // Old version + return; + } + elfHeader = elf_begin(fd, ELF_C_RDWR, (Elf*)0); + if(elf_kind(elfHeader) != ELF_K_ELF) { + // Didn't get an elf object file + return; + } + ehdr = elf32_getehdr(elfHeader); + shnum = ehdr->e_shnum; + phnum = ehdr->e_phnum; + shstrndx = ehdr->e_shstrndx; + for(size_t i = 0; i < shnum; i++) + { + s = elf_nextscn(elfHeader, s); + if(!s) break; + sections.push_back(new Section(*this, s)); + fprintf(stderr, "Got section %04d %s\n", i, sections[i]->getName().c_str()); + } + } +} + +ElfObjectFile::~ElfObjectFile() +{ + if(elfHeader) elf_end(elfHeader); + if(fd >= 0) close(fd); +} + +uint32_t ElfObjectFile::getEntryPoint() const +{ + Elf32_Ehdr *elf32ehdr = elf32_getehdr(elfHeader); + return elf32ehdr->e_entry; +} + +void ElfObjectFile::addSection(const std::string &name, const secdata_t &data, int type) +{ + Elf_Scn *newsect = elf_newscn(elfHeader), + *strsect = elf_getscn(elfHeader, shstrndx); + Elf32_Shdr *shdr = elf32_getshdr(newsect); + /* Create data for the new section */ + Elf_Data *edata = elf_newdata(newsect), *strdata = elf_getdata(strsect, 0), + *newstrdata = elf_newdata(strsect); + edata->d_align = 0x1000; + edata->d_size = data.size(); + edata->d_off = 0; + edata->d_type = ELF_T_BYTE; + edata->d_version = EV_CURRENT; + edata->d_buf = malloc(edata->d_size); + memcpy(edata->d_buf, &data[0], edata->d_size); + /* Add the name of the new section to the string table */ + newstrdata->d_off = strdata->d_off + strdata->d_size; + newstrdata->d_size = name.size() + 1; + newstrdata->d_align = 1; + newstrdata->d_buf = (void *)name.c_str(); + /* Finish the section */ + shdr->sh_name = newstrdata->d_off; + shdr->sh_type = type; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_link = 0; + shdr->sh_info = 0; + + elf_update(elfHeader, ELF_C_WRITE); +} + +const ElfObjectFile::Section *ElfObjectFile::getNamedSection(const std::string &name) const +{ + for(size_t i = 0; i < sections.size(); i++) { + if(sections[i]->getName() == name) return sections[i]; + } + return NULL; +} Added: branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.h (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/objectfile.h Sun Apr 29 08:05:11 2007 @@ -1,0 +1,66 @@ +#ifndef COMPDVR_ELFOBJECT_H +#define COMPDVR_ELFOBJECT_H + +#include <string> +#include <vector> +#include <libelf/libelf.h> + +class ElfObjectFile { +public: + typedef std::vector<uint8_t> secdata_t; + + class Section { + public: + Section(const Section &other) : + obj(other.obj), section(other.section) { } + Section(ElfObjectFile &obj, Elf_Scn *sechdr) : + obj(&obj), section(sechdr) { } + Section &operator = (const Section &other) { + obj = other.obj; + section = other.section; + } + operator bool () { return !!section; } + std::string getName() const { + Elf32_Shdr *e32shdr = elf32_getshdr(section); + return obj->getString(e32shdr->sh_name); + } + + int logicalSize() const { + Elf32_Shdr *e32shdr = elf32_getshdr(section); + return e32shdr->sh_size; + } + + uint32_t getStartRva() const { + Elf32_Shdr *e32shdr = elf32_getshdr(section); + return e32shdr->sh_addr; + } + + private: + const ElfObjectFile *obj; + Elf_Scn *section; + }; + + ElfObjectFile(const std::string &filename); + ~ElfObjectFile(); + + Elf *operator -> () { return fd >= 0 ? elfHeader : 0; } + bool operator ! () const { return fd == -1 ? true : false; } + int getNumSections() const { return sections.size(); } + uint32_t getEntryPoint() const; + std::string getString(int offset) const { + return elf_strptr(elfHeader, shstrndx, offset); + } + void addSection + (const std::string &name, const secdata_t &data, int type = SHT_PROGBITS); + const Section &getSection(int sect) const { return *sections[sect]; } + const Section *getNamedSection(const std::string &name) const; + +private: + int fd; + int shnum, phnum; + int shstrndx; + Elf *elfHeader; + std::vector<Section*> sections; +}; + +#endif//COMPDVR_ELFOBJECT_H Added: branches/powerpc/reactos/tools/ppc-build/elfpe/pedef.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/pedef.h (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/pedef.h Sun Apr 29 08:05:11 2007 @@ -1,0 +1,32 @@ +#ifndef COMPDVR_PEDEF_H +#define COMPDVR_PEDEF_H + +// Definitions from bernd.luevelsmeyer(a)iplan.heitec.net 's pe.txt reference +#define IMAGE_FILE_MACHINE_I386 (0x14c) +#define IMAGE_FILE_MACHINE_I486 (0x14d) +#define IMAGE_FILE_MACHINE_I586 (0x14e) +#define IMAGE_FILE_MACHINE_R3000BE (0x160) +#define IMAGE_FILE_MACHINE_R3000 (0x162) +#define IMAGE_FILE_MACHINE_R4000 (0x166) +#define IMAGE_FILE_MACHINE_R10000 (0x168) +#define IMAGE_FILE_MACHINE_ALPHA (0x184) +#define IMAGE_FILE_MACHINE_POWERPC (0x1F0) +// Recognize BE PowerPC by a coff BE style arch magic +#define IMAGE_FILE_MACHINE_POWERPCBE (0xF001) + +#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 +#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 +#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010 +#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 +#define IMAGE_FILE_32BIT_MACHINE 0x0100 +#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 +#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 +#define IMAGE_FILE_SYSTEM 0x1000 +#define IMAGE_FILE_DLL 0x2000 +#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 +#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 + +#endif//COMPDVR_PEDEF_H Added: branches/powerpc/reactos/tools/ppc-build/elfpe/util.cpp URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/util.cpp (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/util.cpp Sun Apr 29 08:05:11 2007 @@ -1,0 +1,35 @@ +#include "util.h" + +uint32_t roundup(uint32_t value, int round) +{ + round--; + return (value + round) & ~round; +} + +void le16write(uint8_t *dataptr, uint16_t value) +{ + dataptr[0] = value; + dataptr[1] = value >> 8; +} + +void le16write_postinc(uint8_t *&dataptr, uint16_t value) +{ + le16write(dataptr, value); dataptr += 2; +} + +void le32write(uint8_t *dataptr, uint32_t value) +{ + le16write(dataptr, value); + le16write(dataptr + 2, value >> 16); +} + +void le32write_postinc(uint8_t *&dataptr, uint32_t value) +{ + le32write(dataptr, value); dataptr += 4; +} + +void le32pwrite_postinc(uint8_t *&dataptr, const u32pair_t &value) +{ + le32write_postinc(dataptr, value.first); + le32write_postinc(dataptr, value.second); +} Added: branches/powerpc/reactos/tools/ppc-build/elfpe/util.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc-build…
============================================================================== --- branches/powerpc/reactos/tools/ppc-build/elfpe/util.h (added) +++ branches/powerpc/reactos/tools/ppc-build/elfpe/util.h Sun Apr 29 08:05:11 2007 @@ -1,0 +1,20 @@ +#ifndef COMPDVR_UTIL_H +#define COMPDVR_UTIL_H + +#include <utility> +#include <stdint.h> + +void le16write(uint8_t *dataptr, uint16_t value); +void le16write_postinc(uint8_t *&dataptr, uint16_t value); +void le32write(uint8_t *dataptr, uint32_t value); +void le32write_postinc(uint8_t *&dataptr, uint32_t value); +uint16_t le16read(uint8_t *dataptr); +uint16_t le16read_postinc(uint8_t *&dataptr); +uint32_t le32read(uint8_t *dataptr); +uint32_t le32read_postinc(uint8_t *&dataptr); +typedef std::pair<uint32_t, uint32_t> u32pair_t; +void le32pwrite_postinc(uint8_t *&dataptr, const u32pair_t &pair); +void le32pwrite(uint8_t *dataptr, const u32pair_t &pair); +uint32_t roundup(uint32_t value, int round); + +#endif//COMPDVR_UTIL_H
17 years, 9 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200