Win64 fixes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6413 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e23b3db418
commit
e63fa6c53b
38 changed files with 389 additions and 331 deletions
|
@ -16,13 +16,12 @@
|
|||
* Unicode support by Jim Park -- 08/10/2007
|
||||
*/
|
||||
|
||||
#include "../Platform.h"
|
||||
#include <windowsx.h>
|
||||
#include <shlobj.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "../Platform.h"
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#include "fileform.h"
|
||||
|
@ -65,15 +64,15 @@ static void NSISCALL outernotify(int delta) {
|
|||
}
|
||||
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static INT_PTR CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static INT_PTR CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static INT_PTR CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static INT_PTR CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static INT_PTR CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
||||
static DWORD WINAPI install_thread(LPVOID p);
|
||||
|
@ -119,7 +118,7 @@ static void NSISCALL NotifyCurWnd(UINT uNotifyCode)
|
|||
|
||||
#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
#define HandleStaticBkColor() _HandleStaticBkColor(uMsg, wParam, lParam)
|
||||
static BOOL NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if ((uMsg - WM_CTLCOLOREDIT) <= (WM_CTLCOLORSTATIC - WM_CTLCOLOREDIT))
|
||||
{
|
||||
|
@ -151,7 +150,7 @@ static BOOL NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
c->bkb = CreateBrushIndirect(&lh);
|
||||
}
|
||||
|
||||
return (BOOL)c->bkb;
|
||||
return (INT_PTR)c->bkb;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -464,7 +463,7 @@ static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lPara
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
|
||||
{
|
||||
|
@ -738,7 +737,7 @@ DWORD CALLBACK StreamLicenseRTF(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG
|
|||
}
|
||||
#endif
|
||||
|
||||
static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
page *m_this_page=g_this_page;
|
||||
HWND hwLicense;
|
||||
|
@ -847,7 +846,7 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
|||
#endif
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (uMsg == WM_INITDIALOG)
|
||||
{
|
||||
|
@ -909,7 +908,7 @@ static int NSISCALL _sumsecsfield(int idx)
|
|||
|
||||
#define sumsecsfield(x) _sumsecsfield(SECTION_OFFSET(x))
|
||||
|
||||
static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int dontsetdefstyle;
|
||||
page *thispage = g_this_page;
|
||||
|
@ -1279,7 +1278,7 @@ static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
return CallWindowProc(oldTreeWndProc,hwnd,uMsg,wParam,lParam);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
const int wParamSelChangeNotifyInstTypeChanged = -1;
|
||||
static HTREEITEM *hTreeItems;
|
||||
|
@ -1636,7 +1635,7 @@ static DWORD WINAPI install_thread(LPVOID p)
|
|||
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
||||
static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND linsthwnd=insthwnd;
|
||||
if (uMsg == WM_INITDIALOG)
|
||||
|
@ -1724,24 +1723,14 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
HMENU menu = CreatePopupMenu();
|
||||
POINT pt;
|
||||
AppendMenu(menu,MF_STRING,1,GetNSISStringTT(LANG_COPYDETAILS));
|
||||
if (lParam == ((UINT)-1))
|
||||
pt.x = GET_X_LPARAM(lParam), pt.y = GET_Y_LPARAM(lParam);
|
||||
if (lParam == ((UINT)-1)) // BUGBUG64?
|
||||
{
|
||||
RECT r;
|
||||
GetWindowRect(linsthwnd, &r);
|
||||
pt.x = r.left;
|
||||
pt.y = r.top;
|
||||
GetWindowRect(linsthwnd,&r);
|
||||
pt.x = r.left, pt.y = r.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
pt.x = GET_X_LPARAM(lParam);
|
||||
pt.y = GET_Y_LPARAM(lParam);
|
||||
}
|
||||
if (1==TrackPopupMenu(
|
||||
menu,
|
||||
TPM_NONOTIFY|TPM_RETURNCMD,
|
||||
pt.x,
|
||||
pt.y,
|
||||
0,hwndDlg,0))
|
||||
if (1==TrackPopupMenu(menu,TPM_NONOTIFY|TPM_RETURNCMD,pt.x,pt.y,0,hwndDlg,0))
|
||||
{
|
||||
int i,total = 1; // 1 for the null char
|
||||
LVITEM item;
|
||||
|
|
|
@ -83,7 +83,7 @@ static int NSISCALL calc_percent()
|
|||
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_COMPRESS_WHOLE)
|
||||
BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (uMsg == WM_INITDIALOG)
|
||||
{
|
||||
|
@ -99,13 +99,11 @@ BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
#else
|
||||
TCHAR *msg=_LANG_VERIFYINGINST;
|
||||
#endif
|
||||
|
||||
wsprintf(bt,msg,percent);
|
||||
|
||||
my_SetWindowText(hwndDlg,bt);
|
||||
my_SetDialogItemText(hwndDlg,IDC_STR,bt);
|
||||
}
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD verify_time;
|
||||
|
@ -460,8 +458,8 @@ static char _inbuffer[IBUFSIZE];
|
|||
static char _outbuffer[OBUFSIZE];
|
||||
extern int m_length;
|
||||
extern int m_pos;
|
||||
extern BOOL CALLBACK verProc(HWND, UINT, WPARAM, LPARAM);
|
||||
extern BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
|
||||
extern INT_PTR CALLBACK verProc(HWND, UINT, WPARAM, LPARAM);
|
||||
extern INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
|
||||
static int NSISCALL __ensuredata(int amount)
|
||||
{
|
||||
int needed=amount-(dbd_size-dbd_pos);
|
||||
|
|
|
@ -468,6 +468,7 @@ typedef struct
|
|||
#define CC_BK_SYS 8
|
||||
#define CC_BKB 16
|
||||
|
||||
#pragma pack(push, 4)
|
||||
typedef struct {
|
||||
COLORREF text;
|
||||
COLORREF bkc;
|
||||
|
@ -476,6 +477,7 @@ typedef struct {
|
|||
int bkmode;
|
||||
int flags;
|
||||
} ctlcolors;
|
||||
#pragma pack(pop)
|
||||
|
||||
// constants for myDelete (util.c)
|
||||
#define DEL_DIR 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue