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
April 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
26 participants
477 discussions
Start a n
N
ew thread
[mbosma] 14562:
by mbosma@svn.reactos.com
Added: trunk/rosapps/packmgr/gui/de.rc Added: trunk/rosapps/packmgr/gui/es.rc Modified: trunk/rosapps/packmgr/gui/packmgr.rc Added: trunk/rosapps/packmgr/lib/es.rc Modified: trunk/rosapps/packmgr/lib/package.rc _____ Added: trunk/rosapps/packmgr/gui/de.rc --- trunk/rosapps/packmgr/gui/de.rc 2005-04-09 09:40:44 UTC (rev 14561) +++ trunk/rosapps/packmgr/gui/de.rc 2005-04-09 13:48:31 UTC (rev 14562) @@ -0,0 +1,43 @@ + +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN + +/* Dialogs */ +IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 180, 200 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Optionen" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Leider gibt es noch keine Optionen.", 0, 50, 95, 80, 8 +END + +IDD_DOIT DIALOG DISCARDABLE 0, 0, 180, 100 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Performing Operations" +FONT 8, "MS Sans Serif" +BEGIN + + CTEXT "{Status}", IDC_TSTATUS, 0, 10, 180, 8 + + CONTROL "", IDC_STATUS1, "msctls_progress32", PBS_SMOOTH, 20, 25, 140, 15 + + CONTROL "", IDC_STATUS2, "msctls_progress32", PBS_SMOOTH, 20, 45, 140, 15 + + PUSHBUTTON "Abort", IDC_CANCEL, 65, 70, 50, 14, WS_DISABLED +END + +IDR_POPUP MENU DISCARDABLE +BEGIN + POPUP "PopUp", MENUBARBREAK + BEGIN + MENUITEM "Keine Action", 1, GRAYED + MENUITEM "Intallieren (empfohlen)", 2, GRAYED + MENUITEM "Intallieren vom Quellcode", 3, GRAYED + MENUITEM "Aktualisieren", 4, GRAYED + MENUITEM "Deinstallieren", 5, GRAYED + MENUITEM SEPARATOR + MENUITEM "Optionen", 8 + MENUITEM SEPARATOR + MENUITEM "DoIt", 6 + END +END + _____ Added: trunk/rosapps/packmgr/gui/es.rc --- trunk/rosapps/packmgr/gui/es.rc 2005-04-09 09:40:44 UTC (rev 14561) +++ trunk/rosapps/packmgr/gui/es.rc 2005-04-09 13:48:31 UTC (rev 14562) @@ -0,0 +1,43 @@ + +LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL + +/* Dialogs */ +IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 180, 200 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Opciones" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "A·n no hay opciones disponibles.", 0, 50, 95, 80, 8 +END + +IDD_DOIT DIALOG DISCARDABLE 0, 0, 180, 100 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Realizando las operaciones" +FONT 8, "MS Sans Serif" +BEGIN + + CTEXT "{Status}", IDC_TSTATUS, 0, 10, 180, 8 + + CONTROL "", IDC_STATUS1, "msctls_progress32", PBS_SMOOTH, 20, 25, 140, 15 + + CONTROL "", IDC_STATUS2, "msctls_progress32", PBS_SMOOTH, 20, 45, 140, 15 + + PUSHBUTTON "Abort", IDC_CANCEL, 65, 70, 50, 14, WS_DISABLED +END + +IDR_POPUP MENU DISCARDABLE +BEGIN + POPUP "PopUp", MENUBARBREAK + BEGIN + MENUITEM "Ninguna acci¾n", 1, GRAYED + MENUITEM "Instalar (recomendado)", 2, GRAYED + MENUITEM "Instalar desde el c¾digo fuente", 3, GRAYED + MENUITEM "Actualizar", 4, GRAYED + MENUITEM "Desinstalar", 5, GRAYED + MENUITEM SEPARATOR + MENUITEM "Opciones", 8 + MENUITEM SEPARATOR + MENUITEM "íHazlo!", 6 + END +END + _____ Modified: trunk/rosapps/packmgr/gui/packmgr.rc --- trunk/rosapps/packmgr/gui/packmgr.rc 2005-04-09 09:40:44 UTC (rev 14561) +++ trunk/rosapps/packmgr/gui/packmgr.rc 2005-04-09 13:48:31 UTC (rev 14562) @@ -14,5 +14,7 @@ /* Language specific */ #include "en.rc" +#include "es.rc" +#include "de.rc" /* EOF */ _____ Added: trunk/rosapps/packmgr/lib/es.rc --- trunk/rosapps/packmgr/lib/es.rc 2005-04-09 09:40:44 UTC (rev 14561) +++ trunk/rosapps/packmgr/lib/es.rc 2005-04-09 13:48:31 UTC (rev 14562) @@ -0,0 +1,19 @@ + +LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL + +/* String Tables */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_LOAD "Cargando ..." + ERR_OK "Operaci¾n completada." + ERR_PACK "No todos los paquetes pudieron ser instalados\n\nPor favor, mira el archivo de log para mßs detalles." + ERR_GENERIC "Ocurri¾ un error. \nPor favor, mira el archivo de log para mßs detalles." + ERR_DOWNL "íUn archivo necesario no pudo ser descargado!\nPor favor, mira el archivo de log para mßs detalles." + ERR_FILE "Error durante la ejecuci¾n del Script.\nEl archivo no pudo abrirse." + + ERR_SYNATX "Error durante la ejecuci¾n del Script.\nSintaxis err¾nea." + ERR_CALL "Error durante la ejecuci¾n del Script.\nNo se pudo encontrar la funci¾n." + ERR_PARAMETER "Error durante la ejecuci¾n del Script.\nParametro(s) err¾neo." +END + +/* EOF */ _____ Modified: trunk/rosapps/packmgr/lib/package.rc --- trunk/rosapps/packmgr/lib/package.rc 2005-04-09 09:40:44 UTC (rev 14561) +++ trunk/rosapps/packmgr/lib/package.rc 2005-04-09 13:48:31 UTC (rev 14562) @@ -11,5 +11,6 @@ /* Language specific */ #include "en.rc" +#include "es.rc" /* EOF */
19 years, 8 months
1
0
0
0
[hbirr] 14561: Fixed the dereferencing of an existing named object in IoCreateFile.
by hbirr@svn.reactos.com
Fixed the dereferencing of an existing named object in IoCreateFile. Modified: trunk/reactos/ntoskrnl/io/create.c _____ Modified: trunk/reactos/ntoskrnl/io/create.c --- trunk/reactos/ntoskrnl/io/create.c 2005-04-09 09:37:32 UTC (rev 14560) +++ trunk/reactos/ntoskrnl/io/create.c 2005-04-09 09:40:44 UTC (rev 14561) @@ -344,8 +344,8 @@ IN PVOID ExtraCreateParameters OPTIONAL, IN ULONG Options) { - PFILE_OBJECT FileObject; - PDEVICE_OBJECT DeviceObject = NULL; + PFILE_OBJECT FileObject = NULL; + PDEVICE_OBJECT DeviceObject; PIRP Irp; PIO_STACK_LOCATION StackLoc; IO_SECURITY_CONTEXT SecurityContext; @@ -460,23 +460,23 @@ AccessMode, (PVOID*)&DeviceObject, NULL); - ObDereferenceObject (DeviceObject); + ZwClose(LocalHandle); if (!NT_SUCCESS(Status)) { return Status; } if (BODY_TO_HEADER(DeviceObject)->ObjectType != IoDeviceObjectType) { - ZwClose(LocalHandle); + ObDereferenceObject (DeviceObject); return STATUS_OBJECT_NAME_COLLISION; } FileObject = IoCreateStreamFileObject(NULL, DeviceObject); - ZwClose(LocalHandle); + ObDereferenceObject (DeviceObject); } } - if (DeviceObject == NULL) + if (FileObject == NULL) { Status = ObCreateObject(AccessMode, IoFileObjectType,
19 years, 8 months
1
0
0
0
[hbirr] 14560: ObCreateObject should return an existing named object if one already exist.
by hbirr@svn.reactos.com
ObCreateObject should return an existing named object if one already exist. Modified: trunk/reactos/ntoskrnl/ob/object.c _____ Modified: trunk/reactos/ntoskrnl/ob/object.c --- trunk/reactos/ntoskrnl/ob/object.c 2005-04-08 22:19:39 UTC (rev 14559) +++ trunk/reactos/ntoskrnl/ob/object.c 2005-04-09 09:37:32 UTC (rev 14560) @@ -712,8 +712,13 @@ if (ParentHeader && RemainingPath.Buffer == NULL) { - ObDereferenceObject(Parent); - return STATUS_OBJECT_NAME_COLLISION; + if (ParentHeader->ObjectType != Type) + { + ObDereferenceObject(Parent); + return STATUS_OBJECT_NAME_COLLISION; + } + *Object = Parent; + return STATUS_OBJECT_EXISTS; } } else
19 years, 8 months
1
0
0
0
[hpoussin] 14559: GCC 3.3.3 detects uninitialized variable where it is not the case. Workaround problem by moving initialization at the top of function.
by hpoussin@svn.reactos.com
GCC 3.3.3 detects uninitialized variable where it is not the case. Workaround problem by moving initialization at the top of function. Modified: trunk/reactos/drivers/bus/serenum/detect.c _____ Modified: trunk/reactos/drivers/bus/serenum/detect.c --- trunk/reactos/drivers/bus/serenum/detect.c 2005-04-08 20:38:08 UTC (rev 14558) +++ trunk/reactos/drivers/bus/serenum/detect.c 2005-04-08 22:19:39 UTC (rev 14559) @@ -216,7 +216,8 @@ ULONG Size; ULONG Msr, Purge; ULONG i; - BOOLEAN BufferContainsBeginId, BufferContainsEndId; + BOOLEAN BufferContainsBeginId = FALSE; + BOOLEAN BufferContainsEndId = FALSE; SERIAL_LINE_CONTROL Lcr; SERIAL_TIMEOUTS Timeouts; SERIALPERF_STATS PerfStats; @@ -325,7 +326,6 @@ NULL, 0, &PerfStats, &Size); if (!NT_SUCCESS(Status)) return Status; if (PerfStats.FrameErrorCount + PerfStats.ParityErrorCount != 0) goto SerenumConnectIdle; - BufferContainsBeginId = BufferContainsEndId = FALSE; for (i = 0; i < TotalBytesReceived; i++) { if (Buffer[i] == BEGIN_ID) BufferContainsBeginId = TRUE;
19 years, 8 months
1
0
0
0
[hbirr] 14558: - Don't allow to create objects in the nt name space for twice.
by hbirr@svn.reactos.com
- Don't allow to create objects in the nt name space for twice. - Create a stream file object in IoCreateFile if a deviceobject is opening. Modified: trunk/reactos/ntoskrnl/io/create.c Modified: trunk/reactos/ntoskrnl/ob/object.c _____ Modified: trunk/reactos/ntoskrnl/io/create.c --- trunk/reactos/ntoskrnl/io/create.c 2005-04-08 20:29:30 UTC (rev 14557) +++ trunk/reactos/ntoskrnl/io/create.c 2005-04-08 20:38:08 UTC (rev 14558) @@ -238,7 +238,15 @@ DPRINT("DeviceObject %x\n", DeviceObject); - CreatedFileObject->DeviceObject = DeviceObject->Vpb->DeviceObject; + if (DeviceObject->Vpb && + DeviceObject->Vpb->DeviceObject) + { + CreatedFileObject->DeviceObject = DeviceObject->Vpb->DeviceObject; + } + else + { + CreatedFileObject->DeviceObject = DeviceObject; + } CreatedFileObject->Vpb = DeviceObject->Vpb; CreatedFileObject->Type = IO_TYPE_FILE; CreatedFileObject->Flags |= FO_DIRECT_DEVICE_OPEN; @@ -337,11 +345,12 @@ IN ULONG Options) { PFILE_OBJECT FileObject; + PDEVICE_OBJECT DeviceObject = NULL; PIRP Irp; PIO_STACK_LOCATION StackLoc; IO_SECURITY_CONTEXT SecurityContext; KPROCESSOR_MODE AccessMode; - HANDLE LocalFileHandle; + HANDLE LocalHandle; IO_STATUS_BLOCK LocalIoStatusBlock; LARGE_INTEGER SafeAllocationSize; PVOID SystemEaBuffer = NULL; @@ -357,7 +366,7 @@ if (IoStatusBlock == NULL || FileHandle == NULL) return STATUS_ACCESS_VIOLATION; - LocalFileHandle = 0; + LocalHandle = 0; if(Options & IO_NO_PARAMETER_CHECKING) AccessMode = KernelMode; @@ -433,21 +442,57 @@ DPRINT1("FIXME: IO_CHECK_CREATE_PARAMETERS not yet supported!\n"); } - Status = ObCreateObject(AccessMode, - IoFileObjectType, - ObjectAttributes, - AccessMode, - NULL, - sizeof(FILE_OBJECT), - 0, - 0, - (PVOID*)&FileObject); - if (!NT_SUCCESS(Status)) - { + if (CreateDisposition == FILE_OPEN || + CreateDisposition == FILE_OPEN_IF) + { + Status = ObOpenObjectByName(ObjectAttributes, + NULL, + NULL, + AccessMode, + DesiredAccess, + NULL, + &LocalHandle); + if (NT_SUCCESS(Status)) + { + Status = ObReferenceObjectByHandle(LocalHandle, + DesiredAccess, + NULL, + AccessMode, + (PVOID*)&DeviceObject, + NULL); + ObDereferenceObject (DeviceObject); + if (!NT_SUCCESS(Status)) + { + return Status; + } + if (BODY_TO_HEADER(DeviceObject)->ObjectType != IoDeviceObjectType) + { + ZwClose(LocalHandle); + return STATUS_OBJECT_NAME_COLLISION; + } + FileObject = IoCreateStreamFileObject(NULL, DeviceObject); + ZwClose(LocalHandle); + } + } + + + if (DeviceObject == NULL) + { + Status = ObCreateObject(AccessMode, + IoFileObjectType, + ObjectAttributes, + AccessMode, + NULL, + sizeof(FILE_OBJECT), + 0, + 0, + (PVOID*)&FileObject); + if (!NT_SUCCESS(Status)) + { DPRINT("ObCreateObject() failed! (Status %lx)\n", Status); return Status; - } - + } + } RtlMapGenericMask(&DesiredAccess, BODY_TO_HEADER(FileObject)->ObjectType->Mapping); @@ -456,7 +501,7 @@ DesiredAccess, 0, NULL, - &LocalFileHandle); + &LocalHandle); if (!NT_SUCCESS(Status)) { DPRINT("ObInsertObject() failed! (Status %lx)\n", Status); @@ -494,7 +539,7 @@ Irp = IoAllocateIrp(FileObject->DeviceObject->StackSize, FALSE); if (Irp == NULL) { - ZwClose(LocalFileHandle); + ZwClose(LocalHandle); return STATUS_UNSUCCESSFUL; } @@ -574,13 +619,13 @@ FileObject->DeviceObject = NULL; FileObject->Vpb = NULL; - ZwClose(LocalFileHandle); + ZwClose(LocalHandle); } else { _SEH_TRY { - *FileHandle = LocalFileHandle; + *FileHandle = LocalHandle; *IoStatusBlock = LocalIoStatusBlock; } _SEH_HANDLE _____ Modified: trunk/reactos/ntoskrnl/ob/object.c --- trunk/reactos/ntoskrnl/ob/object.c 2005-04-08 20:29:30 UTC (rev 14557) +++ trunk/reactos/ntoskrnl/ob/object.c 2005-04-08 20:38:08 UTC (rev 14558) @@ -705,6 +705,16 @@ DPRINT1("ObFindObject() failed! (Status 0x%x)\n", Status); return Status; } + if (Parent != NULL) + { + ParentHeader = BODY_TO_HEADER(Parent); + } + if (ParentHeader && + RemainingPath.Buffer == NULL) + { + ObDereferenceObject(Parent); + return STATUS_OBJECT_NAME_COLLISION; + } } else { @@ -749,11 +759,6 @@ RtlInitUnicodeString(&(Header->Name),NULL); DPRINT("Getting Parent and adding entry\n"); - if (Parent != NULL) - { - ParentHeader = BODY_TO_HEADER(Parent); - } - if (ParentHeader != NULL && ParentHeader->ObjectType == ObDirectoryType && RemainingPath.Buffer != NULL)
19 years, 8 months
1
0
0
0
[hbirr] 14557: Csrss should only open the '\Windows' directory.
by hbirr@svn.reactos.com
Csrss should only open the '\Windows' directory. Modified: trunk/reactos/subsys/csrss/init.c _____ Modified: trunk/reactos/subsys/csrss/init.c --- trunk/reactos/subsys/csrss/init.c 2005-04-08 19:31:08 UTC (rev 14556) +++ trunk/reactos/subsys/csrss/init.c 2005-04-08 20:29:30 UTC (rev 14557) @@ -135,10 +135,9 @@ NULL, NULL); - Status = NtCreateDirectoryObject(&CsrObjectDirectory, - 0xF000F, /* ea:??? */ - &Attributes); - + Status = NtOpenDirectoryObject(&CsrObjectDirectory, + 0xF000F, /* ea:??? */ + &Attributes); return Status; }
19 years, 8 months
1
0
0
0
[frik85] 14556: update makefile (add ros-get)
by frik85@svn.reactos.com
update makefile (add ros-get) Modified: trunk/rosapps/packmgr/makefile _____ Modified: trunk/rosapps/packmgr/makefile --- trunk/rosapps/packmgr/makefile 2005-04-08 19:18:01 UTC (rev 14555) +++ trunk/rosapps/packmgr/makefile 2005-04-08 19:31:08 UTC (rev 14556) @@ -1,5 +1,5 @@ -all: lib gui +all: lib gui cmd-line lib: dummy $(MAKE) -C lib @@ -7,6 +7,9 @@ gui: dummy $(MAKE) -C gui +cmd-line: dummy + $(MAKE) -C cmd-line + dummy: clean:
19 years, 8 months
1
0
0
0
[chorns] 14555: Copy riched20
by chorns@svn.reactos.com
Copy riched20 Added: branches/xmlbuildsystem/reactos/lib/riched20/ _____ Copied: branches/xmlbuildsystem/reactos/lib/riched20 (from rev 14550, trunk/reactos/lib/riched20)
19 years, 8 months
1
0
0
0
[chorns] 14554: Delete riched20
by chorns@svn.reactos.com
Delete riched20 Deleted: branches/xmlbuildsystem/reactos/lib/riched20/
19 years, 8 months
1
0
0
0
[mbosma] 14553: PackageManager
by mbosma@svn.reactos.com
PackageManager Created the commandline Interface Deleated subcategries Added: trunk/rosapps/packmgr/cmd-line/ Added: trunk/rosapps/packmgr/cmd-line/main.cpp Added: trunk/rosapps/packmgr/cmd-line/main.h Added: trunk/rosapps/packmgr/cmd-line/makefile Added: trunk/rosapps/packmgr/cmd-line/ros-get.rc Modified: trunk/rosapps/packmgr/gui/main.cpp Modified: trunk/rosapps/packmgr/lib/package.cpp Modified: trunk/rosapps/packmgr/lib/package.def Modified: trunk/rosapps/packmgr/lib/package.hpp Modified: trunk/rosapps/packmgr/lib/tree.cpp Modified: trunk/rosapps/packmgr/tree/tree.xml Added: trunk/rosapps/packmgr/tree/tree_withsubs.xml _____ Added: trunk/rosapps/packmgr/cmd-line/main.cpp --- trunk/rosapps/packmgr/cmd-line/main.cpp 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/cmd-line/main.cpp 2005-04-08 19:09:20 UTC (rev 14553) @@ -0,0 +1,185 @@ +//////////////////////////////////////////////////////// +// +// main.cpp +// +// Implementation of a Commandlne Interface +// for the ReactOs Package Manager +// +// Maarten Bosma, 09.01.2004 +// maarten.paul(a)bosma.de +// +//////////////////////////////////////////////////////////////////// + +#include "main.h" + + +int main (int argc, char **argv) +{ + cout << "ReactOs PackageManager " << PACKMGR_VERSION_MAJOR << "." << PACKMGR_VERSION_MINOR << "." << PACKMGR_VERSION_PATCH_LEVEL << " Commandline Interface \n\n"; + + int i; + + if(argc<2) + return Help(); + + for (i=1; i<argc; i++) + cmdline.push_back(argv[i]); + + // install a package + if (cmdline[0] == "install") + Install(); + + // install a package from source + else if (cmdline[0] == "src-inst") + { + cout << "Sorry but I can't do that yet. \n"; + } + + // update a package + else if (cmdline[0] == "update") + { + cout << "Sorry but I can't do that yet. \n"; + } + + // update everything + else if (cmdline[0] == "dist-upgrade") + { + cout << "Sorry but I can't do that yet. \n"; + } + + // remove a package + else if (cmdline[0] == "remove") + { + cout << "Sorry but I can't do that yet. \n"; + } + + // search for a package + else if (cmdline[0] == "show") + { + Show(); + } + + // search for a package + else if (cmdline[0] == "search") + { + cout << "Sorry but I can't do that yet. \n"; + } + + else + Help(); + + return 0; +} + +int Help (void) +{ + cout << "Usage: ros-get [command] \n\n"; + + cout << "Possible commands: \n"; + cout << " install [package name] \t Installs a package \n\n"; + cout << " show [package name] \t\t Shows you detailed information about a package \n"; + + cout << "Currently unimplemented commands: \n"; + cout << " src-install [package name] \t Installs a package from source code \n"; + cout << " update [package name] \t Updates a package \n"; + cout << " dist-update [package name] \t Updates a package \n"; + cout << " remove [package name] \t Uninstalls a package \n\n"; + + cout << " search [search agrument] \t Finds a package \n"; + cout << " list \t\t\t\t Lists all installed programs \n\n"; + + return 0; +} + +int SetStatus (int status1, int status2, WCHAR* text) +{ + if(text) + wprintf(L"%s\n", text); + + // If the Status is 1000 things are done + if(status1==1000) + { + wprintf(L"%s\n", PML_TransError(status2)); + done = true; + } + + return 0; +} + +int Install (void) +{ + pTree tree; + int i, error; + + // load the tree + error = PML_LoadTree (&tree, "tree.xml", NULL); + if(error) + { + cout << PML_TransError(error); + return 0; + } + + // look up the item + for (i=1; (UINT)i<cmdline.size(); i++) + { + int id = PML_FindItem(tree, cmdline[i].c_str()); + + if(id) + PML_SetAction(tree, id, 1, NULL); + + else + cout << "Could not find the Package \"" << cmdline[i] << "\"\n"; + } + + // do it + error = PML_DoIt (tree, SetStatus); + if(error) + { + wprintf(L"%s\n", PML_TransError(error)); + PML_CloseTree (tree); + return 0; + } + + // wait + while (!done) + Sleep(1000); + + // clean up + PML_CloseTree (tree); + + return 0; +} + +int Show (void) +{ + pTree tree; + int i, error; + + // load the tree + error = PML_LoadTree (&tree, "tree.xml", NULL); + if(error) + { + cout << PML_TransError(error); + return 0; + } + + // look up the item + for (i=1; (UINT)i<cmdline.size(); i++) + { + int id = PML_FindItem(tree, cmdline[i].c_str()); + + cout << i << "<" << cmdline.size() << endl; + + if(id) + cout << PML_GetDescription (tree, id) << "\n"; + + else + cout << "Could not find the Package \"" << cmdline[i] << "\"\n"; + } + cout << i << "<" << cmdline.size() << endl; + + // clean up + PML_CloseTree (tree); + + return 0; +} _____ Added: trunk/rosapps/packmgr/cmd-line/main.h --- trunk/rosapps/packmgr/cmd-line/main.h 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/cmd-line/main.h 2005-04-08 19:09:20 UTC (rev 14553) @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////// +// +// main.h +// main.cpp's lumber room :) +/////////////////////////////////////////////////// + +#include "package.hpp" + +#include <iostream> + + +vector<string> cmdline; +bool done = false; + +int Help (void); +int Install (void); +int Show (void); + +int SetStatus (int status1, int status2, WCHAR* text); _____ Added: trunk/rosapps/packmgr/cmd-line/makefile --- trunk/rosapps/packmgr/cmd-line/makefile 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/cmd-line/makefile 2005-04-08 19:09:20 UTC (rev 14553) @@ -0,0 +1,24 @@ + +TARGET_NAME = ros-get +TARGET_TYPE = program +TARGET_APPTYPE = console +PATH_TO_TOP = ../../../reactos + +TARGET_SDKLIBS = package.a + +TARGET_GCCLIBS = stdc++ uuid + +TARGET_OBJECTS = main.o + +TARGET_CFLAGS = \ + -D__USE_W32API -DWIN32 -D_ROS_ \ + -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 \ + -DUNICODE -Wall -I../lib + +TARGET_CPPFLAGS = $(TARGET_CFLAGS) + +TARGET_RCFLAGS = -D__USE_W32API -DNDEBUG -DWIN32 -D_ROS_ -D__WINDRES__ -DUNICODE + +include $(PATH_TO_TOP)/rules.mak +include $(TOOLS_PATH)/helper.mk +include $(TOOLS_PATH)/depend.mk _____ Added: trunk/rosapps/packmgr/cmd-line/ros-get.rc --- trunk/rosapps/packmgr/cmd-line/ros-get.rc 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/cmd-line/ros-get.rc 2005-04-08 19:09:20 UTC (rev 14553) @@ -0,0 +1,8 @@ + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Package Manager - Cmdline Interface\0" +#define REACTOS_STR_INTERNAL_NAME "ros-get\0" +#define REACTOS_STR_ORIGINAL_FILENAME "ros-get.exe\0" + +#include <reactos/version.rc> + +/* EOF */ _____ Modified: trunk/rosapps/packmgr/gui/main.cpp --- trunk/rosapps/packmgr/gui/main.cpp 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/gui/main.cpp 2005-04-08 19:09:20 UTC (rev 14553) @@ -204,12 +204,15 @@ SetMenuItemInfo(hPopup, id, FALSE, &mi); - return 1; + return 0; } // Set the text of the text box int SetText (const char* text) { + if(!text) + return 1; + int i = 0; string source = text; @@ -257,7 +260,8 @@ if(((LPNMHDR)lParam)->code == TVN_SELCHANGED) { selected = ((LPNMTREEVIEW)lParam)->itemNew.lParam; - PML_LoadPackage (tree, selected, SetButton, SetText); + PML_LoadPackage (tree, selected, SetButton); + SetText(PML_GetDescription (tree, selected)); } else if ((int)(((LPNMHDR)lParam)->code) == NM_RCLICK) // <= ahhh LISP _____ Modified: trunk/rosapps/packmgr/lib/package.cpp --- trunk/rosapps/packmgr/lib/package.cpp 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/lib/package.cpp 2005-04-08 19:09:20 UTC (rev 14553) @@ -84,16 +84,19 @@ // The user clicks on a package -extern "C" int PML_LoadPackage (TREE* tree, int id, PML_SetButton SetButton, PML_SetText SetText) +extern "C" int PML_LoadPackage (TREE* tree, int id, PML_SetButton SetButton) { PACKAGE* pack = &tree->packages[id]; tree->setButton = SetButton; - SetButton(1, pack->action); - SetButton(2, pack->inst); // && pack->action != 0 - SetButton(3, pack->src_inst); - SetButton(4, pack->update); - SetButton(5, pack->uninstall); + if(SetButton) + { + SetButton(1, pack->action); + SetButton(2, pack->inst); // && pack->action != 0 + SetButton(3, pack->src_inst); + SetButton(4, pack->update); + SetButton(5, pack->uninstall); + } // root notes (like network) return here if(!pack->path) @@ -105,12 +108,35 @@ pack->loaded = TRUE; } - if(pack->description) - SetText(pack->description); - return ERR_OK; } +extern "C" int PML_FindItem (TREE* tree, const char* what) +{ + int i, j; + bool found; + + // if we have children, same action for them + for (i=1; (UINT)i<tree->packages.size(); i++) + { + found = true; + + for(j=0; (UINT)j<strlen(what); j++) + { + if(tolower(what[j]) != tolower(tree->packages[i].name[j])) + { + found = false; + break; + } + } + + if(found) + return i; + } + + return 0; +} + // The user chooses a actions like Install extern "C" int PML_SetAction (TREE* tree, int id, int action, PML_SetIcon SetIcon) { @@ -134,7 +160,8 @@ // set the icon if(!pack->icon) - SetIcon(id, action); + if(SetIcon) + SetIcon(id, action); // can't do src install yet if(action == 2) @@ -147,7 +174,8 @@ else if (action != 0) { // since we are setting a action we undo it again - tree->setButton(1, 1); + if(tree->setButton) + tree->setButton(1, 1); //tree->setButton(action+1, 0); pack->action = action; @@ -168,9 +196,10 @@ // undoing else - {+ + { // set other things back - tree->setButton(1, 0); + if(tree->setButton) + tree->setButton(1, 0); //tree->setButton(pack->action+1, 1); pack->action = 0; @@ -189,3 +218,11 @@ return ret; } +// +extern "C" char* PML_GetDescription (TREE* tree, int id) +{ + PML_LoadPackage(tree, id, NULL); + + return tree->packages[id].description; +} + _____ Modified: trunk/rosapps/packmgr/lib/package.def --- trunk/rosapps/packmgr/lib/package.def 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/lib/package.def 2005-04-08 19:09:20 UTC (rev 14553) @@ -5,7 +5,9 @@ PML_Abort PML_TransError PML_LoadTree + PML_FindItem PML_LoadPackage + PML_GetDescription PML_SetAction PML_DoIt PML_CloseTree _____ Modified: trunk/rosapps/packmgr/lib/package.hpp --- trunk/rosapps/packmgr/lib/package.hpp 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/lib/package.hpp 2005-04-08 19:09:20 UTC (rev 14553) @@ -71,7 +71,9 @@ WCHAR* PML_TransError (int code); int PML_LoadTree (pTree*, char* url, PML_AddItem); - int PML_LoadPackage (pTree, int id, PML_SetButton, PML_SetText); + int PML_FindItem (TREE* tree, const char* what); + int PML_LoadPackage (pTree, int id, PML_SetButton); + char* PML_GetDescription (TREE* tree, int id); int PML_SetAction (pTree, int package, int action, PML_SetIcon); int PML_DoIt (pTree, PML_SetStatus); _____ Modified: trunk/rosapps/packmgr/lib/tree.cpp --- trunk/rosapps/packmgr/lib/tree.cpp 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/lib/tree.cpp 2005-04-08 19:09:20 UTC (rev 14553) @@ -40,9 +40,8 @@ // expat callback for start of a "node" tag void tree_start (void* usrdata, const char* tag, const char** arg) { - int i, icon; + int i, icon = 0; static int id = 1; - const char* name = "\0"; TREE* tree = (TREE*)usrdata; @@ -58,12 +57,16 @@ tree->packages[id].icon = FALSE; tree->packages[id].none = TRUE; tree->packages[id].path = NULL; + tree->packages[id].name = "\0"; // read the arguments for (i=0; arg[i]; i+=2) { if(!strcmp(arg[i], "name")) - name = arg[i+1]; + { + tree->packages[id].name = new char [strlen(arg[i+1])+1]; + strcpy(tree->packages[id].name, arg[i+1]); + } if(!strcmp(arg[i], "icon")) { @@ -73,7 +76,7 @@ if(!strcmp(arg[i], "file")) { - tree->packages[id].path = new char [strlen(arg[i+1])]; + tree->packages[id].path = new char [strlen(arg[i+1])+1]; strcpy(tree->packages[id].path, arg[i+1]); if(strcmp(tag, "bin")) @@ -84,14 +87,19 @@ } } - if(name[0]=='\0') return; + if(tree->packages[id].name[0] == '\0') return; // add it if(!parents.size()) - tree->addItem(id, name, 0, icon); + { + if(tree->addItem) + tree->addItem(id, tree->packages[id].name, 0, icon); + } + + // do some manipulation at the parent else { - tree->addItem(id, name, parents.back(), icon); + tree->addItem(id, tree->packages[id].name, parents.back(), icon); // list as child in the parent node tree->packages[parents.back()].children.push_back(id); _____ Modified: trunk/rosapps/packmgr/tree/tree.xml --- trunk/rosapps/packmgr/tree/tree.xml 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/tree/tree.xml 2005-04-08 19:09:20 UTC (rev 14553) @@ -1,69 +1,15 @@ <tree> <node name="Internet and Network" icon="5"> - <node name="Browser" icon="5"> - <node name="MozillaControl" file="mozcontrol.xml"/> - </node> - <node name="Email" icon="5"/> - <node name="Instant Messaging and IRC" icon="5"> - <node name="VoIP" icon="5"/> - </node> - <node name="Filesharing" icon="5"/> - <node name="Remotecontrol" icon="5"/> - <node name="Server" icon="5"> - <node name="File-Server" icon="5"/> - <node name="HTTP" icon="5"/> - <node name="IRC" icon="5"/> - <node name="FTP" icon="5"/> - </node> - <node name="Network monitoring" icon="5"/> - <node name="Security" icon="5"/> - <node name="Streaming" icon="5"/> - <node name="Other" icon="5"/> + <node name="Mozilla Control" file="mozcontrol.xml"/> </node> <node name="Office" icon="6"> - <node name="Writing" icon="6"> - <node name="PDF" icon="6"/> - <node name="AbiWord" file="abiword.xml"/> - </node> - <node name="Dictionaries" icon="6"/> + <node name="AbiWord" file="abiword.xml"/> </node> - <node name="Graphics" icon="7"> - <node name="Vector" icon="7"/> - <node name="Pixel" icon="7"/> - <node name="3D" icon="7"/> - </node> - <node name="Multimedia" icon="8"> - <node name="Codecs" icon="8"/> - <node name="Editors" icon="8"/> - <node name="Players" icon="8"/> - </node> - <node name="Development" icon="9"> - <node name="IDE" icon="9"/> - <node name="Compiler" icon="9"/> - <node name="Version Control" icon="9"/> - <node name="Web" icon="9"/> - <node name="Other" icon="9"/> - </node> + <node name="Graphics" icon="7"/> + <node name="Multimedia" icon="8"/> + <node name="Development" icon="9"/> <node name="Games and Fun" icon="10"/> - <node name="Tools" icon="11"> - <node name="Compression" icon="11"/> - <node name="Backup" icon="11"/> - <node name="Burning" icon="11"> - <node name="CD" icon="11"/> - <node name="DVD" icon="11"/> - </node> - </node> - <node name="Others" icon="12"> - <node name="Desktop Environments and Shellreplacements" icon="12"/> - <node name="Desktop" icon="12"/> - <node name="Antivirus" icon="12"/> - <node name="Emulators" icon="12"> - <node name="Computers" icon="12"/> - <node name="Systems" icon="12"/> - <node name="Games" icon="12"/> - </node> - <node name="Drivers" icon="12"/> - </node> - <node name="Installed Programms" icon="13"/> -</tree> - + <node name="Tools" icon="11"/> + <node name="Others" icon="12"/> + <node name="Installed Programms" icon="13"/> +</tree> \ No newline at end of file _____ Added: trunk/rosapps/packmgr/tree/tree_withsubs.xml --- trunk/rosapps/packmgr/tree/tree_withsubs.xml 2005-04-08 19:03:04 UTC (rev 14552) +++ trunk/rosapps/packmgr/tree/tree_withsubs.xml 2005-04-08 19:09:20 UTC (rev 14553) @@ -0,0 +1,69 @@ +<tree> + <node name="Internet and Network" icon="5"> + <node name="Browser" icon="5"> + <node name="MozillaControl" file="mozcontrol.xml"/> + </node> + <node name="Email" icon="5"/> + <node name="Instant Messaging and IRC" icon="5"> + <node name="VoIP" icon="5"/> + </node> + <node name="Filesharing" icon="5"/> + <node name="Remotecontrol" icon="5"/> + <node name="Server" icon="5"> + <node name="File-Server" icon="5"/> + <node name="HTTP" icon="5"/> + <node name="IRC" icon="5"/> + <node name="FTP" icon="5"/> + </node> + <node name="Network monitoring" icon="5"/> + <node name="Security" icon="5"/> + <node name="Streaming" icon="5"/> + <node name="Other" icon="5"/> + </node> + <node name="Office" icon="6"> + <node name="Writing" icon="6"> + <node name="PDF" icon="6"/> + <node name="AbiWord" file="abiword.xml"/> + </node> + <node name="Dictionaries" icon="6"/> + </node> + <node name="Graphics" icon="7"> + <node name="Vector" icon="7"/> + <node name="Pixel" icon="7"/> + <node name="3D" icon="7"/> + </node> + <node name="Multimedia" icon="8"> + <node name="Codecs" icon="8"/> + <node name="Editors" icon="8"/> + <node name="Players" icon="8"/> + </node> + <node name="Development" icon="9"> + <node name="IDE" icon="9"/> + <node name="Compiler" icon="9"/> + <node name="Version Control" icon="9"/> + <node name="Web" icon="9"/> + <node name="Other" icon="9"/> + </node> + <node name="Games and Fun" icon="10"/> + <node name="Tools" icon="11"> + <node name="Compression" icon="11"/> + <node name="Backup" icon="11"/> + <node name="Burning" icon="11"> + <node name="CD" icon="11"/> + <node name="DVD" icon="11"/> + </node> + </node> + <node name="Others" icon="12"> + <node name="Desktop Environments and Shellreplacements" icon="12"/> + <node name="Desktop" icon="12"/> + <node name="Antivirus" icon="12"/> + <node name="Emulators" icon="12"> + <node name="Computers" icon="12"/> + <node name="Systems" icon="12"/> + <node name="Games" icon="12"/> + </node> + <node name="Drivers" icon="12"/> + </node> + <node name="Installed Programms" icon="13"/> +</tree> +
19 years, 8 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
48
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
Results per page:
10
25
50
100
200