-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated how build numbers are done. Update check now always comes bef…
…ore manifest update check, to avoid an issue where no-internet could cause it to be unable to update - or if there was some sort of error and the program needed an update but would close before one could be done. Added some more try catch on file operations.
- Loading branch information
Showing
5 changed files
with
106 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<#@ template debug="true" hostspecific="true" language="C#" #> | ||
<#@ output extension=".cs" #> | ||
<#@ assembly name="System.Windows.Forms" #> | ||
<#@ import namespace="System.IO" #> | ||
<#@ import namespace="System.Text.RegularExpressions" #> | ||
|
||
<# | ||
bool incRevision = false; | ||
bool incBuild = false; | ||
|
||
try { incRevision = Convert.ToBoolean(this.Host.ResolveParameterValue("","","revision")); } catch( Exception ) { } | ||
try { incBuild = Convert.ToBoolean(this.Host.ResolveParameterValue("","","build")); } catch( Exception ) { } | ||
try { | ||
string currentDirectory = Path.GetDirectoryName(Host.TemplateFile); | ||
string assemblyInfo = File.ReadAllText(Path.Combine(currentDirectory,"AssemblyInfo.cs")); | ||
Regex pattern = new Regex("AssemblyVersion\\(\"\\d+\\.\\d+\\.(?<revision>\\d+)\\.(?<build>\\d+)\"\\)"); | ||
MatchCollection matches = pattern.Matches(assemblyInfo); | ||
revision = Convert.ToInt32(matches[0].Groups["revision"].Value) + (incRevision?1:0); | ||
build = Convert.ToInt32(matches[0].Groups["build"].Value) + (incBuild?1:0); | ||
} | ||
catch( Exception ) { } | ||
#> | ||
|
||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using System.Resources; | ||
|
||
// General Information | ||
|
||
[assembly: AssemblyTitle("ALOTAddonBuilder")] | ||
[assembly: AssemblyDescription("Builds the ALOT Addon File for ME2/ME3")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("ME3Tweaks")] | ||
[assembly: AssemblyProduct("ALOTAddonBuilder")] | ||
[assembly: AssemblyCopyright("Copyright © 2017 ME3Tweaks")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Version informationr( | ||
[assembly: AssemblyVersion("1.2.<#= this.revision #>.<#= this.build #>")] | ||
[assembly: AssemblyFileVersion("1.2.<#= this.revision #>.<#= this.build #>")] | ||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )] | ||
|
||
<#+ | ||
int revision = 0; | ||
int build = 0; | ||
#> |