Skip to content
Snippets Groups Projects
Commit 1b206ce5 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Pass the path to the ctrl and exec dirs to textgen.

For Windows release (CI) builds.
parent 4b4d5a50
Branches
Tags
No related merge requests found
......@@ -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);
......
......@@ -151,7 +151,7 @@
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>$(OutputPath)textgen</Command>
<Command>$(OutputPath)textgen ..\..\ctrl ..\..\exec</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment