https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75c67f9b515117b730a84…
commit 75c67f9b515117b730a84800b7c0b5bf65ed192c
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Mon Nov 27 11:02:08 2023 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Nov 27 17:02:08 2023 +0000
[USER32] Fix F1'97 Demo icon not showing in explorer (#5268)
Fixes the F1'97 Demo program (a racing game) not showing an icon in explorer.
This fixes a very special kind of icons which are embedded into the
executable by ancient Watcom C/C++ compilers.
Windows XP/2k3sp2 can show that icon.
Windows Vista/7 cannot show that icon.
Due to the different behavior of the various Windows versions, we
also added a testcase for our bots to protect that functionality in the future,
we committed that test by 0.4.15-dev-7076-g c00d41d91c181746563e689d3390228f703053f5 (#6020)
JIRA issue: CORE-10726
---
win32ss/user/user32/misc/exticon.c | 69 ++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/win32ss/user/user32/misc/exticon.c b/win32ss/user/user32/misc/exticon.c
index 2afd6e6d975..fec6103b2bb 100644
--- a/win32ss/user/user32/misc/exticon.c
+++ b/win32ss/user/user32/misc/exticon.c
@@ -743,9 +743,78 @@ static UINT ICO_ExtractIconExW(
xresdir = find_entry_by_id(iconresdir, LOWORD(pIconId[i]), rootresdir);
if( !xresdir )
{
+#ifdef __REACTOS__
+ /* XP/2K3 can decode icons this way. Vista/7 cannot. This handles
+ * damaged Resources in 'Icon Group' by falling back to 'Icon' resources.
+ * Older Watcom C/C++ compilers can generate such a case */
+ const IMAGE_RESOURCE_DIRECTORY *resdir;
+ WARN("icon entry %d not found\n", LOWORD(pIconId[i]));
+
+ /* Try to get an icon by walking the files Resource Section */
+ if (iconresdir->NumberOfIdEntries > 0)
+ {
+ xresent = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)
+ (ULONG_PTR)(iconresdir + 1);
+ }
+ else
+ {
+ RetPtr[i] = 0;
+ continue;
+ }
+
+ /* Get the Resource Directory */
+ resdir = (const IMAGE_RESOURCE_DIRECTORY *)
+ ((const char *)rootresdir + xresent->OffsetToDirectory);
+
+ if (resdir->NumberOfIdEntries > 0) // Do we have entries
+ {
+ xresent = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)
+ (ULONG_PTR)(resdir + 1);
+ }
+ else
+ {
+ RetPtr[i] = 0;
+ continue;
+ }
+
+ /* Retrieve the data entry and find its address */
+ igdataent = (const IMAGE_RESOURCE_DATA_ENTRY*)
+ ((const char *)rootresdir + xresent->OffsetToData);
+ idata = RtlImageRvaToVa(RtlImageNtHeader((HMODULE)peimage),
+ (HMODULE)peimage, igdataent->OffsetToData, NULL);
+ if (!idata)
+ {
+ RetPtr[i] = 0;
+ continue;
+ }
+
+ /* Check to see if this looks like an icon bitmap */
+ if (idata[0] == sizeof(BITMAPINFOHEADER))
+ {
+ BITMAPINFOHEADER bmih;
+ RtlCopyMemory(&bmih, idata, sizeof(BITMAPINFOHEADER));
+ /* Do the Width and Height look correct for an icon */
+ if ((bmih.biWidth * 2) == bmih.biHeight)
+ {
+ RetPtr[0] = CreateIconFromResourceEx(idata, igdataent->Size,
+ TRUE, 0x00030000, cx1, cy1, flags);
+ if (cx2 && cy2)
+ RetPtr[1] = CreateIconFromResourceEx(idata, idataent->Size,
+ TRUE, 0x00030000, cx2, cy2, flags);
+ ret = 1; // Set number of icons found
+ goto end; // Success so Exit
+ }
+ }
+ else
+ {
+ RetPtr[i] = 0;
+ continue;
+ }
+#else
WARN("icon entry %d not found\n", LOWORD(pIconId[i]));
RetPtr[i]=0;
continue;
+#endif
}
xresdir = find_entry_default(xresdir, rootresdir);
idataent = (const IMAGE_RESOURCE_DATA_ENTRY*)xresdir;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c00d41d91c181746563e6…
commit c00d41d91c181746563e689d3390228f703053f5
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sun Nov 26 09:26:05 2023 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Nov 26 15:26:05 2023 +0000
[USER32_APITEST] Add test for bad 'Icon Groups' but good 'Icons' such as F1'97 (#6020)
Add test for bad 'Icon Groups' but good 'Icons' such as created
by old versions of Watcom C/C++
That icon shows fine in Windows Explorer WinXP/Win2K3,
but does not show in WinVista/Win7 anymore.
A very special corner case.
We will commit the proposed fix shortly after committing the new test.
---
modules/rostests/apitests/user32/PrivateExtractIcons.c | 12 ++++++++++--
modules/rostests/apitests/user32/cpimg2e.exe | Bin 0 -> 38400 bytes
modules/rostests/apitests/user32/resource.h | 1 +
modules/rostests/apitests/user32/user32_apitest.rc | 1 +
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/rostests/apitests/user32/PrivateExtractIcons.c b/modules/rostests/apitests/user32/PrivateExtractIcons.c
index 85edab85a16..aff24a195ed 100644
--- a/modules/rostests/apitests/user32/PrivateExtractIcons.c
+++ b/modules/rostests/apitests/user32/PrivateExtractIcons.c
@@ -27,8 +27,9 @@ BOOL ResourceToFile(INT i, PCWSTR FileName)
if (FileExists(FileName))
{
- skip("'%S' already exists. Exiting now\n", FileName);
- return FALSE;
+ /* We should only be using %temp% paths, so deleting here should be OK */
+ printf("Deleting '%S' that already exists.\n", FileName);
+ DeleteFileW(FileName);
}
hRes = FindResourceW(NULL, MAKEINTRESOURCEW(i), MAKEINTRESOURCEW(RT_RCDATA));
@@ -90,6 +91,12 @@ static struct
/* Icon group file containing one PNG icon and one normal icon */
{L"%temp%\\ROS.ico", 1, 1, TRUE},
+
+ /* Executable file with bad 'Icon Group' but good 'Icons'.
+ * Windows explorer shows the program's icon correctly in WinXP/Win2K3
+ * but Windows 7 shows only a default icon. This is analogous
+ * to EXE's generated by older Watcom C/C++ versions. */
+ {L"%temp%\\cpimg2e.exe", 1, 1, TRUE},
};
static struct
@@ -100,6 +107,7 @@ static struct
{
{L"%temp%\\ROS.ico", IDR_ICONS_PNG},
{L"%temp%\\sysicon.ico", IDR_ICONS_NORMAL},
+ {L"%temp%\\cpimg2e.exe", IDR_EXE_NORMAL}
};
START_TEST(PrivateExtractIcons)
diff --git a/modules/rostests/apitests/user32/cpimg2e.exe b/modules/rostests/apitests/user32/cpimg2e.exe
new file mode 100644
index 00000000000..db9d844a615
Binary files /dev/null and b/modules/rostests/apitests/user32/cpimg2e.exe differ
diff --git a/modules/rostests/apitests/user32/resource.h b/modules/rostests/apitests/user32/resource.h
index ac91b1b51be..33972fde705 100644
--- a/modules/rostests/apitests/user32/resource.h
+++ b/modules/rostests/apitests/user32/resource.h
@@ -3,3 +3,4 @@
#define IDR_ICONS_PNG 2000
#define IDR_ICONS_NORMAL 2001
+#define IDR_EXE_NORMAL 2002
diff --git a/modules/rostests/apitests/user32/user32_apitest.rc b/modules/rostests/apitests/user32/user32_apitest.rc
index 370c3aaa721..155390fc217 100644
--- a/modules/rostests/apitests/user32/user32_apitest.rc
+++ b/modules/rostests/apitests/user32/user32_apitest.rc
@@ -10,6 +10,7 @@ TESTCURSOR CURSOR "test.cur"
IDR_ICONS_PNG RCDATA "ROS.ico"
IDR_ICONS_NORMAL RCDATA "sysicon.ico"
+IDR_EXE_NORMAL RCDATA "cpimg2e.exe"
TESTDIALOG DIALOG 0,0, 200,200
CLASS "TestDialogClass"
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e3d97d7ddecb704a948e0…
commit e3d97d7ddecb704a948e02b7796b2406fcc1f091
Author: Andrei Miloiu <miloiuandrei(a)gmail.com>
AuthorDate: Sun Nov 26 16:11:45 2023 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Nov 26 14:11:45 2023 +0000
[PING] Update Romanian (ro-RO) translation (#6010)
Co-authored-by: Joachim Henze <joachim.henze(a)reactos.org>
Co-authored-by: Stanislav Motylkov <x86corez(a)gmail.com>
---
base/applications/network/ping/lang/ro-RO.rc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/base/applications/network/ping/lang/ro-RO.rc b/base/applications/network/ping/lang/ro-RO.rc
index be34da3759e..bbbefda7744 100644
--- a/base/applications/network/ping/lang/ro-RO.rc
+++ b/base/applications/network/ping/lang/ro-RO.rc
@@ -1,7 +1,9 @@
/*
- * FILE: base/applications/network/ping/lang/ro-RO.rc
- * PURPOSE: Romanian translations for ReactOS Ping Command
- * TRANSLATORS: Ștefan Fulea (stefan dot fulea at mail dot com)
+ * PROJECT: ReactOS Ping Command
+ * LICENSE: MIT (https://spdx.org/licenses/MIT)
+ * PURPOSE: Romanian resource file
+ * TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea(a)mail.com>
+ * Copyright 2023 Andrei Miloiu <miloiuandrei(a)gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -22,7 +24,7 @@ Opțiuni:\n\
-f Indicator de prevenție a fragmentării pachetelor (valabil\n\
doar pentru IPv4).\n\
-i TDV Timp de valabilitate.\n\
- -v TDS Tip de serviciu (valabil doar pentru IPv4. Această opțiune\n\
+ -v TDS Tip de serviciu (valabil doar pentru IPv4. Această setare\n\
nu este de actualitate și nu va avea efect asupra câmpului\n\
tipului de serviciu din antetul unui pachet IP).\n\
-w expirare Limita temporală pentru răspuns, în milisecunde.\n\
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=624b36ad59474e2d213fa…
commit 624b36ad59474e2d213fad0da7eb8088bb35cf64
Author: Andrei Miloiu <miloiuandrei(a)gmail.com>
AuthorDate: Sun Nov 26 16:10:12 2023 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Nov 26 14:10:12 2023 +0000
[WINLOGON] Update Romanian (ro-RO) translation (#6011)
Co-authored-by: Stanislav Motylkov <x86corez(a)gmail.com>
---
base/system/winlogon/lang/ro-RO.rc | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/base/system/winlogon/lang/ro-RO.rc b/base/system/winlogon/lang/ro-RO.rc
index 12a42b69b7b..c3cb421880a 100644
--- a/base/system/winlogon/lang/ro-RO.rc
+++ b/base/system/winlogon/lang/ro-RO.rc
@@ -1,10 +1,11 @@
/*
- * PROJECT: ReactOS Winlogon
- * FILE: base/system/winlogon/lang/ro-RO.rc
- * PURPOSE: Romanian Language File for Winlogon
- * TRANSLATORS:
- * Petru Dimitriu (petrimetri at gmail dot com)
- * Ștefan Fulea (stefan dot fulea at mail dot com)
+ * PROJECT: ReactOS Winlogon
+ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Romanian resource file
+ * TRANSLATORS: Copyright 2011 Petru Dimitriu <petrimetri(a)gmail.com>
+ * Copyright 2011-2019 Ștefan Fulea <stefan.fulea(a)mail.com>
+ * Copyright 2021 George Bișoc <george.bisoc(a)reactos.org>
+ * Copyright 2023 Andrei Miloiu <miloiuandrei(a)gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -45,19 +46,19 @@ END
STRINGTABLE
BEGIN
IDS_PREPARENETWORKCONNECTIONS "Conexiuni în rețea în curs de pregătire…"
- IDS_APPLYINGCOMPUTERSETTINGS "Configurații generale în curs de instituire…"
+ IDS_APPLYINGCOMPUTERSETTINGS "Setări generale în curs de aplicare…"
IDS_RUNNINGSTARTUPSCRIPTS "Operații de pornire în curs de execuție…"
IDS_RUNNINGSHUTDOWNSCRIPTS "Operații de oprire în curs de execuție…"
- IDS_APPLYINGYOURPERSONALSETTINGS "Configurații personale în curs de instituire…"
+ IDS_APPLYINGYOURPERSONALSETTINGS "Setări personale în curs de aplicare…"
IDS_RUNNINGLOGOFFSCRIPTS "Operații de deautentificare în curs de efectuare…"
IDS_RUNNINGLOGONSCRIPTS "Operații de autentificare în curs de efectuare…"
- IDS_LOADINGYOURPERSONALSETTINGS "Configurații personale în curs de reconstituire…"
+ IDS_LOADINGYOURPERSONALSETTINGS "Setări personale în curs de încărcare…"
IDS_CLOSINGNETWORKCONNECTIONS "Conexiuni în rețea în curs de închidere…"
IDS_REACTOSISRESTARTING "Se repornește..."
IDS_REACTOSISSHUTTINGDOWN "Se închide..."
IDS_PREPARETOSTANDBY "Stare de veghe în curs de pregătire…"
IDS_PREPARETOHIBERNATE "Stare de hibernare în curs de pregătire…"
- IDS_SAVEYOURSETTINGS "Configurații personale în curs de păstrare…"
+ IDS_SAVEYOURSETTINGS "Setări personale în curs de salvare…"
IDS_REACTOSISSTARTINGUP "Sistem de operare în curs de pornire…"
IDS_TIMEOUTSHORTFORMAT "%02d:%02d:%02d"
IDS_TIMEOUTLONGFORMAT "%d zile"