1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
// $Id: dwinst.h 9043 2008-08-28 22:48:19Z giles $
16
#ifndef dwinst_INCLUDED
17
# define dwinst_INCLUDED
19
// Definitions for Ghostscript installer
23
#define MAXSTR MAX_PATH
34
void SetMessageFunction(void(*fn)(const char *));
35
void AddMessage(const char *message);
36
const char *GetMainDir();
37
const char *GetUninstallName();
38
BOOL GetPrograms(BOOL bUseCommon, char *buf, int buflen);
39
BOOL Init(const char *szSourceDir, const char *szFileList);
40
BOOL InstallFiles(BOOL bNoCopy, BOOL *pbQuit);
41
BOOL InstallFile(char *filename, BOOL bNoCopy);
42
BOOL MakeDir(const char *dirname);
43
FILE * MakeTemp(char *name);
45
BOOL SetAllUsers(BOOL bUseCommon);
46
void SetTargetDir(const char *szTargetDir);
47
void SetTargetGroup(const char *szTargetGroup);
49
BOOL StartMenuBegin();
51
BOOL StartMenuAdd(const char *szDescription, const char *szProgram, const char *szArguments);
53
BOOL UpdateRegistryBegin();
54
BOOL UpdateRegistryKey(const char *product, const char *version);
55
BOOL UpdateRegistryValue(const char *product, const char *version, const char *name, const char *value);
56
BOOL UpdateRegistryEnd();
58
BOOL WriteUninstall(const char *prog, BOOL bNoCopy);
63
void AppendFileNew(const char *filename);
71
char m_szSourceDir[MAXSTR];
73
// File containing list of files to install
74
char m_szFileList[MAXSTR];
76
// Target directory for program and fonts.
77
char m_szTargetDir[MAXSTR];
79
// Target Group for shortcut
80
char m_szTargetGroup[MAXSTR];
82
// Directory where the Start Menu is located.
83
char m_szPrograms[MAXSTR];
85
// Name used for uninstall
86
char m_szUninstallName[MAXSTR];
88
// Main directory prefix, where log files should be written
89
char m_szMainDir[MAXSTR];
91
// Full directory where log files should be written
92
char m_szLogDir[MAXSTR];
94
// Temporary log files for uninstall
95
char m_szFileNew[MAXSTR];
96
char m_szRegistryNew[MAXSTR];
97
char m_szRegistryOld[MAXSTR];
98
char m_szShellNew[MAXSTR];
99
char m_szShellOld[MAXSTR];
106
BOOL SetRegistryValue(HKEY hkey, const char *value_name, const char *value);
107
BOOL CreateShellLink(LPCSTR description, LPCSTR program, LPCSTR arguments, LPCSTR icon = NULL, int nIconIndex = 0);
108
void CopyFileContents(FILE *df, FILE *sf);
109
void ResetReadonly(const char *filename);
111
void(*AddMessageFn)(const char *);
116
#endif /* dwinst_INCLUDED */