ArgusMagnus Posted October 12, 2015 Share Posted October 12, 2015 (edited) I have developed a plugin installer. I know that this has been done before, but I wasn't happy with the existing solutions. I know that a plugin installer/management system is on Rick's ToDo list, but I wish to provide an intermediate solution, until the real one arrives. The installer can be invoked in two ways: 1. FileType: Open->Plugin Installer (*.pdnplgn, *.zip) 2. Effect: Effects->Advanced->Plugin Installer This will let you open a zip archive (optionally renamed to have a .pdnplgn extension). It will read the containing .net assemblies and show the contained filetype and effect plugins. It will also show you what already existing plugins will be overwritten. If it was started from the effects menu, it will also allow you to preview effects (double click on the effect) before installing it. After clicking "Install" the plugins launch a seperate process which then waits until paint.net is closed by the user and after that copies the files to the paint.net directory. When the installation is complete, it will give you the option to start paint.net up again. However, this won't just simply copy dll's, it will check if there are assemblies which are referenced by the selected ones and copy them as well. If existing, it will also read the PluginInstallerInstructions.xml file in the archive (see the example "ArgusPaintNet (Text).pdnplgn") which lets plugin authors specify non-.net references (like native assemblies or any other filetype) which should be copied and also files which should be removed (e.g. if you have renamed your effect assembly and want the installer to remove the old one). I have read the rules over and over again and I don't think this violates any of them (perhaps the "side effect" clause on FileType plugins, but I could easily remove that) but I'm still not sure if this will be allowed. I have read an old thread where something similar was removed/banned, but I don't know what was actually done since the code was removed. I contacted Rick and he said, that this functionality won't work out as a plugin, but would probably be okay as an external utility, and said, I should post this to the developer section and see how this goes from there. So.. I fear that what I have done till now won't be allowed, but I have still a little hope left since technically, the plugin only shows you plugins (similar to other plugins like the pinned Plugin Browser), the actual installation/file manipulation is done by an external program (you don't see this exe since it is included as resource in the plugin assembly and extracted to the temp folder when needed). Since this might never make it to the public release section, I haven't put too much effort into it yet. It worked well on my personal computers with BoltBait's Plugin Pack and my own (included as ArgusPaintNet (test).pdnplgn), but it is not well tested. You probably wouldn't have a hard time to make it crash (e.g. by feeding it a corrupt archive). I posted this here, so you can tell me if 1. what part of this idea you like and which part you don't 2. Rick (and perhaps senior members/admins) can tell me if this is allowed, and if possible, which part is not allowed (and optionally, just for my own curiosity, why it is not allowed) 3. If this gets the go ahead, you can help me test this, since something like this should be heavily tested before releasing. Download: https://onedrive.live.com/?id=429F16CCEF18E484%21351194&cid=429F16CCEF18E484&group=0 If you want to build this from the source, you will need VS 2015 (previous version probably won't compile it, since the source makes use of new C# 6.0 features). I'm looking forward to your feedback Edited May 19, 2016 by ArgusMagnus 1 Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 12, 2015 Share Posted October 12, 2015 Fancy. When there are conflicts, it would be nice to see the assembly version of the two files. You have an unhanded exception when the cancel button is click on the Open file dialog. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 12, 2015 Author Share Posted October 12, 2015 (edited) Hehe, as I said, not hard to crash^^ I've fixed this, because it required almost no changes. Also the assembly version is now displayed. I have a lot of ideas for improvement, e.g. highlighting conflicting assemblies (possibly with different colors: newer<->green, older<->red), detecting conflicts not only due to conflicting file names but also due to duplicate menu entries, providing an installer for the plugin, possibly with file extension association (so *.pdnplgn would automatically be opened by paint.net, this idea is actually the reason the FileType plugin version exists), but these things would require some work and thus time which I am not willing to invest before I know if I may release this on the forum. Edited October 12, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 12, 2015 Share Posted October 12, 2015 This should not be done as a plugin. It should just be an external utility. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 12, 2015 Author Share Posted October 12, 2015 (edited) Do you mind if I ask why? (I will respect your final decision, but let me try to convince you) I could relative easily covert this to an external utility but I think this would greatly reduce the user experience and I don't know if this would be worth the trouble. Furthermore, in contrast to the plugin solution, it would require "hacks"/ugly methods (somehow get the paint.net process, read registry keys, etc.) which are more likely to fail/be broken by a future update of paint.net. Edited October 12, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 12, 2015 Share Posted October 12, 2015 Because you're not implementing a file type. You're creating something completely different. It will be in a location that doesn't really make sense to the user. So, in addition to this breaking the rules that I've laid out for plugins, it ends up parked in the UI at a location that doesn't really make sense for the end user. File->Open's job is to load images, not plugins. You can install plugins without resorting to hacks. Finding the PaintDotNet.exe process and waiting for it to exit should not be difficult and I can help you with that code (System.Diagnostics.Process should provide most of this functionality). The install directory is stored in the registry key HKLM\Software\Paint.NET\TARGETDIR. You can even do version checking by going to the folder from that key (it'll probably be C:\Program Files\paint.net, of course) and checking the version of PaintDotNet.exe (e.g. with System.Diagnostics.FileVersionInfo). These are things that I am not going to be changing in a future release of paint.net: they're stable and you can rely on them. I just haven't documented them in a central location. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 12, 2015 Author Share Posted October 12, 2015 (edited) You are right, the location (File->Open) doesn't really make sense. I would argue that this is also the case for tools effect plugins like CodeLab, Plugin Browser, Color Harmonies or Effect Plugins which let you upload images to imgur or similar sites and that it at least is also not too far off (it still opens/loads something). But if you don't want that, I accept that. You haven't mentioned how you feel about the Effect Plugin with the same functionality at all, would that be possible? I'll be honest, I'm not motivated to realize this as an external utility, it you don't want it as plugin in any way, I will probably just drop this. The reason is that I can't see such an utility being used by a larger user base. I would not download/install/use an utility, which is not somehow accessible through the paint.net UI and I guess others probably wouldn't either. Edited October 12, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
BoltBait Posted October 12, 2015 Share Posted October 12, 2015 You are right, the location (File->Open) doesn't really make sense. I would argue that this is also the case for tools effect plugins like CodeLab CodeLab is located in the Effects > Advanced menu. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 12, 2015 Share Posted October 12, 2015 ArgusMagnus' plugin is also located in the Effects > Advanced menu, if you put the .dll in the Effects directory. I didn't even notice you could alternatively place it in the FileTypes directory, until I read these replies and re-read the original post. I agree, as a file type, it doesn't make too much sense. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 13, 2015 Share Posted October 13, 2015 It would still be quite useful as an external utility. Troubleshooting here on the forum would be easier, "go download this: (link) and use it" Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 13, 2015 Author Share Posted October 13, 2015 (edited) CodeLab is located in the Effects > Advanced menu.Yeah, I know, but nontheless those plugins I listed (including CodeLab) are located in the UI somewhere, where they don't naturally belong and are there simply due to the lack of alternatives.It would still be quite useful as an external utility. Troubleshooting here on the forum would be easier, "go download this: (link) and use it"Maybe... I don't like it, because it means to have another little program only serving one small purpose which is not used very often having lying around somewhere. Perhaps I would still do it, but certainly not right away (I probably won't have time in the near future). But I would clearly prefer the Effects->Advanced->Plugin Installer option. I really think this would be more user-friendly. I could even rename it to PluginLab or something to make it fit better xDEdit: On second thought, with an external utility, I could get the file extension association functionallity back which died with the FileType plugin. I would still want the Effect plugin for two reasons: 1. To keep the ability to preview effects before installing and 2. to have a way to access the plugin installer from within paint.net. This mainly because I don't like shortcuts to little tools I rarely use clustering my desktop/start screen and remembering names so I can search them is also not my forté. Within the application which it is used for is the place I would want it to be. Edited October 13, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
david.atwell Posted October 13, 2015 Share Posted October 13, 2015 You never know, if your external utility is good enough, it might eventually become an internal utility. Happened with...uh...something. Something of BoltBait's, I think. Maybe Gaussian Blur +? Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
BoltBait Posted October 13, 2015 Share Posted October 13, 2015 More like... Ink Sketch. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 14, 2015 Author Share Posted October 14, 2015 (edited) You never know, if your external utility is good enough, it might eventually become an internal utility. Happened with...uh...something. Something of BoltBait's, I think. Maybe Gaussian Blur +? I don't think this is likely, other than a real effect which can probably very simply be integrated into the internal assemblies, Rick probably has his own ideas for a real plugin management system and won't just integrate an external tool, even if it is good. So.. I haven't really gotten an answer, can I keep the Effect Plugin? If yes, is anyone interested in helping me test it before I release it to the public? I might still do the external utility, but I don't have too much free time on my hands right now. Edit: I've uploaded a new version with some small fixes, it's less likely to crash now. Edited October 14, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 14, 2015 Share Posted October 14, 2015 So.. I haven't really gotten an answer, can I keep the Effect Plugin? I thought I already replied to this ... but no, this can't be a plugin. Oh yeah, here it is This should not be done as a plugin. It should just be an external utility. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
ArgusMagnus Posted October 15, 2015 Author Share Posted October 15, 2015 (edited) Ok. I have read the quoted statement, the reason why it wasn't clear to me if this included the effect plugin is, that your whole explanation why this shouldn't be done as a plugin was based on the assumption, that it would be a filetype plugin. It may be a good idea to update the rules to include this (till the end it remains unclear to me, why this shouldn't be done as an effect plugin, a corresponding entry in the rules could help prevent such confusion in the future). Edited October 15, 2015 by ArgusMagnus Quote My batch Image Processor: https://imagenator.codeplex.com Link to comment Share on other sites More sharing options...
Sorcerer Posted July 18, 2020 Share Posted July 18, 2020 Where is the Source Code? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 18, 2020 Share Posted July 18, 2020 1 hour ago, Sorcerer said: Where is the Source Code? ArgusMagnus hasn't been around for almost 2 years... Maybe if you explained why you need the source code, we could help you. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Sorcerer Posted July 18, 2020 Share Posted July 18, 2020 To learn from and also to try and make it work outside of being a Plugin in Paint.net Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 18, 2020 Share Posted July 18, 2020 7 minutes ago, Sorcerer said: To learn from and also to try and make it work outside of being a Plugin in Paint.net I don't see that you've written any Paint.NET plugins. What are you planning? If you've started a project and are stuck on one particular item, maybe we can walk you through that issue. What we cannot do is give you the source code to the OP's project--we don't have it. But, many people around here know how to do many of the things his project does. So, if you ask SPECIFIC questions, we can probably help. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Sorcerer Posted July 18, 2020 Share Posted July 18, 2020 On 10/12/2015 at 2:44 AM, ArgusMagnus said: If you want to build this from the source, you will need VS 2015 (previous version probably won't compile it, since the source makes use of new C# 6.0 features). I learn better from looking at the code and in the Original Post the Author had said what I quoted above. I just thought they had released the Code since they Said that and was trying to find it. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 18, 2020 Share Posted July 18, 2020 As far as I can tell, the source code was never released. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Sorcerer Posted July 18, 2020 Share Posted July 18, 2020 (edited) Ok Thanks was not sure, with all the Plugins on here with Source Code that should give me enough to learn how to make a Plugin when I have time. Edited July 18, 2020 by Sorcerer Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 18, 2020 Share Posted July 18, 2020 28 minutes ago, Sorcerer said: ...learn how to make a Plugin... If you just want to learn how to make a plugin, I recommend starting here: https://forums.getpaint.net/topic/109990-how-to-write-an-effect-plugin-tutorialsresources/ 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.