diff --git a/Output/x86/libacinerella.so b/Output/x86/libacinerella.so new file mode 100644 index 00000000..aec74615 Binary files /dev/null and b/Output/x86/libacinerella.so differ diff --git a/Vocaluxe.sln b/Vocaluxe.sln index 1c823cd7..7c14c341 100644 --- a/Vocaluxe.sln +++ b/Vocaluxe.sln @@ -5,20 +5,33 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocalu EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 + DebugWin|x64 = DebugWin|x64 + DebugWin|x86 = DebugWin|x86 + ReleaseWin|x64 = ReleaseWin|x64 + ReleaseWin|x86 = ReleaseWin|x86 + DebugLinux|x64 = DebugLinux|x64 + DebugLinux|x86 = DebugLinux|x86 + ReleaseLinux|x64 = ReleaseLinux|x64 + ReleaseLinux|x86 = ReleaseLinux|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x64.ActiveCfg = Debug|x64 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x64.Build.0 = Debug|x64 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x86.ActiveCfg = Debug|x86 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Debug|x86.Build.0 = Debug|x86 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x64.ActiveCfg = Release|x64 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x64.Build.0 = Release|x64 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x86.ActiveCfg = Release|x86 - {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.Release|x86.Build.0 = Release|x86 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.ActiveCfg = DebugWin|x64 + {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}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x64.Build.0 = ReleaseWin|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.Build.0 = ReleaseWin|x86 + + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x64.ActiveCfg = DebugLinux|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x64.Build.0 = DebugLinux|x64 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x86.ActiveCfg = DebugLinux|x86 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x86.Build.0 = DebugLinux|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 + {2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x86.Build.0 = ReleaseLinux|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index cfe4d154..4589654e 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -17,9 +17,11 @@ namespace Vocaluxe.Base #region Enums public enum ERenderer { - TR_CONFIG_SOFTWARE, +#if WIN + TR_CONFIG_DIRECT3D, +#endif TR_CONFIG_OPENGL, - TR_CONFIG_DIRECT3D + TR_CONFIG_SOFTWARE } public enum EAntiAliasingModes @@ -87,8 +89,10 @@ namespace Vocaluxe.Base public enum ERecordLib { - PortAudio, - DirectSound +#if WIN + DirectSound, +#endif + PortAudio } public enum EVideoDecoder @@ -186,7 +190,12 @@ namespace Vocaluxe.Base public static EDebugLevel DebugLevel = EDebugLevel.TR_CONFIG_OFF; // Graphics +#if WIN public static ERenderer Renderer = ERenderer.TR_CONFIG_DIRECT3D; +#else + public static ERenderer Renderer = ERenderer.TR_CONFIG_OPENGL; +#endif + public static ETextureQuality TextureQuality = ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM; public static float MaxFPS = 60f; diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index 53ef0cc8..f5964f86 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -7,7 +7,16 @@ using System.Runtime.InteropServices; using System.IO; using System.Text; +#if WIN using System.Data.SQLite; +#else +using Mono.Data.Sqlite; +using SQLiteConnection = SqliteConnection; +using SQLiteTransaction = SqliteTransaction; +using SQLiteCommand = SqliteCommand; +using SQLiteDataReader = SqliteDataReader; +#endif + using Community.CsharpSqlite; using Vocaluxe.Lib.Draw; @@ -57,9 +66,11 @@ namespace Vocaluxe.Base player.Difficulty = (EGameDifficulty)Diff; SQLiteConnection connection = new SQLiteConnection(); - connection.ConnectionString = "Data Source=" + FilePath; SQLiteCommand command; + connection.ConnectionString = "Data Source=" + FilePath; + + try { connection.Open(); diff --git a/Vocaluxe/Base/CDraw.cs b/Vocaluxe/Base/CDraw.cs index 180ee03b..d1743b0a 100644 --- a/Vocaluxe/Base/CDraw.cs +++ b/Vocaluxe/Base/CDraw.cs @@ -38,6 +38,7 @@ namespace Vocaluxe.Base } break; +#if WIN case ERenderer.TR_CONFIG_DIRECT3D: try { @@ -55,6 +56,7 @@ namespace Vocaluxe.Base Environment.Exit(Environment.ExitCode); } break; +#endif default: _Draw = new CDrawWinForm(); diff --git a/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs b/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs index c3bdfe90..f4798c8c 100644 --- a/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs +++ b/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs @@ -278,13 +278,25 @@ namespace PortAudioSharp { #region **** PORTAUDIO FUNCTIONS **** #if ARCH_X86 +#if WIN private const string PaDll = "x86\\PortAudio.dll"; #endif +#if LINUX + private const string PaDll = "libportaudio.so.2.0.0"; +#endif +#endif + #if ARCH_X64 +#if WIN private const string PaDll = "x64\\PortAudio.dll"; #endif +#if LINUX + private const string PaDll = "libportaudio.so.2.0.0"; +#endif +#endif + [DllImport (PaDll)] public static extern int Pa_GetVersion(); diff --git a/Vocaluxe/Lib/Video/Acinerella/CAcinerella.cs b/Vocaluxe/Lib/Video/Acinerella/CAcinerella.cs index 3275b3a2..199319e4 100644 --- a/Vocaluxe/Lib/Video/Acinerella/CAcinerella.cs +++ b/Vocaluxe/Lib/Video/Acinerella/CAcinerella.cs @@ -159,13 +159,25 @@ namespace Vocaluxe.Lib.Video.Acinerella public static class CAcinerella { #if ARCH_X86 +#if WIN private const string AcDll = "x86\\acinerella.dll"; #endif +#if LINUX + private const string AcDll = "x86/libacinerella.so"; +#endif +#endif + #if ARCH_X64 +#if WIN private const string AcDll = "x64\\acinerella.dll"; #endif +#if LINUX + private const string AcDll = "x64/acinerella.dll"; +#endif +#endif + private static Object _lock = new Object(); // Defines the type of an Acinerella media stream. Currently only video and diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index abe3c18b..1456a80c 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -1,7 +1,7 @@  - Debug + DebugWin x86 8.0.30703 2.0 @@ -27,61 +27,122 @@ 1.0.0.%2a false true - - - x86 - true - full - false - ..\Output\ - TRACE;DEBUG;ARCH_X86 - prompt - 4 - x86 - Off - - - x86 - none - true - ..\Output\ - x86 - prompt - 4 - false - ARCH_X86 - Off - - Vocaluxe.MainProgram - - Vocaluxe.ico - + + x86 + true + full + false + ..\Output\ + TRACE;DEBUG;WIN;ARCH_X86 + prompt + 4 + Off + + + x86 + none + true + ..\Output\ + prompt + 4 + false + WIN;ARCH_X86 + Off + + x64 true full false ..\Output\ - TRACE;DEBUG;ARCH_X64 + TRACE;DEBUG;WIN;ARCH_X64 prompt 4 - x64 Off - + x64 none true ..\Output\ - x64 prompt 4 false - ARCH_X64 + WIN;ARCH_X64 Off + + x86 + true + full + false + ..\Output\ + TRACE;DEBUG;LINUX;ARCH_X86 + prompt + 4 + Off + + + x86 + none + true + ..\Output\ + prompt + 4 + false + LINUX;ARCH_X86 + Off + + + x64 + true + full + false + ..\Output\ + TRACE;DEBUG;LINUX;ARCH_X64 + prompt + 4 + Off + + + x64 + none + true + ..\Output\ + prompt + 4 + false + LINUX;ARCH_X64 + Off + + + + False + ..\Output\x86\SlimDX.dll + False + + + ..\Output\x86\System.Data.SQLite.dll + False + + + + + False + ..\Output\x64\SlimDX.dll + False + + + ..\Output\x64\System.Data.SQLite.dll + False + + + + + False @@ -99,17 +160,8 @@ False ..\Output\OpenTK.GLControl.dll - - False - ..\Output\$(LibPath)\SlimDX.dll - False - - - ..\Output\$(LibPath)\System.Data.SQLite.dll - False -