Skip to content
This repository has been archived by the owner on Mar 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request ParkitectNexus#62 from ParkitectNexus/develop
Browse files Browse the repository at this point in the history
2.1.5980.38291
  • Loading branch information
ikkentim committed May 16, 2016
2 parents e3b2b41 + 7ea13ad commit 1be0b55
Show file tree
Hide file tree
Showing 51 changed files with 386 additions and 499 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "external/xwt"]
path = external/xwt
url = https://github.com/mono/xwt.git
url = https://github.com/ikkentim/xwt.git
4 changes: 2 additions & 2 deletions AppImage/Packager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ mkdir -p ./$APP/$APP.AppDir/usr/bin
mkdir -p ./$APP/$APP.AppDir/usr/opt

#build Nexus Client and copy release into bin
xbuild /p:Configuration=Release ./../src/ParkitectNexus.Client.Linux.Xwt/ParkitectNexus.Client.Linux.Xwt.csproj
cp -R ./../src/ParkitectNexus.Client.Linux.Xwt/bin/Release/* ./$APP/$APP.AppDir/usr/bin
xbuild /p:Configuration=Release ./../src/ParkitectNexus.Client.Linux/ParkitectNexus.Client.Linux.csproj
cp -R ./../bin/Release/* ./$APP/$APP.AppDir/usr/bin

# Figure out $VERSION
VERSION=$(git describe origin/master --tags $(git rev-list --tags --max-count=0))
Expand Down
2 changes: 1 addition & 1 deletion AppImage/parkitectnexus
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export MONO_CONFIG=././etc/mono/config
export MONO_CFG_DIR=././etc

././bin/mozroots --import --sync
././bin/mono "././bin/ParkitectNexus.Client.Linux.Xwt.exe" "$@"
././bin/mono "././bin/ParkitectNexus.Client.Linux.exe" "$@"



2 changes: 1 addition & 1 deletion external/xwt
Submodule xwt updated from 157ffe to feeb4e
4 changes: 0 additions & 4 deletions images/.directory

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/ParkitectNexus.Client.Base/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public bool Initialize(ToolkitType type)

_migrator.Migrate();
ModLoaderUtil.InstallModLoader(_parkitect, _log);

_taskManager.Add<CheckForUpdatesTask>();
return true;
}

Expand Down
19 changes: 17 additions & 2 deletions src/ParkitectNexus.Client.Base/Pages/AssetsPageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,43 @@
using ParkitectNexus.Data.Game;
using ParkitectNexus.Data.Presenter;
using ParkitectNexus.Data.Utilities;
using ParkitectNexus.Data.Web;
using Xwt;
using Xwt.Drawing;
using Image = System.Drawing.Image;
using System.Linq;

namespace ParkitectNexus.Client.Base.Pages
{
public class AssetsPageView : LoadableDataTileView
{
private string[] _requiredAssets;
private readonly IParkitect _parkitect;
private readonly IWebsite _website;
private readonly ILogger _log;
private readonly AssetType _type;

public AssetsPageView(IParkitect parkitect, ILogger log, AssetType type, IPresenter parent, string displayName)
public AssetsPageView(IParkitect parkitect, IWebsite website, ILogger log, AssetType type, IPresenter parent, string displayName)
: base(log, displayName)
{
if (!(parent is MainView))
throw new ArgumentException("parent must be MainView", nameof(parent));

_parkitect = parkitect;
_website = website;
_log = log;
_type = type;
MainView = (MainView) parent;

parkitect.Assets.AssetAdded += Assets_AssetAdded;
parkitect.Assets.AssetRemoved += Assets_AssetRemoved;

GetRequiredMods();
}

private async void GetRequiredMods()
{
_requiredAssets = await _website.API.GetRequiredModIdentifiers();
}

public MainView MainView { get; }
Expand Down Expand Up @@ -92,7 +104,10 @@ protected virtual void PopulateViewBoxWithImage(VBox vBox, IAsset asset)

protected virtual void PopulateViewBoxWithButtons(VBox vBox, IAsset asset)
{
var deleteButton = new Button("Delete");
var canDelete = _requiredAssets == null || !_requiredAssets.Contains(asset.Id);

var deleteButton = new Button("Delete") { Sensitive = canDelete };

deleteButton.Clicked += (sender, args) =>
{
if (
Expand Down
7 changes: 4 additions & 3 deletions src/ParkitectNexus.Client.Base/Pages/BlueprintsPageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
using ParkitectNexus.Data.Game;
using ParkitectNexus.Data.Presenter;
using ParkitectNexus.Data.Utilities;
using ParkitectNexus.Data.Web;

namespace ParkitectNexus.Client.Base.Pages
{
public class BlueprintsPageView : AssetsPageView
{
public BlueprintsPageView(IParkitect parkitect, ILogger log, IPresenter parent)
: base(parkitect, log, AssetType.Blueprint, parent, "Blueprints")
public BlueprintsPageView(IParkitect parkitect, IWebsite website, ILogger log, IPresenter parent)
: base(parkitect, website, log, AssetType.Blueprint, parent, "Blueprints")
{
}
}
}
}
7 changes: 5 additions & 2 deletions src/ParkitectNexus.Client.Base/Pages/ModsPageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Diagnostics;
using System.Linq;
using ParkitectNexus.Data.Assets;
using ParkitectNexus.Data.Assets.Modding;
using ParkitectNexus.Data.Game;
Expand All @@ -26,12 +27,14 @@ namespace ParkitectNexus.Client.Base.Pages
{
public class ModsPageView : AssetsPageView
{
private readonly IParkitect _parkitect;
private readonly IQueueableTaskManager _queueableTaskManager;
private readonly IWebsite _website;

public ModsPageView(IParkitect parkitect, ILogger log, IPresenter parent, IQueueableTaskManager queueableTaskManager,
IWebsite website) : base(parkitect, log, AssetType.Mod, parent, "Mods")
IWebsite website) : base(parkitect, website, log, AssetType.Mod, parent, "Mods")
{
_parkitect = parkitect;
_queueableTaskManager = queueableTaskManager;
_website = website;
}
Expand Down Expand Up @@ -114,4 +117,4 @@ protected override void PopulateViewBoxWithButtons(VBox vBox, IAsset asset)

#endregion
}
}
}
5 changes: 3 additions & 2 deletions src/ParkitectNexus.Client.Base/Pages/SavegamesPageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
using ParkitectNexus.Data.Game;
using ParkitectNexus.Data.Presenter;
using ParkitectNexus.Data.Utilities;
using ParkitectNexus.Data.Web;

namespace ParkitectNexus.Client.Base.Pages
{
public class SavegamesPageView : AssetsPageView
{
public SavegamesPageView(IParkitect parkitect, ILogger log, IPresenter parent)
: base(parkitect, log, AssetType.Savegame, parent, "Savegames")
public SavegamesPageView(IParkitect parkitect, IWebsite website, ILogger log, IPresenter parent)
: base(parkitect, website, log, AssetType.Savegame, parent, "Savegames")
{
}
}
Expand Down
19 changes: 10 additions & 9 deletions src/ParkitectNexus.Client.Base/Pages/TasksPageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using ParkitectNexus.Client.Base.Components;
using ParkitectNexus.Client.Base.Main;
using ParkitectNexus.Data;
Expand All @@ -31,26 +30,28 @@ namespace ParkitectNexus.Client.Base.Pages
{
public class TasksPageView : ScrollView, IPresenter, IPageView
{
private Type[] _tasksOfInterest =
{
typeof(CompileModTask),
typeof(InstallAssetTask)
};
private readonly MainView _mainView;

private readonly Label _nothingLabel;
private readonly IQueueableTaskManager _taskManager;
private readonly VBox _vBox;
private string _displayName = "Tasks";
private readonly MainView _mainView;

private readonly Type[] _tasksOfInterest =
{
typeof (CompileModTask),
typeof (InstallAssetTask),
typeof (UpdateModTask),
};

private List<TaskView> _taskViews = new List<TaskView>();

public TasksPageView(IQueueableTaskManager taskManager, IPresenter parent)
{

if (!(parent is MainView))
throw new ArgumentException("parent must be MainView", nameof(parent));

_mainView = (MainView)parent;
_mainView = (MainView) parent;

_taskManager = taskManager;

Expand Down
2 changes: 1 addition & 1 deletion src/ParkitectNexus.Client.Base/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.0.*")]
[assembly: AssemblyVersion("2.1.*")]
5 changes: 4 additions & 1 deletion src/ParkitectNexus.Client.Darwin/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ static void Main(string[] args)
if(!app.Initialize(ToolkitType.Cocoa))
return;

TmpFixModLoaderUtil.InstallModLoader(ObjectFactory.GetInstance<IParkitect>(), ObjectFactory.GetInstance<ILogger>());
MacEngine.App.OpenUrl += (sender, e) =>
{
ObjectFactory.GetInstance<ILogger>().WriteLine($"Got url {e.Url}");

if(e.Url.StartsWith("parkitectnexus://"))
e.Url = e.Url;
else
Expand All @@ -91,6 +92,8 @@ static void Main(string[] args)
app.HandleUrl(url);
};

TmpFixModLoaderUtil.InstallModLoader(ObjectFactory.GetInstance<IParkitect>(), ObjectFactory.GetInstance<ILogger>());

app.Run();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>ParkitectNexus Client</AssemblyName>
<SuppressXamMacMigration>True</SuppressXamMacMigration>
<ReleaseVersion>2.0.0</ReleaseVersion>
<ReleaseVersion>2.1.5980.38291</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
8 changes: 4 additions & 4 deletions src/ParkitectNexus.Client.Darwin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("ParkitectNexus.Client.Base")]
[assembly: AssemblyTitle("ParkitectNexus Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ParkitectNexus.Client.Base")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyProduct("ParkitectNexus Client")]
[assembly: AssemblyCopyright("Copyright © ParkitectNexus 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -38,4 +38,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.0.5969.32190")]
[assembly: AssemblyVersion("2.1.5980.38291")]
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="..\ParkitectNexus.Client.Windows\Resources\parkitectnexus_logo.png">
<Link>parkitectnexus_logo.png</Link>
</ItemGroup>
<ItemGroup>
<Content Include="parkitectnexus_logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</Content>
</ItemGroup>
</Project>
Loading

0 comments on commit 1be0b55

Please sign in to comment.