fix a few more of the patches for gcc 4.8.3. patch now applies cleanly
[AROS.git] / workbench / utilities / Installer / Installer.h
blobf9a7f8c5f53ae87535b3808d5c7d1f315e11c96d
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef _INSTALLER_H
7 #define _INSTALLER_H
9 #define INSTALLER_NAME "Installer"
10 #define INSTALLER_VERSION 43
11 #define INSTALLER_REVISION 3
14 This flag is not only for internal verbosity, but embraces outputs
15 where Intuition GUI is still missing (mostly errors), too.
17 #define DEBUG 1
18 //#undef DEBUG
20 #ifdef DEBUG
21 # ifdef __AROS__
22 # include <proto/arossupport.h>
23 # endif
24 # define DMSG(x...) kprintf(x)
25 #else
26 # define DMSG(x...) /* */
27 #endif /* DEBUG */
30 #include <ctype.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
35 #include <dos/dos.h>
36 #include <exec/exec.h>
37 #include <exec/execbase.h>
38 #include <proto/dos.h>
39 #include <proto/exec.h>
40 #include <proto/alib.h>
41 #include <proto/icon.h>
42 #ifdef __AROS__
43 #include <proto/workbench.h>
44 #include <dos/bptr.h>
45 #endif
46 #include <workbench/workbench.h>
47 #include <workbench/startup.h>
49 extern struct ExecBase *SysBase;
51 typedef struct ScriptArg
53 struct ScriptArg *next; /* Next argument */
54 struct ScriptArg *parent; /* Parent argument */
55 char *arg; /* Either string or */
56 struct ScriptArg *cmd; /* ptr to list of arguments */
57 /* set one of them to NULL */
58 long int intval; /* If argument is an integer *arg will
59 get NULL */
60 int ignore; /* Parameters set this to 1 to disappear */
62 } ScriptArg;
64 /* Error codes used for ( trap ... ) and onerror */
65 #define NOERROR 0 /* no error occurred */
66 #define USERABORT 1 /* user aborted */
67 #define OUTOFMEMORY 2 /* out of memory */
68 #define SCRIPTERROR 3 /* error in script */
69 #define DOSERROR 4 /* DOS error */
70 #define BADPARAMETER 5 /* bad parameter data */
72 #define NUMERRORS 5 /* Number of error codes */
74 typedef struct InstallerPrefs
76 char * transcriptfile;
77 BPTR transcriptstream;
78 int debug, pretend, nopretend, novicelog, noprint;
79 int welcome;
80 int copyfail, copyflags;
81 ScriptArg onerror, *onerrorparent;
82 ScriptArg trap[NUMERRORS], *trapparent[NUMERRORS];
83 int minusrlevel, defusrlevel;
84 int fromcli;
85 } InstallerPrefs;
87 #define COPY_FAIL 1
88 #define COPY_NOFAIL 2
89 #define COPY_OKNODELETE 4
90 #define COPY_FORCE 1
91 #define COPY_ASKUSER 2
93 struct VariableList
95 char * varsymbol;
96 char * vartext;
97 long int varinteger;
100 struct ProcedureList
102 char * procname;
103 ScriptArg * procbody;
104 char ** arglist;
105 int argnum;
108 struct ParameterList
110 char ** arg;
111 long int intval, intval2;
112 int used;
116 /* Special characters */
117 #define SEMICOLON 0x3B
118 #define LINEFEED 0x0A
119 #define BACKSLASH 0x5C
120 #define SQUOTE 0x27
121 #define DQUOTE 0x22
122 #define LBRACK 0x28
123 #define RBRACK 0x29
124 #define DOLLAR 0x24
125 #define PERCENT 0x25
126 #define PLUS 0x2B
127 #define MINUS 0x2D
128 #define SPACE 0x20
130 #define MAXARGSIZE 1024
132 /* User levels */
133 #define _NOVICE 0
134 #define _AVERAGE 1
135 #define _EXPERT 2
138 #endif /* _INSTALLER_H */