Permalink
Browse files

- fixed Auto Updater to work with new file directory structure and im…

…proved function

- set "Auto Update" to true in GeneralConfig as default and force use of latest build
  • Loading branch information...
cozy1 committed Jan 28, 2019
1 parent 20dd063 commit 824199a9e4c68a6e35a6beb0fd5cd6216ce587d9
@@ -46,6 +46,7 @@
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SelfDestruct.cs" />
<Compile Include="ShellLinkNative.cs" />
<Compile Include="ShellShortcut.cs" />
</ItemGroup>
@@ -2,6 +2,9 @@
using System.IO;
using System.Text;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using CreateToolkitShortcut;


namespace CreateShortcut
@@ -30,10 +33,10 @@ static int Main(string[] args)
Console.WriteLine("Creating Shortcut ...");
Console.WriteLine();

// force the use of developer's static arguments
// force the use of static arguments
if (args.Length == 0)
{
// give the progie some debug args to work with
// give the progie some args to work with
Console.WriteLine("Using Internal Static Arguments for RocksmithToolkitGUI ...");
Console.WriteLine();
args = new string[]
@@ -55,12 +58,13 @@ static int Main(string[] args)
Console.WriteLine();
Console.WriteLine(@" - Command Line Usage: CreateShortcut [arg1] [arg2] [arg3] [arg4]");
Console.WriteLine();
Console.WriteLine(@" - Where: [arg1] shortcut relative path, e.g. './new/myshortcut.lnk'");
Console.WriteLine(@" - Where: [arg1] shortcut relative path, e.g. 'myshortcut.lnk'");
Console.WriteLine(@" [arg2] application relative path, e.g. './programs/myshortcut.exe'");
Console.WriteLine(@" [arg3] icon relative path, e.g. './programs/myshortcut.ico'");
Console.WriteLine(@" [arg4] icon index, e.g. '0'");
Console.WriteLine();
Console.WriteLine(@" - Note: The paths are relative to location of CreateShortcut.exe");
Console.WriteLine(@" CreateToolkitShortcut.exe self destructs after sucessful completion");
Console.WriteLine();
Console.WriteLine(@"Press any key to continue ...");
Console.Read();
@@ -164,8 +168,10 @@ static int Main(string[] args)

Console.WriteLine(@"Press any key to continue ...");
Console.Read();
return result;
}

SelfDestruct.DoIt();
return result;
}

@@ -177,5 +183,6 @@ private static string ProjectVersion()
Assembly.GetExecutingAssembly().GetName().Version.Build);
}


}
}
@@ -6,7 +6,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CreateToolkitShortcut")]
[assembly: AssemblyDescription("CreateTookitShortcut.exe '?' for usage")]
[assembly: AssemblyDescription("Create a shortcut for RocksmithToolkitGUI.exe,\r\n\r\n'?' for alternate usages.\r\n\r\nThis executable self destructs after successful completion.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CreateToolkitShortcut.exe")]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.1")]
[assembly: AssemblyVersion("1.0.5.0")]
[assembly: AssemblyFileVersion("1.0.5.0")]
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Diagnostics;

namespace CreateToolkitShortcut
{
public static class SelfDestruct
{
/// <summary>
/// WARNING - The application will self destruct after this method is called ...
/// <para>WARNING - Appliction executable is permenatly deleted. This is not a joke!!!</para>
/// </summary>
public static void DoIt()
{
Process procDestruct = new Process();
string strName = "destruct.bat";
string strPath = Path.Combine(Directory.GetCurrentDirectory(), strName);
string strExe = new FileInfo(Application.ExecutablePath).Name;

StreamWriter swDestruct = new StreamWriter(strPath);
swDestruct.WriteLine("attrib \"" + strExe + "\"" + " -a -s -r -h");
swDestruct.WriteLine(":Repeat");
swDestruct.WriteLine("del " + "\"" + strExe + "\"");
swDestruct.WriteLine("if exist \"" + strExe + "\"" + " goto Repeat");
swDestruct.WriteLine("del \"" + strName + "\"");
swDestruct.Close();

procDestruct.StartInfo.FileName = "destruct.bat";
procDestruct.StartInfo.CreateNoWindow = true;
procDestruct.StartInfo.UseShellExecute = false;

try
{
procDestruct.Start();
}
catch (Exception)
{
Environment.Exit(1);
}
}


}
}
BIN +512 Bytes (100%) RocksmithPreBuild.exe
Binary file not shown.
@@ -36,16 +36,13 @@ private static void Main(string[] args)
//args = new[] { "PREBUILDER", "1.2.3.4", "RELEASE" };
//args = new[] { "PREBUILDER", "1.2.3.4", "BETA" };
//args = new[] { "PREBUILDER", "1.2.3.4", "BUILD" };
args = new[] { "PREBUILDER", "1.2.3.4", "NONE" };
// args = new[] { "PREBUILDER", "1.2.3.4", "NONE" };
// args = new[] { "PREBUILDER", "READ", "READ" }; // use existing version/type
args = new[] { "PREBUILDER", "READ", "READ", "00000000" }; // use manually set git subversion
//args = new[] { "" }; // shows help
}

if (args.Any() && args[0].ToUpper().Contains("CONVERT"))
{
// use the easter egg feature to convert non-VS2010 projects
}
else if (!args.Any() || args.Length != 3 || args[0].ToUpper().Contains("HELP") || args[0].Contains("?"))
if (!args.Any() || args[0].ToUpper().Contains("HELP") || args[0].Contains("?"))
{
Console.WriteLine("");
Console.WriteLine(" CLI RocksmithPreBuild.exe");
@@ -61,9 +58,13 @@ private static void Main(string[] args)
Console.WriteLine(" [arg1] and [arg2] for read/write to 'PatchAssemblyVersion.ps1' file");
Console.WriteLine(" arg1 = 'READ' [AssemblyVersion Read Mode] ");
Console.WriteLine(" arg2 = 'READ' [AssemblyConfiguration Read Mode]");
Console.WriteLine("");
Console.WriteLine(" arg1 = '2.8.3.0' [AssemblyVersion Write Mode]");
Console.WriteLine(" arg2 = 'BUILD', 'BETA', 'RELEASE', or 'NONE' [AssemblyConfiguration Write Mode]");
Console.WriteLine(" 'NONE' is converted to an empty/null string for use in the app");
Console.WriteLine(" 'NONE' is converted to an empty/null string for use in the app");
Console.WriteLine("");
Console.WriteLine(" - Optional: (write git subversion)");
Console.WriteLine(" arg3 = '00000000' [AssemblyInformationVersion Write Mode] aka gitsubversion");
Console.WriteLine("");
Console.WriteLine(" - Usage: Run CLI RocksmithPreBuilder.exe with arguments from inside");
Console.WriteLine(" the VS2010 DEBUG MODE pre-build event in RocksmithToolkitLib");
@@ -75,7 +76,7 @@ private static void Main(string[] args)
Environment.Exit(1);
}

// alternate CLI usage ... Easter Egg
// convert any VS Project to VS2010
if (args[0].ToUpper().Contains("CONVERT"))
ConvertVsProject();

@@ -126,7 +127,11 @@ private static void Main(string[] args)
Environment.Exit(1);
}

assemblyInformationVersion = lines[0].Substring(0, 8);
if (args.Length == 4)
assemblyInformationVersion = args[3];
else
assemblyInformationVersion = lines[0].Substring(0, 8);

Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(" - gitSubVersion (AssemblyInformationVersion): " + assemblyInformationVersion);
Console.ForegroundColor = ConsoleColor.Green;
@@ -137,7 +142,7 @@ private static void Main(string[] args)
lines = File.ReadAllLines(patchAssemblyVersionPath).ToList();
if (lines.Any())
{
// $Assembly_Version = "0.0.0.0"
// $Assembly_Version = "1.2.3.4"
line = lines.Where(str => str.Contains("$Assembly_Version")).FirstOrDefault();
if (!string.IsNullOrEmpty(line))
{
@@ -231,7 +236,7 @@ private static void Main(string[] args)
lines = File.ReadAllLines(assemblyInfoPath).ToList();
if (lines.Any())
{
// [assembly: AssemblyVersion("2.3.8.1")]
// [assembly: AssemblyVersion("1.2.3.4")]
line = lines.FirstOrDefault(str => str.Contains("[assembly: AssemblyVersion(\""));
if (!string.IsNullOrEmpty(line))
{
@@ -253,7 +258,7 @@ private static void Main(string[] args)
}
}

// [assembly: AssemblyInformationalVersion("9605d7f3")]
// [assembly: AssemblyInformationalVersion("00000000")]
line = lines.FirstOrDefault(str => str.Contains("[assembly: AssemblyInformationalVersion(\""));
if (!string.IsNullOrEmpty(line))
{
@@ -406,9 +411,9 @@ private static void ShowHelpfulError(string message)

private static string ProjectVersion()
{
return String.Format("{0}.{1}.{2}",
Assembly.GetExecutingAssembly().GetName().Version.Major,
Assembly.GetExecutingAssembly().GetName().Version.Minor,
return String.Format("{0}.{1}.{2}",
Assembly.GetExecutingAssembly().GetName().Version.Major,
Assembly.GetExecutingAssembly().GetName().Version.Minor,
Assembly.GetExecutingAssembly().GetName().Version.Build);
}

@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
@@ -94,7 +94,7 @@ private void CheckForUpdate(object sender, DoWorkEventArgs e)
// CHECK FOR NEW AVAILABLE REVISION AND ENABLE UPDATE
try
{
onlineVersion = ToolkitVersionOnline.Load();
onlineVersion = ToolkitVersionOnline.GetOnlineVersionInfo();
}
catch (WebException) { /* Do nothing on 404 */ }
catch (Exception)
@@ -285,10 +285,10 @@ private void MainForm_Shown(object sender, EventArgs e)

private void ShowHelpForm()
{
// using ascii text file for web browser viewing
using (var helpViewer = new HelpForm())
{
helpViewer.Text = String.Format("{0}", "Viewing ReleaseNotes.txt ...");
// using ascii text file for web browser viewing
helpViewer.PopulateAsciiText(File.ReadAllText("ReleaseNotes.txt"));
helpViewer.ShowDialog();
}
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("fe47c38f")]
[assembly: AssemblyInformationalVersion("20dd063f")]
[assembly: AssemblyConfiguration("")]
@@ -1,58 +1,35 @@
Rocksmith Toolkit Release Notes

* Switched ReleaseNotes to ascii text file format for web browser viewing

* Updated RocksmithPreBuild.exe to include new versioning methods

* improved ReadVolumeFactor parsing method to account for different bnk formats

* Added new support for Mac Wineskin wrappers

* Updated to DDC v3.6 thanks to Chlipouni

* Revised sortable field validation to be more consistent with ODLC

* Added support to CDLC Creator to preserve tagger.org artwork

* Rewrote AppId Updater code as a memory process to improve overall performance

* Fixed typo/bug in GenerateSng

* Correctly set manifest boolean property �SKU� so that CDLC are not tagged as DLC in the in-game setlist.

* Applied a perma fix to prevent creating property values in the designer when the CDLC Creator GUI design is modified (fixes empty PackageVersion and Platform issues)

* Improved RS1 to RS2014 and RS2014 to RS1 conversions and better tone conversions

* Improved RS1 Import Package function to collect more accurate package data.

* Add arrangement represent (Default/Bonus/Alternate) validation to CDLC Creator.

* Save most recent �Default Project Folder� to Configuration from �Quick Add�.

* Added volume validation check when loading data.

* Toolkit CDLC Creator uses the EOF Track>Rocksmith>Arrangement type> Default, Bonus, Alternate properties as set by default by EOF or as selected by the charter in EOF. The toolkit alerts users if there are more than 5 usable instrument arrangements entered (Remastered Max5 Limit) into the CDLC Creator.

* Added Custom Open File Dialog to CDLC Creator �Quick Add� button which allows arrangements to be entered in any specified order. The order of Arrangement and Tone lists can be changed using Shift+Up/Down Arrow (see popup tooltips in CDLC Creator).

* Fixed Mac Wine/Mono third party application processing

* Fixed audio file type filtering in CDLC Creator.

* Remove all periods �.� from sortable fields to avoid issues with sorting and file naming.

* Make _RSToolkit Logger available in application for Global use.

* Added Package Rating to toolkit.version file to track user rating of CDLC

* Fixed Toolkit Auto Updater button action and caption

* Wwise Path can now be completely cleared and reset in the Configure menu so that it is possible for user to switch to/from Wwise versions as needed to convert RS2014 to RS1 and then switch back.

* Fixed some VS IDE issues with DDC tab menu.

* Added automatic RS2014 to RS1 CDLC Converter. Hover mouse over RS2014 radio button in "Game Version" groupbox to see quick how-to instructions. You must have Wwise 2010.3.3 exact version installed from http://www.saintsrowmods.com/forum/pages/wwise and also set toolkit >Configuration>Wwise Path for auto conversion to work.
- fixed Auto Updater to work with new file directory structure and improved function
- set "Auto Update" to true in GeneralConfig as default and force use of latest build
- added 'assemblyPath' enumeration to Auto Update feature
- switched ReleaseNotes to ascii text file format for web browser viewing
- updated RocksmithPreBuild.exe to include new versioning methods
- improved ReadVolumeFactor parsing method to account for different bnk formats
- added new support for Mac Wineskin wrappers
- updated to DDC v3.6 thanks to Chlipouni
- revised sortable field validation to be more consistent with ODLC
- added support to CDLC Creator to preserve tagger.org artwork
- rewrote AppId Updater code as a memory process to improve overall performance
- fixed typo/bug in GenerateSng
- correctly set manifest boolean property 'SKU' so that CDLC are not tagged as DLC in the in-game setlist.
- applied a perma fix to prevent creating property values in the designer when the CDLC Creator GUI design is modified (fixes empty PackageVersion and Platform issues)
- improved RS1 to RS2014 and RS2014 to RS1 conversions and better tone conversions
- improved RS1 Import Package function to collect more accurate package data
- add arrangement represent (Default/Bonus/Alternate) validation to CDLC Creator
- save most recent 'Default Project Folder' to Configuration from 'Quick Add'
- added volume validation check when loading data
- toolkit CDLC Creator uses the EOF Track>Rocksmith>Arrangement type> Default, Bonus, Alternate properties as set by default by EOF or as selected by the charter in EOF. The toolkit alerts users if there are more than 5 usable instrument arrangements entered (Remastered Max5 Limit) into the CDLC Creator.
- added Custom Open File Dialog to CDLC Creator 'Quick Add' button which allows arrangements to be entered in any specified order. The order of Arrangement and Tone lists can be changed using Shift+Up/Down Arrow (see popup tooltips in CDLC Creator).
- fixed Mac Wine/Mono third party application processing
- fixed audio file type filtering in CDLC Creator
- remove all periods "." from sortable fields to avoid issues with sorting and file naming
- make _RSToolkit Logger available in application for Global use
- added Package Rating to toolkit.version file to track user rating of CDLC
- fixed Toolkit Auto Updater button action and caption
- Wwise Path can now be completely cleared and reset in the Configure menu so that it is possible for user to switch to/from Wwise versions as needed to convert RS2014 to RS1 and then switch back.
- fixed some VS IDE issues with DDC tab menu
- added automatic RS2014 to RS1 CDLC Converter. Hover mouse over RS2014 radio button in 'Game Version' groupbox to see quick how-to instructions. You must have Wwise 2010.3.3 exact version installed from http://www.saintsrowmods.com/forum/pages/wwise and also set toolkit >Configuration>Wwise Path for auto conversion to work.


Please let the toolkit developers know if experience any issues with this beta (good reports or bug reports). Always make sure you are able to reproduce the issue with the latest toolkit beta before filing a bug report.
@@ -437,8 +437,8 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PreBuildEvent>REM copy support files
xcopy /S /Y "$(SolutionDir)Third-party Apps"</PreBuildEvent>
<!-- be sure to address all build types in the PostBuildEvent -->
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">
xcopy /S /Y "$(SolutionDir)Third-party Apps"
@@ -448,10 +448,8 @@
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>REM copy support files
xcopy /S /Y "$(SolutionDir)Third-party Apps"
<PostBuildEvent>REM Cleanup for Release (AppVeyor) Build

REM Cleanup for Release (AppVeyor) Build
if $(ConfigurationName) == Release (
del /S /Q "$(TargetDir)*.exe.config"
del /S /Q "$(TargetDir)*.pdb"
@@ -468,6 +466,7 @@ if $(ConfigurationName) == Release (
)

REM Cleanup for Release (Mac Wineskin) Build

if $(ConfigurationName) == RocksmithToolkitMac (
del /S /Q "$(TargetDir)*.exe.config"
del /S /Q "$(TargetDir)*.pdb"
Oops, something went wrong.

0 comments on commit 824199a

Please sign in to comment.