Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ee9baf28
Commit
ee9baf28
authored
Jun 21, 2009
by
André Hentschel
Committed by
Alexandre Julliard
Jun 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz: Add function for installer button.
parent
d9972cb4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
1 deletion
+54
-1
De.rc
dlls/appwiz.cpl/De.rc
+1
-0
En.rc
dlls/appwiz.cpl/En.rc
+1
-0
Makefile.in
dlls/appwiz.cpl/Makefile.in
+1
-1
appwiz.c
dlls/appwiz.cpl/appwiz.c
+50
-0
res.h
dlls/appwiz.cpl/res.h
+1
-0
No files found.
dlls/appwiz.cpl/De.rc
View file @
ee9baf28
...
...
@@ -35,6 +35,7 @@ STRINGTABLE
IDS_COLUMN_NAME, "Name"
IDS_COLUMN_PUBLISHER, "Herausgeber"
IDS_COLUMN_VERSION, "Version"
IDS_INSTALL_FILTER, "Setup-Programme\0*instal*.exe;*setup*.exe;*.msi\0Programme (*.exe)\0*.exe\0Alle Dateien (*.*)\0*.*\0\0"
}
IDD_MAIN DIALOG 0, 0, 320, 220
...
...
dlls/appwiz.cpl/En.rc
View file @
ee9baf28
...
...
@@ -33,6 +33,7 @@ STRINGTABLE
IDS_COLUMN_NAME, "Name"
IDS_COLUMN_PUBLISHER, "Publisher"
IDS_COLUMN_VERSION, "Version"
IDS_INSTALL_FILTER, "Installation Programs\0*instal*.exe;*setup*.exe;*.msi\0Programs (*.exe)\0*.exe\0All Files (*.*)\0*.*\0\0"
}
IDD_MAIN DIALOG 0, 0, 320, 220
...
...
dlls/appwiz.cpl/Makefile.in
View file @
ee9baf28
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
appwiz.cpl
IMPORTS
=
kernel32 comctl32 advapi32 shell32 user32
IMPORTS
=
kernel32 comctl32 advapi32 shell32 user32
comdlg32
C_SRCS
=
\
appwiz.c
...
...
dlls/appwiz.cpl/appwiz.c
View file @
ee9baf28
...
...
@@ -41,6 +41,7 @@
#include <winreg.h>
#include <shellapi.h>
#include <commctrl.h>
#include <commdlg.h>
#include <cpl.h>
#include "res.h"
...
...
@@ -71,6 +72,8 @@ typedef struct APPINFO {
static
struct
APPINFO
*
AppInfo
=
NULL
;
static
HINSTANCE
hInst
;
static
const
WCHAR
openW
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
/* names of registry keys */
static
const
WCHAR
BackSlashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
DisplayNameW
[]
=
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
...
...
@@ -372,6 +375,49 @@ static void UpdateButtons(HWND hWnd)
}
/******************************************************************************
* Name : InstallProgram
* Description: Search for potential Installer and execute it.
* Parameters : hWnd - Handle of the dialog box
*/
static
void
InstallProgram
(
HWND
hWnd
)
{
OPENFILENAMEW
ofn
;
WCHAR
titleW
[
MAX_STRING_LEN
];
WCHAR
FilterBufferW
[
MAX_STRING_LEN
];
WCHAR
FileNameBufferW
[
MAX_PATH
];
LoadStringW
(
hInst
,
IDS_CPL_TITLE
,
titleW
,
sizeof
(
titleW
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_INSTALL_FILTER
,
FilterBufferW
,
sizeof
(
FilterBufferW
)
/
sizeof
(
WCHAR
));
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAMEW
));
ofn
.
lStructSize
=
sizeof
(
OPENFILENAMEW
);
ofn
.
hwndOwner
=
hWnd
;
ofn
.
hInstance
=
hInst
;
ofn
.
lpstrFilter
=
FilterBufferW
;
ofn
.
nFilterIndex
=
0
;
ofn
.
lpstrFile
=
FileNameBufferW
;
ofn
.
nMaxFile
=
MAX_PATH
;
ofn
.
lpstrFileTitle
=
NULL
;
ofn
.
nMaxFileTitle
=
0
;
ofn
.
lpstrTitle
=
titleW
;
ofn
.
Flags
=
OFN_HIDEREADONLY
|
OFN_ENABLESIZING
;
FileNameBufferW
[
0
]
=
0
;
if
(
GetOpenFileNameW
(
&
ofn
))
{
SHELLEXECUTEINFOW
sei
;
memset
(
&
sei
,
0
,
sizeof
(
sei
));
sei
.
cbSize
=
sizeof
(
sei
);
sei
.
lpVerb
=
openW
;
sei
.
nShow
=
SW_SHOWDEFAULT
;
sei
.
fMask
=
SEE_MASK_NO_CONSOLE
;
sei
.
lpFile
=
ofn
.
lpstrFile
;
ShellExecuteExW
(
&
sei
);
}
}
/******************************************************************************
* Name : UninstallProgram
* Description: Executes the specified program's installer.
* Parameters : id - the internal ID of the installer to remove
...
...
@@ -737,6 +783,10 @@ static BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
))
{
case
IDC_INSTALL
:
InstallProgram
(
hWnd
);
break
;
case
IDC_ADDREMOVE
:
selitem
=
SendDlgItemMessageW
(
hWnd
,
IDL_PROGRAMS
,
LVM_GETNEXTITEM
,
-
1
,
LVNI_FOCUSED
|
LVNI_SELECTED
);
...
...
dlls/appwiz.cpl/res.h
View file @
ee9baf28
...
...
@@ -53,3 +53,4 @@
#define IDS_COLUMN_NAME 6
#define IDS_COLUMN_PUBLISHER 7
#define IDS_COLUMN_VERSION 8
#define IDS_INSTALL_FILTER 9
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment