From: Brian Smith Date: Thu, 7 Sep 2000 22:00:52 +0000 (+0000) Subject: Somehow the packinst.c and directory got removed from the archive, so I X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6ab5e82fc31ea3561317f62b5f56176d609aab28 Somehow the packinst.c and directory got removed from the archive, so I included the version from the OS/2 installer which probably has some fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/Install/packinst/packinst.c b/utils/Install/packinst/packinst.c new file mode 100644 index 0000000000..cad4a82fa6 --- /dev/null +++ b/utils/Install/packinst/packinst.c @@ -0,0 +1,190 @@ +/* $Id$ */ + +/* + * include.c (c) 1998,1999 Brian Smith + */ + +#include +#include +#include +#include +#include +#include +#include + +extern int files; + +FILE *cfgfile, *installfile; +char *INSTALLER_APPLICATION; +char *INSTALLER_VERSION; +char *INSTALLER_TITLE; +char *INSTALLER_PATH; +char *INSTALLER_FOLDER; +char *INSTALLER_PROGRAM; +char *INSTALLER_SHADOW; +char *INSTALLER_OBJECT; +char *INSTALLER_SETS; +char *INSTALLER_SYSVAR; +char *INSTALLER_SYSLINE; +char *INSTALLER_PACKAGES[20]; +char *INSTALLER_CONFIRM_WPS; +char *INSTALLER_CONFIRM_CONFIGSYS; +char *INSTALLER_CONFIRM_OVERWRITE; +int INSTALLER_BITMAP_WIDTH; +int INSTALLER_BITMAP_HEIGHT; +int INSTALLER_PACKAGE_COUNT=0; + +int packagefiles[20]; +char *packagefilename[20]; + +void resetglobals(void); + +int include_unpack(char *aname); + +void append_file(char *filename) +{ + FILE *appendfile; + int amnt; + char buffer[512]; + + if((appendfile = fopen(filename, "rb"))==NULL) + { + printf("Error opening %s for reading!\n", filename); + exit(3); + } + while(!feof(appendfile)) + { + amnt = fread(buffer, 1, 512, appendfile); + fwrite(buffer, 1, amnt, installfile); + } + fclose(appendfile); +} + +void getline(FILE *f, char *entry, char *entrydata) +{ +char in[4096]; +int z; + + memset(in, 0, 4096); + fgets(in, 4095, f); + + if(in[strlen(in)-1] == '\n') + in[strlen(in)-1] = 0; + + if(in[0] != '#') + { + for(z=0;z