Archive: Trouble Re-compiling InstallOptions v2.0b4


Trouble Re-compiling InstallOptions v2.0b4
I am using the DirRequest command in InstallOptions to have the user pick a directory to store data in. Since I wanted it to look like the Directory page, I went into the source and modified the Browse button text to say "Browse..." instead of just "...". When I downloaded the newest CVS version last night though, I went in to change this again and I get the following error when I try to compile:

Output Window
Compiling...
InstallerOptions.cpp
C:\Program Files\NSIS\Contrib\InstallOptions\InstallerOptions.cpp(765) : error C2065: 'COLOR_HOTLIGHT' : undeclared identifier
C:\Program Files\NSIS\Contrib\InstallOptions\InstallerOptions.cpp(800) : error C2065: 'IDC_HAND' : undeclared identifier
Error executing cl.exe.

Results
InstallerOptions.obj - 2 error(s), 0 warning(s)


When I look through the old source, COLOR_HOTLIGHT and IDC_HAND are not in there, so they must be new to this build.

Can anyone help me with this?

Also, if there is an interest, I could make this change more permanent so that the user can change the text of the browes button in the script, just like the directory page does.

Thanks. -tim

You need lastest SDK headers from Microsoft:

but you can do the following changes to compile:

#ifndef COLOR_HOTLIGHT
#define COLOR_HOTLIGHT 26
#endif

#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
#endif

or download latest core SDK at:

Core SDK

good luck,
Ramon


Thanks - you can probably tell that I haven't done much Microsoft C++ programing recently. I downloaded and installed the Core SDK as you suggested, but it still wouldn't compile (same errors). :(

The defines worked of course. :)

-tim


You also need to make sure that the SDK location is registered with your C++ compiler. If you are using VC++ it can be done from:
Start->Programs->Microsoft Platform SDK February 2003->Visual Studio Registration->Register PSDK Directories with Visual Studio
If you are using a different C++ compiler, you need to make sure that the include and lib directories in the PSDK are reference earlier than the default include and lib directories.