Adam's Lair Forum

game development and casual madness
It is currently 2018/10/17, 19:08

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2016/07/28, 19:33 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
So, I just updated my plugin package and decided to install it, just to check if things are normal and if it works.

For my surprise, two things happened:
  • LibGit2Sharp.NativeBinaries was not installed (LibGit2Sharp depends on it)
  • My plugin files and dependencies were installed on the root folder of the project (where DualityEditor.exe is located), and they were not initialized

For the first thing, I think Duality won't resolve dependencies that depend on other libraries. And I'm not sure what's going on at the second issue, I don't see anything unusual in my nuspec file.

EDIT: I just pushed the 1.1.1 version trying to fix the dependency issue for LibGit2Sharp.NativeBinaries but it didn't work.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2016/07/28, 20:50 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2063
Location: Germany
Role: Professional
Your package seems to be missing the Plugin tag, which it requires to be recognized as a plugin. Regarding the dependencies, I'm not sure why that would be missing. Is there anything in the logs when you install your package? If the dependency wasn't resolved, there should be either an error log, or an error message box.

Also, when you install the plugin, but before applying it, is there an ApplyUpdate.xml file? What's the content?

(By the way, you can test your packages locally before releasing them by putting them into a local folder and adding that folder as another repository in your PackageConfig.xml!)

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2016/07/28, 21:04 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2063
Location: Germany
Role: Professional
Looked into it quickly. Turns out, the NativeBinaries package does not seem to actually contain any lib files, but instead some msbuild config that configures Visual / Xamarin Studio to retrieve them from a custom folder. This will obviously not work for Duality.

I don't see a good solution for this from a package management perspective. Code-wise, you could potentially grab them manually from the LocalPackageStoreDirectory as found in DualityEditorApp.PackageManager when you run your plugin, but before doing anything else, especially accessing LibGit2Sharp.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2016/07/29, 21:18 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
This is what's in my ApplyUpdate.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<UpdateConfig>
  <Update source="Source\Packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.dll" target="LibGit2Sharp.dll" />
  <Update source="Source\Packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.pdb" target="LibGit2Sharp.pdb" />
  <Update source="Source\Packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.xml" target="LibGit2Sharp.xml" />
  <Update source="Source\Packages\RockyTV.GitPlugin.editor.1.1.1\lib\GitPlugin.editor.dll" target="GitPlugin.editor.dll" />
  <Update source="Source\Packages\RockyTV.GitPlugin.editor.1.1.1\lib\GitPlugin.editor.pdb" target="GitPlugin.editor.pdb" />
  <Update source="Source\Packages\RockyTV.GitPlugin.editor.1.1.1\lib\GitPlugin.editor.xml" target="GitPlugin.editor.xml" />
</UpdateConfig>


And may I ask, is there a problem if my plugin was built with .NET 4.5?

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2016/07/30, 17:37 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
I added a function in my code, right before it tries to initialize the repository, that copies the LibGit2Sharp.NativeBinaries dependency to the root folder of the project.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2016/07/31, 18:19 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2063
Location: Germany
Role: Professional
RockyTV wrote:
And may I ask, is there a problem if my plugin was built with .NET 4.5?


Nope, unless you'd use functionality that is not available on a non .Net platform which you plan to support - but since this is editor-only, this is probably not a concern.

RockyTV wrote:
I added a function in my code, right before it tries to initialize the repository, that copies the LibGit2Sharp.NativeBinaries dependency to the root folder of the project.

Very good, that should work around the issue in your case. Just make sure the init code is always called before invoking any method that references LibGit2Sharp, as this will trigger loading the library and potentially its native dependencies.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group