Basic Win64 support (MSVC)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6439 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
204f371097
commit
d799ee53d7
52 changed files with 380 additions and 247 deletions
|
@ -157,7 +157,7 @@ void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent
|
|||
FD_SET(m_socket,&f[2]);
|
||||
struct timeval tv;
|
||||
memset(&tv,0,sizeof(tv));
|
||||
if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
|
||||
if (select((int)(m_socket+1),&f[0],&f[1],&f[2],&tv)==-1)
|
||||
{
|
||||
m_errorstr="connecting to host (calling select())";
|
||||
m_state=STATE_ERROR;
|
||||
|
|
|
@ -605,11 +605,13 @@ INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
case IDM_EDITSCRIPT:
|
||||
{
|
||||
if (g_sdata.input_script) {
|
||||
if ((int)ShellExecute(g_sdata.hwnd,_T("open"),g_sdata.input_script,NULL,NULL,SW_SHOWNORMAL)<=32) {
|
||||
LPCTSTR verb = _T("open"); // BUGBUG: Should not force the open verb?
|
||||
HINSTANCE hi = ShellExecute(g_sdata.hwnd,verb,g_sdata.input_script,NULL,NULL,SW_SHOWNORMAL);
|
||||
if ((UINT_PTR)hi <= 32) {
|
||||
TCHAR path[MAX_PATH];
|
||||
if (GetWindowsDirectory(path,sizeof(path))) {
|
||||
lstrcat(path,_T("\\notepad.exe"));
|
||||
ShellExecute(g_sdata.hwnd,_T("open"),path,g_sdata.input_script,NULL,SW_SHOWNORMAL);
|
||||
ShellExecute(g_sdata.hwnd,verb,path,g_sdata.input_script,NULL,SW_SHOWNORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,9 +75,15 @@ void CreateToolBar()
|
|||
SendMessage(g_toolbar.hwnd, TB_ADDBUTTONS, BUTTONCOUNT, (LPARAM) &tbbs);
|
||||
|
||||
// For Comctl32.dll version detection
|
||||
#ifndef _WIN64
|
||||
HMODULE hMod = GetModuleHandle(_T("comctl32.dll"));
|
||||
const FARPROC hasCC4_70 = GetProcAddress(hMod, "InitCommonControlsEx");
|
||||
const FARPROC hasCC4_71 = GetProcAddress(hMod, "DllGetVersion");
|
||||
#else
|
||||
const bool hasCC4_70 = true, hasCC4_71 = true;
|
||||
#endif
|
||||
|
||||
if (GetProcAddress(hMod, "InitCommonControlsEx")) { // Version 4.70
|
||||
if (hasCC4_70) { // Version 4.70
|
||||
// Modern toolbar, 24-bit bitmaps
|
||||
|
||||
g_toolbar.imagelist = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
|
||||
|
@ -88,8 +94,7 @@ void CreateToolBar()
|
|||
SendMessage(g_toolbar.hwnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM) g_toolbar.imagelistd);
|
||||
SendMessage(g_toolbar.hwnd, TB_SETHOTIMAGELIST, 0, (LPARAM) g_toolbar.imagelisth);
|
||||
|
||||
// Version 4.71
|
||||
if (GetProcAddress(hMod, "DllGetVersion")) {
|
||||
if (hasCC4_71) { // Version 4.71
|
||||
SendMessage(g_toolbar.hwnd, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue