summaryrefslogtreecommitdiffstats
path: root/PCbuild8/make_buildinfo
diff options
context:
space:
mode:
Diffstat (limited to 'PCbuild8/make_buildinfo')
-rw-r--r--PCbuild8/make_buildinfo/make_buildinfo.c66
-rw-r--r--PCbuild8/make_buildinfo/make_buildinfo.vcproj104
2 files changed, 0 insertions, 170 deletions
diff --git a/PCbuild8/make_buildinfo/make_buildinfo.c b/PCbuild8/make_buildinfo/make_buildinfo.c
deleted file mode 100644
index 6f89716..0000000
--- a/PCbuild8/make_buildinfo/make_buildinfo.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <windows.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-
-/* This file creates the local getbuildinfo.c file, by
- invoking subwcrev.exe (if found). This replaces tokens
- int the file with information about the build.
- If this isn't a subversion checkout, or subwcrev isn't
- found, it copies ..\\Modules\\getbuildinfo.c instead.
-
- Currently, subwcrev.exe is found from the registry entries
- of TortoiseSVN.
-
- make_buildinfo.exe is called as a pre-build step for pythoncore.
-*/
-
-int make_buildinfo2()
-{
- struct _stat st;
- HKEY hTortoise;
- char command[500];
- DWORD type, size;
- if (_stat("..\\.svn", &st) < 0)
- return 0;
- /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
- if (_stat("no_subwcrev", &st) == 0)
- return 0;
- if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
- RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
- /* Tortoise not installed */
- return 0;
- command[0] = '"'; /* quote the path to the executable */
- size = sizeof(command) - 1;
- if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
- type != REG_SZ)
- /* Registry corrupted */
- return 0;
- strcat_s(command, sizeof(command), "bin\\subwcrev.exe");
- if (_stat(command+1, &st) < 0)
- /* subwcrev.exe not part of the release */
- return 0;
- strcat_s(command, sizeof(command), "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo.c");
- puts(command); fflush(stdout);
- if (system(command) < 0)
- return 0;
- return 1;
-}
-
-int main(int argc, char*argv[])
-{
- char command[500] = "";
- int svn;
- /* Get getbuildinfo.c from svn as getbuildinfo2.c */
- svn = make_buildinfo2();
- if (svn) {
- puts("subcwrev succeeded, generated getbuildinfo.c");
- } else {
- puts("Couldn't run subwcrev.exe on getbuildinfo.c. Copying it");
- strcat_s(command, sizeof(command), "copy /Y ..\\Modules\\getbuildinfo.c getbuildinfo.c");
- puts(command); fflush(stdout);
- if (system(command) < 0)
- return EXIT_FAILURE;
- }
- return 0;
-} \ No newline at end of file
diff --git a/PCbuild8/make_buildinfo/make_buildinfo.vcproj b/PCbuild8/make_buildinfo/make_buildinfo.vcproj
deleted file mode 100644
index c3f3491..0000000
--- a/PCbuild8/make_buildinfo/make_buildinfo.vcproj
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="make_buildinfo"
- ProjectGUID="{87AB87DB-B665-4621-A67B-878C15B93FF0}"
- RootNamespace="make_buildinfo"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ProjectDir)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\make_buildinfo.c"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>