UltimateZoneBuilder/Source/Tools/VersionFromEXE/Program.cs
MaxED 2c0f530ba5 Fixed a crash when changing Custom Field type to Sector/Linedef/Thing Tag.
Changed the way editor is closed during the update process (updater now asks to close the editor after downloading the update package).
Added write access check before performing the update.
The editor can now update the updater.
Updater: merged relevant parts of SharpCompress into the updater source, reducing updater file size from 900 kb to 150 kb.
Updated ZDoom_DECORATE.cfg.
2016-10-08 21:09:55 +00:00

23 lines
608 B
C#

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;
}
}
}