Bugs item #1951417, was opened at 2008-04-25 00:59
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1951417&group_id=22049
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: 2.0 Series
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Paul Wise (pabs3)
Summary: "no branding image found" message on linux/Debian
Initial Comment:
Version: 2.36
email: kostas@...
When compiling on a Debian system I get the message "Error: no branding image found in chosen UI!". The same script compiles fine with the same NSIS version under Windows.
I think the problem was caused in revision 4890 of file /NSIS/trunk/Source/Platform.h. ULONG_PTR is used before it is defined.
I tested this on my system by moving the 3 lines that define ULONG_PTR before the MAKEINTRESOURCEW definition and it resolves the problem for me.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-04 01:36
Message:
Logged In: NO
Thanks!
kostas
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-05-04 01:31
Message:
Logged In: YES
user_id=35028
Originator: NO
Fixed in SVN r5634.
Switched it to using stricmp and turned off ignoring the test.
I'll add the patch when I upload 2.37 to Debian.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-04 01:29
Message:
Logged In: NO
Sorry for not following this closer.
I don't have mingw32-binutils installed. If I understand correctly that is
for cross-compilation and I only complied makensis.
kostas
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-05-03 22:29
Message:
Logged In: YES
user_id=584402
Originator: NO
Nice catch. That really has to be case-insensitive.
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-05-03 20:39
Message:
Logged In: YES
user_id=35028
Originator: NO
1046 doesn't seem to come up because check is set to false because the
string comparison is not case insensitive:
(gdb) br script.cpp:2462
Breakpoint 1 at 0x808aa56: file Source/script.cpp, line 2462.
(gdb) condition 1 dlgItem->wId == 1046
(gdb) r
...
Breakpoint 1, CEXEBuild::doCommand (this=0xbfabb020, which_token=38,
line=@0xbfaa89f4) at Source/script.cpp:2462
2462 if (IS_INTRESOURCE(dlgItem->szClass)) {
(gdb) p line.gettoken_str(2)
$1 = 0x99115a0
"/home/pabs/devel/misc/nsis/.test\\Contrib\\UIs\\modern_headerbmp.exe"
(gdb) s
2467 char *szClass = winchar_toansi(dlgItem->szClass);
(gdb) n
2468 check = strcmp(szClass, "Static") == 0;
(gdb) p szClass
$2 = 0x9903990 "STATIC"
In the resource file it is "Static", but according to reshacker and
windres, the class in the resulting executable is "STATIC". So, somehow it
is getting uppercased when building, my windres is this:
$ i586-mingw32msvc-windres --version
GNU windres (GNU Binutils) 2.18.50.20080109
Looks like windres doesn't know about the "Static" class:
pabs@...$
i586-mingw32msvc-windres modern_headerbmp.exe
/* Type: dialog
Name: 105. */
LANGUAGE 9, 1
105 DIALOGEX 0, 0, 331, 222
STYLE 0x80ca0848
FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "", 3, 166, 201, 50, 14, 0x50030000
PUSHBUTTON "", 1, 216, 201, 50, 14, 0x50010000
PUSHBUTTON "", 2, 273, 201, 50, 14, 0x50010000
CONTROL "", 1018, 130, 0x40020004, 15, 45, 300, 140
CONTROL "", 1044, 130, 0x40020004, 0, 0, 331, 193
CONTROL "", 1035, 130, 0x50020010, 5, 193, 321, 1
CONTROL "", 1036, 130, 0x50020010, 0, 35, 340, 1
CONTROL "", 1045, 130, 0x40020010, 0, 193, 340, 1
LTEXT "", 1256, 5, 188, 322, 8, 0x50020000
LTEXT "", 1028, 5, 188, 322, 8, 0x58020000
LTEXT "", 1034, 0, 0, 332, 35, 0x50020000
LTEXT "", 1037, 105, 5, 215, 10, 0x50020000
LTEXT "", 1038, 110, 16, 210, 16, 0x50020000
CONTROL "", 1046, 130, 0x5000000e, 0, 0, 100, 35
END
pabs@...$ i586-mingw32msvc-windres
./build/debug/UIs/modern_headerbmp.exe
/* COFF information not part of RC
Time stamp: 1209870594
Type: dialog
COFF information not part of RC
Time stamp: 1209870594
Name: 105
COFF information not part of RC
Time stamp: 1209870594. */
LANGUAGE 9, 1
105 DIALOGEX 0, 0, 331, 222
STYLE 0x80ca0848
FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "", 3, 166, 201, 50, 14, 0x50030000
PUSHBUTTON "", 1, 216, 201, 50, 14, 0x50010000
PUSHBUTTON "", 2, 273, 201, 50, 14, 0x50010000
CONTROL "", 1018, "STATIC", 0x40020004, 15, 45, 300, 140
CONTROL "", 1044, "STATIC", 0x40020004, 0, 0, 331, 193
CONTROL "", 1035, "STATIC", 0x50020010, 5, 193, 321, 1
CONTROL "", 1036, "STATIC", 0x50020010, 0, 35, 340, 1
CONTROL "", 1045, "STATIC", 0x40020010, 0, 193, 340, 1
LTEXT "", 1256, 5, 188, 322, 8, 0x50020000
LTEXT "", 1028, 5, 188, 322, 8, 0x58000000
LTEXT "", 1034, 0, 0, 332, 35, 0x50020000
LTEXT "", 1037, 105, 5, 215, 10, 0x50020000
LTEXT "", 1038, 110, 16, 210, 16, 0x50020000
CONTROL "", 1046, "STATIC", 0x5000000e, 0, 0, 100, 35
END
kichik - I'm not sure what the right solution is, maybe just change that
to a case-insensitive comparison?
kostas - need some more info:
Which version of mingw32-binutils are you using?
If you run i586-mingw32msvc-windres on the recompiled modern_headerbmp.exe
what output do you get?
If you upgrade mingw32-binutils to the sid version and recompile do you
get the error?
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-05-03 06:27
Message:
Logged In: YES
user_id=584402
Originator: NO
Try printing all the details on 1046's DialogItemTemplate and see what's
wrong there.
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-05-03 06:15
Message:
Logged In: YES
user_id=35028
Originator: NO
Resource Hacker gives me this:
CONTROL "", 1046, "STATIC", 0x5000000E, 231, 0, 100, 35
Looks fine to me: 0xE = 14
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-05-03 02:00
Message:
Logged In: YES
user_id=584402
Originator: NO
pragma pack isn't tested because it's assumed to work just like the other
basic stuff like int and printf are assumed to work. If you think it's test
worthy, go ahead and add another test to Source\Tests\DialogTemplate.cpp.
DialogItemTemplate doesn't need packing because it's not read from the
installer but only kept in memory.
According to your debug output, the problem is not with packing. The
values all match and don't seem offseted. Maybe modern_headerbmp.exe itself
is flawed. Open it with Resource Hacker and see if the SS_BITMAP style
exists.
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-05-02 23:56
Message:
Logged In: YES
user_id=35028
Originator: NO
Recompiling trunk still gives me the error. I'm using the same gcc as
kostas.
kostas: Can you rebuild & reinstall the nsis deb (run these commands) and
then try and see if makensis still has the problem?
sudo aptitude build-dep nsis
sudo aptitude install build-essential devscripts
apt-get source nsis
cd nsis-*
debuild
sudo debi
kichik: are the pragma pack things tested by the test suite? If not, I
guess they should be?
Hmm, looks like DialogTemplate.h doesn't set the pragma pack before the
DialogItemTemplate structure is defined.
Moving the pragma pack before the DialogItemTemplate definition doesn't
seem to fix this though, however sizeof(*dlgItem) is 40 before moving
pragma pack and 36 after moving the pragma pack.
gdb gives me this after moving the pragma pack:
(gdb) br script.cpp:2473
Breakpoint 1 at 0x8080cb5: file Source/script.cpp, line 2473.
(gdb) command 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>p *dlgItem
>p dlgItem->dwStyle & 14
>c
>end
(gdb) r
...
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$17 = {dwHelpId = 0, sX = 5, sY = 188, sWidth = 322, sHeight = 8,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1256, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$18 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$19 = {dwHelpId = 0, sX = 5, sY = 188, sWidth = 322, sHeight = 8,
dwExtStyle = 0, dwStyle = 1476395008, wId = 1028, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$20 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$21 = {dwHelpId = 0, sX = 0, sY = 0, sWidth = 332, sHeight = 35,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1034, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$22 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$23 = {dwHelpId = 0, sX = 10, sY = 5, sWidth = 280, sHeight = 10,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1037, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$24 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$25 = {dwHelpId = 0, sX = 15, sY = 16, sWidth = 275, sHeight = 16,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1038, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$26 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$27 = {dwHelpId = 0, sX = 300, sY = 8, sWidth = 0, sHeight = 0, dwExtStyle
= 0, dwStyle = 1342308355, wId = 1039, szClass = 0x82, szTitle = 0x67,
szCreationData = 0x0,
wCreateDataSize = 0}
$28 = 2
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$29 = {dwHelpId = 0, sX = 5, sY = 188, sWidth = 322, sHeight = 8,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1256, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$30 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$31 = {dwHelpId = 0, sX = 5, sY = 188, sWidth = 322, sHeight = 8,
dwExtStyle = 0, dwStyle = 1476395008, wId = 1028, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$32 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$33 = {dwHelpId = 0, sX = 0, sY = 0, sWidth = 332, sHeight = 35,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1034, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$34 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$35 = {dwHelpId = 0, sX = 105, sY = 5, sWidth = 215, sHeight = 10,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1037, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$36 = 0
Breakpoint 1, CEXEBuild::doCommand (this=0xbfd592f0, which_token=38,
line=@0xbfd44020) at Source/script.cpp:2473
2473 if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
$37 = {dwHelpId = 0, sX = 110, sY = 16, sWidth = 210, sHeight = 16,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1038, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
$38 = 0
p *dlgItem
$4 = {dwHelpId = 0, sX = 5, sY = 188, sWidth = 322, sHeight = 8,
dwExtStyle = 0, dwStyle = 1342308352, wId = 1256, szClass = 0x82, szTitle =
0x0, szCreationData = 0x0,
wCreateDataSize = 0}
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-02 22:53
Message:
Logged In: NO
Does the fact that it works for me after I recompile makensis means
anything? Different gcc versions? Since I cannot reproduce the problem
after compilation, I cannot help much.
kostas
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-05-02 11:49
Message:
Logged In: YES
user_id=584402
Originator: NO
Actually, #pragma pack() failures could cause this as well. But I'd think
it would fail much sooner if that was the case.
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-05-02 11:48
Message:
Logged In: YES
user_id=584402
Originator: NO
The only reason I could think of that could make script.cpp:2473 fail is
that SS_BITMAP is not properly defined as 14.
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-05-01 03:59
Message:
Logged In: YES
user_id=35028
Originator: NO
Looking at the code, there doesn't seem to be any difference between
Windows and Linux.
Commenting out this line in HeaderBitmap.nsi fixes the issue for me:
!define MUI_HEADERIMAGE
Any thoughts about what the reason could be kichik?
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-04-29 22:09
Message:
Logged In: NO
The example HeaderBitmap.nsi in "Examples/Modern UI" does not compile for
me.
My script used to work with previews versions allthough I don't remember
from which version I upgraded.
----------------------------------------------------------------------
Comment By: Paul Wise (pabs3)
Date: 2008-04-25 17:35
Message:
Logged In: YES
user_id=35028
Originator: NO
nsis 2.36-1 from Debian has no patches except to ignore the result of the
Examples/System/System.nsi test.
On Debian we compile with these parameters:
PREFIX=/usr
PREFIX_CONF=/etc
PREFIX_INC_C=/usr/i586-mingw32msvc/include/
SKIPUTILS='NSIS Menu'
CHMDOCS=0
APPEND_CCFLAGS="-Wall -g -O2"
APPEND_LINKFLAGS="-Wall -g -O2"
STRIP_CP=no
Perhaps one of those is responsible?
Please post your script so I can reproduce this issue.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-04-25 06:47
Message:
Logged In: NO
You are right. I recompiled the original and it works fine. Debian's
version does not. I assume this is a Debian problem. Just in case, the
Debian version is question is nsis-2.36-1. I compile only makensis using
gcc "gcc version 4.2.3 (Debian 4.2.3-3)".
Thanks
----------------------------------------------------------------------
Comment By: Amir Szekely (kichik)
Date: 2008-04-25 02:41
Message:
Logged In: YES
user_id=584402
Originator: NO
Works fine for me. Please include exact steps for reproduction. I've tried
all Modern UI scripts and they all worked fine.
Your suggested solution doesn't make sense to me as we're talking about C.
If ULONG_PTR being undefined would have mattered, you'd get an error. Are
you sure that's the only change you've done? Maybe just the fact that you
rebuilt it all made the difference?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1951417&group_id=22049
|