mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-25 13:21:28 +00:00
23 lines
608 B
C#
Executable file
23 lines
608 B
C#
Executable file
using System;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
|
|
namespace mxd.VersionFromEXE
|
|
{
|
|
class Program
|
|
{
|
|
static int Main(string[] args)
|
|
{
|
|
if(args.Length != 2 || !File.Exists(args[0]))
|
|
{
|
|
Console.WriteLine("Creates a bath file, which sets EXEREVISIONNUMBER environment variable to the exe revision number.");
|
|
Console.WriteLine("Usage: VersionFromEXE.exe other.exe output.bat");
|
|
return 1;
|
|
}
|
|
|
|
int rev = FileVersionInfo.GetVersionInfo(args[0]).ProductPrivatePart;
|
|
File.AppendAllText(args[1], "SET EXEREVISIONNUMBER=" + rev + "\n");
|
|
return 0;
|
|
}
|
|
}
|
|
}
|