ReactOS 0.4.15-dev-7834-g00c4b3d
utils.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Zebediah Figura
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19extern char PROG_FILES_DIR[MAX_PATH];
21extern char COMMON_FILES_DIR[MAX_PATH];
22extern char APP_DATA_DIR[MAX_PATH];
23extern char WINDOWS_DIR[MAX_PATH];
24extern char CURR_DIR[MAX_PATH];
25
28
29typedef struct _msi_table
30{
31 const char *filename;
32 const char *data;
33 int size;
35
36#define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
37
38/* in install.c */
39void create_database_wordcount(const char *name, const msi_table *tables, int num_tables,
40 int version, int wordcount, const char *template, const char *packagecode);
41
42#define create_database(name, tables, num_tables) \
43 create_database_wordcount(name, tables, num_tables, 100, 0, ";1033", \
44 "{004757CA-5092-49C2-AD20-28E1CE0DF5F2}");
45
46#define create_database_template(name, tables, num_tables, version, template) \
47 create_database_wordcount(name, tables, num_tables, version, 0, template, \
48 "{004757CA-5092-49C2-AD20-28E1CE0DF5F2}");
49
50void create_cab_file(const char *name, DWORD max_size, const char *files);
51void create_file_data(const char *name, const char *data, DWORD size);
52#define create_file(name, size) create_file_data(name, name, size)
53void create_pf_data(const char *file, const char *data, BOOL is_file);
54#define create_pf(file, is_file) create_pf_data(file, file, is_file)
55void delete_cab_files(void);
56BOOL delete_pf(const char *rel_path, BOOL is_file);
57BOOL file_exists(const char *file);
58BOOL pf_exists(const char *file);
60UINT run_query(MSIHANDLE hdb, MSIHANDLE hrec, const char *query);
static INT max_size
Definition: history.c:51
#define MAX_PATH
Definition: compat.h:34
static const WCHAR version[]
Definition: asmname.c:66
struct nls_table * tables
Definition: nls_base.c:22
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
static void create_cab_file(void)
Definition: files.c:356
BOOL is_process_limited(void)
Definition: install.c:2254
void create_database_wordcount(const char *name, const msi_table *tables, int num_tables, int version, int wordcount, const char *template, const char *packagecode)
UINT run_query(MSIHANDLE hdb, MSIHANDLE hrec, const char *query)
Definition: install.c:3653
BOOL get_user_dirs(void)
Definition: install.c:2404
BOOL pf_exists(const char *file)
Definition: install.c:3620
BOOL get_system_dirs(void)
Definition: install.c:2423
char APP_DATA_DIR[MAX_PATH]
Definition: install.c:69
void create_pf_data(const char *file, const char *data, BOOL is_file)
BOOL file_exists(const char *file)
Definition: install.c:3615
struct _msi_table msi_table
char PROG_FILES_DIR[MAX_PATH]
Definition: install.c:66
char COMMON_FILES_DIR[MAX_PATH]
Definition: install.c:68
char CURR_DIR[MAX_PATH]
Definition: install.c:65
void create_file_data(const char *name, const char *data, DWORD size)
char PROG_FILES_DIR_NATIVE[MAX_PATH]
Definition: install.c:67
char WINDOWS_DIR[MAX_PATH]
Definition: install.c:70
BOOL delete_pf(const char *rel_path, BOOL is_file)
Definition: install.c:2499
void delete_cab_files(void)
Definition: install.c:3097
unsigned int UINT
Definition: ndis.h:50
const char * filename
Definition: utils.h:31
const char * data
Definition: utils.h:32
Definition: fci.c:127
Definition: name.c:39
unsigned long MSIHANDLE
Definition: winemsi.idl:27