Commits (5)
@echo off
call gitinfo.bat
call ../build/gitinfo.bat
call build.bat "/p:Configuration=Release" %*
\ No newline at end of file
......@@ -121,7 +121,7 @@
<OutputFile>.\msvc.win32.dll.debug/sbbs.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>gitinfo.bat</Command>
<Command>..\build\gitinfo.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
......@@ -173,7 +173,7 @@
<OutputFile>.\msvc.win32.dll.release/sbbs.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>gitinfo.bat</Command>
<Command>..\build\gitinfo.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
......
......@@ -117,7 +117,7 @@
<OutputFile>.\msvc.win32.dll.debug/sbbs.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>gitinfo.bat</Command>
<Command>..\build\gitinfo.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
......@@ -169,7 +169,7 @@
<OutputFile>.\msvc.win32.dll.release/sbbs.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>gitinfo.bat</Command>
<Command>..\build\gitinfo.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
......
git_branch.h
git_hash.h
@echo off
setlocal
rem *** Requires Microsoft Visual C++ 2019 ***
call "%VS160COMNTOOLS%\VsMSBuildCmd.bat"
msbuild vdmodem.sln /p:Platform="Win32" %*
if errorlevel 1 echo. & echo !ERROR(s) occurred & exit /b 1
\ No newline at end of file
@echo off
call build.bat "/p:Configuration=Release" %*
\ No newline at end of file
......@@ -34,6 +34,8 @@
#include "sockwrap.h"
#include "telnet.h"
#include "ini_file.h"
#include "git_branch.h"
#include "git_hash.h"
#define TITLE "Synchronet Virtual DOS Modem for Windows"
#define VERSION "0.0"
......@@ -108,7 +110,8 @@ void usage(const char* progname)
"\t-d Enable debug output\n"
"\t-h<sock> Specify socket descriptor/handle to use (decimal)\n"
"\t-r<cps> Specify maximum receive data rate (chars/second)\n"
"\t-c<fname> Specify alternate configuration (.ini) filename\n"
"\t-c<fname> Specify alternate configuration (.ini) path/filename\n"
"\t-V Display detailed version information and exit\n"
,progname
);
exit(EXIT_SUCCESS);
......@@ -756,7 +759,21 @@ char* atmodem_exec(struct modem* modem)
}
break;
case 'I':
sprintf(respbuf, "\r\n" TITLE " v" VERSION " Copyright %s Rob Swindell\r\n", &__DATE__[7]);
switch(val) {
case 0:
safe_snprintf(respbuf, sizeof(respbuf)
,"\r\n" TITLE " v" VERSION " Copyright %s Rob Swindell\r\n%s/%s\r\n"
,&__DATE__[7]
,GIT_BRANCH
,GIT_HASH
);
break;
case 1:
safe_snprintf(respbuf, sizeof(respbuf), "\r\n%s\r\n", ini_fname);
break;
default:
return error(modem);
}
return respbuf;
case 'O':
if(sock == INVALID_SOCKET)
......@@ -1078,6 +1095,9 @@ int main(int argc, char** argv)
case 'R':
rx_delay = strtoul(arg + 1, NULL, 10);
break;
case 'V':
fprintf(stdout, "%s/%s\n", GIT_BRANCH, GIT_HASH);
return EXIT_SUCCESS;
default:
usage(argv[0]);
break;
......
......@@ -9,18 +9,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xpdev_mt", "..\xpdev\xpdev_
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{20051597-6298-4098-8F26-E408C2880FE4}.Debug|x86.ActiveCfg = Debug|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Debug|x86.Build.0 = Debug|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Release|x86.ActiveCfg = Release|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Release|x86.Build.0 = Release|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|x86.ActiveCfg = Debug|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|x86.Build.0 = Debug|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|x86.ActiveCfg = Release|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|x86.Build.0 = Release|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Debug|Win32.ActiveCfg = Debug|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Debug|Win32.Build.0 = Debug|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Release|Win32.ActiveCfg = Release|Win32
{20051597-6298-4098-8F26-E408C2880FE4}.Release|Win32.Build.0 = Release|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|Win32.ActiveCfg = Debug|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|Win32.Build.0 = Debug|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|Win32.ActiveCfg = Release|Win32
{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......