]> Nishi Git Mirror - dataworks.git/commitdiff
nsis builds
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Wed, 19 Jun 2024 03:50:36 +0000 (03:50 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Wed, 19 Jun 2024 03:50:36 +0000 (03:50 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@361 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Document/README.FMT
Makefiles/installer.mk
Tool/docfmt.c

index fa524ca43af647b5645d374c40189844cc8b17b7..7c0b85659e2afe08cf19cddbaf16954c78b60525 100644 (file)
@@ -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
index 5b80a7c8cad7f941a65a98c8cf37f6110075613d..f7940f80609bf10f3ff60d4a79a5562b5bf9d6af 100644 (file)
@@ -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
index 898078a950e8e83ba9a721b75dd0cc8f24795542..cfa16cd0fa3b2c4b317913435a773b4df2f7137a 100644 (file)
@@ -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;