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
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
September 2005
----- 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
22 participants
582 discussions
Start a n
N
ew thread
[weiden] 17971: some arc names might be longer than 100 characters, increase the buffer size to 255 characters for now to fix a buffer overflow during startup
by weiden@svn.reactos.com
some arc names might be longer than 100 characters, increase the buffer size to 255 characters for now to fix a buffer overflow during startup Modified: trunk/reactos/ntoskrnl/io/arcname.c _____ Modified: trunk/reactos/ntoskrnl/io/arcname.c --- trunk/reactos/ntoskrnl/io/arcname.c 2005-09-21 17:37:08 UTC (rev 17970) +++ trunk/reactos/ntoskrnl/io/arcname.c 2005-09-21 17:57:07 UTC (rev 17971) @@ -106,7 +106,7 @@ IopEnumerateBiosDisks(PLIST_ENTRY ListHead) { RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - WCHAR Name[100]; + WCHAR Name[255]; ULONG AdapterCount; ULONG ControllerCount; ULONG DiskCount;
19 years, 3 months
1
0
0
0
[weiden] 17970: fixed differences in signedness warnings
by weiden@svn.reactos.com
fixed differences in signedness warnings Modified: trunk/reactos/subsys/win32k/include/ntuser.h _____ Modified: trunk/reactos/subsys/win32k/include/ntuser.h --- trunk/reactos/subsys/win32k/include/ntuser.h 2005-09-21 17:28:14 UTC (rev 17969) +++ trunk/reactos/subsys/win32k/include/ntuser.h 2005-09-21 17:37:08 UTC (rev 17970) @@ -27,14 +27,14 @@ ASSERT(FALSE); \ } \ UUserEnterExclusive(); \ - ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \ + ASSERT(InterlockedIncrement((PLONG)(&_locked)) == 1 /*> 0*/); \ _file = __FILE__; _line = __LINE__; \ /* DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ } #define UserLeave() \ { \ - ASSERT(InterlockedDecrement(&_locked) == 0/*>= 0*/); \ + ASSERT(InterlockedDecrement((PLONG)(&_locked)) == 0/*>= 0*/); \ /*DPRINT("unlock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ if (UserLock.Owner != KeGetCurrentThread()) { \ DPRINT1("file %s, line %i\n",_file, _line); \
19 years, 3 months
1
0
0
0
[weiden] 17969: add missing function declarations
by weiden@svn.reactos.com
add missing function declarations Modified: trunk/reactos/subsys/system/usetup/partlist.h Modified: trunk/reactos/subsys/system/usetup/registry.h _____ Modified: trunk/reactos/subsys/system/usetup/partlist.h --- trunk/reactos/subsys/system/usetup/partlist.h 2005-09-21 17:23:27 UTC (rev 17968) +++ trunk/reactos/subsys/system/usetup/partlist.h 2005-09-21 17:28:14 UTC (rev 17969) @@ -191,6 +191,9 @@ VOID SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber); +BOOL +SetMountedDeviceValues(PPARTLIST List); + VOID ScrollDownPartitionList (PPARTLIST List); _____ Modified: trunk/reactos/subsys/system/usetup/registry.h --- trunk/reactos/subsys/system/usetup/registry.h 2005-09-21 17:23:27 UTC (rev 17968) +++ trunk/reactos/subsys/system/usetup/registry.h 2005-09-21 17:28:14 UTC (rev 17969) @@ -35,6 +35,9 @@ BOOLEAN SetInstallPathValue(PUNICODE_STRING InstallPath); +BOOLEAN +SetMountedDeviceValue(CHAR Letter, ULONG Signature, LARGE_INTEGER StartingOffset); + #endif /* __REGISTRY_H__ */ /* EOF */
19 years, 3 months
1
0
0
0
[weiden] 17968: pass the buffer size to GetEnvironmentVariable() in characters, not bytes!
by weiden@svn.reactos.com
pass the buffer size to GetEnvironmentVariable() in characters, not bytes! Modified: trunk/reactos/subsys/system/cmd/cmd.c Modified: trunk/reactos/subsys/system/cmd/if.c Modified: trunk/reactos/subsys/system/cmd/where.c _____ Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-09-21 17:22:45 UTC (rev 17967) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-09-21 17:23:27 UTC (rev 17968) @@ -1552,7 +1552,7 @@ for you can change the EnvirommentVariable for prompt before cmd start this patch are not 100% right, if it does not exists a PROMPT value cmd should use $P$G as defualt not set EnvirommentVariable PROMPT to $P$G if it does not exists */ - if (GetEnvironmentVariable(_T("PROMPT"),lpBuffer, 2 * sizeof(TCHAR)) == 0) + if (GetEnvironmentVariable(_T("PROMPT"),lpBuffer, sizeof(lpBuffer) / sizeof(lpBuffer[0])) == 0) SetEnvironmentVariable (_T("PROMPT"), _T("$P$G")); _____ Modified: trunk/reactos/subsys/system/cmd/if.c --- trunk/reactos/subsys/system/cmd/if.c 2005-09-21 17:22:45 UTC (rev 17967) +++ trunk/reactos/subsys/system/cmd/if.c 2005-09-21 17:23:27 UTC (rev 17968) @@ -131,7 +131,7 @@ if (*pp) { *pp++ = _T('\0'); - ValueSize = GetEnvironmentVariable(param, Value, sizeof Value); + ValueSize = GetEnvironmentVariable(param, Value, sizeof(Value) / sizeof(Value[0])); x_flag ^= (0 == ValueSize) ? 0 : X_EXEC; _____ Modified: trunk/reactos/subsys/system/cmd/where.c --- trunk/reactos/subsys/system/cmd/where.c 2005-09-21 17:22:45 UTC (rev 17967) +++ trunk/reactos/subsys/system/cmd/where.c 2005-09-21 17:23:27 UTC (rev 17968) @@ -157,7 +157,7 @@ if (dwBuffer > ENV_BUFFER_SIZE) { pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); - GetEnvironmentVariable (_T("PATH"), pszBuffer, dwBuffer * sizeof (TCHAR)); + GetEnvironmentVariable (_T("PATH"), pszBuffer, dwBuffer); } @@ -222,7 +222,7 @@ if (dwBuffer > ENV_BUFFER_SIZE) { pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); - GetEnvironmentVariable (_T("PATHEXT"), pszBuffer, dwBuffer * sizeof (TCHAR)); + GetEnvironmentVariable (_T("PATHEXT"), pszBuffer, dwBuffer); } else if (0 == dwBuffer) {
19 years, 3 months
1
0
0
0
[weiden] 17967: fixed some warnings
by weiden@svn.reactos.com
fixed some warnings Modified: trunk/reactos/subsys/system/notepad/dialog.c _____ Modified: trunk/reactos/subsys/system/notepad/dialog.c --- trunk/reactos/subsys/system/notepad/dialog.c 2005-09-21 17:09:33 UTC (rev 17966) +++ trunk/reactos/subsys/system/notepad/dialog.c 2005-09-21 17:22:45 UTC (rev 17967) @@ -339,7 +339,7 @@ } else { - p2 = pTemp; + p2 = (LPBYTE)pTemp; if ((p2[0] == 0xEF) && (p2[1] == 0xBB) && (p2[2] == 0xBF)) { iCodePage = CP_UTF8; @@ -353,7 +353,7 @@ Globals.iEncoding = ENCODING_ANSI; } - iNewSize = MultiByteToWideChar(iCodePage, 0, p2, dwNumRead, NULL, 0); + iNewSize = MultiByteToWideChar(iCodePage, 0, (LPCSTR)p2, dwNumRead, NULL, 0); pTemp2 = HeapAlloc(GetProcessHeap(), 0, (iNewSize + 1) * sizeof(*pTemp2)); if (!pTemp2) { @@ -362,7 +362,7 @@ ShowLastError(); return; } - MultiByteToWideChar(iCodePage, 0, p2, dwNumRead, pTemp2, iNewSize); + MultiByteToWideChar(iCodePage, 0, (LPCSTR)p2, dwNumRead, pTemp2, iNewSize); pTemp2[iNewSize] = 0; p = pTemp2; }
19 years, 3 months
1
0
0
0
[rcampbell] 17966: -small test commit
by rcampbell@svn.reactos.com
-small test commit Modified: trunk/reactos/CREDITS _____ Modified: trunk/reactos/CREDITS --- trunk/reactos/CREDITS 2005-09-21 15:32:53 UTC (rev 17965) +++ trunk/reactos/CREDITS 2005-09-21 17:09:33 UTC (rev 17966) @@ -4,7 +4,7 @@ Robert Bergkvist <fragdance(a)hotmail.com> Hartmut Birr <hartmut.birr(a)gmx.de> Aleksey Bragin <aleksey(a)studiocerebral.com> -Richard Campbell <eek2121(a)comcast.net> +Richard Campbell <betam4x(a)gmail.com> Gunnar Andre' Dalsnes <hardon(a)online.no> Arindam Das Boudewijn Dekker <ariadne(a)xs4all.nl>
19 years, 3 months
1
0
0
0
[weiden] 17965: fixed differences in signedness warnings
by weiden@svn.reactos.com
fixed differences in signedness warnings Modified: trunk/reactos/drivers/usb/usbport/config.c Modified: trunk/reactos/drivers/usb/usbport/hcd.h _____ Modified: trunk/reactos/drivers/usb/usbport/config.c --- trunk/reactos/drivers/usb/usbport/config.c 2005-09-21 14:01:49 UTC (rev 17964) +++ trunk/reactos/drivers/usb/usbport/config.c 2005-09-21 15:32:53 UTC (rev 17965) @@ -16,10 +16,10 @@ #define USB_ALTSETTINGALLOC 4 #define USB_MAXINTERFACES 32 -static int usb_parse_endpoint(struct usb_host_endpoint *endpoint, unsigned char *buffer, int size) +static int usb_parse_endpoint(struct usb_host_endpoint *endpoint, char *buffer, int size) { struct usb_descriptor_header *header; - unsigned char *begin; + char *begin; int parsed = 0, len, numskipped; header = (struct usb_descriptor_header *)buffer; @@ -101,12 +101,12 @@ return parsed; } -static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) +static int usb_parse_interface(struct usb_interface *interface, char *buffer, int size) { int i, len, numskipped, retval, parsed = 0; struct usb_descriptor_header *header; struct usb_host_interface *ifp; - unsigned char *begin; + char *begin; interface->act_altsetting = 0; interface->num_altsetting = 0; @@ -410,8 +410,8 @@ { int result; unsigned int cfgno, length; - unsigned char *buffer; - unsigned char *bigbuffer; + char *buffer; + char *bigbuffer; struct usb_config_descriptor *desc; if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG) { _____ Modified: trunk/reactos/drivers/usb/usbport/hcd.h --- trunk/reactos/drivers/usb/usbport/hcd.h 2005-09-21 14:01:49 UTC (rev 17964) +++ trunk/reactos/drivers/usb/usbport/hcd.h 2005-09-21 15:32:53 UTC (rev 17965) @@ -206,7 +206,7 @@ int (*hub_status_data) (struct usb_hcd *hcd, char *buf); int (*hub_control) (struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, - char *buf, u16 wLength); + u8 *buf, u16 wLength); }; // old version, "just in case"
19 years, 3 months
1
0
0
0
[navaraf] 17964: Indentation fix.
by navaraf@svn.reactos.com
Indentation fix. Modified: trunk/reactos/subsys/win32k/ntuser/painting.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/painting.c --- trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 13:49:09 UTC (rev 17963) +++ trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 14:01:49 UTC (rev 17964) @@ -632,7 +632,7 @@ hChild = IntFindWindowToRepaint(Window->FirstChild, Thread); if (hChild != NULL) return hChild; - } + } } return NULL;
19 years, 3 months
1
0
0
0
[navaraf] 17963: Incomplete support for WS_EX_TRANSPARENT, should fix Task Manager painting bugs.
by navaraf@svn.reactos.com
Incomplete support for WS_EX_TRANSPARENT, should fix Task Manager painting bugs. Modified: trunk/reactos/subsys/win32k/ntuser/painting.c Modified: trunk/reactos/subsys/win32k/ntuser/vis.c Modified: trunk/reactos/subsys/win32k/ntuser/windc.c Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/painting.c --- trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -602,13 +602,28 @@ IntFindWindowToRepaint(PWINDOW_OBJECT Window, PW32THREAD Thread) { HWND hChild; + PWINDOW_OBJECT TempWindow; - while (Window != NULL) + for (; Window != NULL; Window = Window->NextSibling) { - /* FIXME: Transparent windows. */ - if (IntIsWindowDirty(Window) && - IntWndBelongsToThread(Window, Thread)) + if (IntWndBelongsToThread(Window, Thread) && + IntIsWindowDirty(Window)) { + /* Make sure all non-transparent siblings are already drawn. */ + if (Window->ExStyle & WS_EX_TRANSPARENT) + { + for (TempWindow = Window->NextSibling; TempWindow != NULL; + TempWindow = TempWindow->NextSibling) + { + if (!(TempWindow->ExStyle & WS_EX_TRANSPARENT) && + IntWndBelongsToThread(TempWindow, Thread) && + IntIsWindowDirty(TempWindow)) + { + return TempWindow->hSelf; + } + } + } + return Window->hSelf; } @@ -617,9 +632,7 @@ hChild = IntFindWindowToRepaint(Window->FirstChild, Thread); if (hChild != NULL) return hChild; - } - - Window = Window->NextSibling; + } } return NULL; _____ Modified: trunk/reactos/subsys/win32k/ntuser/vis.c --- trunk/reactos/subsys/win32k/ntuser/vis.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/vis.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -89,7 +89,8 @@ CurrentSibling = CurrentWindow->FirstChild; while (CurrentSibling != NULL && CurrentSibling != PreviousWindow) { - if (CurrentSibling->Style & WS_VISIBLE) + if ((CurrentSibling->Style & WS_VISIBLE) && + !(CurrentSibling->ExStyle & WS_EX_TRANSPARENT)) { ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSibling->WindowRect); /* Combine it with the window region if available */ @@ -115,7 +116,8 @@ CurrentWindow = Window->FirstChild; while (CurrentWindow) { - if (CurrentWindow->Style & WS_VISIBLE) + if ((CurrentWindow->Style & WS_VISIBLE) && + !(CurrentWindow->ExStyle & WS_EX_TRANSPARENT)) { ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWindow->WindowRect); /* Combine it with the window region if available */ _____ Modified: trunk/reactos/subsys/win32k/ntuser/windc.c --- trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -342,7 +342,6 @@ Flags |= DCX_CACHE; } - if (Flags & DCX_USESTYLE) { Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP); _____ Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c --- trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -1118,7 +1118,8 @@ * change. */ if (VisBefore != NULL && VisAfter != NULL && !(WinPos.flags & SWP_NOCOPYBITS) && - ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW))) + ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) && + !(Window->ExStyle & WS_EX_TRANSPARENT)) { CopyRgn = NtGdiCreateRectRgn(0, 0, 0, 0); RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
19 years, 3 months
1
0
0
0
[sedwards] 17962: Nathan Woods <npwoods _NOSPAM_at_NOSPAM cybercom.net> - Implement a working VS.NET backend, minor fixes to the vc6 backend
by sedwards@svn.reactos.com
Nathan Woods <npwoods _NOSPAM_at_NOSPAM
cybercom.net
> - Implement a working
VS.NET
backend, minor fixes to the vc6 backend Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-09-21 02:04:07 UTC (rev 17961) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-09-21 03:20:07 UTC (rev 17962) @@ -48,13 +48,13 @@ imports.push_back ( module.non_if_data.libraries[i]->name ); } - string module_type = Right(module.GetTargetName(),3); - bool lib = (module_type == "lib"); - bool dll = (module_type == "dll"); - bool exe = (module_type == "exe"); + string module_type = GetExtension(module.GetTargetName()); + bool lib = (module_type == ".lib") || (module_type == ".a"); + bool dll = (module_type == ".dll"); + bool exe = (module_type == ".exe"); // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? - bool console = exe; // FIXME: Not always correct + bool console = exe && (module.type == Win32CUI); // TODO FIXME - not sure if the count here is right... int parts = 0; @@ -75,9 +75,16 @@ // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? string dsp_path = module.GetBasePath(); - vector<string> c_srcs, source_files, resource_files, includes; + vector<string> c_srcs, source_files, resource_files, includes, libraries, defines; vector<const IfableData*> ifs_list; ifs_list.push_back ( &module.non_if_data ); + + defines.push_back ( "WIN32" ); + defines.push_back ( "_WINDOWS" ); + defines.push_back ( "WIN32" ); + defines.push_back ( "_MBCS" ); + defines.push_back ( "STDCALL=__stdcall" ); + while ( ifs_list.size() ) { const IfableData& data = *ifs_list.back(); @@ -105,6 +112,19 @@ module.GetBasePath() ); includes.push_back ( path ); } + const vector<Library*>& libs = data.libraries; + for ( i = 0; i < libs.size(); i++ ) + { + libraries.push_back ( libs[i]->name + ".lib" ); + } + const vector<Define*>& defs = data.defines; + for ( i = 0; i < defs.size(); i++ ) + { + if ( defs[i]->value[0] ) + defines.push_back ( defs[i]->name + "=" + defs[i]->value ); + else + defines.push_back ( defs[i]->name ); + } } // TODO FIXME - we don't include header files in our build system //my @header_files = @{module->{header_files}}; @@ -292,14 +312,6 @@ if ( dll ) fprintf ( OUT, "# PROP Ignore_Export_Lib 0\r\n" ); fprintf ( OUT, "# PROP Target_Dir \"\"\r\n" ); - vector<string> defines; - defines.push_back ( "WINVER=0x0501" ); - defines.push_back ( "_WIN32_WINNT=0x0501" ); - defines.push_back ( "_WIN32_IE=0x0600" ); - defines.push_back ( "WIN32" ); - defines.push_back ( "_WINDOWS" ); - defines.push_back ( "WIN32" ); - defines.push_back ( "_MBCS" ); if ( debug ) { defines.push_back ( "_DEBUG" ); @@ -500,19 +512,7 @@ { fprintf ( OUT, "LINK32=link.exe\r\n" ); fprintf ( OUT, "# ADD BASE LINK32 " ); - vector<string> libraries; - libraries.push_back ( "kernel32.lib" ); - libraries.push_back ( "user32.lib" ); - libraries.push_back ( "gdi32.lib" ); - libraries.push_back ( "winspool.lib" ); - libraries.push_back ( "comdlg32.lib" ); - libraries.push_back ( "advapi32.lib" ); - libraries.push_back ( "shell32.lib" ); - libraries.push_back ( "ole32.lib" ); - libraries.push_back ( "oleaut32.lib" ); - libraries.push_back ( "uuid.lib" ); - libraries.push_back ( "odbc32.lib" ); - libraries.push_back ( "odbccp32.lib" ); + for ( i = 0; i < libraries.size(); i++ ) { fprintf ( OUT, "%s ", libraries[i].c_str() ); _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-09-21 02:04:07 UTC (rev 17961) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-09-21 03:20:07 UTC (rev 17962) @@ -1,875 +1,408 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include <string> -#include <vector> - -#include <stdio.h> - -#include "msvc.h" - -using std::string; -using std::vector; - -void -MSVCBackend::_generate_vcproj ( const Module& module ) -{ - size_t i; - // TODO FIXME wine hack? - const bool wine = false; - - string vcproj_file = VcprojFileName(module); - printf ( "Creating MSVC2K5 project: '%s'\n", vcproj_file.c_str() ); - FILE* OUT = fopen ( vcproj_file.c_str(), "wb" ); - - vector<string> imports; - for ( i = 0; i < module.non_if_data.libraries.size(); i++ ) - { - imports.push_back ( module.non_if_data.libraries[i]->name ); - } - - string module_type = Right(module.GetTargetName(),3); - bool lib = (module_type == "lib"); - bool dll = (module_type == "dll"); - bool exe = (module_type == "exe"); - // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? - - bool console = exe; // FIXME: Not always correct - - // TODO FIXME - not sure if the count here is right... - int parts = 0; - const char* p = strpbrk ( vcproj_file.c_str(), "/\\" ); - while ( p ) - { - ++parts; - p = strpbrk ( p+1, "/\\" ); - } - string msvc_wine_dir = ".."; - while ( --parts ) - msvc_wine_dir += "\\.."; - - string wine_include_dir = msvc_wine_dir + "\\include"; - - //$progress_current++; - //$output->progress("$dsp_file (file $progress_current of $progress_max)"); - - // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? - string vcproj_path = module.GetBasePath(); - vector<string> c_srcs, source_files, resource_files, includes; - vector<const IfableData*> ifs_list; - ifs_list.push_back ( &module.non_if_data ); - while ( ifs_list.size() ) - { - const IfableData& data = *ifs_list.back(); - ifs_list.pop_back(); - // TODO FIXME - refactor needed - we're discarding if conditions - for ( i = 0; i < data.ifs.size(); i++ ) - ifs_list.push_back ( &data.ifs[i]->data ); - const vector<File*>& files = data.files; - for ( i = 0; i < files.size(); i++ ) - { - // TODO FIXME - do we want the full path of the file here? - string file = string(".") + &files[i]->name[vcproj_path.size()]; - - source_files.push_back ( file ); - if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) - c_srcs.push_back ( file ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) - resource_files.push_back ( file ); - } - const vector<Include*>& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - string path = Path::RelativeFromDirectory ( - incs[i]->directory, - module.GetBasePath() ); - includes.push_back ( path ); - } - } - // TODO FIXME - we don't include header files in our build system - //my @header_files = @{module->{header_files}}; - vector<string> header_files; - - // TODO FIXME - wine hack? - /*if (module.name !~ /^wine(?:_unicode|build|runtests|test)?$/ && - module.name !~ /^(?:gdi32)_.+?$/ && - Right ( module.name, 5 ) == "_test" ) - { - source_files.push_back ( module.name + ".spec" ); - @source_files = sort(@source_files); - }*/ - - bool no_cpp = true; - bool no_msvc_headers = true; - // TODO FIXME - wine hack? - /*if (module.name =~ /^wine(?:runtests|test)$/ - || Right ( module.name, 5 ) == "_test" ) - { - no_msvc_headers = false; - }*/ - - std::vector<std::string> cfgs; - - cfgs.push_back ( module.name + " - Win32" ); - - if (!no_cpp) - { - std::vector<std::string> _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " C" ); - _cfgs.push_back ( cfgs[i] + " C++" ); - } - cfgs.resize(0); - cfgs = _cfgs; - } - - // TODO FIXME - wine hack? - /*if (!no_release) - { - std::vector<std::string> _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " Debug" ); - _cfgs.push_back ( cfgs[i] + " Release" ); - } - cfgs.resize(0); - cfgs = _cfgs; - }*/ - - if (!no_msvc_headers) - { - std::vector<std::string> _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " MSVC Headers" ); - _cfgs.push_back ( cfgs[i] + " Wine Headers" ); - } - cfgs.resize(0); - cfgs = _cfgs; - } - - string default_cfg = cfgs.back(); - - fprintf ( OUT, "# Microsoft Developer Studio Project File - Name=\"%s\" - Package Owner=<4>\r\n", module.name.c_str() ); - fprintf ( OUT, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n" ); - fprintf ( OUT, "# ** DO NOT EDIT **\r\n" ); - fprintf ( OUT, "\r\n" ); - - if ( lib ) - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\r\n" ); - } - else if ( dll ) - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\r\n" ); - } - else - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\r\n" ); - } - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "CFG=%s\r\n", default_cfg.c_str() ); - fprintf ( OUT, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n" ); - fprintf ( OUT, "!MESSAGE use the Export Makefile command and run\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\".\r\n", module.name.c_str() ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE You can specify a configuration when running NMAKE\r\n" ); - fprintf ( OUT, "!MESSAGE by defining the macro CFG on the command line. For example:\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s\"\r\n", module.name.c_str(), default_cfg.c_str() ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE Possible choices for configuration are:\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - for ( i = 0; i < cfgs.size(); i++ ) - { - const string& cfg = cfgs[i]; - if ( lib ) - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Static Library\")\r\n", cfg.c_str() ); - } - else if ( dll ) - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n", cfg.c_str() ); - } - else - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Console Application\")\r\n", cfg.c_str() ); - } - } - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "# Begin Project\r\n" ); - fprintf ( OUT, "# PROP AllowPerConfigDependencies 0\r\n" ); - fprintf ( OUT, "# PROP Scc_ProjName \"\"\r\n" ); - fprintf ( OUT, "# PROP Scc_LocalPath \"\"\r\n" ); - fprintf ( OUT, "CPP=cl.exe\r\n" ); - if ( !lib && !exe ) fprintf ( OUT, "MTL=midl.exe\r\n" ); - fprintf ( OUT, "RSC=rc.exe\r\n" ); - - int n = 0; - - std::string output_dir; - for ( size_t icfg = 0; icfg < cfgs.size(); icfg++ ) - { - std::string& cfg = cfgs[icfg]; - if ( icfg ) - { - if ( n == 0 ) - { - fprintf ( OUT, "!IF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } - else - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } - } - - bool debug = !strstr ( cfg.c_str(), "Release" ); - bool msvc_headers = ( 0 != strstr ( cfg.c_str(), "MSVC Headers" ) ); - - fprintf ( OUT, "# PROP BASE Use_MFC 0\r\n" ); - - if ( debug ) - { - fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 1\r\n" ); - } - else - { - fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 0\r\n" ); - } - - output_dir = Replace(cfg,module.name + " - ",""); - output_dir = Replace(output_dir," ","_"); - output_dir = Replace(output_dir,"C++","Cxx"); - // TODO FIXME - wine hack? - //if ( output_prefix_dir.size() ) - // output_dir = output_prefix_dir + "\\" + output_dir; - - fprintf ( OUT, "# PROP BASE Output_Dir \"%s\"\r\n", output_dir.c_str() ); - fprintf ( OUT, "# PROP BASE Intermediate_Dir \"%s\"\r\n", output_dir.c_str() ); - - fprintf ( OUT, "# PROP BASE Target_Dir \"\"\r\n" ); - - fprintf ( OUT, "# PROP Use_MFC 0\r\n" ); - if ( debug ) - { - fprintf ( OUT, "# PROP Use_Debug_Libraries 1\r\n" ); - } - else - { - fprintf ( OUT, "# PROP Use_Debug_Libraries 0\r\n" ); - } - fprintf ( OUT, "# PROP Output_Dir \"%s\"\r\n", output_dir.c_str() ); - fprintf ( OUT, "# PROP Intermediate_Dir \"%s\"\r\n", output_dir.c_str() ); - - if ( dll ) fprintf ( OUT, "# PROP Ignore_Export_Lib 0\r\n" ); - fprintf ( OUT, "# PROP Target_Dir \"\"\r\n" ); - - vector<string> defines; - defines.push_back ( "WINVER=0x0501" ); - defines.push_back ( "_WIN32_WINNT=0x0501" ); - defines.push_back ( "_WIN32_IE=0x0600" ); - defines.push_back ( "WIN32" ); - defines.push_back ( "_WINDOWS" ); - defines.push_back ( "WIN32" ); - defines.push_back ( "_MBCS" ); - if ( debug ) - { - defines.push_back ( "_DEBUG" ); - if ( lib || exe ) - { - fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od" ); - defines.push_back ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines.push_back ( "_WINDOWS" ); - defines.push_back ( "_USRDLL" ); - // TODO FIXME - wine hack? - //defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); - } - } - else - { - defines.push_back ( "NDEBUG" ); - if ( lib || exe ) - { - fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /GX /O2" ); - defines.push_back ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD BASE CPP /nologo /MT /W3 /GX /O2" ); - defines.push_back ( "_WINDOWS" ); - defines.push_back ( "_USRDLL" ); - // TODO FIXME - wine hack? - //defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); - } - } - - for ( i = 0; i < defines.size(); i++ ) - { - fprintf ( OUT, " /D \"%s\"", defines[i].c_str() ); - } - if ( lib || exe ) fprintf ( OUT, " /YX" ); - fprintf ( OUT, " /FD" ); - if ( debug ) - { - fprintf ( OUT, " /GZ" ); - if ( lib || exe ) fprintf ( OUT, " " ); - } - fprintf ( OUT, " /c" ); - fprintf ( OUT, "\r\n" ); - - vector<string> defines2; - defines2.push_back ( "WINVER=0x0501" ); - defines2.push_back ( "_WIN32_WINNT=0x0501" ); - defines2.push_back ( "_WIN32_IE=0x0600" ); - defines2.push_back ( "WIN32" ); - defines2.push_back ( "_WINDOWS" ); - defines2.push_back ( "_MBCS" ); - if ( debug ) - { - defines2.push_back ( "_DEBUG" ); - if(lib) - { - fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines2.push_back ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines2.push_back ( "_USRDLL" ); - } - } - else - { - defines2.push_back ( "NDEBUG" ); - if(lib) - { - fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - defines2.push_back ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - defines2.push_back ( "_USRDLL" ); - } - } - - // TODO FIXME - wine hack? - if ( wine ) - { - // TODO FIXME - wine hack? - //defines2.push_back ( string("_\U") + module.name + "\E_" ); - // TODO FIXME - wine hack? - /*if ( module.name !~ /^(?:wine(?:build|test)|.*?_test)$/ ) - defines2.push_back ( "__WINESRC__" );*/ - if ( msvc_headers ) - defines2.push_back ( "__WINE_USE_NATIVE_HEADERS" ); - string output_dir2 = Replace(output_dir,"\\","\\\\"); - defines2.push_back ( ssprintf("__WINETEST_OUTPUT_DIR=\\\"%s\\\"",output_dir.c_str()) ); - defines2.push_back ( "__i386__" ); - defines2.push_back ( "_X86_" ); - - // TODO FIXME - wine hacks? - /*if(module.name =~ /^gdi32_(?:enhmfdrv|mfdrv)$/) { - push @includes, ".." ); - } - - if ( strstr ( module.name.c_str(), "_test" ) - { - include.push_back ( msvc_wine_dir + "\\" + output_dir ); - } - - if (!msvc_headers || module.name == "winetest") - { - includes.push_back ( wine_include_dir ); - }*/ - } - - //if ( wine ) - { - for ( i = 0; i < includes.size(); i++ ) - { - const string& include = includes[i]; - if ( strpbrk ( include.c_str(), "[\\\"]" ) ) - { - fprintf ( OUT, " /I \"%s\"", include.c_str() ); - } - else - { - fprintf ( OUT, " /I %s", include.c_str() ); - } - } - } - - fprintf ( OUT, " /I \".\"" ); - for ( i = 0; i < defines2.size(); i++ ) - { - const string& define = defines2[i]; - if ( strpbrk ( define.c_str(), "[\\\"]" ) ) - { - fprintf ( OUT, " /D \"%s\"", define.c_str() ); - } - else - { - fprintf ( OUT, " /D %s", define.c_str() ); - } - } - if ( wine ) fprintf ( OUT, " /D inline=__inline" ); - if ( 0 && wine ) fprintf ( OUT, " /D \"__STDC__\"" ); - - fprintf ( OUT, lib ? " /YX" : " /FR" ); - fprintf ( OUT, " /FD" ); - if ( debug ) fprintf ( OUT, " /GZ" ); - if ( debug && lib ) fprintf ( OUT, " " ); - fprintf ( OUT, " /c" ); - if ( !no_cpp ) fprintf ( OUT, " /TP" ); - fprintf ( OUT, "\r\n" ); - - if ( debug ) - { - if ( dll ) - { - fprintf ( OUT, "# SUBTRACT CPP /X /YX\r\n" ); - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n" ); - fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n" ); - } - fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"_DEBUG\"\r\n" ); - fprintf ( OUT, "# ADD RSC /l 0x41d" ); - if ( wine ) - { - for ( i = 0; i < includes.size(); i++ ) - { - fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); - } - } - fprintf ( OUT, " /d \"_DEBUG\"\r\n" ); - } - else - { - if ( dll ) - { - fprintf ( OUT, "# SUBTRACT CPP /YX\r\n" ); - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n" ); - fprintf ( OUT, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n" ); - } - fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"NDEBUG\"\r\n" ); - fprintf ( OUT, "# ADD RSC /l 0x41d" ); - if ( wine ) - { - for ( i = 0; i < includes.size(); i++ ) - fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); - } - fprintf ( OUT, "/d \"NDEBUG\"\r\n" ); - } - fprintf ( OUT, "BSC32=bscmake.exe\r\n" ); - fprintf ( OUT, "# ADD BASE BSC32 /nologo\r\n" ); - fprintf ( OUT, "# ADD BSC32 /nologo\r\n" ); - - if ( exe || dll ) - { - fprintf ( OUT, "LINK32=link.exe\r\n" ); - fprintf ( OUT, "# ADD BASE LINK32 " ); - vector<string> libraries; - libraries.push_back ( "kernel32.lib" ); - libraries.push_back ( "user32.lib" ); - libraries.push_back ( "gdi32.lib" ); - libraries.push_back ( "winspool.lib" ); - libraries.push_back ( "comdlg32.lib" ); - libraries.push_back ( "advapi32.lib" ); - libraries.push_back ( "shell32.lib" ); - libraries.push_back ( "ole32.lib" ); - libraries.push_back ( "oleaut32.lib" ); - libraries.push_back ( "uuid.lib" ); - libraries.push_back ( "odbc32.lib" ); - libraries.push_back ( "odbccp32.lib" ); - for ( i = 0; i < libraries.size(); i++ ) - { - fprintf ( OUT, "%s ", libraries[i].c_str() ); - } - fprintf ( OUT, " /nologo" ); - if ( dll ) fprintf ( OUT, " /dll" ); - if ( console ) fprintf ( OUT, " /subsystem:console" ); - if ( debug ) fprintf ( OUT, " /debug" ); - fprintf ( OUT, " /machine:I386" ); - if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "# ADD LINK32" ); - fprintf ( OUT, " /nologo" ); - // TODO FIXME - do we need their kludge? - //if ( module.name == "ntdll" ) fprintf ( OUT, " libcmt.lib" ); // FIXME: Kludge - for ( i = 0; i < imports.size(); i++ ) - { - const string& import = imports[i]; - if ( import != "msvcrt" ) - fprintf ( OUT, " %s.lib", import.c_str() ); - } - if ( dll ) fprintf ( OUT, " /dll" ); - if ( console ) fprintf ( OUT, " /subsystem:console" ); - if ( debug ) fprintf ( OUT, " /debug" ); - fprintf ( OUT, " /machine:I386" ); - // TODO FIXME - do we need their kludge? - //if ( module.name == "ntdll" ) fprintf ( OUT, " /nodefaultlib" ); // FIXME: Kludge - if ( dll ) fprintf ( OUT, " /def:\"%s.def\"", module.name.c_str() ); - if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); - fprintf ( OUT, "\r\n" ); - } - else - { - fprintf ( OUT, "LIB32=link.exe -lib\r\n" ); - fprintf ( OUT, "# ADD BASE LIB32 /nologo\r\n" ); - fprintf ( OUT, "# ADD LIB32 /nologo\r\n" ); - } - - n++; - } - - if ( cfgs.size() != 0 ) - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ENDIF \r\n" ); - fprintf ( OUT, "\r\n" ); - } -#if 0 - if ( module.name == "winebuild" ) - { - fprintf ( OUT, "# Begin Special Build Tool\r\n" ); - fprintf ( OUT, "SOURCE=\"$(InputPath)\"\r\n" ); - fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\r\n" ); - fprintf ( OUT, "PostBuild_Cmds=" ); - fprintf ( OUT, "copy ..\\..\\library\\%s\\wine.dll $(OutDir)\t", - output_dir.c_str() ); - fprintf ( OUT, "copy ..\\..\\unicode\\%s\\wine_unicode.dll $(OutDir)\r\n", - output_dir.c_str() ); - fprintf ( OUT, "# End Special Build Tool\r\n" ); - } -#endif - fprintf ( OUT, "# Begin Target\r\n" ); - fprintf ( OUT, "\r\n" ); - for ( i = 0; i < cfgs.size(); i++ ) - { - fprintf ( OUT, "# Name \"%s\"\r\n", cfgs[i].c_str() ); - } - - fprintf ( OUT, "# Begin Group \"Source Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n" ); - - for ( size_t isrcfile = 0; isrcfile < source_files.size(); isrcfile++ ) - { - string source_file = DosSeparator(source_files[isrcfile]); - - if ( strncmp ( source_file.c_str(), ".\\", 2 ) ) - { - source_file = string(".\\") + source_file; - } -#if 0 - if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) - { - string basename = string ( source_file.c_str(), source_file.size() - 5 ); - - // TODO FIXME - not sure what this is doing? wine hack maybe? - //if ( basename !~ /\..{1,3}$/; ) basename += string(".dll"); - string dbg_c_file = basename + ".dbg.c"; - - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=%s\r\n", dbg_c_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } -#endif - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "SOURCE=%s\r\n", source_file.c_str() ); - - if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) - { -#if 0 - string basename = string ( source_file.c_str(), source_file.size() - 5 ); - - string spec_file = source_file; - string def_file = basename + ".def"; - - // TODO FIXME - not sure what this is doing? wine hack maybe? - //if ( basename !~ /\..{1,3}$/; ) basename += ".dll"; - string dbg_file = basename + ".dbg"; - string dbg_c_file = basename + ".dbg.c"; - - string srcdir = "."; // FIXME: Is this really always correct? - - fprintf ( OUT, "# Begin Custom Build\r\n" ); - fprintf ( OUT, "InputPath=%s\r\n", spec_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "BuildCmds= \\\r\n" ); - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe --def %s > %s \\\r\n", - output_dir.c_str(), - spec_file.c_str(), - def_file.c_str() ); - - if ( module.name == "ntdll" ) - { - int n = 0; - for ( i = 0; i < c_srcs.size(); i++ ) - { - const string& c_src = c_srcs[i]; - if(n++ > 0) - { - fprintf ( OUT, "\techo %s >> %s \\\r\n", c_src.c_str(), dbg_file.c_str() ); - } - else - { - fprintf ( OUT, "\techo %s > %s \\\r\n", c_src.c_str(), dbg_file.c_str() ); - } - } - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", - output_dir.c_str() ); - fprintf ( OUT, " -o %s --debug -C%s %s \\\r\n", - dbg_c_file.c_str(), - srcdir.c_str(), - dbg_file.c_str() ); - } - else - { - string sc_srcs; - for ( i = 0; i < c_srcs.size(); i++ ) - { - const string& c_src = c_srcs[i]; - if ( !strcmp ( &c_src[c_src.size()-2], ".c" ) ) - { - if ( sc_srcs.size() ) - sc_srcs += " "; - sc_srcs += c_src; - } - } - - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", - output_dir.c_str() ); - fprintf ( OUT, " -o %s --debug -C%s %s \\\r\n", - dbg_c_file.c_str(), - srcdir.c_str(), - sc_srcs.c_str() ); - } - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", def_file.c_str() ); - fprintf ( OUT, " $(BuildCmds)\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", dbg_c_file.c_str() ); - fprintf ( OUT, " $(BuildCmds)\r\n" ); - fprintf ( OUT, "# End Custom Build\r\n" ); -#endif - } - /*else if ( source_file =~ /([^\\]*?\.h)$/ ) - { - my $h_file = $1; - - foreach my $cfg (@cfgs) { - if($#cfgs == 0) { - # Nothing - } elsif($n == 0) { - fprintf ( OUT, "!IF \"$(CFG)\" == \"$cfg\"\r\n" ); - fprintf ( OUT, "\r\n" ); - } else { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"$cfg\"\r\n" ); - fprintf ( OUT, "\r\n" ); - } - - $output_dir = $cfg; - $output_dir =~ s/^$project - //; - $output_dir =~ s/ /_/g; - $output_dir =~ s/C\+\+/Cxx/g; - if($output_prefix_dir) { - $output_dir = "$output_prefix_dir\\$output_dir" ); - } - - fprintf ( OUT, "# Begin Custom Build\r\n" ); - fprintf ( OUT, "OutDir=%s\r\n", output_dir.c_str() ); - fprintf ( OUT, "InputPath=%s\r\n", source_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"$(OutDir)\\wine\\%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", h_file.c_str() ); - fprintf ( OUT, "\tcopy \"$(InputPath)\" \"$(OutDir)\\wine\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# End Custom Build\r\n" ); - } - - if ( cfgs.size() != 0) - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ENDIF \r\n" ); - fprintf ( OUT, "\r\n" ); - } - }*/ - - fprintf ( OUT, "# End Source File\r\n" ); - } - fprintf ( OUT, "# End Group\r\n" ); - fprintf ( OUT, "# Begin Group \"Header Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n" ); - for ( i = 0; i < header_files.size(); i++ ) - { - const string& header_file = header_files[i]; - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=.\\%s\r\n", header_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } - fprintf ( OUT, "# End Group\r\n" ); - - - - fprintf ( OUT, "# Begin Group \"Resource Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n" ); - for ( i = 0; i < resource_files.size(); i++ ) - { - const string& resource_file = resource_files[i]; - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=.\\%s\r\n", resource_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } - fprintf ( OUT, "# End Group\r\n" ); - - fprintf ( OUT, "# End Target\r\n" ); - fprintf ( OUT, "# End Project\r\n" ); - - fclose(OUT); -} - -#if 0 - -void -MSVCBackend::_generate_dsw_project ( - FILE* OUT, - const Module& module, - std::string dsp_file, - const std::vector<Dependency*>& dependencies ) -{ - dsp_file = DosSeparator ( std::string(".\\") + dsp_file ); - - // TODO FIXME - must they be sorted? - //@dependencies = sort(@dependencies); - - fprintf ( OUT, "####################################################################### ########\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<5>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<4>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - for ( size_t i = 0; i < dependencies.size(); i++ ) - { - Dependency& dependency = *dependencies[i]; - fprintf ( OUT, " Begin Project Dependency\r\n" ); - fprintf ( OUT, " Project_Dep_Name %s\r\n", dependency.module.name.c_str() ); - fprintf ( OUT, " End Project Dependency\r\n" ); - } - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void -MSVCBackend::_generate_dsw_footer ( FILE* OUT ) -{ - fprintf ( OUT, "####################################################################### ########\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Global:\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<5>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<3>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "####################################################################### ########\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -#endif - -void -MSVCBackend::_generate_sln_header ( FILE* OUT ) -{ - fprintf ( OUT, "Microsoft Visual Studio Solution File, Format Version 9.00\r\n" ); - fprintf ( OUT, "# Visual C++ Express 2005\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void -MSVCBackend::_generate_sln ( FILE* OUT ) -{ - _generate_sln_header(OUT); - // TODO FIXME - is it necessary to sort them? - for ( size_t i = 0; i < ProjectNode.modules.size(); i++ ) - { - Module& module = *ProjectNode.modules[i]; - - std::string vcproj_file = VcprojFileName ( module ); - _generate_dsw_project ( OUT, module, vcproj_file, module.dependencies ); - } -// _generate_dsw_footer ( OUT ); -} - - - -/* - m_devFile << "Microsoft Visual Studio Solution File, Format Version 9.00" << endl; - m_devFile << "# Visual C++ Express 2005" << endl; - - m_devFile << "# FIXME Project listings here" << endl; - m_devFile << "EndProject" << endl; - m_devFile << "Global" << endl; - m_devFile << " GlobalSection(SolutionConfigurationPlatforms) = preSolution" << endl; - m_devFile << " Debug|Win32 = Debug|Win32" << endl; - m_devFile << " Release|Win32 = Release|Win32" << endl; - m_devFile << " EndGlobalSection" << endl; - m_devFile << " GlobalSection(ProjectConfigurationPlatforms) = postSolution" << endl; - m_devFile << " #FIXME Project Listings Here" << endl; - m_devFile << " EndGlobalSection" << endl; - m_devFile << " GlobalSection(SolutionProperties) = preSolution" << endl; - m_devFile << " HideSolutionNode = FALSE" << endl; - m_devFile << " EndGlobalSection" << endl; - m_devFile << "EndGlobal" << endl; - - m_devFile << endl << endl; -*/ +/* + * Copyright (C) 2002 Patrik Stridvall + * Copyright (C) 2005 Royce Mitchell III + * + * 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. + */ + +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#endif//_MSC_VER + [truncated at 1000 lines; 385 more skipped]
19 years, 3 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
59
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200