From 1b206ce591c8e6878575457251437e6f3199077a Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Wed, 11 Nov 2020 01:11:43 -0800 Subject: [PATCH] Pass the path to the ctrl and exec dirs to textgen. For Windows release (CI) builds. --- src/sbbs3/textgen.c | 13 ++++++++++--- src/sbbs3/textgen.vcxproj | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/textgen.c b/src/sbbs3/textgen.c index 460b1fe6e8..4eaa6a74cc 100644 --- a/src/sbbs3/textgen.c +++ b/src/sbbs3/textgen.c @@ -167,7 +167,10 @@ int main(int argc, char **argv) FILE *text_js; FILE *text_defaults_c; - p = get_ctrl_dir(/* warn: */TRUE); + if(argc > 1) + p = argv[1]; + else + p = get_ctrl_dir(/* warn: */TRUE); SAFEPRINTF(path,"%s/text.dat",p); if((text_dat=fopen(path,"r"))==NULL) { perror(path); @@ -191,8 +194,12 @@ int main(int argc, char **argv) fputs("\n",text_h); fputs("enum {\n",text_h); - if((p=getenv("SBBSEXEC"))==NULL) - p="/sbbs/exec"; + if(argc > 2) + p = argv[2]; + else + p = getenv("SBBSEXEC"); + if(p==NULL) + p = "/sbbs/exec"; sprintf(path,"%s/load/text.js",p); if((text_js=fopen(path, "w"))==NULL) { perror(path); diff --git a/src/sbbs3/textgen.vcxproj b/src/sbbs3/textgen.vcxproj index 91c125b6c7..ca93405199 100644 --- a/src/sbbs3/textgen.vcxproj +++ b/src/sbbs3/textgen.vcxproj @@ -151,7 +151,7 @@ </Command> </PreBuildEvent> <PostBuildEvent> - <Command>$(OutputPath)textgen</Command> + <Command>$(OutputPath)textgen ..\..\ctrl ..\..\exec</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> -- GitLab