diff --git a/dlls/msi/action.c b/dlls/msi/action.c index b7e55edea65..0f2c6f8bf3f 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -41,7 +41,6 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/stand #include "shlobj.h" #include "wine/unicode.h" #include "winver.h" -#include "action.h" #define REG_PROGRESS_VALUE 13200 #define COMPONENT_PROGRESS_VALUE 24000 diff --git a/dlls/msi/action.h b/dlls/msi/action.h deleted file mode 100644 index 9dc19ac0c71..00000000000 --- a/dlls/msi/action.h +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Common prototypes for Action handlers - * - * Copyright 2005 Aric Stewart for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __MSI_ACTION_H__ -#define __MSI_ACTION_H__ - -#include "wine/list.h" - -typedef struct tagMSIFEATURE -{ - struct list entry; - LPWSTR Feature; - LPWSTR Feature_Parent; - LPWSTR Title; - LPWSTR Description; - INT Display; - INT Level; - LPWSTR Directory; - INT Attributes; - - INSTALLSTATE Installed; - INSTALLSTATE ActionRequest; - INSTALLSTATE Action; - - struct list Children; - struct list Components; - - INT Cost; -} MSIFEATURE; - -typedef struct tagMSICOMPONENT -{ - struct list entry; - DWORD magic; - LPWSTR Component; - LPWSTR ComponentId; - LPWSTR Directory; - INT Attributes; - LPWSTR Condition; - LPWSTR KeyPath; - - INSTALLSTATE Installed; - INSTALLSTATE ActionRequest; - INSTALLSTATE Action; - - BOOL ForceLocalState; - BOOL Enabled; - INT Cost; - INT RefCount; - - LPWSTR FullKeypath; - LPWSTR AdvertiseString; -} MSICOMPONENT; - -typedef struct tagComponentList -{ - struct list entry; - MSICOMPONENT *component; -} ComponentList; - -typedef struct tagFeatureList -{ - struct list entry; - MSIFEATURE *feature; -} FeatureList; - -typedef struct tagMSIFOLDER -{ - struct list entry; - LPWSTR Directory; - LPWSTR TargetDefault; - LPWSTR SourceLongPath; - LPWSTR SourceShortPath; - - LPWSTR ResolvedTarget; - LPWSTR ResolvedSource; - LPWSTR Property; /* initially set property */ - struct tagMSIFOLDER *Parent; - INT State; - /* 0 = uninitialized */ - /* 1 = existing */ - /* 2 = created remove if empty */ - /* 3 = created persist if empty */ - INT Cost; - INT Space; -} MSIFOLDER; - -typedef enum _msi_file_state { - msifs_invalid, - msifs_missing, - msifs_overwrite, - msifs_present, - msifs_installed, - msifs_skipped, -} msi_file_state; - -typedef struct tagMSIFILE -{ - struct list entry; - LPWSTR File; - MSICOMPONENT *Component; - LPWSTR FileName; - LPWSTR ShortName; - LPWSTR LongName; - INT FileSize; - LPWSTR Version; - LPWSTR Language; - INT Attributes; - INT Sequence; - msi_file_state state; - LPWSTR SourcePath; - LPWSTR TargetPath; - BOOL IsCompressed; -} MSIFILE; - -typedef struct tagMSITEMPFILE -{ - struct list entry; - LPWSTR File; - LPWSTR Path; -} MSITEMPFILE; - -typedef struct tagMSIAPPID -{ - struct list entry; - LPWSTR AppID; /* Primary key */ - LPWSTR RemoteServerName; - LPWSTR LocalServer; - LPWSTR ServiceParameters; - LPWSTR DllSurrogate; - BOOL ActivateAtStorage; - BOOL RunAsInteractiveUser; -} MSIAPPID; - -typedef struct tagMSIPROGID MSIPROGID; - -typedef struct tagMSICLASS -{ - struct list entry; - LPWSTR clsid; /* Primary Key */ - LPWSTR Context; /* Primary Key */ - MSICOMPONENT *Component; - MSIPROGID *ProgID; - LPWSTR ProgIDText; - LPWSTR Description; - MSIAPPID *AppID; - LPWSTR FileTypeMask; - LPWSTR IconPath; - LPWSTR DefInprocHandler; - LPWSTR DefInprocHandler32; - LPWSTR Argument; - MSIFEATURE *Feature; - INT Attributes; - /* not in the table, set during installation */ - BOOL Installed; -} MSICLASS; - -typedef struct tagMSIMIME MSIMIME; - -typedef struct tagMSIEXTENSION -{ - struct list entry; - LPWSTR Extension; /* Primary Key */ - MSICOMPONENT *Component; - MSIPROGID *ProgID; - LPWSTR ProgIDText; - MSIMIME *Mime; - MSIFEATURE *Feature; - /* not in the table, set during installation */ - BOOL Installed; - struct list verbs; -} MSIEXTENSION; - -struct tagMSIPROGID -{ - struct list entry; - LPWSTR ProgID; /* Primary Key */ - MSIPROGID *Parent; - MSICLASS *Class; - LPWSTR Description; - LPWSTR IconPath; - /* not in the table, set during installation */ - BOOL InstallMe; - MSIPROGID *CurVer; - MSIPROGID *VersionInd; -}; - -typedef struct tagMSIVERB -{ - struct list entry; - LPWSTR Verb; - INT Sequence; - LPWSTR Command; - LPWSTR Argument; -} MSIVERB; - -struct tagMSIMIME -{ - struct list entry; - LPWSTR ContentType; /* Primary Key */ - MSIEXTENSION *Extension; - LPWSTR clsid; - MSICLASS *Class; - /* not in the table, set during installation */ - BOOL InstallMe; -}; - -enum SCRIPTS { - INSTALL_SCRIPT = 0, - COMMIT_SCRIPT = 1, - ROLLBACK_SCRIPT = 2, - TOTAL_SCRIPTS = 3 -}; - -#define SEQUENCE_UI 0x1 -#define SEQUENCE_EXEC 0x2 -#define SEQUENCE_INSTALL 0x10 - -typedef struct tagMSISCRIPT -{ - LPWSTR *Actions[TOTAL_SCRIPTS]; - UINT ActionCount[TOTAL_SCRIPTS]; - BOOL ExecuteSequenceRun; - BOOL CurrentlyScripting; - UINT InWhatSequence; - LPWSTR *UniqueActions; - UINT UniqueActionsCount; -} MSISCRIPT; - - -extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force); -extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action); -extern void ACTION_FinishCustomActions( MSIPACKAGE* package); -extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, BOOL execute); - -/* actions in other modules */ -extern UINT ACTION_AppSearch(MSIPACKAGE *package); -extern UINT ACTION_FindRelatedProducts(MSIPACKAGE *package); -extern UINT ACTION_InstallFiles(MSIPACKAGE *package); -extern UINT ACTION_RemoveFiles(MSIPACKAGE *package); -extern UINT ACTION_DuplicateFiles(MSIPACKAGE *package); -extern UINT ACTION_RegisterClassInfo(MSIPACKAGE *package); -extern UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package); -extern UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package); -extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package); -extern UINT ACTION_RegisterFonts(MSIPACKAGE *package); - - -/* Helpers */ -extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data ); -extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index); -extern LPWSTR msi_dup_property(MSIPACKAGE *package, LPCWSTR prop); -extern int msi_get_property_int( MSIPACKAGE *package, LPCWSTR prop, int def ); -extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, - BOOL set_prop, MSIFOLDER **folder); -extern MSICOMPONENT *get_loaded_component( MSIPACKAGE* package, LPCWSTR Component ); -extern MSIFEATURE *get_loaded_feature( MSIPACKAGE* package, LPCWSTR Feature ); -extern MSIFILE *get_loaded_file( MSIPACKAGE* package, LPCWSTR file ); -extern MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir ); -extern int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path); -extern UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action); -extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR); -extern LPWSTR build_directory_name(DWORD , ...); -extern BOOL create_full_pathW(const WCHAR *path); -extern BOOL ACTION_VerifyComponentForAction(MSICOMPONENT*, INSTALLSTATE); -extern BOOL ACTION_VerifyFeatureForAction(MSIFEATURE*, INSTALLSTATE); -extern void reduce_to_longfilename(WCHAR*); -extern void reduce_to_shortfilename(WCHAR*); -extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR); -extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature); -extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR); -extern BOOL check_unique_action(MSIPACKAGE *, LPCWSTR); -extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... ); -extern UINT msi_create_component_directories( MSIPACKAGE *package ); -extern void msi_ui_error( DWORD msg_id, DWORD type ); - - -/* control event stuff */ -extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event, - MSIRECORD *data); -extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package); -extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, msi_dialog *dialog, - LPCWSTR event, LPCWSTR control, LPCWSTR attribute); -extern VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event, - LPCWSTR control, LPCWSTR attribute ); - -/* User Interface messages from the actions */ -extern void ui_progress(MSIPACKAGE *, int, int, int, int); -extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *); - - -/* string consts use a number of places and defined in helpers.c*/ -extern const WCHAR cszSourceDir[]; -extern const WCHAR szProductCode[]; -extern const WCHAR cszRootDrive[]; -extern const WCHAR cszbs[]; - -#endif /* __MSI_ACTION_H__ */ diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 1d3559cccd4..57bffe7cf70 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -31,7 +31,6 @@ #include "wine/unicode.h" #include "wine/debug.h" #include "msipriv.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index cc9c86bc1c1..e2bb34cf4c4 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -39,7 +39,6 @@ #include "msipriv.h" #include "winuser.h" #include "wine/unicode.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index dd8252ad171..9cfb00114fa 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -35,7 +35,6 @@ #include "msi.h" #include "msiquery.h" #include "msipriv.h" -#include "action.h" #define YYLEX_PARAM info #define YYPARSE_PARAM info diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 5220a57cdc9..a464dfede10 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -47,7 +47,6 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/summa #include "shlobj.h" #include "wine/unicode.h" #include "winver.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 6c6aa0e4079..06558de37bd 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -42,8 +42,6 @@ #include "wine/debug.h" #include "wine/unicode.h" -#include "action.h" - WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/events.c b/dlls/msi/events.c index dac7f8eae73..2b0397bf73c 100644 --- a/dlls/msi/events.c +++ b/dlls/msi/events.c @@ -32,7 +32,6 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/contr #include "winreg.h" #include "msi.h" #include "msipriv.h" -#include "action.h" #include "wine/debug.h" #include "wine/unicode.h" diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 4e33da7bab9..99cc6b5565d 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -45,7 +45,6 @@ #include "winreg.h" #include "shlwapi.h" #include "wine/unicode.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/font.c b/dlls/msi/font.c index ce75520ddec..32dbbbe9687 100644 --- a/dlls/msi/font.c +++ b/dlls/msi/font.c @@ -26,7 +26,6 @@ #include "wine/debug.h" #include "msipriv.h" #include "wine/unicode.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/format.c b/dlls/msi/format.c index 7cbcacc77b3..4cb802e2135 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -36,7 +36,6 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msifo #include "msipriv.h" #include "winnls.h" #include "wine/unicode.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index 5ba6b8ade7e..2ebc13a74a7 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -32,7 +32,6 @@ #include "msipriv.h" #include "winuser.h" #include "wine/unicode.h" -#include "action.h" #include "msidefs.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 66b6f3c59f8..7a367aa1cb2 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -29,7 +29,6 @@ #include "msi.h" #include "msidefs.h" #include "msipriv.h" -#include "action.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 79615ff5ac0..34cbe521b2c 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -39,7 +39,6 @@ #include "shobjidl.h" #include "objidl.h" #include "wine/unicode.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 945509f14cc..ef0c0333168 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -2,6 +2,7 @@ * Implementation of the Microsoft Installer (msi.dll) * * Copyright 2002-2005 Mike McCormack for CodeWeavers + * Copyright 2005 Aric Stewart for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -116,7 +117,7 @@ typedef struct tagMSIVIEWOPS * fetch_int - reads one integer from {row,col} in the table * * This function should be called after the execute method. - * Data returned by the function should not change until + * Data returned by the function should not change until * close or delete is called. * To get a string value, query the database's string table with * the integer value returned from this function. @@ -183,7 +184,7 @@ typedef struct tagMSIVIEWOPS /* * find_matching_rows - iterates through rows that match a value * - * If the column type is a string then a string ID should be passed in. + * If the column type is a string then a string ID should be passed in. * If the value to be looked up is an integer then no transformation of * the input value is required, except if the column is a string, in which * case a string ID should be passed in. @@ -260,6 +261,221 @@ typedef struct tagMSISUMMARYINFO PROPVARIANT property[MSI_MAX_PROPS]; } MSISUMMARYINFO; +typedef struct tagMSIFEATURE +{ + struct list entry; + LPWSTR Feature; + LPWSTR Feature_Parent; + LPWSTR Title; + LPWSTR Description; + INT Display; + INT Level; + LPWSTR Directory; + INT Attributes; + INSTALLSTATE Installed; + INSTALLSTATE ActionRequest; + INSTALLSTATE Action; + struct list Children; + struct list Components; + INT Cost; +} MSIFEATURE; + +typedef struct tagMSICOMPONENT +{ + struct list entry; + DWORD magic; + LPWSTR Component; + LPWSTR ComponentId; + LPWSTR Directory; + INT Attributes; + LPWSTR Condition; + LPWSTR KeyPath; + INSTALLSTATE Installed; + INSTALLSTATE ActionRequest; + INSTALLSTATE Action; + BOOL ForceLocalState; + BOOL Enabled; + INT Cost; + INT RefCount; + LPWSTR FullKeypath; + LPWSTR AdvertiseString; +} MSICOMPONENT; + +typedef struct tagComponentList +{ + struct list entry; + MSICOMPONENT *component; +} ComponentList; + +typedef struct tagFeatureList +{ + struct list entry; + MSIFEATURE *feature; +} FeatureList; + +typedef struct tagMSIFOLDER +{ + struct list entry; + LPWSTR Directory; + LPWSTR TargetDefault; + LPWSTR SourceLongPath; + LPWSTR SourceShortPath; + + LPWSTR ResolvedTarget; + LPWSTR ResolvedSource; + LPWSTR Property; /* initially set property */ + struct tagMSIFOLDER *Parent; + INT State; + /* 0 = uninitialized */ + /* 1 = existing */ + /* 2 = created remove if empty */ + /* 3 = created persist if empty */ + INT Cost; + INT Space; +} MSIFOLDER; + +typedef enum _msi_file_state { + msifs_invalid, + msifs_missing, + msifs_overwrite, + msifs_present, + msifs_installed, + msifs_skipped, +} msi_file_state; + +typedef struct tagMSIFILE +{ + struct list entry; + LPWSTR File; + MSICOMPONENT *Component; + LPWSTR FileName; + LPWSTR ShortName; + LPWSTR LongName; + INT FileSize; + LPWSTR Version; + LPWSTR Language; + INT Attributes; + INT Sequence; + msi_file_state state; + LPWSTR SourcePath; + LPWSTR TargetPath; + BOOL IsCompressed; +} MSIFILE; + +typedef struct tagMSITEMPFILE +{ + struct list entry; + LPWSTR File; + LPWSTR Path; +} MSITEMPFILE; + +typedef struct tagMSIAPPID +{ + struct list entry; + LPWSTR AppID; /* Primary key */ + LPWSTR RemoteServerName; + LPWSTR LocalServer; + LPWSTR ServiceParameters; + LPWSTR DllSurrogate; + BOOL ActivateAtStorage; + BOOL RunAsInteractiveUser; +} MSIAPPID; + +typedef struct tagMSIPROGID MSIPROGID; + +typedef struct tagMSICLASS +{ + struct list entry; + LPWSTR clsid; /* Primary Key */ + LPWSTR Context; /* Primary Key */ + MSICOMPONENT *Component; + MSIPROGID *ProgID; + LPWSTR ProgIDText; + LPWSTR Description; + MSIAPPID *AppID; + LPWSTR FileTypeMask; + LPWSTR IconPath; + LPWSTR DefInprocHandler; + LPWSTR DefInprocHandler32; + LPWSTR Argument; + MSIFEATURE *Feature; + INT Attributes; + /* not in the table, set during installation */ + BOOL Installed; +} MSICLASS; + +typedef struct tagMSIMIME MSIMIME; + +typedef struct tagMSIEXTENSION +{ + struct list entry; + LPWSTR Extension; /* Primary Key */ + MSICOMPONENT *Component; + MSIPROGID *ProgID; + LPWSTR ProgIDText; + MSIMIME *Mime; + MSIFEATURE *Feature; + /* not in the table, set during installation */ + BOOL Installed; + struct list verbs; +} MSIEXTENSION; + +struct tagMSIPROGID +{ + struct list entry; + LPWSTR ProgID; /* Primary Key */ + MSIPROGID *Parent; + MSICLASS *Class; + LPWSTR Description; + LPWSTR IconPath; + /* not in the table, set during installation */ + BOOL InstallMe; + MSIPROGID *CurVer; + MSIPROGID *VersionInd; +}; + +typedef struct tagMSIVERB +{ + struct list entry; + LPWSTR Verb; + INT Sequence; + LPWSTR Command; + LPWSTR Argument; +} MSIVERB; + +struct tagMSIMIME +{ + struct list entry; + LPWSTR ContentType; /* Primary Key */ + MSIEXTENSION *Extension; + LPWSTR clsid; + MSICLASS *Class; + /* not in the table, set during installation */ + BOOL InstallMe; +}; + +enum SCRIPTS { + INSTALL_SCRIPT = 0, + COMMIT_SCRIPT = 1, + ROLLBACK_SCRIPT = 2, + TOTAL_SCRIPTS = 3 +}; + +#define SEQUENCE_UI 0x1 +#define SEQUENCE_EXEC 0x2 +#define SEQUENCE_INSTALL 0x10 + +typedef struct tagMSISCRIPT +{ + LPWSTR *Actions[TOTAL_SCRIPTS]; + UINT ActionCount[TOTAL_SCRIPTS]; + BOOL ExecuteSequenceRun; + BOOL CurrentlyScripting; + UINT InWhatSequence; + LPWSTR *UniqueActions; + UINT UniqueActionsCount; +} MSISCRIPT; + #define MSIHANDLETYPE_ANY 0 #define MSIHANDLETYPE_DATABASE 1 #define MSIHANDLETYPE_SUMMARYINFO 2 @@ -345,7 +561,7 @@ extern UINT read_raw_stream_data( MSIDATABASE*, LPCWSTR stname, /* transform functions */ extern UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg ); -extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, +extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond ); /* action internals */ @@ -420,7 +636,7 @@ extern LPCWSTR msi_download_file( LPCWSTR szUrl, LPWSTR filename ); /* for deformating */ extern UINT MSI_FormatRecordW( MSIPACKAGE *, MSIRECORD *, LPWSTR, DWORD * ); extern UINT MSI_FormatRecordA( MSIPACKAGE *, MSIRECORD *, LPSTR, DWORD * ); - + /* registry data encoding/decoding functions */ extern BOOL unsquash_guid(LPCWSTR in, LPWSTR out); extern BOOL squash_guid(LPCWSTR in, LPWSTR out); @@ -491,6 +707,71 @@ extern LPVOID gUIContext; extern WCHAR gszLogFile[MAX_PATH]; extern HINSTANCE msi_hInstance; +/* action related functions */ +extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force); +extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action); +extern void ACTION_FinishCustomActions( MSIPACKAGE* package); +extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, BOOL execute); + +/* actions in other modules */ +extern UINT ACTION_AppSearch(MSIPACKAGE *package); +extern UINT ACTION_FindRelatedProducts(MSIPACKAGE *package); +extern UINT ACTION_InstallFiles(MSIPACKAGE *package); +extern UINT ACTION_RemoveFiles(MSIPACKAGE *package); +extern UINT ACTION_DuplicateFiles(MSIPACKAGE *package); +extern UINT ACTION_RegisterClassInfo(MSIPACKAGE *package); +extern UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package); +extern UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package); +extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package); +extern UINT ACTION_RegisterFonts(MSIPACKAGE *package); + +/* Helpers */ +extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data ); +extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index); +extern LPWSTR msi_dup_property(MSIPACKAGE *package, LPCWSTR prop); +extern int msi_get_property_int( MSIPACKAGE *package, LPCWSTR prop, int def ); +extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, + BOOL set_prop, MSIFOLDER **folder); +extern MSICOMPONENT *get_loaded_component( MSIPACKAGE* package, LPCWSTR Component ); +extern MSIFEATURE *get_loaded_feature( MSIPACKAGE* package, LPCWSTR Feature ); +extern MSIFILE *get_loaded_file( MSIPACKAGE* package, LPCWSTR file ); +extern MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir ); +extern int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path); +extern UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action); +extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR); +extern LPWSTR build_directory_name(DWORD , ...); +extern BOOL create_full_pathW(const WCHAR *path); +extern BOOL ACTION_VerifyComponentForAction(MSICOMPONENT*, INSTALLSTATE); +extern BOOL ACTION_VerifyFeatureForAction(MSIFEATURE*, INSTALLSTATE); +extern void reduce_to_longfilename(WCHAR*); +extern void reduce_to_shortfilename(WCHAR*); +extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR); +extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature); +extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR); +extern BOOL check_unique_action(MSIPACKAGE *, LPCWSTR); +extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... ); +extern UINT msi_create_component_directories( MSIPACKAGE *package ); +extern void msi_ui_error( DWORD msg_id, DWORD type ); + +/* control event stuff */ +extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event, + MSIRECORD *data); +extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package); +extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, msi_dialog *dialog, + LPCWSTR event, LPCWSTR control, LPCWSTR attribute); +extern VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event, + LPCWSTR control, LPCWSTR attribute ); + +/* User Interface messages from the actions */ +extern void ui_progress(MSIPACKAGE *, int, int, int, int); +extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *); + +/* string consts use a number of places and defined in helpers.c*/ +extern const WCHAR cszSourceDir[]; +extern const WCHAR szProductCode[]; +extern const WCHAR cszRootDrive[]; +extern const WCHAR cszbs[]; + /* memory allocation macro functions */ static inline void *msi_alloc( size_t len ) { diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 5959128881f..d0b0619f513 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -43,7 +43,6 @@ #include "msidefs.h" #include "msipriv.h" -#include "action.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/source.c b/dlls/msi/source.c index ebf0c08373f..f10c32f9c45 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -36,7 +36,6 @@ #include "winver.h" #include "winuser.h" #include "wine/unicode.h" -#include "action.h" #include "sddl.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index d941bc73c5b..da954997bb9 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -36,7 +36,6 @@ #include "msidefs.h" #include "msipriv.h" #include "winuser.h" -#include "action.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msi);