Skip to content

Commit

Permalink
Merge pull request #123 from MacTee/dev
Browse files Browse the repository at this point in the history
Dev merge - Version 2.3.0.1
  • Loading branch information
MacTee committed Jun 7, 2015
2 parents d473801 + 07e980d commit 07dd9d4
Show file tree
Hide file tree
Showing 60 changed files with 1,582 additions and 2,630 deletions.
15 changes: 8 additions & 7 deletions KSPModAdmin.Core/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using KSPModAdmin.Core.Utils;

namespace KSPModAdmin.Core
{
Expand Down Expand Up @@ -37,7 +38,7 @@ public class Constants

// KSP MA folders
public const string PLUGIN_FOLDER = "Plugins";
public const string LANGUAGE_FOLDER = "lang"; // "Languages";
public const string LANGUAGE_FOLDER = "Languages";

// KSP folders
public const string KSP_ROOT = "KSP_Root";
Expand Down Expand Up @@ -71,11 +72,11 @@ public static string KSP_EXE
{
get
{
switch (Environment.OSVersion.Platform)
switch (PlatformHelper.GetPlatform())
{
case PlatformID.Unix:
case Platform.Linux:
return KSP_EXE_LINUX;
case PlatformID.MacOSX:
case Platform.OsX:
return KSP_EXE_MAC;
default:
return KSP_EXE_WIN;
Expand All @@ -86,11 +87,11 @@ public static string KSP_X64_EXE
{
get
{
switch (Environment.OSVersion.Platform)
switch (PlatformHelper.GetPlatform())
{
case PlatformID.Unix:
case Platform.Linux:
return KSP_X64_EXE_LINUX;
case PlatformID.MacOSX:
case Platform.OsX:
return KSP_X64_EXE_MAC;
default:
return KSP_X64_EXE_WIN;
Expand Down
6 changes: 5 additions & 1 deletion KSPModAdmin.Core/Controller/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ protected static void LoadLanguages()
try
{
Localizer.GlobalInstance.DefaultLanguage = "eng";
langLoadFailed = !Localizer.GlobalInstance.LoadLanguages(KSPPathHelper.GetPath(KSPPaths.LanguageFolder), true);
langLoadFailed = !Localizer.GlobalInstance.LoadLanguages(new []
{
KSPPathHelper.GetPath(KSPPaths.LanguageFolder),
Path.Combine(KSPPathHelper.GetPath(KSPPaths.KSPMA_Plugins), Constants.LANGUAGE_FOLDER)
}, true);
}
catch (Exception ex)
{
Expand Down
6 changes: 3 additions & 3 deletions KSPModAdmin.Core/Controller/OptionsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ private static void DownloadNewAdminVersion()
{
string filename = View.llblAdminDownload.Text;
string url = string.Empty;
if (Environment.OSVersion.Platform == PlatformID.MacOSX || Environment.OSVersion.Platform == PlatformID.Unix)
if (PlatformHelper.GetPlatform() == Platform.OsX || PlatformHelper.GetPlatform() == Platform.Linux)
url = Constants.SERVICE_DOWNLOAD_LINK_MONO;
else
url = Constants.SERVICE_DOWNLOAD_LINK_WIN;
Expand Down Expand Up @@ -1122,9 +1122,9 @@ public static void SteamSearch4KSPPath()
AsyncTask<string[]>.DoWork(() =>
{
string steamPath = string.Empty;
if (Environment.OSVersion.Platform == PlatformID.MacOSX)
if (PlatformHelper.GetPlatform() == Platform.OsX)
steamPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), STEAM_PATH_MAC);
else if (Environment.OSVersion.Platform == PlatformID.Unix)
else if (PlatformHelper.GetPlatform() == Platform.Linux)
steamPath = Path.Combine(Environment.GetEnvironmentVariable(Constants.HOME), STEAM_PATH_LINUX);
else
{
Expand Down
39 changes: 0 additions & 39 deletions KSPModAdmin.Core/KSPModAdmin.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\sharpcompress.0.10.3\lib\net40\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="StyleCop">
<HintPath>..\packages\StyleCop.4.7.49.0\lib\net35\StyleCop.dll</HintPath>
</Reference>
<Reference Include="StyleCop.CSharp">
<HintPath>..\packages\StyleCop.4.7.49.0\lib\net35\StyleCop.CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
Expand Down Expand Up @@ -428,38 +422,6 @@
<Compile Include="Utils\ActionKeyManager\Keyboard.cs" />
<Compile Include="Utils\ActionKeyManager\VirtualKey.cs" />
<Compile Include="Utils\Misc\AsyncTask.cs" />
<Compile Include="Utils\Controls\CheckBoxComboBox\CheckBoxComboBox.cs">
<SubType>Component</SubType>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\CheckBoxComboBox.Designer.cs">
<DependentUpon>CheckBoxComboBox.cs</DependentUpon>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\GripBounds.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\Popup.cs">
<SubType>Component</SubType>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\Popup.Designer.cs">
<DependentUpon>Popup.cs</DependentUpon>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\PopupComboBox.cs">
<SubType>Component</SubType>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\PopupComboBox.Designer.cs">
<DependentUpon>PopupComboBox.cs</DependentUpon>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\Selection Wrappers\ListSelectionWrapper.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\CheckBoxComboBox\Selection Wrappers\ObjectSelectionWrapper.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Utils\Controls\TextBoxNumeric.cs">
<SubType>Component</SubType>
</Compile>
Expand Down Expand Up @@ -643,7 +605,6 @@
<None Include="Resources\help_earth.png" />
<None Include="Resources\compress_replace_folder_16x16.png" />
<None Include="Resources\compress_replace_folder_24x24.png" />
<Content Include="Utils\Controls\CheckBoxComboBox\_license\license.txt" />
<Content Include="Utils\Controls\FolderSelectionDialog\_license\license.txt" />
<Content Include="Utils\Controls\TreeViewAdv\_license\license.txt" />
<Content Include="Utils\Controls\TreeViewAdv\_license\ReleaseNotes.txt" />
Expand Down
Loading

0 comments on commit 07dd9d4

Please sign in to comment.