From 2f7d2f98e8c037fc4bc79beafbcf3636648d7d62 Mon Sep 17 00:00:00 2001 From: Jiiniasu Date: Sun, 10 Apr 2016 12:26:47 +0200 Subject: [PATCH 01/19] Make screenshots save as PNG --- Vocaluxe/Lib/Draw/CDirect3D.cs | 6 +++--- Vocaluxe/Lib/Draw/CDrawWinForm.cs | 2 +- Vocaluxe/Lib/Draw/COpenGL.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index fc58ebb1..df93e1a8 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -556,13 +556,13 @@ namespace Vocaluxe.Lib.Draw /// public void MakeScreenShot() { - string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.bmp"); + string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png"); //create a surface of the frame using (Surface surface = _Device.GetBackBuffer(0, 0)) { - var screen = new Bitmap(Surface.ToStream(surface, ImageFileFormat.Bmp)); - screen.Save(file, ImageFormat.Bmp); + var screen = new Bitmap(Surface.ToStream(surface, ImageFileFormat.Png)); + screen.Save(file, ImageFormat.Png); screen.Dispose(); } } diff --git a/Vocaluxe/Lib/Draw/CDrawWinForm.cs b/Vocaluxe/Lib/Draw/CDrawWinForm.cs index 6a1b94a7..b06d0929 100644 --- a/Vocaluxe/Lib/Draw/CDrawWinForm.cs +++ b/Vocaluxe/Lib/Draw/CDrawWinForm.cs @@ -303,7 +303,7 @@ namespace Vocaluxe.Lib.Draw public void MakeScreenShot() { - string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.bmp"); + string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png"); _Backbuffer.Save(file, ImageFormat.Png); } diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index 46cb7d15..a2d46014 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -291,7 +291,7 @@ namespace Vocaluxe.Lib.Draw public void MakeScreenShot() { - string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.bmp"); + string file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png"); int width = GetScreenWidth(); int height = GetScreenHeight(); @@ -304,7 +304,7 @@ namespace Vocaluxe.Lib.Draw screen.UnlockBits(bmpData); screen.RotateFlip(RotateFlipType.RotateNoneFlipY); - screen.Save(file, ImageFormat.Bmp); + screen.Save(file, ImageFormat.Png); } } From 4f990e6306bf50d391af0a87c784b23d13a1f99a Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 21 Nov 2016 20:10:16 +0100 Subject: [PATCH 02/19] Fix: After deleting a playlist the playlist-selector is out of sync (maybe a fix for #209) --- Vocaluxe/Base/CPlaylists.cs | 5 +++++ Vocaluxe/Screens/CScreenSong.cs | 30 +++++++++++++++--------------- VocaluxeLib/Menu/CSelectSlide.cs | 24 ++++++++++++++++++++---- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/Vocaluxe/Base/CPlaylists.cs b/Vocaluxe/Base/CPlaylists.cs index f2f84ed8..9cc3201a 100644 --- a/Vocaluxe/Base/CPlaylists.cs +++ b/Vocaluxe/Base/CPlaylists.cs @@ -42,6 +42,11 @@ namespace Vocaluxe.Base get { return _Playlists.Select(t => t.Name).ToList(); } } + public static List Ids + { + get { return _Playlists.Select(t => t.Id).ToList(); } + } + public static int NumPlaylists { get { return _Playlists.Count; } diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 5d49a606..c14037ba 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -372,9 +372,9 @@ namespace Vocaluxe.Screens else if (_Buttons[_ButtonOptionsOpenSelectedItem].Selected) _HandleSelectButton(); else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selected) - _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection); + _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].SelectedTag); else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selected) - _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1); + _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag); else if (_Buttons[_ButtonOptionsRandomMedley].Selected) _ToggleSongOptions(ESongOptionsView.Medley); else if (_Buttons[_ButtonOptionsStartMedley].Selected) @@ -533,12 +533,12 @@ namespace Vocaluxe.Screens } else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].IsValueSelected) { - _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection); + _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].SelectedTag); return true; } else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].IsValueSelected) { - _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1); + _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag); return true; } else if (_Buttons[_ButtonOptionsRandomMedley].Selected) @@ -1279,16 +1279,16 @@ namespace Vocaluxe.Screens private void _UpdatePlaylistNames() { _SelectSlides[_SelectSlideOptionsPlaylistAdd].Clear(); - _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue("TR_SCREENSONG_NEWPLAYLIST"); - _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValues(CPlaylists.Names); + _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue("TR_SCREENSONG_NEWPLAYLIST", tag: -1); + _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValues(CPlaylists.Names, CPlaylists.Ids); _SelectSlides[_SelectSlideOptionsPlaylistOpen].Clear(); - _SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValues(CPlaylists.Names); + _SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValues(CPlaylists.Names, CPlaylists.Ids); } private void _OpenAndAddPlaylistAction() { - if (_Playlist.ActivePlaylistID != (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) && - (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) != -1) + if (_Playlist.ActivePlaylistID != (_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) && + (_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) != -1) { //Open an existing playlist and add song //Check selected game-mode @@ -1301,9 +1301,9 @@ namespace Vocaluxe.Screens gm = EGameMode.TR_GAMEMODE_NORMAL; //Check if Playlist really exists - if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1 >= 0) + if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag >= 0) { - _Playlist.ActivePlaylistID = _SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1; + _Playlist.ActivePlaylistID = _SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag; //Add song to playlist CPlaylists.AddSong(_Playlist.ActivePlaylistID, CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].ID, gm); @@ -1314,7 +1314,7 @@ namespace Vocaluxe.Screens _Playlist.ScrollToBottom(); } } - else if ((_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) == -1) + else if ((_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) == -1) { //Create a new playlist and add song //Check selected game-mode @@ -1336,8 +1336,8 @@ namespace Vocaluxe.Screens _OpenPlaylist(_Playlist.ActivePlaylistID); //Add new playlist to select-slide - _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID)); - _SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID)); + _SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID), _Playlist.ActivePlaylistID); + _SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID), _Playlist.ActivePlaylistID); } else { @@ -1359,7 +1359,7 @@ namespace Vocaluxe.Screens private void _SetSelectSlidePlaylistToCurrentPlaylist() { if (_Playlist.ActivePlaylistID > -1) - _SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection = _Playlist.ActivePlaylistID + 1; + _SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag = _Playlist.ActivePlaylistID; else _SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection = 0; } diff --git a/VocaluxeLib/Menu/CSelectSlide.cs b/VocaluxeLib/Menu/CSelectSlide.cs index 64f39b08..fa6310b2 100644 --- a/VocaluxeLib/Menu/CSelectSlide.cs +++ b/VocaluxeLib/Menu/CSelectSlide.cs @@ -436,6 +436,22 @@ namespace VocaluxeLib.Menu AddValue(value); } + public void AddValues(IEnumerable values, IEnumerable tags) + { + using (var e1 = values.GetEnumerator()) + using (var e2 = tags.GetEnumerator()) + { + while (e1.MoveNext() && e2.MoveNext()) + { + AddValue(e1.Current, tag: e2.Current); + } + if (e1.MoveNext() || e2.MoveNext()) + { + throw new ArgumentException("the lists must have the same length"); + } + } + } + public void AddValues(string[] values, CTextureRef[] textures) { Debug.Assert(values.Length == textures.Length); @@ -566,10 +582,10 @@ namespace VocaluxeLib.Menu for (int i = 0; i < numvis; i++) { var el = new CElement - { - Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID), - Img = new CStatic(_PartyModeID) - }; + { + Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID), + Img = new CStatic(_PartyModeID) + }; _VisibleElements.Add(el); } } From 78e2c50209740b80535c4e8de47c331b8e3210a5 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Wed, 23 Nov 2016 12:12:58 +0100 Subject: [PATCH 03/19] Fix: "1)" is fixed in PartyModeChallenge*'s roundtables (fixes #231) --- .../Themes/Default/Screens/PartyScreenChallengeMain.xml | 2 +- .../Themes/Default/Screens/PartyScreenChallengeMedleyMain.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeMain.xml b/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeMain.xml index 3edf6ca5..1c67c701 100644 --- a/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeMain.xml +++ b/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeMain.xml @@ -187,7 +187,7 @@ Center Outline - 1) + 0 diff --git a/Output/PartyModes/ChallengeMedley/Themes/Default/Screens/PartyScreenChallengeMedleyMain.xml b/Output/PartyModes/ChallengeMedley/Themes/Default/Screens/PartyScreenChallengeMedleyMain.xml index 371c3e14..c1279d0d 100644 --- a/Output/PartyModes/ChallengeMedley/Themes/Default/Screens/PartyScreenChallengeMedleyMain.xml +++ b/Output/PartyModes/ChallengeMedley/Themes/Default/Screens/PartyScreenChallengeMedleyMain.xml @@ -187,7 +187,7 @@ Center Outline - 1) + 0 From 557ba6207c5b122b3862d7422df7a36eb8d14f22 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sun, 27 Nov 2016 13:55:42 +0100 Subject: [PATCH 04/19] Mod: Change gamepad's Abort/"Esc" button from "X" to "B" (as "B" is common key for aborting something) --- Vocaluxe/Lib/Input/CGamePad.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Lib/Input/CGamePad.cs b/Vocaluxe/Lib/Input/CGamePad.cs index 482dce1a..04810d7a 100644 --- a/Vocaluxe/Lib/Input/CGamePad.cs +++ b/Vocaluxe/Lib/Input/CGamePad.cs @@ -161,7 +161,7 @@ namespace Vocaluxe.Lib.Input key = Keys.Space; else if (buttonStates.Buttons.A == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.A == OpenTK.Input.ButtonState.Released) key = Keys.Enter; - else if (buttonStates.Buttons.X == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.X == OpenTK.Input.ButtonState.Released) + else if (buttonStates.Buttons.B == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.B == OpenTK.Input.ButtonState.Released) key = Keys.Escape; else if (buttonStates.Buttons.Back == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.Back == OpenTK.Input.ButtonState.Released) key = Keys.Back; From 58bdabe62cec458c4247c7e513a84ca842f6fadd Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sun, 27 Nov 2016 14:16:42 +0100 Subject: [PATCH 05/19] Fix: Can't select players if #player=12 in PartyModes (fixes #232) --- VocaluxeLib/Menu/CMenuPartyNameSelection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/CMenuPartyNameSelection.cs b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs index 09b96cad..489467bc 100644 --- a/VocaluxeLib/Menu/CMenuPartyNameSelection.cs +++ b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs @@ -727,7 +727,7 @@ namespace VocaluxeLib.Menu { if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic) return; - if (_NumPlayerTeams[team] == _PartyMode.MaxPlayersPerTeam) + if (_NumPlayerTeams[team] > _PartyMode.MaxPlayersPerTeam) return; _NameSelections[_NameSelection].UseProfile(profileID); From 6b89fdf8bb281d281e86eb40f2878c56dfe3e5a9 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sat, 10 Dec 2016 18:36:16 +0100 Subject: [PATCH 06/19] -Mod: add ambient theme videos to all releases (closes #237) --- appveyor.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 520b55f8..e614e1a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,7 +32,17 @@ install: $Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK = $Env:APPVEYOR_REPO_BRANCH } before_build: -- ps: >- +- ps: | + Try + { + Start-FileDownload 'https://github.com/lukeIam/VocaluxeDependencies/blob/master/zips/themes/vocaluxe.themes.ambient.video.zip?raw=true' + & 7z x '-aoa' '-oOutput/' './vocaluxe.themes.ambient.video.zip' + Remove-Item './vocaluxe.themes.ambient.video.zip' + } + Catch + { + Write-Warning "Ambient-Video download failed" + } nuget restore -DisableParallelProcessing build: From 9d4a420ea2987370032f8cda0d4e3de7b422c000 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 12 Dec 2016 21:01:41 +0100 Subject: [PATCH 07/19] -Mod: New versioning scheme including type if type!=release -Mod: Show the same version tag everywhere -Mod: Automatically determinate release type depending on the new version-tag -Mod: Automatically determinate CodeName -Add: Code-name for the 0.4. releases --- Vocaluxe/Base/CSettings.cs | 54 +++++++++++++++++++------- Vocaluxe/Linux/Build/PostBuildEvent.sh | 2 + Vocaluxe/Linux/Build/PreBuildEvent.sh | 2 + Vocaluxe/Properties/AssemblyInfo.cs | 6 +-- Vocaluxe/Vocaluxe.csproj | 4 +- 5 files changed, 50 insertions(+), 18 deletions(-) diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 3ad3a4ef..94f38509 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Reflection; using System.Windows.Forms; using VocaluxeLib; @@ -53,10 +54,44 @@ namespace Vocaluxe.Base public static EProgramState ProgramState = EProgramState.Start; //Adjusting of programName and version now in the assembly config. - //I'd use the major and minor for Main releases, build number for every public release and revision for every bugfix version without any features - private const string _ProgramCodeName = "Shining Heaven"; + private static readonly Dictionary _CodeNames = new Dictionary() + { + {"0.3.", "Shining Heaven"}, + {"0.4.", "Blue Sunrise"} + }; - public const ERevision VersionRevision = ERevision.Beta; + private static string _ProgramCodeName + { + get + { + var versionParts = Application.ProductVersion.Split('.'); + string name; + _CodeNames.TryGetValue($"{versionParts[0]}.{versionParts[1]}.", out name); + if (name != null) + return name; + return "Unnamed Version"; + } + } + + public static ERevision VersionRevision + { + get + { + if (_Version.ToLower().Contains("alpha")) + { + return ERevision.Alpha; + } + if (_Version.ToLower().Contains("beta")) + { + return ERevision.Beta; + } + if (_Version.ToLower().Contains("rc")) + { + return ERevision.RC; + } + return ERevision.Release; + } + } public const int DatabaseHighscoreVersion = 3; public const int DatabaseCoverVersion = 1; @@ -177,8 +212,7 @@ namespace Vocaluxe.Base { get { - Version v = _Assembly.Version; - return "v" + v.Major + "." + v.Minor + "." + v.Build; + return Application.ProductVersion.Split('-').First(); } } @@ -186,10 +220,8 @@ namespace Vocaluxe.Base { string version = _Version + " (" + _Arch + ")"; - // ReSharper disable ConditionIsAlwaysTrueOrFalse if (VersionRevision != ERevision.Release) { - // ReSharper restore ConditionIsAlwaysTrueOrFalse string gitversion = Application.ProductVersion; version += " " + _GetVersionStatus() + String.Format(" ({0})", gitversion); } @@ -200,10 +232,8 @@ namespace Vocaluxe.Base public static string GetFullVersionText() { string version = ProgramName; - - // ReSharper disable ConditionIsAlwaysTrueOrFalse + if (_ProgramCodeName != "") - // ReSharper restore ConditionIsAlwaysTrueOrFalse version += " \"" + _ProgramCodeName + "\""; return version + " " + _GetVersionText(); @@ -211,11 +241,9 @@ namespace Vocaluxe.Base private static string _GetVersionStatus() { - string result; + string result = ""; - // ReSharper disable ConditionIsAlwaysTrueOrFalse if (VersionRevision != ERevision.Release) - // ReSharper restore ConditionIsAlwaysTrueOrFalse result = Enum.GetName(typeof(ERevision), VersionRevision); return result; diff --git a/Vocaluxe/Linux/Build/PostBuildEvent.sh b/Vocaluxe/Linux/Build/PostBuildEvent.sh index c9c2d125..92b73c10 100755 --- a/Vocaluxe/Linux/Build/PostBuildEvent.sh +++ b/Vocaluxe/Linux/Build/PostBuildEvent.sh @@ -2,4 +2,6 @@ PROJECT=$1 cd $PROJECT sed -i -r -e 's/AssemblyInformationalVersion\(".*?"\)/AssemblyInformationalVersion("GITVERSION")/' $PROJECT/Properties/AssemblyInfo.cs +sed -i -r -e 's/AssemblyVersion\(".*?"\)/AssemblyVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs +sed -i -r -e 's/AssemblyFileVersion\(".*?"\)/AssemblyFileVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs sed -i -e 's/var matchingServerVersion = "";/var matchingServerVersion = "'$(git describe --long)'";/' $PROJECT/../Output/Website/js/main.js diff --git a/Vocaluxe/Linux/Build/PreBuildEvent.sh b/Vocaluxe/Linux/Build/PreBuildEvent.sh index 4d7c6ef7..9fe7bd5b 100755 --- a/Vocaluxe/Linux/Build/PreBuildEvent.sh +++ b/Vocaluxe/Linux/Build/PreBuildEvent.sh @@ -2,3 +2,5 @@ PROJECT=$1 cd $PROJECT sed -i -e s/GITVERSION/$(git describe --long)/ $PROJECT/Properties/AssemblyInfo.cs +shortv=$(git describe --abbrev=0 | sed -e 's/alpha/0/' -e 's/beta/1/' -e 's/rc/2/') +sed -i -e s/SHORTVERSION/${shortv}/ $PROJECT/Properties/AssemblyInfo.cs diff --git a/Vocaluxe/Properties/AssemblyInfo.cs b/Vocaluxe/Properties/AssemblyInfo.cs index 3e00fede..4cde4f89 100644 --- a/Vocaluxe/Properties/AssemblyInfo.cs +++ b/Vocaluxe/Properties/AssemblyInfo.cs @@ -27,7 +27,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Vocaluxe")] -[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -49,6 +49,6 @@ using System.Runtime.InteropServices; // Revision // -[assembly: AssemblyVersion("0.3.0.83")] -[assembly: AssemblyFileVersion("0.3.0.83")] +[assembly: AssemblyVersion("SHORTVERSION")] +[assembly: AssemblyFileVersion("SHORTVERSION")] [assembly: AssemblyInformationalVersion("GITVERSION")] diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index fc607fd5..ef349b8e 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -479,12 +479,12 @@ xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap" powershell -command "if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;}(Get-Content -Encoding UTF8 '$(ProjectDir)..\Output\Website\js\main.js') | Foreach-Object {$_ -replace '(?<=var *matchingServerVersion * = *\")\w*(?=\" *;)', "$version"} | Set-Content -Encoding UTF8 '$(ProjectDir)..\Output\Website\js\main.js'" -powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\()(.*)(?=\))', '\"GITVERSION\"'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'" +powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\(\").*(?=\")', 'GITVERSION'} | Foreach-Object {$_ -replace '(?<=(AssemblyVersion|AssemblyFileVersion)\(\").*(?=\")', 'SHORTVERSION'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs' " cp -ruT "$(ProjectDir)Website" "$(SolutionDir)/PhoneGap" $(ProjectDir)Linux/Build/PostBuildEvent.sh $(ProjectDir) - powershell -command "if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;} (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace 'GITVERSION', $version} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'" + powershell -command " if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;} (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\(\").*(?=\")', $version} | Foreach-Object {$_ -replace '(?<=(AssemblyVersion|AssemblyFileVersion)\(\").*(?=\")', $version.Split('-')[0].replace('alpha','0').replace('beta','1').replace('rc','2')} | Foreach-Object {$_ -replace '(?<=AssemblyCopyright\(\".*)[0-9]+(?=\")', (Get-Date).Year} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs' " $(ProjectDir)Linux/Build/PreBuildEvent.sh $(ProjectDir)