Skip to content

Commit

Permalink
add steam compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryddag committed Jan 8, 2018
1 parent 283d14b commit d1b070e
Show file tree
Hide file tree
Showing 18 changed files with 2,577 additions and 114 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## [v2.0.1.4](https://github.com/ProjectCeleste/Celeste_Launcher/tree/v2.0.1.4) (2018-01-08)

[Full Changelog](https://github.com/ProjectCeleste/Celeste_Launcher/compare/v2.0.1.3...v2.0.1.4)

**New Features:**

- Steam Helper: Allow to easily make "Celeste Fan Project" compatible with "Steam" (can be found in "Tools/Helpers" menu).

Note: Now steam_api.dll will be auto removed if your game installation is not "Steam" compatible.

## [v2.0.1.3](https://github.com/ProjectCeleste/Celeste_Launcher/tree/v2.0.1.3) (2017-12-23)

[Full Changelog](https://github.com/ProjectCeleste/Celeste_Launcher/compare/v2.0.1.2...v2.0.1.3)
Expand Down
33 changes: 18 additions & 15 deletions Celeste_Launcher_Gui/Celeste_Launcher_Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\Unofficial.Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
<HintPath>$(SolutionDir)\packages\Unofficial.Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Markdig, Version=0.14.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Markdig.0.14.3\lib\net40\Markdig.dll</HintPath>
<Reference Include="Markdig, Version=0.14.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Markdig.0.14.8\lib\net40\Markdig.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Dism, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Microsoft.Dism.1.6.372\lib\net40\Microsoft.Dism.dll</HintPath>
</Reference>
Expand All @@ -72,12 +73,15 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsFirewallHelper, Version=1.0.6403.13182, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\WindowsFirewallHelper.1.0.6403.13182\lib\net20\WindowsFirewallHelper.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="Forms\SteamForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SteamForm.Designer.cs">
<DependentUpon>SteamForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\WindowsFeaturesForm.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -148,6 +152,7 @@
<Compile Include="Helpers\Dism.cs" />
<Compile Include="Helpers\OpenNat.cs" />
<Compile Include="Helpers\RichTextBoxExtensions.cs" />
<Compile Include="Helpers\Steam.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Forms\RegisterForm.cs">
Expand All @@ -165,6 +170,9 @@
<EmbeddedResource Include="Forms\ChangePwdForm.resx">
<DependentUpon>ChangePwdForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SteamForm.resx">
<DependentUpon>SteamForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\WindowsFeaturesForm.resx">
<DependentUpon>WindowsFeaturesForm.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -211,7 +219,9 @@
<EmbeddedResource Include="Forms\UpdaterForm.resx">
<DependentUpon>UpdaterForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
Expand Down Expand Up @@ -273,7 +283,7 @@
<None Include="Resources\BackgroundTexture.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Libs\Celeste_AOEO_Controls\Celeste_AOEO_Controls.csproj">
<ProjectReference Include="$(SolutionDir)\Libs\Celeste_AOEO_Controls\Celeste_AOEO_Controls.csproj">
<Project>{d84366a3-0232-4680-b838-9ec2f23cd52b}</Project>
<Name>Celeste_AOEO_Controls</Name>
</ProjectReference>
Expand All @@ -283,11 +293,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\packages\WindowsFirewallHelper.1.0.6403.13182\build\WindowsFirewallHelper.targets" Condition="Exists('$(SolutionDir)\packages\WindowsFirewallHelper.1.0.6403.13182\build\WindowsFirewallHelper.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\packages\WindowsFirewallHelper.1.0.6403.13182\build\WindowsFirewallHelper.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\WindowsFirewallHelper.1.0.6403.13182\build\WindowsFirewallHelper.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions Celeste_Launcher_Gui/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class UserConfig
[XmlElement(ElementName = "BetaUpdate")]
public bool BetaUpdate { get; set; }

[XmlElement(ElementName = "IsSteam")]
public bool IsSteam { get; set; }
[XmlIgnore]
public bool IsSteamVersion { get; set; } = false;

[XmlElement(ElementName = "LoginInfo")]
public LoginInfo LoginInfo { get; set; } = new LoginInfo();
Expand Down
2 changes: 1 addition & 1 deletion Celeste_Launcher_Gui/Forms/GameScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void BtnRunScan_Click(object sender, EventArgs e)
Program.UserConfig.BetaUpdate = checkBox1.Checked;
Program.UserConfig.Save(Program.UserConfigFilePath);

using (var form = new GameScanProgressForm(Program.UserConfig.GameFilesPath, Program.UserConfig.BetaUpdate))
using (var form = new GameScanProgressForm(Program.UserConfig.GameFilesPath, Program.UserConfig.IsSteamVersion, Program.UserConfig.BetaUpdate))
{
var dr = form.ShowDialog();

Expand Down
4 changes: 2 additions & 2 deletions Celeste_Launcher_Gui/Forms/GameScanProgressForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Celeste_Launcher_Gui.Forms
{
public partial class GameScanProgressForm : Form
{
public GameScanProgressForm(string gameFilesPath, bool isBetaUpdate)
public GameScanProgressForm(string gameFilesPath,bool isSteam, bool isBetaUpdate)
{
InitializeComponent();

Expand All @@ -28,7 +28,7 @@ public GameScanProgressForm(string gameFilesPath, bool isBetaUpdate)
if (!Directory.Exists(gameFilesPath))
Directory.CreateDirectory(gameFilesPath);

GameScannner = new GameScannnerApi(isBetaUpdate, gameFilesPath);
GameScannner = new GameScannnerApi(gameFilesPath, isSteam, isBetaUpdate);
lbl_ProgressTitle.Text = string.Empty;
lbl_ProgressDetail.Text = string.Empty;
lbl_GlobalProgress.Text = $@"0/{GameScannner.FilesInfo.Count()}";
Expand Down
45 changes: 28 additions & 17 deletions Celeste_Launcher_Gui/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion Celeste_Launcher_Gui/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Celeste_AOEO_Controls.MsgBox;
using Celeste_Launcher_Gui.Helpers;
using Celeste_Public_Api.GameScanner_Api;
using Celeste_Public_Api.Helpers;
using Open.Nat;

#endregion
Expand Down Expand Up @@ -73,6 +74,16 @@ private async void Btn_Play_Click(object sender, EventArgs e)
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

//isSteam
if (!Program.UserConfig.IsSteamVersion)
{
var steamApiDll = $"{Program.UserConfig.GameFilesPath}\\steam_api.dll";
if (File.Exists(steamApiDll))
{
File.Delete(steamApiDll);
}
}

//MpSettings
try
{
Expand Down Expand Up @@ -413,7 +424,7 @@ private async void MainForm_Load(object sender, EventArgs e)
//CleanUpFiles
try
{
UpdaterForm.CleanUpFiles(Directory.GetCurrentDirectory(), "*.old");
Misc.CleanUpFiles(Directory.GetCurrentDirectory(), "*.old");
}
catch (Exception ex)
{
Expand Down Expand Up @@ -542,5 +553,13 @@ private void WindowsFeaturesToolStripMenuItem_Click(object sender, EventArgs e)
form.ShowDialog();
}
}

private void SteamToolStripMenuItem_Click(object sender, EventArgs e)
{
using (var form = new SteamForm())
{
form.ShowDialog();
}
}
}
}
4 changes: 2 additions & 2 deletions Celeste_Launcher_Gui/Forms/QuickGameScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public QuickGameScan()
: GameScannnerApi.GetGameFilesRootPath();

GameScannner = Program.UserConfig != null
? new GameScannnerApi(Program.UserConfig.BetaUpdate, GameFilePath)
: new GameScannnerApi(false, GameFilePath);
? new GameScannnerApi(GameFilePath, Program.UserConfig.IsSteamVersion, Program.UserConfig.BetaUpdate)
: new GameScannnerApi(GameFilePath, false, false);

pB_Progress.Value = 0;
lbl_GlobalProgress.Text = $@"0/{GameScannner.FilesInfo.Count()}";
Expand Down
Loading

0 comments on commit d1b070e

Please sign in to comment.