mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[MSI] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
23ec1e5e6f
commit
c42b133eb1
50 changed files with 1298 additions and 382 deletions
|
@ -49,7 +49,7 @@ list(APPEND SOURCE
|
|||
update.c
|
||||
upgrade.c
|
||||
where.c
|
||||
msipriv.h)
|
||||
precomp.h)
|
||||
|
||||
add_library(msi SHARED
|
||||
${SOURCE}
|
||||
|
@ -73,5 +73,5 @@ add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32
|
|||
kernel32
|
||||
ntdll)
|
||||
|
||||
add_pch(msi msipriv.h SOURCE)
|
||||
add_pch(msi precomp.h SOURCE)
|
||||
add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -18,11 +18,29 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <winsvc.h>
|
||||
#include <odbcinst.h>
|
||||
#include <imagehlp.h>
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "winsvc.h"
|
||||
#include "odbcinst.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msidefs.h"
|
||||
#include "winuser.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "mscoree.h"
|
||||
#include "shlwapi.h"
|
||||
#include "imagehlp.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winver.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define REG_PROGRESS_VALUE 13200
|
||||
#define COMPONENT_PROGRESS_VALUE 24000
|
||||
|
@ -142,6 +160,13 @@ static const WCHAR szWriteEnvironmentStrings[] =
|
|||
static const WCHAR szINSTALL[] =
|
||||
{'I','N','S','T','A','L','L',0};
|
||||
|
||||
struct dummy_thread
|
||||
{
|
||||
HANDLE started;
|
||||
HANDLE stopped;
|
||||
HANDLE thread;
|
||||
};
|
||||
|
||||
static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template)
|
||||
{
|
||||
WCHAR query[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
|
||||
|
@ -2854,7 +2879,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
|
|||
return ERROR_SUCCESS;
|
||||
|
||||
comp->Action = msi_get_component_action( package, comp );
|
||||
if (comp->Action != INSTALLSTATE_LOCAL)
|
||||
if (comp->Action != INSTALLSTATE_LOCAL && comp->Action != INSTALLSTATE_SOURCE)
|
||||
{
|
||||
TRACE("component not scheduled for installation %s\n", debugstr_w(component));
|
||||
return ERROR_SUCCESS;
|
||||
|
@ -7952,6 +7977,42 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq)
|
|||
return rc;
|
||||
}
|
||||
|
||||
DWORD WINAPI dummy_thread_proc(void *arg)
|
||||
{
|
||||
struct dummy_thread *info = arg;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr)) ERR("CoInitializeEx failed %08x\n", hr);
|
||||
|
||||
SetEvent(info->started);
|
||||
WaitForSingleObject(info->stopped, INFINITE);
|
||||
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void start_dummy_thread(struct dummy_thread *info)
|
||||
{
|
||||
if (!(info->started = CreateEventA(NULL, TRUE, FALSE, NULL))) return;
|
||||
if (!(info->stopped = CreateEventA(NULL, TRUE, FALSE, NULL))) return;
|
||||
if (!(info->thread = CreateThread(NULL, 0, dummy_thread_proc, info, 0, NULL))) return;
|
||||
|
||||
WaitForSingleObject(info->started, INFINITE);
|
||||
}
|
||||
|
||||
static void stop_dummy_thread(struct dummy_thread *info)
|
||||
{
|
||||
if (info->thread)
|
||||
{
|
||||
SetEvent(info->stopped);
|
||||
WaitForSingleObject(info->thread, INFINITE);
|
||||
CloseHandle(info->thread);
|
||||
}
|
||||
if (info->started) CloseHandle(info->started);
|
||||
if (info->stopped) CloseHandle(info->stopped);
|
||||
}
|
||||
|
||||
/****************************************************
|
||||
* TOP level entry points
|
||||
*****************************************************/
|
||||
|
@ -7962,6 +8023,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
|||
static const WCHAR szDisableRollback[] = {'D','I','S','A','B','L','E','R','O','L','L','B','A','C','K',0};
|
||||
static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
|
||||
WCHAR *reinstall = NULL, *productcode, *action;
|
||||
struct dummy_thread thread_info = {NULL, NULL, NULL};
|
||||
UINT rc;
|
||||
DWORD len = 0;
|
||||
|
||||
|
@ -8018,6 +8080,8 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
|||
msi_adjust_privilege_properties( package );
|
||||
msi_set_context( package );
|
||||
|
||||
start_dummy_thread(&thread_info);
|
||||
|
||||
productcode = msi_dup_property( package->db, szProductCode );
|
||||
if (strcmpiW( productcode, package->ProductCode ))
|
||||
{
|
||||
|
@ -8054,6 +8118,8 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
|||
/* finish up running custom actions */
|
||||
ACTION_FinishCustomActions(package);
|
||||
|
||||
stop_dummy_thread(&thread_info);
|
||||
|
||||
if (package->need_rollback && !(reinstall = msi_dup_property( package->db, szReinstall )))
|
||||
{
|
||||
WARN("installation failed, running rollback script\n");
|
||||
|
|
|
@ -18,8 +18,20 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
typedef struct tagMSIALTERVIEW
|
||||
|
|
|
@ -17,7 +17,20 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msidefs.h"
|
||||
#include "winver.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
|
|
@ -18,6 +18,15 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
|
|
@ -18,7 +18,23 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "msidefs.h"
|
||||
#include "msipriv.h"
|
||||
#include "activscp.h"
|
||||
#include "oleauto.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "msiserver.h"
|
||||
#include "msiserver_dispids.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
|
|
@ -30,7 +30,16 @@
|
|||
* UnregisterMIMEInfo
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msipriv.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -91,7 +91,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
@ -164,7 +184,7 @@ static void value_free( struct value val )
|
|||
}
|
||||
|
||||
|
||||
#line 168 "cond.tab.c" /* yacc.c:339 */
|
||||
#line 188 "cond.tab.c" /* yacc.c:339 */
|
||||
|
||||
# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
|
@ -184,8 +204,8 @@ static void value_free( struct value val )
|
|||
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "cond.tab.h". */
|
||||
#ifndef YY_COND_E_REACTOSSYNC3_0_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED
|
||||
# define YY_COND_E_REACTOSSYNC3_0_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED
|
||||
#ifndef YY_COND_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED
|
||||
# define YY_COND_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
|
@ -245,7 +265,7 @@ extern int cond_debug;
|
|||
typedef union YYSTYPE YYSTYPE;
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 102 "cond.y" /* yacc.c:355 */
|
||||
#line 122 "cond.y" /* yacc.c:355 */
|
||||
|
||||
struct cond_str str;
|
||||
struct value value;
|
||||
|
@ -253,7 +273,7 @@ union YYSTYPE
|
|||
INT operator;
|
||||
BOOL bool;
|
||||
|
||||
#line 257 "cond.tab.c" /* yacc.c:355 */
|
||||
#line 277 "cond.tab.c" /* yacc.c:355 */
|
||||
};
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
|
@ -263,11 +283,11 @@ union YYSTYPE
|
|||
|
||||
int cond_parse (COND_input *info);
|
||||
|
||||
#endif /* !YY_COND_E_REACTOSSYNC3_0_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED */
|
||||
#endif /* !YY_COND_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_COND_TAB_H_INCLUDED */
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
#line 271 "cond.tab.c" /* yacc.c:358 */
|
||||
#line 291 "cond.tab.c" /* yacc.c:358 */
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
|
@ -549,11 +569,11 @@ static const yytype_uint8 yytranslate[] =
|
|||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
static const yytype_uint16 yyrline[] =
|
||||
{
|
||||
0, 129, 129, 135, 142, 146, 150, 154, 158, 165,
|
||||
169, 176, 180, 188, 223, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
|
||||
246, 247, 248, 252, 266, 281, 289, 299, 316, 333,
|
||||
350, 370
|
||||
0, 149, 149, 155, 162, 166, 170, 174, 178, 185,
|
||||
189, 196, 200, 208, 243, 251, 252, 253, 254, 255,
|
||||
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
|
||||
266, 267, 268, 272, 286, 301, 309, 319, 336, 353,
|
||||
370, 390
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1372,89 +1392,89 @@ yyreduce:
|
|||
switch (yyn)
|
||||
{
|
||||
case 2:
|
||||
#line 130 "cond.y" /* yacc.c:1646 */
|
||||
#line 150 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
cond->result = (yyvsp[0].bool);
|
||||
}
|
||||
#line 1381 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1401 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 3:
|
||||
#line 135 "cond.y" /* yacc.c:1646 */
|
||||
#line 155 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
cond->result = MSICONDITION_NONE;
|
||||
}
|
||||
#line 1390 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1410 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 4:
|
||||
#line 143 "cond.y" /* yacc.c:1646 */
|
||||
#line 163 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = (yyvsp[0].bool);
|
||||
}
|
||||
#line 1398 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1418 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 5:
|
||||
#line 147 "cond.y" /* yacc.c:1646 */
|
||||
#line 167 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = (yyvsp[-2].bool) || (yyvsp[0].bool);
|
||||
}
|
||||
#line 1406 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1426 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 6:
|
||||
#line 151 "cond.y" /* yacc.c:1646 */
|
||||
#line 171 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = !(yyvsp[-2].bool) || (yyvsp[0].bool);
|
||||
}
|
||||
#line 1414 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1434 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 7:
|
||||
#line 155 "cond.y" /* yacc.c:1646 */
|
||||
#line 175 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = ( (yyvsp[-2].bool) || (yyvsp[0].bool) ) && !( (yyvsp[-2].bool) && (yyvsp[0].bool) );
|
||||
}
|
||||
#line 1422 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1442 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 8:
|
||||
#line 159 "cond.y" /* yacc.c:1646 */
|
||||
#line 179 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = ( (yyvsp[-2].bool) && (yyvsp[0].bool) ) || ( !(yyvsp[-2].bool) && !(yyvsp[0].bool) );
|
||||
}
|
||||
#line 1430 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1450 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 9:
|
||||
#line 166 "cond.y" /* yacc.c:1646 */
|
||||
#line 186 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = (yyvsp[0].bool);
|
||||
}
|
||||
#line 1438 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1458 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 10:
|
||||
#line 170 "cond.y" /* yacc.c:1646 */
|
||||
#line 190 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = (yyvsp[-2].bool) && (yyvsp[0].bool);
|
||||
}
|
||||
#line 1446 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1466 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 11:
|
||||
#line 177 "cond.y" /* yacc.c:1646 */
|
||||
#line 197 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = !(yyvsp[0].bool);
|
||||
}
|
||||
#line 1454 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1474 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 12:
|
||||
#line 181 "cond.y" /* yacc.c:1646 */
|
||||
#line 201 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
if ((yyvsp[0].value).type == VALUE_INTEGER)
|
||||
(yyval.bool) = (yyvsp[0].value).u.integer ? 1 : 0;
|
||||
|
@ -1462,11 +1482,11 @@ yyreduce:
|
|||
(yyval.bool) = (yyvsp[0].value).u.string && (yyvsp[0].value).u.string[0];
|
||||
value_free( (yyvsp[0].value) );
|
||||
}
|
||||
#line 1466 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1486 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 13:
|
||||
#line 189 "cond.y" /* yacc.c:1646 */
|
||||
#line 209 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
if ((yyvsp[-2].value).type == VALUE_INTEGER && (yyvsp[0].value).type == VALUE_INTEGER)
|
||||
{
|
||||
|
@ -1501,127 +1521,127 @@ yyreduce:
|
|||
value_free( (yyvsp[-2].value) );
|
||||
value_free( (yyvsp[0].value) );
|
||||
}
|
||||
#line 1505 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1525 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 14:
|
||||
#line 224 "cond.y" /* yacc.c:1646 */
|
||||
#line 244 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.bool) = (yyvsp[-1].bool);
|
||||
}
|
||||
#line 1513 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1533 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 15:
|
||||
#line 231 "cond.y" /* yacc.c:1646 */
|
||||
#line 251 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_EQ; }
|
||||
#line 1519 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1539 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 16:
|
||||
#line 232 "cond.y" /* yacc.c:1646 */
|
||||
#line 252 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_NE; }
|
||||
#line 1525 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1545 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 17:
|
||||
#line 233 "cond.y" /* yacc.c:1646 */
|
||||
#line 253 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_LT; }
|
||||
#line 1531 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1551 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 18:
|
||||
#line 234 "cond.y" /* yacc.c:1646 */
|
||||
#line 254 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_GT; }
|
||||
#line 1537 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1557 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 19:
|
||||
#line 235 "cond.y" /* yacc.c:1646 */
|
||||
#line 255 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_LE; }
|
||||
#line 1543 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1563 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 20:
|
||||
#line 236 "cond.y" /* yacc.c:1646 */
|
||||
#line 256 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_GE; }
|
||||
#line 1549 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1569 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 21:
|
||||
#line 237 "cond.y" /* yacc.c:1646 */
|
||||
#line 257 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_SS; }
|
||||
#line 1555 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1575 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 22:
|
||||
#line 238 "cond.y" /* yacc.c:1646 */
|
||||
#line 258 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_IEQ; }
|
||||
#line 1561 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1581 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 23:
|
||||
#line 239 "cond.y" /* yacc.c:1646 */
|
||||
#line 259 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_INE; }
|
||||
#line 1567 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1587 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 24:
|
||||
#line 240 "cond.y" /* yacc.c:1646 */
|
||||
#line 260 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_ILT; }
|
||||
#line 1573 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1593 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 25:
|
||||
#line 241 "cond.y" /* yacc.c:1646 */
|
||||
#line 261 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_IGT; }
|
||||
#line 1579 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1599 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 26:
|
||||
#line 242 "cond.y" /* yacc.c:1646 */
|
||||
#line 262 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_ILE; }
|
||||
#line 1585 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1605 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 27:
|
||||
#line 243 "cond.y" /* yacc.c:1646 */
|
||||
#line 263 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_IGE; }
|
||||
#line 1591 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1611 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 28:
|
||||
#line 244 "cond.y" /* yacc.c:1646 */
|
||||
#line 264 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_ISS; }
|
||||
#line 1597 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1617 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 29:
|
||||
#line 245 "cond.y" /* yacc.c:1646 */
|
||||
#line 265 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_LHS; }
|
||||
#line 1603 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1623 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 30:
|
||||
#line 246 "cond.y" /* yacc.c:1646 */
|
||||
#line 266 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_RHS; }
|
||||
#line 1609 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1629 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 31:
|
||||
#line 247 "cond.y" /* yacc.c:1646 */
|
||||
#line 267 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_ILHS; }
|
||||
#line 1615 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1635 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 32:
|
||||
#line 248 "cond.y" /* yacc.c:1646 */
|
||||
#line 268 "cond.y" /* yacc.c:1646 */
|
||||
{ (yyval.operator) = COND_IRHS; }
|
||||
#line 1621 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1641 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 33:
|
||||
#line 253 "cond.y" /* yacc.c:1646 */
|
||||
#line 273 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
UINT len;
|
||||
|
@ -1635,11 +1655,11 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1639 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1659 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 34:
|
||||
#line 267 "cond.y" /* yacc.c:1646 */
|
||||
#line 287 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
UINT len = GetEnvironmentVariableW( (yyvsp[0].identifier), NULL, 0 );
|
||||
|
@ -1654,11 +1674,11 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1658 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1678 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 35:
|
||||
#line 282 "cond.y" /* yacc.c:1646 */
|
||||
#line 302 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
(yyval.value).type = VALUE_LITERAL;
|
||||
|
@ -1666,11 +1686,11 @@ yyreduce:
|
|||
if( !(yyval.value).u.string )
|
||||
YYABORT;
|
||||
}
|
||||
#line 1670 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1690 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 36:
|
||||
#line 290 "cond.y" /* yacc.c:1646 */
|
||||
#line 310 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
LPWSTR szNum = COND_GetString( cond, &(yyvsp[0].str) );
|
||||
|
@ -1680,11 +1700,11 @@ yyreduce:
|
|||
(yyval.value).u.integer = atoiW( szNum );
|
||||
cond_free( szNum );
|
||||
}
|
||||
#line 1684 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1704 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 37:
|
||||
#line 300 "cond.y" /* yacc.c:1646 */
|
||||
#line 320 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1701,11 +1721,11 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1705 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1725 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 38:
|
||||
#line 317 "cond.y" /* yacc.c:1646 */
|
||||
#line 337 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1722,11 +1742,11 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1726 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1746 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 39:
|
||||
#line 334 "cond.y" /* yacc.c:1646 */
|
||||
#line 354 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install, action;
|
||||
|
@ -1743,11 +1763,11 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1747 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1767 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 40:
|
||||
#line 351 "cond.y" /* yacc.c:1646 */
|
||||
#line 371 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1764,22 +1784,22 @@ yyreduce:
|
|||
}
|
||||
cond_free( (yyvsp[0].identifier) );
|
||||
}
|
||||
#line 1768 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1788 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 41:
|
||||
#line 371 "cond.y" /* yacc.c:1646 */
|
||||
#line 391 "cond.y" /* yacc.c:1646 */
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
(yyval.identifier) = COND_GetString( cond, &(yyvsp[0].str) );
|
||||
if( !(yyval.identifier) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 1779 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1799 "cond.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
|
||||
#line 1783 "E:/reactosSync3.0_gcc/dll/win32/msi/cond.tab.c" /* yacc.c:1646 */
|
||||
#line 1803 "cond.tab.c" /* yacc.c:1646 */
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
|
@ -2007,7 +2027,7 @@ yyreturn:
|
|||
#endif
|
||||
return yyresult;
|
||||
}
|
||||
#line 379 "cond.y" /* yacc.c:1906 */
|
||||
#line 399 "cond.y" /* yacc.c:1906 */
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,10 +18,25 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
||||
/* below is the query interface to a table */
|
||||
|
||||
typedef struct tagMSICREATEVIEW
|
||||
|
|
|
@ -18,9 +18,25 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <wine/exception.h>
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "msidefs.h"
|
||||
#include "winuser.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/exception.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "msvchelper.h"
|
||||
|
|
|
@ -18,10 +18,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
#include "objidl.h"
|
||||
#include "objbase.h"
|
||||
#include "msiserver.h"
|
||||
#include "query.h"
|
||||
|
||||
#include "initguid.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
/*
|
||||
|
@ -36,6 +53,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
|||
|
||||
#define IS_INTMSIDBOPEN(x) (((ULONG_PTR)(x) >> 16) == 0)
|
||||
|
||||
struct row_export_info
|
||||
{
|
||||
HANDLE handle;
|
||||
LPCWSTR folder;
|
||||
LPCWSTR table;
|
||||
};
|
||||
|
||||
static void free_transforms( MSIDATABASE *db )
|
||||
{
|
||||
while( !list_empty( &db->transforms ) )
|
||||
|
@ -904,50 +928,131 @@ end:
|
|||
return r;
|
||||
}
|
||||
|
||||
static UINT msi_export_record( HANDLE handle, MSIRECORD *row, UINT start )
|
||||
static UINT msi_export_field( HANDLE handle, MSIRECORD *row, UINT field )
|
||||
{
|
||||
UINT i, count, len, r = ERROR_SUCCESS;
|
||||
const char *sep;
|
||||
char *buffer;
|
||||
BOOL bret;
|
||||
DWORD sz;
|
||||
UINT r;
|
||||
|
||||
len = 0x100;
|
||||
buffer = msi_alloc( len );
|
||||
if ( !buffer )
|
||||
sz = 0x100;
|
||||
buffer = msi_alloc( sz );
|
||||
if (!buffer)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
||||
count = MSI_RecordGetFieldCount( row );
|
||||
for ( i=start; i<=count; i++ )
|
||||
r = MSI_RecordGetStringA( row, field, buffer, &sz );
|
||||
if (r == ERROR_MORE_DATA)
|
||||
{
|
||||
sz = len;
|
||||
r = MSI_RecordGetStringA( row, i, buffer, &sz );
|
||||
if (r == ERROR_MORE_DATA)
|
||||
{
|
||||
char *p = msi_realloc( buffer, sz + 1 );
|
||||
if (!p)
|
||||
break;
|
||||
len = sz + 1;
|
||||
buffer = p;
|
||||
}
|
||||
sz = len;
|
||||
r = MSI_RecordGetStringA( row, i, buffer, &sz );
|
||||
if (r != ERROR_SUCCESS)
|
||||
break;
|
||||
char *p;
|
||||
|
||||
if (!WriteFile( handle, buffer, sz, &sz, NULL ))
|
||||
sz++; /* leave room for NULL terminator */
|
||||
p = msi_realloc( buffer, sz );
|
||||
if (!p)
|
||||
{
|
||||
r = ERROR_FUNCTION_FAILED;
|
||||
break;
|
||||
msi_free( buffer );
|
||||
return ERROR_OUTOFMEMORY;
|
||||
}
|
||||
buffer = p;
|
||||
|
||||
r = MSI_RecordGetStringA( row, field, buffer, &sz );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
msi_free( buffer );
|
||||
return r;
|
||||
}
|
||||
}
|
||||
else if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
bret = WriteFile( handle, buffer, sz, &sz, NULL );
|
||||
msi_free( buffer );
|
||||
if (!bret)
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT msi_export_stream( LPCWSTR folder, LPCWSTR table, MSIRECORD *row, UINT field,
|
||||
UINT start )
|
||||
{
|
||||
static const WCHAR fmt_file[] = { '%','s','/','%','s','/','%','s',0 };
|
||||
static const WCHAR fmt_folder[] = { '%','s','/','%','s',0 };
|
||||
WCHAR stream_name[256], stream_filename[MAX_PATH];
|
||||
DWORD sz, read_size, write_size;
|
||||
char buffer[1024];
|
||||
HANDLE file;
|
||||
UINT r;
|
||||
|
||||
/* get the name of the file */
|
||||
sz = sizeof(stream_name)/sizeof(WCHAR);
|
||||
r = MSI_RecordGetStringW( row, start, stream_name, &sz );
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
/* if the destination folder does not exist then create it (folder name = table name) */
|
||||
snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_folder, folder, table );
|
||||
if (GetFileAttributesW( stream_filename ) == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
if (!CreateDirectoryW( stream_filename, NULL ))
|
||||
return ERROR_PATH_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* actually create the file */
|
||||
snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_file, folder, table, stream_name );
|
||||
file = CreateFileW( stream_filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
return ERROR_FILE_NOT_FOUND;
|
||||
|
||||
/* copy the stream to the file */
|
||||
read_size = sizeof(buffer);
|
||||
while (read_size == sizeof(buffer))
|
||||
{
|
||||
r = MSI_RecordReadStream( row, field, buffer, &read_size );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
CloseHandle( file );
|
||||
return r;
|
||||
}
|
||||
if (!WriteFile( file, buffer, read_size, &write_size, NULL ) || read_size != write_size)
|
||||
{
|
||||
CloseHandle( file );
|
||||
return ERROR_WRITE_FAULT;
|
||||
}
|
||||
}
|
||||
CloseHandle( file );
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT msi_export_record( struct row_export_info *row_export_info, MSIRECORD *row, UINT start )
|
||||
{
|
||||
HANDLE handle = row_export_info->handle;
|
||||
UINT i, count, r = ERROR_SUCCESS;
|
||||
const char *sep;
|
||||
DWORD sz;
|
||||
|
||||
count = MSI_RecordGetFieldCount( row );
|
||||
for (i = start; i <= count; i++)
|
||||
{
|
||||
r = msi_export_field( handle, row, i );
|
||||
if (r == ERROR_INVALID_PARAMETER)
|
||||
{
|
||||
r = msi_export_stream( row_export_info->folder, row_export_info->table, row, i, start );
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
/* exporting a binary stream, repeat the "Name" field */
|
||||
r = msi_export_field( handle, row, start );
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
}
|
||||
else if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
sep = (i < count) ? "\t" : "\r\n";
|
||||
if (!WriteFile( handle, sep, strlen(sep), &sz, NULL ))
|
||||
{
|
||||
r = ERROR_FUNCTION_FAILED;
|
||||
break;
|
||||
}
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
msi_free( buffer );
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -971,9 +1076,25 @@ static UINT msi_export_forcecodepage( HANDLE handle, UINT codepage )
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT msi_export_summaryinformation( MSIDATABASE *db, HANDLE handle )
|
||||
{
|
||||
static const char header[] = "PropertyId\tValue\r\n"
|
||||
"i2\tl255\r\n"
|
||||
"_SummaryInformation\tPropertyId\r\n";
|
||||
DWORD sz;
|
||||
|
||||
sz = lstrlenA(header);
|
||||
if (!WriteFile(handle, header, sz, &sz, NULL))
|
||||
return ERROR_WRITE_FAULT;
|
||||
|
||||
return msi_export_suminfo( db, handle );
|
||||
}
|
||||
|
||||
static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
||||
LPCWSTR folder, LPCWSTR file )
|
||||
{
|
||||
static const WCHAR summaryinformation[] = {
|
||||
'_','S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n',0 };
|
||||
static const WCHAR query[] = {
|
||||
's','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','%','s',0 };
|
||||
static const WCHAR forcecodepage[] = {
|
||||
|
@ -1012,14 +1133,22 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (!strcmpW( table, summaryinformation ))
|
||||
{
|
||||
r = msi_export_summaryinformation( db, handle );
|
||||
goto done;
|
||||
}
|
||||
|
||||
r = MSI_OpenQuery( db, &view, query, table );
|
||||
if (r == ERROR_SUCCESS)
|
||||
{
|
||||
struct row_export_info row_export_info = { handle, folder, table };
|
||||
|
||||
/* write out row 1, the column names */
|
||||
r = MSI_ViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec);
|
||||
if (r == ERROR_SUCCESS)
|
||||
{
|
||||
msi_export_record( handle, rec, 1 );
|
||||
msi_export_record( &row_export_info, rec, 1 );
|
||||
msiobj_release( &rec->hdr );
|
||||
}
|
||||
|
||||
|
@ -1027,7 +1156,7 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
|||
r = MSI_ViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec);
|
||||
if (r == ERROR_SUCCESS)
|
||||
{
|
||||
msi_export_record( handle, rec, 1 );
|
||||
msi_export_record( &row_export_info, rec, 1 );
|
||||
msiobj_release( &rec->hdr );
|
||||
}
|
||||
|
||||
|
@ -1036,12 +1165,12 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
|||
if (r == ERROR_SUCCESS)
|
||||
{
|
||||
MSI_RecordSetStringW( rec, 0, table );
|
||||
msi_export_record( handle, rec, 0 );
|
||||
msi_export_record( &row_export_info, rec, 0 );
|
||||
msiobj_release( &rec->hdr );
|
||||
}
|
||||
|
||||
/* write out row 4 onwards, the data */
|
||||
r = MSI_IterateRecords( view, 0, msi_export_row, handle );
|
||||
r = MSI_IterateRecords( view, 0, msi_export_row, &row_export_info );
|
||||
msiobj_release( &view->hdr );
|
||||
}
|
||||
|
||||
|
@ -1879,16 +2008,8 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
|
|||
db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
|
||||
if( !db )
|
||||
{
|
||||
IWineMsiRemoteDatabase *remote_database;
|
||||
|
||||
remote_database = (IWineMsiRemoteDatabase *)msi_get_remote( handle );
|
||||
if ( !remote_database )
|
||||
return MSIDBSTATE_ERROR;
|
||||
|
||||
IWineMsiRemoteDatabase_Release( remote_database );
|
||||
WARN("MsiGetDatabaseState not allowed during a custom action!\n");
|
||||
|
||||
return MSIDBSTATE_READ;
|
||||
return MSIDBSTATE_ERROR;
|
||||
}
|
||||
|
||||
if (db->mode != MSIDBOPEN_READONLY )
|
||||
|
|
|
@ -18,10 +18,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
||||
/*
|
||||
* Code to delete rows from a table.
|
||||
*
|
||||
|
|
|
@ -19,11 +19,32 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include <olectl.h>
|
||||
#include <richedit.h>
|
||||
#include <shellapi.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "msi.h"
|
||||
#include "msidefs.h"
|
||||
#include "ocidl.h"
|
||||
#include "olectl.h"
|
||||
#include "richedit.h"
|
||||
#include "commctrl.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "shellapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "resource.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
@ -3179,13 +3200,13 @@ static LONGLONG msi_vcl_get_cost( msi_dialog *dialog )
|
|||
MSICOSTTREE_SELFONLY, INSTALLSTATE_LOCAL, &each_cost)))
|
||||
{
|
||||
/* each_cost is in 512-byte units */
|
||||
total_cost += each_cost * 512;
|
||||
total_cost += ((LONGLONG)each_cost) * 512;
|
||||
}
|
||||
if (ERROR_SUCCESS == (MSI_GetFeatureCost(dialog->package, feature,
|
||||
MSICOSTTREE_SELFONLY, INSTALLSTATE_ABSENT, &each_cost)))
|
||||
{
|
||||
/* each_cost is in 512-byte units */
|
||||
total_cost -= each_cost * 512;
|
||||
total_cost -= ((LONGLONG)each_cost) * 512;
|
||||
}
|
||||
}
|
||||
return total_cost;
|
||||
|
|
|
@ -18,7 +18,20 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -18,8 +18,20 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
typedef struct tagMSIDROPVIEW
|
||||
|
|
|
@ -30,9 +30,23 @@
|
|||
* RemoveFiles
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <patchapi.h>
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "fdi.h"
|
||||
#include "msi.h"
|
||||
#include "msidefs.h"
|
||||
#include "msipriv.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "patchapi.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
@ -186,8 +200,6 @@ static UINT copy_file(MSIFILE *file, LPWSTR source)
|
|||
return GetLastError();
|
||||
|
||||
SetFileAttributesW(file->TargetPath, FILE_ATTRIBUTE_NORMAL);
|
||||
|
||||
file->state = msifs_installed;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -235,7 +247,6 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
|
|||
MoveFileExW(file->TargetPath, NULL, MOVEFILE_DELAY_UNTIL_REBOOT) &&
|
||||
MoveFileExW(tmpfileW, file->TargetPath, MOVEFILE_DELAY_UNTIL_REBOOT))
|
||||
{
|
||||
file->state = msifs_installed;
|
||||
package->need_reboot_at_end = 1;
|
||||
gle = ERROR_SUCCESS;
|
||||
}
|
||||
|
@ -351,6 +362,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
BOOL is_global_assembly = msi_is_global_assembly( file->Component );
|
||||
|
||||
msi_file_update_ui( package, file, szInstallFiles );
|
||||
|
||||
rc = msi_load_media_info( package, file->Sequence, mi );
|
||||
|
@ -398,7 +411,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
|
||||
TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
|
||||
|
||||
if (!msi_is_global_assembly( file->Component ))
|
||||
if (!is_global_assembly)
|
||||
{
|
||||
msi_create_directory(package, file->Component->Directory);
|
||||
}
|
||||
|
@ -410,10 +423,11 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
msi_free(source);
|
||||
goto done;
|
||||
}
|
||||
if (!is_global_assembly) file->state = msifs_installed;
|
||||
msi_free(source);
|
||||
}
|
||||
else if (!msi_is_global_assembly( file->Component ) &&
|
||||
file->state != msifs_installed && !(file->Attributes & msidbFileAttributesPatchAdded))
|
||||
else if (!is_global_assembly && file->state != msifs_installed &&
|
||||
!(file->Attributes & msidbFileAttributesPatchAdded))
|
||||
{
|
||||
ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
|
||||
rc = ERROR_INSTALL_FAILURE;
|
||||
|
|
|
@ -18,7 +18,14 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msipriv.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -19,7 +19,23 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "winnls.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,6 +18,17 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
|
|
@ -18,10 +18,25 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
||||
/* below is the query interface to a table */
|
||||
|
||||
typedef struct tagMSIINSERTVIEW
|
||||
|
|
|
@ -20,7 +20,22 @@
|
|||
|
||||
/* Msi top level apis directly related to installs */
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msidefs.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,9 +18,21 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <fdi.h>
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "fdi.h"
|
||||
#include "msipriv.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "objidl.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "resource.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,11 +18,35 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <softpub.h>
|
||||
#include <initguid.h>
|
||||
#include <msxml2.h>
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "shlwapi.h"
|
||||
#include "msi.h"
|
||||
#include "msidefs.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "wincrypt.h"
|
||||
#include "winver.h"
|
||||
#include "winuser.h"
|
||||
#include "shlobj.h"
|
||||
#include "shobjidl.h"
|
||||
#include "objidl.h"
|
||||
#include "wintrust.h"
|
||||
#include "softpub.h"
|
||||
|
||||
#include "initguid.h"
|
||||
#include "msxml2.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
@ -50,6 +49,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
#define WINE_PRODUCTVERSION 4,5,6001,22308
|
||||
#define WINE_PRODUCTVERSION_STR "4.5.6001.22308"
|
||||
|
||||
#include <wine/wine_common_ver.rc>
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
||||
#include "rsrc.rc"
|
||||
|
|
|
@ -18,9 +18,20 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <rpcproxy.h>
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "oleauto.h"
|
||||
#include "rpcproxy.h"
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -22,37 +22,21 @@
|
|||
#ifndef __WINE_MSI_PRIVATE__
|
||||
#define __WINE_MSI_PRIVATE__
|
||||
|
||||
#include <wine/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winreg.h>
|
||||
#include <wincon.h>
|
||||
#include <winver.h>
|
||||
#include <msiquery.h>
|
||||
#include <objbase.h>
|
||||
#include <msiserver.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <fusion.h>
|
||||
#include <sddl.h>
|
||||
#include <msidefs.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
#include <wine/list.h>
|
||||
#include <wine/unicode.h>
|
||||
|
||||
#include "resource.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "fdi.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msidefs.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "fusion.h"
|
||||
#include "winnls.h"
|
||||
#include "winver.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
|
||||
BOOL is_wow64 DECLSPEC_HIDDEN;
|
||||
|
@ -968,6 +952,7 @@ extern LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty ) DECL
|
|||
extern INT msi_suminfo_get_int32( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
|
||||
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_export_suminfo( MSIDATABASE *db, HANDLE handle ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_load_suminfo_properties( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* undocumented functions */
|
||||
|
@ -1280,6 +1265,4 @@ static inline LPWSTR strdupW( LPCWSTR src )
|
|||
return dest;
|
||||
}
|
||||
|
||||
#include "query.h"
|
||||
|
||||
#endif /* __WINE_MSI_PRIVATE__ */
|
||||
|
|
|
@ -18,7 +18,26 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
#include "msiserver.h"
|
||||
|
||||
#include "initguid.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,9 +18,35 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
#define COBJMACROS
|
||||
|
||||
#include <wininet.h>
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objidl.h"
|
||||
#include "wincrypt.h"
|
||||
#include "winuser.h"
|
||||
#include "wininet.h"
|
||||
#include "winver.h"
|
||||
#include "urlmon.h"
|
||||
#include "shlobj.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "objbase.h"
|
||||
#include "msidefs.h"
|
||||
#include "sddl.h"
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "msiserver.h"
|
||||
#include "resource.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
@ -502,71 +528,73 @@ done:
|
|||
|
||||
static LPWSTR get_fusion_filename(MSIPACKAGE *package)
|
||||
{
|
||||
HKEY netsetup;
|
||||
static const WCHAR fusion[] =
|
||||
{'f','u','s','i','o','n','.','d','l','l',0};
|
||||
static const WCHAR subkey[] =
|
||||
{'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
||||
'N','E','T',' ','F','r','a','m','e','w','o','r','k',' ','S','e','t','u','p','\\','N','D','P',0};
|
||||
static const WCHAR subdir[] =
|
||||
{'M','i','c','r','o','s','o','f','t','.','N','E','T','\\','F','r','a','m','e','w','o','r','k','\\',0};
|
||||
static const WCHAR v2050727[] =
|
||||
{'v','2','.','0','.','5','0','7','2','7',0};
|
||||
static const WCHAR v4client[] =
|
||||
{'v','4','\\','C','l','i','e','n','t',0};
|
||||
static const WCHAR installpath[] =
|
||||
{'I','n','s','t','a','l','l','P','a','t','h',0};
|
||||
HKEY netsetup, hkey;
|
||||
LONG res;
|
||||
LPWSTR file = NULL;
|
||||
DWORD index = 0, size;
|
||||
WCHAR ver[MAX_PATH];
|
||||
WCHAR name[MAX_PATH];
|
||||
WCHAR windir[MAX_PATH];
|
||||
DWORD size, len, type;
|
||||
WCHAR windir[MAX_PATH], path[MAX_PATH], *filename = NULL;
|
||||
|
||||
static const WCHAR fusion[] = {'f','u','s','i','o','n','.','d','l','l',0};
|
||||
static const WCHAR sub[] = {
|
||||
'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'N','E','T',' ','F','r','a','m','e','w','o','r','k',' ','S','e','t','u','p','\\',
|
||||
'N','D','P',0
|
||||
};
|
||||
static const WCHAR subdir[] = {
|
||||
'M','i','c','r','o','s','o','f','t','.','N','E','T','\\',
|
||||
'F','r','a','m','e','w','o','r','k','\\',0
|
||||
};
|
||||
|
||||
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, sub, 0, KEY_ENUMERATE_SUB_KEYS, &netsetup);
|
||||
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, subkey, 0, KEY_CREATE_SUB_KEY, &netsetup);
|
||||
if (res != ERROR_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
GetWindowsDirectoryW(windir, MAX_PATH);
|
||||
|
||||
ver[0] = '\0';
|
||||
size = MAX_PATH;
|
||||
while (RegEnumKeyExW(netsetup, index, name, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
|
||||
if (!RegCreateKeyExW(netsetup, v4client, 0, NULL, 0, KEY_QUERY_VALUE, NULL, &hkey, NULL))
|
||||
{
|
||||
index++;
|
||||
|
||||
/* verify existence of fusion.dll .Net 3.0 does not install a new one */
|
||||
if (strcmpW( ver, name ) < 0)
|
||||
size = sizeof(path)/sizeof(path[0]);
|
||||
if (!RegQueryValueExW(hkey, installpath, NULL, &type, (BYTE *)path, &size))
|
||||
{
|
||||
LPWSTR check;
|
||||
size = lstrlenW(windir) + lstrlenW(subdir) + lstrlenW(name) +lstrlenW(fusion) + 3;
|
||||
check = msi_alloc(size * sizeof(WCHAR));
|
||||
len = strlenW(path) + strlenW(fusion) + 2;
|
||||
if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL;
|
||||
|
||||
if (!check)
|
||||
strcpyW(filename, path);
|
||||
strcatW(filename, szBackSlash);
|
||||
strcatW(filename, fusion);
|
||||
if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
msi_free(file);
|
||||
return NULL;
|
||||
TRACE( "found %s\n", debugstr_w(filename) );
|
||||
RegCloseKey(hkey);
|
||||
RegCloseKey(netsetup);
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
|
||||
lstrcpyW(check, windir);
|
||||
lstrcatW(check, szBackSlash);
|
||||
lstrcatW(check, subdir);
|
||||
lstrcatW(check, name);
|
||||
lstrcatW(check, szBackSlash);
|
||||
lstrcatW(check, fusion);
|
||||
if (!RegCreateKeyExW(netsetup, v2050727, 0, NULL, 0, KEY_QUERY_VALUE, NULL, &hkey, NULL))
|
||||
{
|
||||
RegCloseKey(hkey);
|
||||
GetWindowsDirectoryW(windir, MAX_PATH);
|
||||
len = strlenW(windir) + strlenW(subdir) + strlenW(v2050727) + strlenW(fusion) + 3;
|
||||
if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL;
|
||||
|
||||
if(GetFileAttributesW(check) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
msi_free(file);
|
||||
file = check;
|
||||
lstrcpyW(ver, name);
|
||||
}
|
||||
else
|
||||
msi_free(check);
|
||||
strcpyW(filename, windir);
|
||||
strcatW(filename, szBackSlash);
|
||||
strcatW(filename, subdir);
|
||||
strcatW(filename, v2050727);
|
||||
strcatW(filename, szBackSlash);
|
||||
strcatW(filename, fusion);
|
||||
if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
TRACE( "found %s\n", debugstr_w(filename) );
|
||||
RegCloseKey(netsetup);
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(netsetup);
|
||||
return file;
|
||||
return filename;
|
||||
}
|
||||
|
||||
typedef struct tagLANGANDCODEPAGE
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#define COBJMACROS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "objbase.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msipriv.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
|
30
dll/win32/msi/precomp.h
Normal file
30
dll/win32/msi/precomp.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
#ifndef __WINE_MSI_PRECOMP__
|
||||
#define __WINE_MSI_PRECOMP__
|
||||
|
||||
#include <wine/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
||||
#include "msipriv.h"
|
||||
#include "query.h"
|
||||
|
||||
#include <winreg.h>
|
||||
#include <wincon.h>
|
||||
#include <msiserver.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#include <wine/unicode.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#endif /* !__WINE_MSI_PRECOMP__ */
|
|
@ -21,6 +21,18 @@
|
|||
#ifndef __WINE_MSI_QUERY_H
|
||||
#define __WINE_MSI_QUERY_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
|
||||
#define OP_EQ 1
|
||||
#define OP_AND 2
|
||||
#define OP_OR 3
|
||||
|
|
|
@ -18,7 +18,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
#include "objidl.h"
|
||||
#include "winnls.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -19,7 +19,23 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msipriv.h"
|
||||
#include "wincrypt.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winver.h"
|
||||
#include "winuser.h"
|
||||
#include "sddl.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MSIERR_INSTALLERROR 5
|
||||
#define MSIERR_ACTIONSTART 8
|
||||
#define MSIERR_COMMONDATA 11
|
||||
|
|
|
@ -18,9 +18,21 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#define COBJMACROS
|
||||
|
||||
#include <activscp.h>
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "msidefs.h"
|
||||
#include "msipriv.h"
|
||||
#include "activscp.h"
|
||||
#include "oleauto.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "msiserver.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -18,10 +18,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
||||
/* below is the query interface to a table */
|
||||
|
||||
typedef struct tagMSISELECTVIEW
|
||||
|
|
|
@ -18,7 +18,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msipriv.h"
|
||||
#include "wincrypt.h"
|
||||
#include "winver.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "sddl.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||
/* A Bison parser, made by GNU Bison 3.0. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
|||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "3.0.2"
|
||||
#define YYBISON_VERSION "3.0"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
|
@ -91,7 +91,19 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "query.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
@ -120,11 +132,11 @@ static struct expr * EXPR_wildcard( void *info );
|
|||
|
||||
#line 134 "sql.tab.c" /* yacc.c:339 */
|
||||
|
||||
# ifndef YY_NULLPTR
|
||||
# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULLPTR nullptr
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULLPTR 0
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
@ -138,8 +150,8 @@ static struct expr * EXPR_wildcard( void *info );
|
|||
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "sql.tab.h". */
|
||||
#ifndef YY_SQL_SQL_TAB_H_INCLUDED
|
||||
# define YY_SQL_SQL_TAB_H_INCLUDED
|
||||
#ifndef YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED
|
||||
# define YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
|
@ -242,7 +254,7 @@ union YYSTYPE
|
|||
|
||||
int sql_parse (SQL_input *info);
|
||||
|
||||
#endif /* !YY_SQL_SQL_TAB_H_INCLUDED */
|
||||
#endif /* !YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED */
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
@ -303,30 +315,11 @@ typedef short int yytype_int16;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef YY_ATTRIBUTE
|
||||
# if (defined __GNUC__ \
|
||||
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
|
||||
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
|
||||
# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
|
||||
# else
|
||||
# define YY_ATTRIBUTE(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef YY_ATTRIBUTE_PURE
|
||||
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
|
||||
#endif
|
||||
|
||||
#ifndef YY_ATTRIBUTE_UNUSED
|
||||
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
|
||||
#endif
|
||||
|
||||
#if !defined _Noreturn \
|
||||
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
|
||||
# if defined _MSC_VER && 1200 <= _MSC_VER
|
||||
# define _Noreturn __declspec (noreturn)
|
||||
# else
|
||||
# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -583,7 +576,7 @@ static const char *const yytname[] =
|
|||
"data_count", "oneselect", "selectfrom", "selcollist", "collist", "from",
|
||||
"unorderdfrom", "tablelist", "expr", "val", "constlist",
|
||||
"update_assign_list", "column_assignment", "const_val", "column_val",
|
||||
"column", "selcolumn", "table", "id", "string", "number", YY_NULLPTR
|
||||
"column", "selcolumn", "table", "id", "string", "number", YY_NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1050,11 +1043,11 @@ static int
|
|||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULLPTR;
|
||||
const char *yyformat = YY_NULL;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
|
@ -1111,7 +1104,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
|
@ -1453,7 +1446,7 @@ yyreduce:
|
|||
SQL_input* sql = (SQL_input*) info;
|
||||
*sql->view = (yyvsp[0].query);
|
||||
}
|
||||
#line 1469 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1450 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
@ -1468,7 +1461,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), insert );
|
||||
}
|
||||
#line 1484 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1465 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
@ -1483,7 +1476,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), insert );
|
||||
}
|
||||
#line 1499 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1480 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
@ -1504,7 +1497,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), create );
|
||||
}
|
||||
#line 1520 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1501 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
@ -1521,7 +1514,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), create );
|
||||
}
|
||||
#line 1537 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1518 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
@ -1536,7 +1529,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), update );
|
||||
}
|
||||
#line 1552 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1533 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
@ -1551,7 +1544,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), update );
|
||||
}
|
||||
#line 1567 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1548 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 16:
|
||||
|
@ -1566,7 +1559,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), delete );
|
||||
}
|
||||
#line 1582 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1563 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 17:
|
||||
|
@ -1581,7 +1574,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter );
|
||||
}
|
||||
#line 1597 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1578 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 18:
|
||||
|
@ -1596,7 +1589,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter );
|
||||
}
|
||||
#line 1612 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1593 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 19:
|
||||
|
@ -1611,7 +1604,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter );
|
||||
}
|
||||
#line 1627 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1608 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 20:
|
||||
|
@ -1619,7 +1612,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.integer) = 1;
|
||||
}
|
||||
#line 1635 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1616 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
@ -1627,7 +1620,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.integer) = -1;
|
||||
}
|
||||
#line 1643 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1624 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 22:
|
||||
|
@ -1643,7 +1636,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), drop );
|
||||
}
|
||||
#line 1659 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1640 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 23:
|
||||
|
@ -1654,7 +1647,7 @@ yyreduce:
|
|||
else
|
||||
(yyval.column_list) = NULL;
|
||||
}
|
||||
#line 1670 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1651 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 24:
|
||||
|
@ -1668,7 +1661,7 @@ yyreduce:
|
|||
ci->next = (yyvsp[0].column_list);
|
||||
(yyval.column_list) = (yyvsp[-2].column_list);
|
||||
}
|
||||
#line 1684 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1665 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
@ -1676,7 +1669,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_list) = (yyvsp[0].column_list);
|
||||
}
|
||||
#line 1692 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1673 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
@ -1686,7 +1679,7 @@ yyreduce:
|
|||
(yyval.column_list)->type = ((yyvsp[0].column_type) | MSITYPE_VALID);
|
||||
(yyval.column_list)->temporary = (yyvsp[0].column_type) & MSITYPE_TEMPORARY ? TRUE : FALSE;
|
||||
}
|
||||
#line 1702 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1683 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 27:
|
||||
|
@ -1694,7 +1687,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = (yyvsp[0].column_type);
|
||||
}
|
||||
#line 1710 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1691 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 28:
|
||||
|
@ -1702,7 +1695,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = (yyvsp[-1].column_type) | MSITYPE_LOCALIZABLE;
|
||||
}
|
||||
#line 1718 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1699 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 29:
|
||||
|
@ -1710,7 +1703,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = (yyvsp[-1].column_type) | MSITYPE_TEMPORARY;
|
||||
}
|
||||
#line 1726 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1707 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 30:
|
||||
|
@ -1718,7 +1711,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) |= MSITYPE_NULLABLE;
|
||||
}
|
||||
#line 1734 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1715 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 31:
|
||||
|
@ -1726,15 +1719,15 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = (yyvsp[-2].column_type);
|
||||
}
|
||||
#line 1742 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1723 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 32:
|
||||
#line 357 "sql.y" /* yacc.c:1646 */
|
||||
{
|
||||
(yyval.column_type) = MSITYPE_STRING | 1;
|
||||
(yyval.column_type) = MSITYPE_STRING | 0x400;
|
||||
}
|
||||
#line 1750 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1731 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 33:
|
||||
|
@ -1742,7 +1735,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = MSITYPE_STRING | 0x400 | (yyvsp[-1].column_type);
|
||||
}
|
||||
#line 1758 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1739 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 34:
|
||||
|
@ -1750,7 +1743,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = MSITYPE_STRING | 0x400;
|
||||
}
|
||||
#line 1766 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1747 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 35:
|
||||
|
@ -1758,7 +1751,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = 2 | 0x400;
|
||||
}
|
||||
#line 1774 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1755 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 36:
|
||||
|
@ -1766,7 +1759,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = 2 | 0x400;
|
||||
}
|
||||
#line 1782 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1763 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 37:
|
||||
|
@ -1774,7 +1767,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = 4;
|
||||
}
|
||||
#line 1790 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1771 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 38:
|
||||
|
@ -1782,7 +1775,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_type) = MSITYPE_STRING | MSITYPE_VALID;
|
||||
}
|
||||
#line 1798 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1779 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 39:
|
||||
|
@ -1792,7 +1785,7 @@ yyreduce:
|
|||
YYABORT;
|
||||
(yyval.column_type) = (yyvsp[0].integer);
|
||||
}
|
||||
#line 1808 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1789 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 40:
|
||||
|
@ -1800,7 +1793,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.query) = (yyvsp[0].query);
|
||||
}
|
||||
#line 1816 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1797 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 41:
|
||||
|
@ -1816,7 +1809,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), distinct );
|
||||
}
|
||||
#line 1832 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1813 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 42:
|
||||
|
@ -1837,7 +1830,7 @@ yyreduce:
|
|||
else
|
||||
(yyval.query) = (yyvsp[0].query);
|
||||
}
|
||||
#line 1853 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1834 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 44:
|
||||
|
@ -1845,7 +1838,7 @@ yyreduce:
|
|||
{
|
||||
(yyvsp[-2].column_list)->next = (yyvsp[0].column_list);
|
||||
}
|
||||
#line 1861 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1842 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 45:
|
||||
|
@ -1853,7 +1846,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_list) = NULL;
|
||||
}
|
||||
#line 1869 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1850 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 47:
|
||||
|
@ -1861,7 +1854,7 @@ yyreduce:
|
|||
{
|
||||
(yyvsp[-2].column_list)->next = (yyvsp[0].column_list);
|
||||
}
|
||||
#line 1877 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1858 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 48:
|
||||
|
@ -1869,7 +1862,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.column_list) = NULL;
|
||||
}
|
||||
#line 1885 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1866 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 49:
|
||||
|
@ -1885,7 +1878,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), table );
|
||||
}
|
||||
#line 1901 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1882 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 50:
|
||||
|
@ -1902,7 +1895,7 @@ yyreduce:
|
|||
|
||||
(yyval.query) = (yyvsp[-3].query);
|
||||
}
|
||||
#line 1918 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1899 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 52:
|
||||
|
@ -1918,7 +1911,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), where );
|
||||
}
|
||||
#line 1934 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1915 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 53:
|
||||
|
@ -1934,7 +1927,7 @@ yyreduce:
|
|||
|
||||
PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), where );
|
||||
}
|
||||
#line 1950 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1931 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 54:
|
||||
|
@ -1942,7 +1935,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.string) = (yyvsp[0].string);
|
||||
}
|
||||
#line 1958 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1939 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 55:
|
||||
|
@ -1952,7 +1945,7 @@ yyreduce:
|
|||
if (!(yyval.string))
|
||||
YYABORT;
|
||||
}
|
||||
#line 1968 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1949 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 56:
|
||||
|
@ -1962,7 +1955,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 1978 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1959 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 57:
|
||||
|
@ -1972,7 +1965,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 1988 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1969 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 58:
|
||||
|
@ -1982,7 +1975,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 1998 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1979 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 59:
|
||||
|
@ -1992,7 +1985,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2008 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1989 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 60:
|
||||
|
@ -2002,7 +1995,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2018 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 1999 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 61:
|
||||
|
@ -2012,7 +2005,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2028 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2009 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 62:
|
||||
|
@ -2022,7 +2015,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2038 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2019 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 63:
|
||||
|
@ -2032,7 +2025,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2048 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2029 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 64:
|
||||
|
@ -2042,7 +2035,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2058 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2039 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 65:
|
||||
|
@ -2052,7 +2045,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2068 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2049 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 66:
|
||||
|
@ -2062,7 +2055,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2078 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2059 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 69:
|
||||
|
@ -2073,7 +2066,7 @@ yyreduce:
|
|||
YYABORT;
|
||||
(yyval.column_list)->val = (yyvsp[0].expr);
|
||||
}
|
||||
#line 2089 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2070 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 70:
|
||||
|
@ -2085,7 +2078,7 @@ yyreduce:
|
|||
(yyval.column_list)->val = (yyvsp[-2].expr);
|
||||
(yyval.column_list)->next = (yyvsp[0].column_list);
|
||||
}
|
||||
#line 2101 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2082 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 72:
|
||||
|
@ -2094,7 +2087,7 @@ yyreduce:
|
|||
(yyval.column_list) = (yyvsp[-2].column_list);
|
||||
(yyval.column_list)->next = (yyvsp[0].column_list);
|
||||
}
|
||||
#line 2110 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2091 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 73:
|
||||
|
@ -2103,7 +2096,7 @@ yyreduce:
|
|||
(yyval.column_list) = (yyvsp[-2].column_list);
|
||||
(yyval.column_list)->val = (yyvsp[0].expr);
|
||||
}
|
||||
#line 2119 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2100 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 74:
|
||||
|
@ -2113,7 +2106,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2129 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2110 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 75:
|
||||
|
@ -2123,7 +2116,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2139 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2120 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 76:
|
||||
|
@ -2133,7 +2126,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2149 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2130 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 77:
|
||||
|
@ -2143,7 +2136,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2159 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2140 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 78:
|
||||
|
@ -2153,7 +2146,7 @@ yyreduce:
|
|||
if( !(yyval.expr) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2169 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2150 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 79:
|
||||
|
@ -2163,7 +2156,7 @@ yyreduce:
|
|||
if( !(yyval.column_list) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2179 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2160 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 80:
|
||||
|
@ -2173,7 +2166,7 @@ yyreduce:
|
|||
if( !(yyval.column_list) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2189 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2170 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 81:
|
||||
|
@ -2183,7 +2176,7 @@ yyreduce:
|
|||
if( !(yyval.column_list) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2199 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2180 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 82:
|
||||
|
@ -2193,7 +2186,7 @@ yyreduce:
|
|||
if( !(yyval.column_list) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2209 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2190 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 83:
|
||||
|
@ -2203,7 +2196,7 @@ yyreduce:
|
|||
if( !(yyval.column_list) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2219 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2200 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 84:
|
||||
|
@ -2211,7 +2204,7 @@ yyreduce:
|
|||
{
|
||||
(yyval.string) = (yyvsp[0].string);
|
||||
}
|
||||
#line 2227 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2208 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 85:
|
||||
|
@ -2220,7 +2213,7 @@ yyreduce:
|
|||
if ( SQL_getstring( info, &(yyvsp[0].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2236 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2217 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 86:
|
||||
|
@ -2229,7 +2222,7 @@ yyreduce:
|
|||
if ( SQL_getstring( info, &(yyvsp[0].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) )
|
||||
YYABORT;
|
||||
}
|
||||
#line 2245 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2226 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 87:
|
||||
|
@ -2237,11 +2230,11 @@ yyreduce:
|
|||
{
|
||||
(yyval.integer) = SQL_getint( info );
|
||||
}
|
||||
#line 2253 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2234 "sql.tab.c" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
|
||||
#line 2257 "sql.tab.c" /* yacc.c:1646 */
|
||||
#line 2238 "sql.tab.c" /* yacc.c:1646 */
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||
/* A Bison parser, made by GNU Bison 3.0. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
|||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_SQL_SQL_TAB_H_INCLUDED
|
||||
# define YY_SQL_SQL_TAB_H_INCLUDED
|
||||
#ifndef YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED
|
||||
# define YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
|
@ -134,4 +134,4 @@ union YYSTYPE
|
|||
|
||||
int sql_parse (SQL_input *info);
|
||||
|
||||
#endif /* !YY_SQL_SQL_TAB_H_INCLUDED */
|
||||
#endif /* !YY_SQL_E_REACTOSSYNC_GCC_DLL_WIN32_MSI_SQL_TAB_H_INCLUDED */
|
||||
|
|
|
@ -18,7 +18,22 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
#include "ole2.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "msipriv.h"
|
||||
#include "query.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -19,7 +19,21 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "msipriv.h"
|
||||
#include "query.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
@ -194,7 +208,28 @@ static UINT STREAMS_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row
|
|||
|
||||
static UINT STREAMS_delete_row(struct tagMSIVIEW *view, UINT row)
|
||||
{
|
||||
FIXME("(%p %d): stub!\n", view, row);
|
||||
MSIDATABASE *db = ((MSISTREAMSVIEW *)view)->db;
|
||||
UINT i, num_rows = db->num_streams - 1;
|
||||
const WCHAR *name;
|
||||
WCHAR *encname;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p %d)!\n", view, row);
|
||||
|
||||
name = msi_string_lookup( db->strings, db->streams[row].str_index, NULL );
|
||||
if (!(encname = encode_streamname( FALSE, name ))) return ERROR_OUTOFMEMORY;
|
||||
hr = IStorage_DestroyElement( db->storage, encname );
|
||||
msi_free( encname );
|
||||
if (FAILED( hr ))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
hr = IStream_Release( db->streams[row].stream );
|
||||
if (FAILED( hr ))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
for (i = row; i < num_rows; i++)
|
||||
db->streams[i] = db->streams[i + 1];
|
||||
db->num_streams = num_rows;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -293,12 +328,15 @@ static UINT STREAMS_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRE
|
|||
r = streams_modify_update(view, rec);
|
||||
break;
|
||||
|
||||
case MSIMODIFY_DELETE:
|
||||
r = STREAMS_delete_row(view, row - 1);
|
||||
break;
|
||||
|
||||
case MSIMODIFY_VALIDATE_NEW:
|
||||
case MSIMODIFY_INSERT_TEMPORARY:
|
||||
case MSIMODIFY_REFRESH:
|
||||
case MSIMODIFY_REPLACE:
|
||||
case MSIMODIFY_MERGE:
|
||||
case MSIMODIFY_DELETE:
|
||||
case MSIMODIFY_VALIDATE:
|
||||
case MSIMODIFY_VALIDATE_FIELD:
|
||||
case MSIMODIFY_VALIDATE_DELETE:
|
||||
|
|
|
@ -20,7 +20,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -18,14 +18,30 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <propvarutil.h>
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "stdio.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "msidefs.h"
|
||||
#include "msipriv.h"
|
||||
#include "objidl.h"
|
||||
#include "propvarutil.h"
|
||||
#include "msiserver.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
#include <pshpack1.h>
|
||||
#include "pshpack1.h"
|
||||
|
||||
typedef struct {
|
||||
WORD wByteOrder;
|
||||
|
@ -63,7 +79,7 @@ typedef struct {
|
|||
} u;
|
||||
} PROPERTY_DATA;
|
||||
|
||||
#include <poppack.h>
|
||||
#include "poppack.h"
|
||||
|
||||
static HRESULT (WINAPI *pPropVariantChangeType)
|
||||
(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
|
||||
|
@ -1000,6 +1016,117 @@ end:
|
|||
return r;
|
||||
}
|
||||
|
||||
static UINT save_prop( MSISUMMARYINFO *si, HANDLE handle, UINT row )
|
||||
{
|
||||
static const char fmt_systemtime[] = "%d/%02d/%02d %02d:%02d:%02d";
|
||||
char data[20]; /* largest string: YYYY/MM/DD hh:mm:ss */
|
||||
static const char fmt_begin[] = "%u\t";
|
||||
static const char data_end[] = "\r\n";
|
||||
static const char fmt_int[] = "%u";
|
||||
UINT r, data_type, len;
|
||||
SYSTEMTIME system_time;
|
||||
FILETIME file_time;
|
||||
INT int_value;
|
||||
awstring str;
|
||||
DWORD sz;
|
||||
|
||||
str.unicode = FALSE;
|
||||
str.str.a = NULL;
|
||||
len = 0;
|
||||
r = get_prop( si, row, &data_type, &int_value, &file_time, &str, &len );
|
||||
if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA)
|
||||
return r;
|
||||
if (data_type == VT_EMPTY)
|
||||
return ERROR_SUCCESS; /* property not set */
|
||||
snprintf( data, sizeof(data), fmt_begin, row );
|
||||
sz = lstrlenA( data );
|
||||
if (!WriteFile( handle, data, sz, &sz, NULL ))
|
||||
return ERROR_WRITE_FAULT;
|
||||
|
||||
switch (data_type)
|
||||
{
|
||||
case VT_I2:
|
||||
case VT_I4:
|
||||
snprintf( data, sizeof(data), fmt_int, int_value );
|
||||
sz = lstrlenA( data );
|
||||
if (!WriteFile( handle, data, sz, &sz, NULL ))
|
||||
return ERROR_WRITE_FAULT;
|
||||
break;
|
||||
case VT_LPSTR:
|
||||
len++;
|
||||
if (!(str.str.a = msi_alloc( len )))
|
||||
return ERROR_OUTOFMEMORY;
|
||||
r = get_prop( si, row, NULL, NULL, NULL, &str, &len );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
msi_free( str.str.a );
|
||||
return r;
|
||||
}
|
||||
sz = lstrlenA( str.str.a );
|
||||
if (!WriteFile( handle, str.str.a, sz, &sz, NULL ))
|
||||
{
|
||||
msi_free( str.str.a );
|
||||
return ERROR_WRITE_FAULT;
|
||||
}
|
||||
msi_free( str.str.a );
|
||||
break;
|
||||
case VT_FILETIME:
|
||||
if (!FileTimeToSystemTime( &file_time, &system_time ))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
snprintf( data, sizeof(data), fmt_systemtime, system_time.wYear, system_time.wMonth,
|
||||
system_time.wDay, system_time.wHour, system_time.wMinute,
|
||||
system_time.wSecond );
|
||||
sz = lstrlenA( data );
|
||||
if (!WriteFile( handle, data, sz, &sz, NULL ))
|
||||
return ERROR_WRITE_FAULT;
|
||||
break;
|
||||
case VT_EMPTY:
|
||||
/* cannot reach here, property not set */
|
||||
break;
|
||||
default:
|
||||
FIXME( "Unknown property variant type\n" );
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
sz = lstrlenA( data_end );
|
||||
if (!WriteFile( handle, data_end, sz, &sz, NULL ))
|
||||
return ERROR_WRITE_FAULT;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT msi_export_suminfo( MSIDATABASE *db, HANDLE handle )
|
||||
{
|
||||
UINT i, r, num_rows;
|
||||
MSISUMMARYINFO *si;
|
||||
|
||||
r = msi_get_suminfo( db->storage, 0, &si );
|
||||
if (r != ERROR_SUCCESS)
|
||||
r = msi_get_db_suminfo( db, 0, &si );
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
num_rows = get_property_count( si->property );
|
||||
if (!num_rows)
|
||||
{
|
||||
msiobj_release( &si->hdr );
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_rows; i++)
|
||||
{
|
||||
r = save_prop( si, handle, i );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
msiobj_release( &si->hdr );
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
msiobj_release( &si->hdr );
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle )
|
||||
{
|
||||
MSISUMMARYINFO *si;
|
||||
|
|
|
@ -18,7 +18,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "winnls.h"
|
||||
#include "msipriv.h"
|
||||
#include "query.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -16,7 +16,14 @@
|
|||
** parser for analysis.
|
||||
*/
|
||||
|
||||
#include "msipriv.h"
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "query.h"
|
||||
#include "sql.tab.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -18,10 +18,24 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
||||
/* below is the query interface to a table */
|
||||
|
||||
typedef struct tagMSIUPDATEVIEW
|
||||
|
|
|
@ -26,7 +26,17 @@
|
|||
* RemoveExistingProducts (TODO)
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "wine/debug.h"
|
||||
#include "msidefs.h"
|
||||
#include "msipriv.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
|
|
@ -19,7 +19,22 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "msi.h"
|
||||
#include "msiquery.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "msipriv.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "query.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ reactos/dll/win32/msg711.acm # Synced to WineStaging-2.9
|
|||
reactos/dll/win32/msgsm32.acm # Synced to WineStaging-2.9
|
||||
reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/msi # Synced to Wine-3.0
|
||||
reactos/dll/win32/msi # Synced to WineStaging-3.3
|
||||
reactos/dll/win32/msimg32 # Synced to WineStaging-2.16
|
||||
reactos/dll/win32/msimtf # Synced to WineStaging-2.9
|
||||
reactos/dll/win32/msisip # Synced to WineStaging-2.9
|
||||
|
|
Loading…
Reference in a new issue