Re: Exception: System.NullReferenceException in 0capture
"Bastian Eicher" <[email protected]>
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Phil, thank you for the bug reports. Regarding the two issues you submitted via the feedback window: * I've found the bug causing the crash in the "New Feed" Wizard and have fixed it. I'll push out a 2.8.1 release soon. * The crash in 0install caused by running the 0caputre feed was caused by the missing <archive> (because --collect-files did not work). It still should not have crashed and instead displayed a helpful error message. This will also be fixed in an upcoming release. A Zero Install feed needs an archive to extract an implementation from. Zero Install can treat some installer formats (MSI, certain EXE installers) as archives, but not all. Unfortunately DocFetcher's setup is not extractable by Zero Install. For these non-extractable cases there are two solutions: * Use the installer capture only to get desktop integration information but then list a ZIP version of the application in the feed to get the actual binaries. This is what "New Feed" Wizard would have offered if it hadn't crashed first. ;) * Create your own ZIP archive from the application's installation directory. This is what "0capture --collect-files" is intended for; I just haven't finished implementing it yet. I accidentally added --collect-files to the public interface before it was ready. Looking at DocFetcher's installer I noticed it doesn't perform any desktop integration like adding file associations. In such cases the best solution would usually be to use the portable ZIP as the basis for the feed and leave out the capturing all together. The only problem with this is that the portable version writes its config and database into its installation directory while Zero Install expects implementation directories to be immutable. With most applications this can be solved by using a <recipe> to remove the files that tell it to run in portable mode. However in DocFetcher's case the compiled JARs differ between the portable and non-portable version. In addition to deleting the "conf" and "indexes" directories, "net.sourceforge.docfetcher_1.1.14_20150217-2200.jar" from the portable version needs to be replaced with "net.sourceforge.docfetcher_1.1.14_20150217-2213.jar" from the installer version. I have created a feed that does all this. Additionally, on Windows the feed bypasses DocFetcher.exe in order to allow Zero Install to provide a Java implementation from its cache (rather than requiring it to be installed in "C:\Program Files\Java"). I have uploaded the feed to: http://0install.de/feeds/DocFetcher.xml Please let me know whether this is a suitable starting point for you. Sorry that this turned out to be so complicated. Perhaps we can get in touch with the DocFetcher developers to simplify the process for future releases. Regards Bastian -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Dienstag, 12. Mai 2015 16:26 To: [email protected] Subject: Re: [Zero-install-devel] Exception: System.NullReferenceException in 0capture Bastian, That fixed the problem, but I found another one or two. When the --collect-files command line flag was included, a new error was output. I also attempted to use the New Feed wizard but it also failed. I sent the debug info for that from the UI. Input and output C:\temp\docfetcher>0capture start dockfetcher.snapshot <ran installer> C:\temp\docfetcher>0capture finish dockfetcher.snapshot docfetcher.xml --installation-dir="C:\Program Files (x86)\DocFetcher" --main-exe=DocFetcher.exe --collect-files Searching for executable files... [====================] Complete Unhandled Exception: System.NotImplementedException: The method or operation is not implemented. at ZeroInstall.Capture.Cli.CaptureCommand.Finish() at ZeroInstall.Capture.Cli.Program.Main(String[] args) Thanks for fixing the original problem, Ill go write a bug for this one. ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y