You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pc...@hyperreal.org on 1998/05/07 15:23:38 UTC

cvs commit: apache-1.3/src/os/win32/installer/installdll install.c install.mak

pcs         98/05/07 06:23:37

  Modified:    src/os/win32/installer apache.iwz
               src/os/win32/installer/installdll install.c install.mak
  Log:
  Update the installer to fix overwriting of user's already installed
  configuration or htdocs files. This is similar to how APACI now works.
  For the configuration files, the @@...@@ tokens are expanded, and
  the file called conf\*.conf.default. Then it is _copied_ to the
  corresponding conf\*.conf _only if_ that file does not exist. If it
  does exist, it displays a messagebox saying "Preserving file XXX", like
  APACI. [PR#2118]
  
  For the htdocs, the manuals are always installed into htdocs\manual(*)
  However htdocs\index.html and htdocs\apache_pb.gif are not installed
  if they already exist. So this will now not overwrite the user's
  index.html file. [PR#2084 -- for Unix, but applied to Win32 as well]
  Note: under APACI the manuals are not installed if htdocs exists. On
  Win32 htdocs\manuals is installed. This is because we add a menu
  item "Apache Documentation" which launches explorer to read the docs, so
  we really want them installed.
  
  (* if the installation type includes manuals, that is).
  
  A couple of other fixes:
  
    - always create cgi-bin and htdocs directories, even if the
      manuals are not being installed
  
  PR: 2118, 2084
  
  Revision  Changes    Path
  1.6       +66 -47    apache-1.3/src/os/win32/installer/apache.iwz
  
  Index: apache.iwz
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/installer/apache.iwz,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apache.iwz	1998/04/18 09:46:33	1.5
  +++ apache.iwz	1998/05/07 13:23:36	1.6
  @@ -60,30 +60,30 @@
   
   [Types]
   Types=3
  -Type1Components=5
  +Type1Components=6
   Type1Name=Custom
  -Type1ComponentList=1 2 3 4 5 
  -Type2Components=4
  +Type1ComponentList=1 2 3 4 5 6 
  +Type2Components=5
   Type2Name=Typical
  -Type2ComponentList=1 3 4 5 
  -Type3Components=1
  +Type2ComponentList=1 3 4 5 6 
  +Type3Components=2
   Type3Name=Compact
  -Type3ComponentList=1 
  +Type3ComponentList=1 6 
   
   [Components]
  -Components=5
  +Components=6
   Component1Groups=5
   Component1Name=Application Files
   Component1Description=Application files needed to run the application
  -Component1GroupList=1 3 24 25 26 
  +Component1GroupList=1 3 24 25 4 
   Component2Groups=14
   Component2Name=Source Code
   Component2Description=Source code for Apache and support tools
   Component2GroupList=10 11 12 13 14 15 16 17 18 19 20 21 22 23 
  -Component3Groups=6
  -Component3Name=Documentation
  +Component3Groups=5
  +Component3Name=Apache Manual
   Component3Description=Apache documentation
  -Component3GroupList=4 5 6 7 8 9 
  +Component3GroupList=5 6 7 8 9 
   Component4Groups=1
   Component4Name=Additional Modules
   Component4Description=Apache modules to extend the server
  @@ -92,10 +92,14 @@
   Component5Name=Icons
   Component5Description=Icons for directory indexes
   Component5GroupList=27 
  +Component6Groups=4
  +Component6Name=Required Directories
  +Component6Description=
  +Component6GroupList=26 28 29 30 
   
   [Groups]
  -Groups=27
  -Group1Size=313049
  +Groups=30
  +Group1Size=478242
   Group1Files=10
   Group1Name=Program Executables
   Group1Dir=<INSTALLDIR>
  @@ -110,7 +114,7 @@
   Group1File8=C:\Apache\README
   Group1File9=C:\Apache\README.NT
   Group1File10=C:\apache\Makefile.tmpl
  -Group2Size=132096
  +Group2Size=258048
   Group2Files=10
   Group2Name=Additional Modules
   Group2Dir=<INSTALLDIR>\modules
  @@ -125,10 +129,10 @@
   Group2File8=C:\Apache\modules\ApacheModuleStatus.dll
   Group2File9=C:\Apache\modules\ApacheModuleUserTrack.dll
   Group2File10=C:\apache\modules\ApacheModuleRewrite.dll
  -Group3Size=35901
  +Group3Size=34849
   Group3Files=6
   Group3Name=Configuration Files
  -Group3Dir=<INSTALLDIR>\conf
  +Group3Dir=<INSTALLDIR>\.tmp
   Group3Update=0
   Group3File1=C:\Apache\conf\httpd.conf-dist-win
   Group3File2=C:\Apache\conf\access.conf-dist-win
  @@ -136,17 +140,17 @@
   Group3File4=C:\Apache\conf\mime.types
   Group3File5=C:\Apache\conf\srm.conf-dist-win
   Group3File6=C:\apache\conf\highperformance.conf-dist
  -Group4Size=3689
  +Group4Size=3642
   Group4Files=2
  -Group4Name=Documentation
  -Group4Dir=<INSTALLDIR>\htdocs
  +Group4Name=Initial Document Root Files
  +Group4Dir=<INSTALLDIR>\.tmp
   Group4Update=0
   Group4File1=C:\Apache\htdocs\apache_pb.gif
   Group4File2=C:\Apache\htdocs\index.html
  -Group5Size=226845
  +Group5Size=216846
   Group5Files=31
  -Group5Name=manual
  -Group5Dir=[Documentation]\manual
  +Group5Name=Manual
  +Group5Dir=<INSTALLDIR>\htdocs\manual
   Group5Update=0
   Group5File1=C:\Apache\htdocs\manual\bind.html
   Group5File2=C:\Apache\htdocs\manual\cgi_path.html
  @@ -179,10 +183,10 @@
   Group5File29=C:\Apache\htdocs\manual\upgrading_to_1_3.html
   Group5File30=C:\Apache\htdocs\manual\windows.html
   Group5File31=C:\apache\htdocs\manual\ebcdic.html
  -Group6Size=42478
  +Group6Size=42368
   Group6Files=8
   Group6Name=images
  -Group6Dir=[manual]\images
  +Group6Dir=[Manual]\images
   Group6Update=0
   Group6File1=C:\Apache\htdocs\manual\images\custom_errordocs.gif
   Group6File2=C:\Apache\htdocs\manual\images\home.gif
  @@ -192,10 +196,10 @@
   Group6File6=C:\apache\htdocs\manual\images\mod_rewrite_fig1.gif
   Group6File7=C:\apache\htdocs\manual\images\mod_rewrite_fig2.fig
   Group6File8=C:\apache\htdocs\manual\images\mod_rewrite_fig2.gif
  -Group7Size=319923
  +Group7Size=312558
   Group7Files=22
   Group7Name=misc
  -Group7Dir=[manual]\misc
  +Group7Dir=[Manual]\misc
   Group7Update=0
   Group7File1=C:\Apache\htdocs\manual\misc\API.html
   Group7File2=C:\Apache\htdocs\manual\misc\client_block_api.html
  @@ -219,10 +223,10 @@
   Group7File20=C:\Apache\htdocs\manual\misc\security_tips.html
   Group7File21=C:\Apache\htdocs\manual\misc\vif-info.html
   Group7File22=C:\Apache\htdocs\manual\misc\windoz_keepalive.html
  -Group8Size=513323
  +Group8Size=487855
   Group8Files=48
   Group8Name=mod
  -Group8Dir=[manual]\mod
  +Group8Dir=[Manual]\mod
   Group8Update=0
   Group8File1=C:\Apache\htdocs\manual\mod\core.html
   Group8File2=C:\Apache\htdocs\manual\mod\directive-dict.html
  @@ -272,10 +276,10 @@
   Group8File46=C:\Apache\htdocs\manual\mod\mod_userdir.html
   Group8File47=C:\Apache\htdocs\manual\mod\mod_usertrack.html
   Group8File48=C:\apache\htdocs\manual\mod\mod_mmap_static.html
  -Group9Size=98941
  +Group9Size=94293
   Group9Files=12
   Group9Name=vhosts
  -Group9Dir=[manual]\vhosts
  +Group9Dir=[Manual]\vhosts
   Group9Update=0
   Group9File1=C:\Apache\htdocs\manual\vhosts\details.html
   Group9File2=C:\Apache\htdocs\manual\vhosts\details_1_2.html
  @@ -289,7 +293,7 @@
   Group9File10=C:\Apache\htdocs\manual\vhosts\name-based.html
   Group9File11=C:\Apache\htdocs\manual\vhosts\vhosts-in-depth.html
   Group9File12=C:\Apache\htdocs\manual\vhosts\virtual-host.html
  -Group10Size=396446
  +Group10Size=403016
   Group10Files=17
   Group10Name=src
   Group10Dir=<INSTALLDIR>\src
  @@ -311,7 +315,7 @@
   Group10File15=C:\Apache\src\README
   Group10File16=C:\Apache\src\README.EBCDIC
   Group10File17=C:\apache\src\README.DSO
  -Group11Size=60478
  +Group11Size=60553
   Group11Files=9
   Group11Name=ap
   Group11Dir=[src]\ap
  @@ -325,7 +329,7 @@
   Group11File7=C:\Apache\src\ap\ap_snprintf.c
   Group11File8=C:\Apache\src\ap\ap_strings.c
   Group11File9=C:\Apache\src\ap\Makefile.tmpl
  -Group12Size=215042
  +Group12Size=213647
   Group12Files=25
   Group12Name=include
   Group12Dir=[src]\include
  @@ -355,7 +359,7 @@
   Group12File23=C:\Apache\src\include\util_script.h
   Group12File24=C:\apache\src\include\compat.h
   Group12File25=C:\apache\src\include\util_uri.h
  -Group13Size=696308
  +Group13Size=677557
   Group13Files=25
   Group13Name=main
   Group13Dir=[src]\main
  @@ -385,13 +389,13 @@
   Group13File23=C:\apache\src\main\util_md5.c
   Group13File24=C:\apache\src\main\util_script.c
   Group13File25=C:\apache\src\main\util_uri.c
  -Group14Size=922
  +Group14Size=886
   Group14Files=1
   Group14Name=modules
   Group14Dir=[src]\modules
   Group14Update=0
   Group14File1=C:\Apache\src\modules\README
  -Group15Size=48389
  +Group15Size=47178
   Group15Files=3
   Group15Name=example
   Group15Dir=[modules]\example
  @@ -399,20 +403,20 @@
   Group15File1=C:\Apache\src\modules\example\Makefile.tmpl
   Group15File2=C:\Apache\src\modules\example\mod_example.c
   Group15File3=C:\Apache\src\modules\example\README
  -Group16Size=13422
  +Group16Size=13008
   Group16Files=2
   Group16Name=experimental
   Group16Dir=[modules]\experimental
   Group16Update=0
   Group16File1=C:\Apache\src\modules\experimental\Makefile.tmpl
   Group16File2=C:\Apache\src\modules\experimental\mod_mmap_static.c
  -Group17Size=511
  +Group17Size=494
   Group17Files=1
   Group17Name=extra
   Group17Dir=[modules]\extra
   Group17Update=0
   Group17File1=C:\Apache\src\modules\extra\Makefile.tmpl
  -Group18Size=181915
  +Group18Size=176607
   Group18Files=12
   Group18Name=proxy
   Group18Dir=[modules]\proxy
  @@ -429,7 +433,7 @@
   Group18File10=C:\apache\src\modules\proxy\proxy_ftp.c
   Group18File11=C:\apache\src\modules\proxy\proxy_http.c
   Group18File12=C:\apache\src\modules\proxy\proxy_util.c
  -Group19Size=809658
  +Group19Size=785797
   Group19Files=37
   Group19Name=standard
   Group19Dir=[modules]\standard
  @@ -471,7 +475,7 @@
   Group19File35=C:\apache\src\modules\standard\mod_unique_id.c
   Group19File36=C:\apache\src\modules\standard\mod_userdir.c
   Group19File37=C:\apache\src\modules\standard\mod_usertrack.c
  -Group20Size=170120
  +Group20Size=164226
   Group20Files=25
   Group20Name=regex
   Group20Dir=[src]\regex
  @@ -501,7 +505,7 @@
   Group20File23=C:\Apache\src\regex\tests
   Group20File24=C:\Apache\src\regex\utils.h
   Group20File25=C:\Apache\src\regex\WHATSNEW
  -Group21Size=168008
  +Group21Size=162448
   Group21Files=26
   Group21Name=support
   Group21Dir=[src]\support
  @@ -537,7 +541,7 @@
   Group22Name=os
   Group22Dir=[src]\os
   Group22Update=0
  -Group23Size=192109
  +Group23Size=190860
   Group23Files=43
   Group23Name=win32
   Group23Dir=[os]\win32
  @@ -585,7 +589,7 @@
   Group23File41=C:\apache\src\os\win32\service.c
   Group23File42=C:\apache\src\os\win32\service.h
   Group23File43=C:\apache\src\os\win32\util_win32.c
  -Group24Size=53760
  +Group24Size=142848
   Group24Files=1
   Group24Name=Installer DLL
   Group24Dir=<INSTALLDIR>
  @@ -602,7 +606,7 @@
   Group26Name=logs
   Group26Dir=<INSTALLDIR>\logs
   Group26Update=0
  -Group27Size=37074
  +Group27Size=36913
   Group27Files=76
   Group27Name=icons
   Group27Dir=<INSTALLDIR>\icons
  @@ -683,6 +687,21 @@
   Group27File74=C:\apache\icons\uuencoded.gif
   Group27File75=C:\apache\icons\world1.gif
   Group27File76=C:\apache\icons\world2.gif
  +Group28Size=0
  +Group28Files=0
  +Group28Name=conf
  +Group28Dir=<INSTALLDIR>\conf
  +Group28Update=0
  +Group29Size=0
  +Group29Files=0
  +Group29Name=htdocs
  +Group29Dir=<INSTALLDIR>\htdocs
  +Group29Update=0
  +Group30Size=0
  +Group30Files=0
  +Group30Name=cgi-bin
  +Group30Dir=<INSTALLDIR>\cgi-bin
  +Group30Update=0
   
   [Sequence]
   DestinationLocationDir=<ProgramFilesDir>\Apache Group\Apache
  @@ -782,9 +801,9 @@
   Icon1StartMenu=0
   Icon1Window=0
   Icon2Param=
  -Icon2Cmd=[manual]\index.html
  +Icon2Cmd=[Manual]\index.html
   Icon2Description=Apache Documentation
  -Icon2WorkingDir=[manual]
  +Icon2WorkingDir=[Manual]
   Icon2IconFile=
   Icon2RealFile=C:\Apache\htdocs\manual\index.html
   Icon2WhichIcon=0
  
  
  
  1.2       +165 -29   apache-1.3/src/os/win32/installer/installdll/install.c
  
  Index: install.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/installer/installdll/install.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- install.c	1998/02/24 14:26:51	1.1
  +++ install.c	1998/05/07 13:23:36	1.2
  @@ -3,12 +3,14 @@
   /*
    * 26/06/97 PCS 1.000 Initial version
    * 22/02/98 PCS 1.001 Used the excellent NTemacs to apply proper formating
  + * 04/05/98 PCS 1.002 Copy conf files to *.conf.default, then to *.conf
    */
   
   #include <windows.h>
   #include <winsock.h>
   #include <string.h>
   #include <stdio.h>
  +#include <direct.h>
   
   /* Global to store the instance handle */
   HINSTANCE hInstance = NULL;
  @@ -38,7 +40,7 @@
       wvsprintf(buf, fmt, ap);
       va_end(ap);
   
  -    if (opt | AP_WIN32ERROR) {
  +    if (opt & AP_WIN32ERROR) {
   	char *p;
   
   	strcat(buf, "\r\r(");
  @@ -57,7 +59,7 @@
   	strcat(buf, ")");
       }
   
  -    return MessageBox(hWnd, buf, title, opt);
  +    return MessageBox(hWnd, buf, title, mb_opt);
   }
   
   /*
  @@ -234,12 +236,25 @@
       return outbuf;
   }
   
  +/*
  + * Some options to determine how we copy a file. Apart from OPT_NONE, these should
  + * be OR'able
  + */
  +
  +typedef enum { 
  +    OPT_NONE = 0, 
  +    OPT_OVERWRITE = 1,	    /* Always overwrite destination file */
  +    OPT_EXPAND = 2,	    /* Expand any @@...@@ tokens in replaceHttpd */
  +    OPT_DELETESOURCE = 4,   /* Delete the source file after the copy */
  +    OPT_SILENT = 8,	    /* Don't tell use about failures */
  +} options_t;
  +
   /* 
    * Copy a file, expanding sequences from the replaceTable argument.
    * Returns 0 on success, -1 on error. Reports errors to user.
    */
   #define MAX_INPUT_LINE 2000
  -int WINAPI ExpandConfFile(HWND hwnd, LPSTR szInst, LPSTR szinFile, LPSTR szoutFile, REPLACETABLE replaceTable)
  +int WINAPI ExpandConfFile(HWND hwnd, LPSTR szInst, LPSTR szinFile, LPSTR szoutFile, REPLACETABLE replaceTable, options_t options)
   {
       char inFile[_MAX_PATH];
       char outFile[_MAX_PATH];
  @@ -258,6 +273,24 @@
   			 "Cannot read file %s", inFile);
   	return -1;
       }
  +    if (! (options & OPT_OVERWRITE)) {
  +	/* Overwrite not allowed if file does not exist */
  +	if ((outfp = fopen(outFile, "r"))) {
  +	    if (! (options & OPT_SILENT)) {
  +		MessageBox_error(hwnd,
  +				 0,
  +				 "File not overwritten",
  +				 MB_OK | MB_ICONWARNING,
  +				 "Preserving existing file %s.\r\r"
  +				 "The new version of this file has been left in %s", 
  +				 outFile, inFile);
  +	    }
  +	    fclose(outfp);
  +	    fclose(infp);
  +	    return 0;
  +	}
  +	/* To get here, output file does not exist */
  +    }
       if (!(outfp = fopen(outFile, "w"))) {
   	MessageBox_error(hwnd, 
   			 AP_WIN32ERROR,
  @@ -277,11 +310,13 @@
   	 * called expandLine() or taking a copy of the input
   	 * buffer.
   	 */
  -	for (pos = inbuf; *pos; ++pos)
  -	    if (*pos == '@' && *(pos+1) == '@')
  -		break;
  +	if (options & OPT_EXPAND) {
  +    	    for (pos = inbuf; *pos; ++pos)
  +		if (*pos == '@' && *(pos+1) == '@')
  +		    break;
  +	}
   
  -	if (*pos) {
  +	if (options & OPT_EXPAND && *pos) {
   	    /* The input line contains at least one '@@' sequence, so
   	     * call expandLine() to expand any sequences we know about.
   	     */
  @@ -313,6 +348,10 @@
       fclose(infp);
       fclose(outfp);
   
  +    if (options & OPT_DELETESOURCE) {
  +	unlink(inFile);
  +    }
  +
       return 0;
   }
   
  @@ -349,27 +388,81 @@
   }
   
   /*
  - * This is the entry point from InstallShield. The only parameter
  - * of interest is szInst which gives the installation directory. The
  - * template configuration files will be in the files 
  - * conf\httpd.conf-dist-win, conf\access.conf-dist-win and
  - * conf\srm.conf-dist-win relative to this directory. We need to
  - * expand them into corresponding conf\*.conf files.
  + * actionTable[] contains things we do when this DLL is called by InstallShield
  + * during the install. It is like a simple script, without us having to
  + * worry about parsing, error checking, etc.
    *
  + * Each item in the table is of type ACTIONITEM. The first element is the action 
  + * to perform (e.g. CMD_COPY). The second and third elements are filenames
  + * (e.g. for CMD_COPY, the first filename is the source and the second filename
  + * is the destination). The final element of ACTIONITEM is a set of options
  + * which apply to the current "command". For example, OPT_EXPAND on a CMD_COPY
  + * line, tells the copy function to expand @@ServerRoot@@ tokens found in the
  + * source file.
  + *
  + * The contents of this table are performed in order, top to bottom. This lets
  + * us expand the files to the *.conf.default names, then copy to *.conf only
  + * if the corresponding *.conf file does not already exist. If it does exist,
  + * it is not overwritten.
  + *
    * Return 1 on success, 0 on error.
    */
   
  +typedef enum {
  +    CMD_COPY = 0,
  +    CMD_RMDIR,
  +    CMD_RM,
  +    CMD_END
  +} cmd_t;
  +
   typedef struct {
  +    cmd_t command;
       char *in;
       char *out;
  -} FILEITEM;
  -typedef FILEITEM *FILETABLE;
  +    options_t options;
  +} ACTIONITEM;
  +typedef ACTIONITEM *ACTIONTABLE;
  +
  +ACTIONITEM actionTable[] = {
  +    /*
  +     * Installation of the configuraton files. These are installed into the ".tmp"
  +     * directory by the installer. We first move them to conf\*.default (overwriting
  +     * any *.default file from a previous install). The *.conf-dist-win files
  +     * are also expanded for any @@...@@ tokens. Then we copy the conf\*.default
  +     * file to corresponding conf\* file, unless that would overwrite an existing file.
  +     */
  +    { CMD_COPY, ".tmp\\mime.types", "conf\\mime.types.default",
  +	OPT_OVERWRITE|OPT_DELETESOURCE },
  +    { CMD_COPY, ".tmp\\magic", "conf\\magic.default",
  +	OPT_OVERWRITE|OPT_DELETESOURCE },
  +    { CMD_COPY, ".tmp\\httpd.conf-dist-win", "conf\\httpd.conf.default", 
  +	OPT_OVERWRITE|OPT_EXPAND|OPT_DELETESOURCE },
  +    { CMD_COPY, ".tmp\\srm.conf-dist-win", "conf\\srm.conf.default", 
  +	OPT_OVERWRITE|OPT_EXPAND|OPT_DELETESOURCE },
  +    { CMD_COPY, ".tmp\\access.conf-dist-win", "conf\\access.conf.default", 
  +	OPT_OVERWRITE|OPT_EXPAND|OPT_DELETESOURCE },
  +
  +    /* Now copy to the 'live' files, unless they already exist */
  +    { CMD_COPY, "conf\\httpd.conf.default", "conf\\httpd.conf", OPT_NONE },
  +    { CMD_COPY, "conf\\srm.conf.default", "conf\\srm.conf", OPT_NONE },
  +    { CMD_COPY, "conf\\access.conf.default", "conf\\access.conf", OPT_NONE },
  +    { CMD_COPY, "conf\\magic.default", "conf\\magic", OPT_NONE },
  +    { CMD_COPY, "conf\\mime.types.default", "conf\\mime.types", OPT_NONE },
   
  -FILEITEM fileTable[] = {
  -    { "conf\\httpd.conf-dist-win", "conf\\httpd.conf" },
  -    { "conf\\srm.conf-dist-win", "conf\\srm.conf" },
  -    { "conf\\access.conf-dist-win", "conf\\access.conf" },
  -    { NULL, NULL }
  +    { CMD_COPY, ".tmp\\highperformance.conf-dist", "conf\\highperformance.conf-dist", 
  +	OPT_EXPAND|OPT_OVERWRITE|OPT_DELETESOURCE },
  +
  +    /* Move the default htdocs files into place, provided they don't already
  +     * exist.
  +     */
  +    { CMD_COPY, ".tmp\\index.html", "htdocs\\index.html", OPT_DELETESOURCE|OPT_SILENT },
  +    { CMD_RM, ".tmp\\index.html", NULL, OPT_SILENT },
  +    { CMD_COPY, ".tmp\\apache_pb.gif", "htdocs\\apache_pb.gif", OPT_DELETESOURCE|OPT_SILENT },
  +    { CMD_RM, ".tmp\\apache_pb.gif", NULL, OPT_SILENT },
  +
  +    { CMD_RMDIR, ".tmp", NULL },
  +
  +    { CMD_END, NULL, NULL, OPT_NONE }
   };
   
   /*
  @@ -381,19 +474,62 @@
   
   CHAR WINAPI BeforeExit(HWND hwnd, LPSTR szSrcDir, LPSTR szSupport, LPSTR szInst, LPSTR szRes)
   {
  -    FILEITEM *pfileItem;
  +    ACTIONITEM *pactionItem;
  +    int end = 0;
   
       FillInReplaceTable(hwnd, replaceHttpd, szInst);
   
  -    pfileItem = fileTable;
  -    while (pfileItem->in != NULL) {
  -	if (ExpandConfFile(hwnd, szInst, 
  -			   pfileItem->in, pfileItem->out,
  -			   replaceHttpd) < 0) {
  -	    /* Error has already been reported to the user */
  -	    return 0;
  +    pactionItem = actionTable;
  +    while (!end) {
  +	switch(pactionItem->command) {
  +	case CMD_END:
  +	    end = 1;
  +	    break;
  +	case CMD_COPY:
  +	    if (ExpandConfFile(hwnd, szInst, 
  +			       pactionItem->in, 
  +			       pactionItem->out,
  +			       replaceHttpd,
  +			       pactionItem->options) < 0) {
  +		/* Error has already been reported to the user */
  +		return 0;
  +	    }
  +	    break;
  +	case CMD_RM: {
  +	    char inFile[MAX_INPUT_LINE];
  +
  +	    sprintf(inFile, "%s\\%s", szInst, pactionItem->in);
  +	    if (unlink(inFile) < 0 && !(pactionItem->options & OPT_SILENT)) {
  +		MessageBox_error(hwnd, AP_WIN32ERROR, "Error during configuration",
  +		    MB_ICONHAND,
  +		    "Could not remove file %s", 
  +		    inFile);
  +		return 0;
  +	    }
  +	    break;
  +	}
  +	case CMD_RMDIR: {
  +	    char inFile[MAX_INPUT_LINE];
  +
  +	    sprintf(inFile, "%s\\%s", szInst, pactionItem->in);
  +	    if (rmdir(inFile) < 0) {
  +		MessageBox_error(hwnd, AP_WIN32ERROR, "Error during configuration",
  +		    MB_ICONHAND,
  +		    "Could not delete temporary directory %s", 
  +		    inFile);
  +		return 0;
  +	    }
  +	    break;
  +	}
  +	default:
  +	    MessageBox_error(hwnd, 0, "Error during configuration",
  +		    MB_ICONHAND,
  +		    "An error has occurred during configuration\r"
  +		    "(Error: unknown command %d)", (int)pactionItem->command);
  +	    end = 1;
  +	    break;
   	}
  -	pfileItem++;
  +	pactionItem++;
       }
       return 1;
   }
  
  
  
  1.2       +26 -60    apache-1.3/src/os/win32/installer/installdll/install.mak
  
  Index: install.mak
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/installer/installdll/install.mak,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- install.mak	1998/02/24 14:26:52	1.1
  +++ install.mak	1998/05/07 13:23:37	1.2
  @@ -27,6 +27,10 @@
   NULL=nul
   !ENDIF 
   
  +CPP=cl.exe
  +MTL=midl.exe
  +RSC=rc.exe
  +
   !IF  "$(CFG)" == "install - Win32 Release"
   
   OUTDIR=.\Release
  @@ -55,45 +59,11 @@
   "$(OUTDIR)" :
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
  -CPP=cl.exe
   CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
    /Fp"$(INTDIR)\install.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
   CPP_OBJS=.\Release/
   CPP_SBRS=.
  -
  -.c{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cpp{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cxx{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.c{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cpp{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cxx{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -MTL=midl.exe
   MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 
  -RSC=rc.exe
   BSC32=bscmake.exe
   BSC32_FLAGS=/nologo /o"$(OUTDIR)\install.bsc" 
   BSC32_SBRS= \
  @@ -144,12 +114,33 @@
   "$(OUTDIR)" :
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
  -CPP=cl.exe
   CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
    /Fp"$(INTDIR)\install.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
   CPP_OBJS=.\Debug/
   CPP_SBRS=.
  +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 
  +BSC32=bscmake.exe
  +BSC32_FLAGS=/nologo /o"$(OUTDIR)\install.bsc" 
  +BSC32_SBRS= \
  +	
  +LINK32=link.exe
  +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
  + advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll\
  + /incremental:yes /pdb:"$(OUTDIR)\install.pdb" /debug /machine:I386\
  + /def:".\install.def" /out:"$(OUTDIR)\install.dll"\
  + /implib:"$(OUTDIR)\install.lib" /pdbtype:sept 
  +DEF_FILE= \
  +	".\install.def"
  +LINK32_OBJS= \
  +	"$(INTDIR)\install.obj"
   
  +"$(OUTDIR)\install.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
  +    $(LINK32) @<<
  +  $(LINK32_FLAGS) $(LINK32_OBJS)
  +<<
  +
  +!ENDIF 
  +
   .c{$(CPP_OBJS)}.obj::
      $(CPP) @<<
      $(CPP_PROJ) $< 
  @@ -179,31 +170,6 @@
      $(CPP) @<<
      $(CPP_PROJ) $< 
   <<
  -
  -MTL=midl.exe
  -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 
  -RSC=rc.exe
  -BSC32=bscmake.exe
  -BSC32_FLAGS=/nologo /o"$(OUTDIR)\install.bsc" 
  -BSC32_SBRS= \
  -	
  -LINK32=link.exe
  -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
  - advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll\
  - /incremental:yes /pdb:"$(OUTDIR)\install.pdb" /debug /machine:I386\
  - /def:".\install.def" /out:"$(OUTDIR)\install.dll"\
  - /implib:"$(OUTDIR)\install.lib" /pdbtype:sept 
  -DEF_FILE= \
  -	".\install.def"
  -LINK32_OBJS= \
  -	"$(INTDIR)\install.obj"
  -
  -"$(OUTDIR)\install.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
  -    $(LINK32) @<<
  -  $(LINK32_FLAGS) $(LINK32_OBJS)
  -<<
  -
  -!ENDIF 
   
   
   !IF "$(CFG)" == "install - Win32 Release" || "$(CFG)" ==\