From: nishi Date: Wed, 19 Jun 2024 03:50:36 +0000 (+0000) Subject: nsis builds X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=77a52093e24a6b9ace7f7a744b7f768694e44ec0;p=dataworks.git nsis builds git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@361 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Document/README.FMT b/Document/README.FMT index fa524ca..7c0b856 100644 --- a/Document/README.FMT +++ b/Document/README.FMT @@ -90,12 +90,27 @@ Works with TCP/IP socket. How to install \hline -On DOS... \list -\list Insert the floppy +\list DOS and DOS/4G +\list+ +\indent +2 +\list +\list Insert the floppy/CD-ROM \list Change the drive to your installation media. +\list Change the directory to dos or dos4g \list Run install.exe for English, instajp.exe for Japanese installer. -\list Specify the path to be installed on. +\indent -2 +\list- +\list Windows +\list+ +\indent +2 +\list +\list Insert the CD-ROM +\list Change the drive to your installation media. +\list Change the directory to win32 or win64 +\list Run install.exe for English, instajp.exe for Japanese installer. +\indent -2 +\list- Copyright \hline diff --git a/Makefiles/installer.mk b/Makefiles/installer.mk index 5b80a7c..f7940f8 100644 --- a/Makefiles/installer.mk +++ b/Makefiles/installer.mk @@ -42,3 +42,54 @@ dos-installer: if [ ! "$(FORMAT)" = "NO" ]; then rm -rf install-workdir ; fi if [ ! "$(FORMAT)" = "NO" ]; then rm -f install-dosbox.conf ; fi $(MAKE) clean + +./install.exe: no-doc + convert -size 150x57 xc:white canvas.bmp + convert Binary/dataworks-black.png dw.bmp + convert canvas.bmp dw.bmp -geometry +97+5 -composite dataworks.bmp + rm canvas.bmp dw.bmp + echo "!include MUI2.nsh" > install.nsi + echo "!define MUI_ABORTWARNING" >> install.nsi + echo "!define MUI_ICON \"Binary/dataworks.ico\"" >> install.nsi + echo "!define MUI_HEADERIMAGE" >> install.nsi + echo "!define MUI_HEADERIMAGE_BITMAP \"dataworks.bmp\"" >> install.nsi + echo "!define MUI_HEADERIMAGE_RIGHT" >> install.nsi + echo "!include nsDialogs.nsh" >> install.nsi + echo "!include LogicLib.nsh" >> install.nsi + echo "Name \"DataWorks\"" >> install.nsi + echo "OutFile \"$@\"" >> install.nsi + echo "SetCompressor lzma" >> install.nsi + echo "InstallDir \"\$$$(TO)\\DataWorks\"" >> install.nsi + echo "XPStyle on" >> install.nsi + echo "!insertmacro MUI_PAGE_WELCOME" >> install.nsi + echo "!insertmacro MUI_PAGE_DIRECTORY" >> install.nsi + echo "!insertmacro MUI_PAGE_INSTFILES" >> install.nsi + echo "!insertmacro MUI_PAGE_FINISH" >> install.nsi + echo "!insertmacro MUI_UNPAGE_WELCOME" >> install.nsi + echo "!insertmacro MUI_UNPAGE_CONFIRM" >> install.nsi + echo "!insertmacro MUI_UNPAGE_INSTFILES" >> install.nsi + echo "!insertmacro MUI_UNPAGE_FINISH" >> install.nsi + echo "!insertmacro MUI_LANGUAGE \"English\"" >> install.nsi + echo "Section" >> install.nsi + echo " SetOutPath \"\$$INSTDIR\"" >> install.nsi + echo " File \"Client/dataworks.exe\"" >> install.nsi + echo " File \"Server/dataworks_server.exe\"" >> install.nsi + echo " File \"RemoteClient/dataworks_remote_client.exe\"" >> install.nsi + echo " CreateDirectory \"\$$SMPROGRAMS\\DataWorks\"" >> install.nsi + echo " SetOutPath \"\$$INSTDIR\"" >> install.nsi + echo " CreateShortcut \"\$$SMPROGRAMS\\DataWorks\\DataWorks Client.lnk\" \"\$$INSTDIR\\dataworks.exe\" \"\"" >> install.nsi + echo " CreateShortcut \"\$$SMPROGRAMS\\DataWorks\\DataWorks Remote Client.lnk\" \"\$$INSTDIR\\dataworks_remote_client.exe\" \"\"" >> install.nsi + echo " CreateShortcut \"\$$SMPROGRAMS\\DataWorks\\DataWorks Server.lnk\" \"\$$INSTDIR\\dataworks_server.exe\" \"\"" >> install.nsi + echo " WriteUninstaller \"\$$INSTDIR\\Uninstall.exe\"" >> install.nsi + echo " WriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DataWorks\" \"DisplayName\" \"Dataworks\"" + echo " WriteRegStr HKLM \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DataWorks\" \"UninstallString\" \"\$$INSTDIR\\Uninstall.exe\"" + echo "SectionEnd" >> install.nsi + echo "Section Uninsatll" >> install.nsi + echo " SetAutoClose false" >> install.nsi + echo " Delete \"\$$INSTDIR\\dataworks.exe\"" >> install.nsi + echo " Delete \"\$$INSTDIR\\dataworks_server.exe\"" >> install.nsi + echo " Delete \"\$$INSTDIR\\dataworks_remote_client.exe\"" >> install.nsi + echo " RMDir \"\$$INSTDIR\"" >> install.nsi + echo "SectionEnd" >> install.nsi + makensis install.nsi + rm install.nsi dataworks.bmp diff --git a/Tool/docfmt.c b/Tool/docfmt.c index 898078a..cfa16cd 100644 --- a/Tool/docfmt.c +++ b/Tool/docfmt.c @@ -52,6 +52,8 @@ char* __util_strcat(const char* a, const char* b) { FILE* in; FILE* out; +#define MAX 128 + int process_doc(void) { char cbuf[2]; cbuf[1] = 0; @@ -63,6 +65,7 @@ int process_doc(void) { str = malloc(1); str[0] = 0; fseek(in, 0, SEEK_SET); + int cincr = 0; while(1) { int len = fread(cbuf, 1, 1, in); if(len <= 0) break; @@ -86,10 +89,27 @@ int process_doc(void) { if(strcmp(cmd, "\\hline") == 0) { } else if(strcmp(cmd, "\\indent") == 0) { } else if(strcmp(cmd, "\\list") == 0) { + } else if(strcmp(cmd, "\\list+") == 0) { + cincr++; + if(cincr >= MAX){ + free(str); + free(full); + fprintf(stderr, "List index stack overflow. Aborted\n"); + return 1; + } + } else if(strcmp(cmd, "\\list-") == 0) { + cincr--; + if(cincr < 0){ + free(str); + free(full); + fprintf(stderr, "List index stack underflow. Aborted\n"); + return 1; + } } else if(str[1] == '"') { } else { fprintf(stderr, "Invalid command. Aborted\n"); free(str); + free(full); return 1; } } @@ -104,7 +124,9 @@ int process_doc(void) { } free(str); - int list = 1; + int* list = malloc(MAX * sizeof(*list)); + int listi = 0; + for(listi = 0; listi < MAX; listi++) list[listi] = 1; str = malloc(1); str[0] = 0; @@ -140,18 +162,18 @@ int process_doc(void) { indent = atoi(val); } } + } else if(strcmp(cmd, "\\list+") == 0) { + list++; + } else if(strcmp(cmd, "\\list-") == 0) { + list--; } else if(strcmp(cmd, "\\list") == 0) { if(val == NULL) { - list = 1; + *list = 1; } else { for(i = 0; i < indent; i++) fprintf(out, " "); - fprintf(out, "%d. %s\n", list++, val); + fprintf(out, "%d. %s\n", (*list)++, val); } } else if(str[1] == '"') { - } else { - fprintf(stderr, "Invalid command. Aborted\n"); - free(str); - return 1; } } else { int i;