diff --git a/GstreamerHelper/GstreamerHelper.vcxproj b/GstreamerHelper/GstreamerHelper.vcxproj index 3f43af5b..fd3c7260 100644 --- a/GstreamerHelper/GstreamerHelper.vcxproj +++ b/GstreamerHelper/GstreamerHelper.vcxproj @@ -9,6 +9,14 @@ DebugWin x64 + + PortableWin + Win32 + + + PortableWin + x64 + ReleaseWin Win32 @@ -43,6 +51,13 @@ true Unicode + + DynamicLibrary + false + v110_xp + true + Unicode + DynamicLibrary false @@ -50,6 +65,13 @@ true Unicode + + DynamicLibrary + false + v110_xp + true + Unicode + @@ -62,9 +84,15 @@ + + + + + + @@ -90,6 +118,13 @@ $(MSBuildProjectDirectory)\x86\lib;$(LibraryPath) obj\$(Configuration).$(Platform)\ + + false + bin\$(Configuration).$(Platform)\ + $(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath) + $(MSBuildProjectDirectory)\x86\lib;$(LibraryPath) + obj\$(Configuration).$(Platform)\ + false bin\$(Configuration).$(Platform)\ @@ -97,6 +132,13 @@ $(MSBuildProjectDirectory)\x64\lib;$(LibraryPath) obj\$(Configuration).$(Platform)\ + + false + bin\$(Configuration).$(Platform)\ + $(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath) + $(MSBuildProjectDirectory)\x64\lib;$(LibraryPath) + obj\$(Configuration).$(Platform)\ + ..\Output\x86 @@ -168,6 +210,31 @@ Copying binary + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;GSTREAMERHELPER_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + false + true + true + gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies) + false + + + xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x86\gstreamer\" /I /Y + + + Copying binary + + Level3 @@ -191,6 +258,29 @@ xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x64\gstreamer\" /I /Y + + + Level3 + Use + Full + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;GSTREAMERHELPER_EXPORTS;%(PreprocessorDefinitions) + true + true + Speed + + + Windows + false + true + true + gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies) + + + xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x64\gstreamer\" /I /Y + + @@ -209,11 +299,17 @@ false + false false + false + + + + @@ -223,7 +319,9 @@ Create Create Create + Create Create + Create diff --git a/PartyModes/PartyModeChallenge/PartyModeChallenge.csproj b/PartyModes/PartyModeChallenge/PartyModeChallenge.csproj index 4623278b..52d14088 100644 --- a/PartyModes/PartyModeChallenge/PartyModeChallenge.csproj +++ b/PartyModes/PartyModeChallenge/PartyModeChallenge.csproj @@ -106,6 +106,26 @@ + + bin\x86\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + + + bin\x64\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + diff --git a/PartyModes/PartyModeChallengeMedley/PartyModeChallengeMedley.csproj b/PartyModes/PartyModeChallengeMedley/PartyModeChallengeMedley.csproj index 9b4f39d5..15bea0ed 100644 --- a/PartyModes/PartyModeChallengeMedley/PartyModeChallengeMedley.csproj +++ b/PartyModes/PartyModeChallengeMedley/PartyModeChallengeMedley.csproj @@ -106,6 +106,26 @@ + + bin\x86\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + + + bin\x64\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + diff --git a/PartyModes/PartyModeTicTacToe/PartyModeTicTacToe.csproj b/PartyModes/PartyModeTicTacToe/PartyModeTicTacToe.csproj index 7c64e9ac..a03eafb6 100644 --- a/PartyModes/PartyModeTicTacToe/PartyModeTicTacToe.csproj +++ b/PartyModes/PartyModeTicTacToe/PartyModeTicTacToe.csproj @@ -106,6 +106,26 @@ + + bin\x86\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + + + bin\x64\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + diff --git a/Vocaluxe.sln b/Vocaluxe.sln index 636ec3bf..44172895 100644 --- a/Vocaluxe.sln +++ b/Vocaluxe.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio Express 2012 for Windows Desktop Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}" ProjectSection(ProjectDependencies) = postProject {6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678} @@ -26,6 +26,8 @@ Global DebugLinux|x86 = DebugLinux|x86 DebugWin|x64 = DebugWin|x64 DebugWin|x86 = DebugWin|x86 + PortableWin|x64 = PortableWin|x64 + PortableWin|x86 = PortableWin|x86 ReleaseLinux|x64 = ReleaseLinux|x64 ReleaseLinux|x86 = ReleaseLinux|x86 ReleaseWin|x64 = ReleaseWin|x64 @@ -40,6 +42,10 @@ Global {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.Build.0 = DebugWin|x64 {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.ActiveCfg = DebugWin|x86 {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.Build.0 = DebugWin|x86 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.PortableWin|x64.Build.0 = PortableWin|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.PortableWin|x86.ActiveCfg = PortableWin|x86 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.PortableWin|x86.Build.0 = PortableWin|x86 {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64 {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64 {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86 @@ -56,6 +62,10 @@ Global {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x64.Build.0 = DebugWin|x64 {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x86.ActiveCfg = DebugWin|x86 {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x86.Build.0 = DebugWin|x86 + {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.PortableWin|x64.Build.0 = PortableWin|x64 + {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.PortableWin|x86.ActiveCfg = PortableWin|x86 + {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.PortableWin|x86.Build.0 = PortableWin|x86 {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64 {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64 {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86 @@ -72,6 +82,10 @@ Global {6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugWin|x64.Build.0 = DebugWin|x64 {6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugWin|x86.ActiveCfg = DebugWin|x86 {6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugWin|x86.Build.0 = DebugWin|x86 + {6F3E1874-F28A-40E9-AFBD-31934D593679}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {6F3E1874-F28A-40E9-AFBD-31934D593679}.PortableWin|x64.Build.0 = PortableWin|x64 + {6F3E1874-F28A-40E9-AFBD-31934D593679}.PortableWin|x86.ActiveCfg = PortableWin|x86 + {6F3E1874-F28A-40E9-AFBD-31934D593679}.PortableWin|x86.Build.0 = PortableWin|x86 {6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64 {6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64 {6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86 @@ -88,6 +102,10 @@ Global {5A4053F1-5AD5-441F-B254-D97A088127B6}.DebugWin|x64.Build.0 = DebugWin|x64 {5A4053F1-5AD5-441F-B254-D97A088127B6}.DebugWin|x86.ActiveCfg = DebugWin|x86 {5A4053F1-5AD5-441F-B254-D97A088127B6}.DebugWin|x86.Build.0 = DebugWin|x86 + {5A4053F1-5AD5-441F-B254-D97A088127B6}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {5A4053F1-5AD5-441F-B254-D97A088127B6}.PortableWin|x64.Build.0 = PortableWin|x64 + {5A4053F1-5AD5-441F-B254-D97A088127B6}.PortableWin|x86.ActiveCfg = PortableWin|x86 + {5A4053F1-5AD5-441F-B254-D97A088127B6}.PortableWin|x86.Build.0 = PortableWin|x86 {5A4053F1-5AD5-441F-B254-D97A088127B6}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64 {5A4053F1-5AD5-441F-B254-D97A088127B6}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64 {5A4053F1-5AD5-441F-B254-D97A088127B6}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86 @@ -104,6 +122,10 @@ Global {6F3E1874-F28A-40E9-AFBD-31934D593678}.DebugWin|x64.Build.0 = DebugWin|x64 {6F3E1874-F28A-40E9-AFBD-31934D593678}.DebugWin|x86.ActiveCfg = DebugWin|x86 {6F3E1874-F28A-40E9-AFBD-31934D593678}.DebugWin|x86.Build.0 = DebugWin|x86 + {6F3E1874-F28A-40E9-AFBD-31934D593678}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {6F3E1874-F28A-40E9-AFBD-31934D593678}.PortableWin|x64.Build.0 = PortableWin|x64 + {6F3E1874-F28A-40E9-AFBD-31934D593678}.PortableWin|x86.ActiveCfg = PortableWin|x86 + {6F3E1874-F28A-40E9-AFBD-31934D593678}.PortableWin|x86.Build.0 = PortableWin|x86 {6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64 {6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64 {6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86 @@ -118,6 +140,10 @@ Global {ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x64.Build.0 = DebugWin|x64 {ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.ActiveCfg = DebugWin|Win32 {ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.Build.0 = DebugWin|Win32 + {ED007796-367F-4142-AA55-5450C7645C2C}.PortableWin|x64.ActiveCfg = PortableWin|x64 + {ED007796-367F-4142-AA55-5450C7645C2C}.PortableWin|x64.Build.0 = PortableWin|x64 + {ED007796-367F-4142-AA55-5450C7645C2C}.PortableWin|x86.ActiveCfg = PortableWin|Win32 + {ED007796-367F-4142-AA55-5450C7645C2C}.PortableWin|x86.Build.0 = PortableWin|Win32 {ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x64.ActiveCfg = ReleaseWin|x64 {ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x86.ActiveCfg = ReleaseWin|x64 {ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64 diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index f3dbbdbf..5aeca79f 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -146,12 +146,20 @@ namespace Vocaluxe.Base _Settings.Encoding = Encoding.UTF8; _Settings.ConformanceLevel = ConformanceLevel.Document; +#if PORTABLE SongFolder.Add(Path.Combine(Directory.GetCurrentDirectory(), CSettings.FolderSongs)); +#else + SongFolder.Add(Path.Combine(CSettings.DataPath, CSettings.FolderSongs)); + SongFolder.Add(Path.Combine(Directory.GetCurrentDirectory(), CSettings.FolderSongs)); +#endif + + foreach (string folder in SongFolder) + CSettings.CreateFolder(folder); MicConfig = new SMicConfig[CSettings.MaxNumPlayer]; // Init config file - if (!File.Exists(CSettings.FileConfig)) + if (!File.Exists(Path.Combine(CSettings.DataPath,CSettings.FileConfig))) SaveConfig(); _LoadConfig(); @@ -159,7 +167,7 @@ namespace Vocaluxe.Base private static void _LoadConfig() { - CXMLReader xmlReader = CXMLReader.OpenFile(CSettings.FileConfig); + CXMLReader xmlReader = CXMLReader.OpenFile(Path.Combine(CSettings.DataPath, CSettings.FileConfig)); if (xmlReader == null) return; @@ -297,7 +305,7 @@ namespace Vocaluxe.Base XmlWriter writer = null; try { - writer = XmlWriter.Create(CSettings.FileConfig, _Settings); + writer = XmlWriter.Create(Path.Combine(CSettings.DataPath, CSettings.FileConfig)); writer.WriteStartDocument(); writer.WriteStartElement("root"); diff --git a/Vocaluxe/Base/CLog.cs b/Vocaluxe/Base/CLog.cs index df186697..ccb28228 100644 --- a/Vocaluxe/Base/CLog.cs +++ b/Vocaluxe/Base/CLog.cs @@ -39,7 +39,7 @@ namespace Vocaluxe.Base private void _Open() { - _LogFile = new StreamWriter(Path.Combine(Environment.CurrentDirectory, _LogFileName), false, Encoding.UTF8); + _LogFile = new StreamWriter(Path.Combine(CSettings.DataPath, _LogFileName), false, Encoding.UTF8); _LogFile.WriteLine(_LogName + " " + CSettings.GetFullVersionText() + " " + DateTime.Now); _LogFile.WriteLine("----------------------------------------"); diff --git a/Vocaluxe/Base/CPlaylists.cs b/Vocaluxe/Base/CPlaylists.cs index 1dc0493b..8320d21d 100644 --- a/Vocaluxe/Base/CPlaylists.cs +++ b/Vocaluxe/Base/CPlaylists.cs @@ -60,7 +60,7 @@ namespace Vocaluxe.Base public static void ConvertUSDXPlaylists() { List files = new List(); - files.AddRange(CHelper.ListFiles(CSettings.FolderPlaylists, "*.upl", true, true)); + files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath,CSettings.FolderPlaylists), "*.upl", true, true)); foreach (string file in files) { @@ -74,7 +74,7 @@ namespace Vocaluxe.Base { _Playlists = new List(); List files = new List(); - files.AddRange(CHelper.ListFiles(CSettings.FolderPlaylists, "*.xml", true, true)); + files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath, CSettings.FolderPlaylists), "*.xml", true, true)); foreach (string file in files) { diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 71cfd196..04c9e812 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -68,6 +68,12 @@ namespace Vocaluxe.Base public static bool IsFullScreen; public const int VertexBufferElements = 10000; +#if PORTABLE + public static string DataPath = Environment.CurrentDirectory; +#else + public static string DataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),"Vocaluxe"); +#endif + public const string Icon = "Vocaluxe.ico"; public const string Logo = "Logo.png"; public const string FallbackLanguage = "English"; @@ -209,7 +215,7 @@ namespace Vocaluxe.Base public static void CreateFolders() { - List folders = new List {FolderCover, FolderFonts, FolderProfiles, FolderSongs, FolderScreenshots, FolderBackgroundMusic, FolderSounds, FolderPlaylists}; + List folders = new List {FolderCover, FolderFonts, FolderProfiles, Path.Combine(DataPath,FolderScreenshots), FolderBackgroundMusic, FolderSounds, Path.Combine(DataPath,FolderPlaylists)}; foreach (string folder in folders) { diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index 0e104ee1..df780715 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -713,7 +713,7 @@ namespace Vocaluxe.Lib.Draw public void MakeScreenShot() { const string file = "Screenshot_"; - string path = Path.Combine(Environment.CurrentDirectory, CSettings.FolderScreenshots); + string path = Path.Combine(CSettings.DataPath, CSettings.FolderScreenshots); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp"))) diff --git a/Vocaluxe/Lib/Draw/CDrawWinForm.cs b/Vocaluxe/Lib/Draw/CDrawWinForm.cs index 0c0c9ac1..0b35637e 100644 --- a/Vocaluxe/Lib/Draw/CDrawWinForm.cs +++ b/Vocaluxe/Lib/Draw/CDrawWinForm.cs @@ -313,7 +313,7 @@ namespace Vocaluxe.Lib.Draw public void MakeScreenShot() { const string file = "Screenshot_"; - string path = Path.Combine(Environment.CurrentDirectory, CSettings.FolderScreenshots); + string path = Path.Combine(CSettings.DataPath, CSettings.FolderScreenshots); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".png"))) diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index e2cc99d8..441d1d67 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -543,7 +543,7 @@ namespace Vocaluxe.Lib.Draw public void MakeScreenShot() { const string file = "Screenshot_"; - string path = Path.Combine(Environment.CurrentDirectory, CSettings.FolderScreenshots); + string path = Path.Combine(CSettings.DataPath, CSettings.FolderScreenshots); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp"))) diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 2360607d..e74c7885 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -120,7 +120,29 @@ LINUX;ARCH_X64 Off - + + x86 + none + true + ..\Output\ + prompt + 4 + false + WIN;ARCH_X86;PORTABLE + Off + + + x64 + none + true + ..\Output\ + prompt + 4 + false + WIN;ARCH_X64;PORTABLE + Off + + False ..\Output\x86\SlimDX.dll @@ -131,7 +153,7 @@ False - + ..\Output\x64\SlimDX.dll False @@ -314,4 +336,4 @@ --> - \ No newline at end of file + diff --git a/VocaluxeLib/VocaluxeLib.csproj b/VocaluxeLib/VocaluxeLib.csproj index 25869d1a..8ddaa65f 100644 --- a/VocaluxeLib/VocaluxeLib.csproj +++ b/VocaluxeLib/VocaluxeLib.csproj @@ -103,6 +103,26 @@ LINUX Off + + bin\x86\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset + + + bin\x64\PortableWin\ + WIN + true + AnyCPU + false + Off + prompt + ManagedMinimumRules.ruleset +