Jump to content

[1.3 & 1.2] KSP-AVC Add-on Version Checker Plugin 1.1.6.2 - MiniAVC - KSP-AVC Online (2016-10-13)


cybutek

Recommended Posts

Make sure that KSP-AVC.dll and KSP-AVC.version have been overwritten and replaced with the new ones. Try deleting the KSP-AVC folder and then copy the new one over, this will solve any problems which may be caused with the operating system not wanting to overwrite files etc.
Did you make sure to completely uninstall the last version? It sounds like you have an extra KSP-AVC.version file somewhere...

LOL, ninja'd by cybutek :cool:

I use JSGME to put in and pull out mods by copying in and removing subdirectory trees (in KSP's case all in GameData).

I have separate entries for KSP-AVC 1.04 and 1.1. Pulled out the 1.0.4 and put in the 1.1 mod. JSGME would have removed the files of 1.0.4 and then put in those of 1.1. Only files created by KSP-AVC 1.0.4 (KSP-AVC.log and KSP-AVC.xml) would have persisted. Ie. it is the equivalent of overwriting KSP-AVC.dll and KSP-AVC.version.

But KSP-AVC still reports it's 1.0.4 and there's a new version 1.1.

Okay, time to get serious. Have JSGME remove all mods. Walk the GameData tree (excluding Squad and NASAMission subdirectories) and clear out any old config files and a few .dll's that got missed somehow. No extra KSP-AVC files lurking about.

Put all the current versions of mods back in. Launch KSP. KSP-AVC still thinks it's version 1.0.4.

KSP-AVC says it's checking 7 addons. But there's only 2 .version files: KSP-AVC and KerbalEngineer. Of the mods listed on http://ksp-avc.cybutek.net/ I also have Deadly Reentry but its current version doesn't contain a .version file. So why does KSP-AVC think there are 7 addons for it to check?

EDIT: And I figured it out by looking at KSP-AVC.log.

KSP-AVC is walking all the sub-directories of the KSP program directory, not just GameData. Including the MODS sub-directory used by JSGME to store mods in their original form and where it copies from when installing them. It's reporting on 5 more .version files it finds there, including the one for KSP-AVC 1.0.4.

Perhaps have KSP-AVC exclude the MODS sub-directory from its search? :)

Edited by Jacke
Link to comment
Share on other sites

Version 1.1.1 is now available!

Added: Blanket exception handling and logging.

Added: Logger will flush on destruction and GC finaliser.

Added: Check to remove '/tree/' from github urls.

Changed: Remote checking back to WWW because WebRequest in Mono does not support TLS/SSL.

Changed: Version file search is now limited to just the GameData directory.

Fixed: Possible null refs caused by invalid remote urls.

Released MiniAVC for Developers!

Developers can now easily bundle the KSP-AVC system into any mod. It is as simple as placing the MiniAVC.dll with your version file.

For more information read the online readme file.

Get MiniAVC Here!

Link to comment
Share on other sites

Another feature request: could you show the download URL when you mouse over it? Either as a tooltip or in a status bar? I would prefer to know where it is going to take me if I click the button.

Does the MiniAVC check for updates to itself? :cool:

I really like MiniAVC. It is really slick. Thank you.

Link to comment
Share on other sites

Another feature request: could you show the download URL when you mouse over it? Either as a tooltip or in a status bar? I would prefer to know where it is going to take me if I click the button.

Does the MiniAVC check for updates to itself? :cool:

I really like MiniAVC. It is really slick. Thank you.

You've got some good suggestions there about the download button. Also MiniAVC doesn't check for updates to its self, as this could cause confusion with players not knowing where to put it. The solution would be having an update feature like ModStatistics, but I would consider that to be far too invasive for something that is bundled. The last thing I would want is for a player to feel like they've been infected, even if it was because of a miss-read or miss-click with the opt-out. The plan for the moment is that it'll use the most upto date version from which ever mods have it bundled. MiniAVC although a sleek tool is not meant to replace the full KSP-AVC Plugin but to suppliment it.

Link to comment
Share on other sites

You've got some good suggestions there about the download button. Also MiniAVC doesn't check for updates to its self, as this could cause confusion with players not knowing where to put it. The solution would be having an update feature like ModStatistics, but I would consider that to be far too invasive for something that is bundled. The last thing I would want is for a player to feel like they've been infected, even if it was because of a miss-read or miss-click with the opt-out. The plan for the moment is that it'll use the most upto date version from which ever mods have it bundled. MiniAVC although a sleek tool is not meant to replace the full KSP-AVC Plugin but to suppliment it.

I agree about staying away from auto-updating. Majiir caught a lot of flack over ModStatistics and how it works.

Using the most up-to-date bundled version does sound like the best way, and I think that would be acceptable.

Link to comment
Share on other sites

Version 1.1.1 is now available!

Added: Blanket exception handling and logging.

Added: Logger will flush on destruction and GC finaliser.

Added: Check to remove '/tree/' from github urls.

Changed: Remote checking back to WWW because WebRequest in Mono does not support TLS/SSL.

Changed: Version file search is now limited to just the GameData directory.

Fixed: Possible null refs caused by invalid remote urls.

Released MiniAVC for Developers!

Developers can now easily bundle the KSP-AVC system into any mod. It is as simple as placing the MiniAVC.dll with your version file.

For more information read the online readme file.

Get MiniAVC Here!

Whatever you did: You did it well. Startup is now way faster for me :D

Link to comment
Share on other sites

Just installed the latest version, 1.1.1. I'm using KSP 0.24.2 on OSX 10.9.4. The last version, 1.1, caused KSP to freeze at start up. With this new version, it starts up okay, but the message about checking installed mods hangs at the end and never goes away. It get stuck on the middle of the screen. This is what I get in my logs, over and over:

at KSP_AVC.Starter.Update () [0x00000] in <filename unknown>:0

[LOG 03:35:33.025] KSP-AVC -> Object reference not set to an instance of an object

[LOG 03:35:33.025] KSP-AVC -> at System.Version.op_GreaterThan (System.Version v1, System.Version v2) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.get_IsUpdateAvailable () [0x00000] in <filename unknown>:0

at KSP_AVC.Starter.<Update>b__1 (KSP_AVC.Addon a) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.Any[Addon] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

Released MiniAVC for Developers!

Developers can now easily bundle the KSP-AVC system into any mod. It is as simple as placing the MiniAVC.dll with your version file.

While I absolutely approve this idea... are you sure you want to go this way? Tread lightly dude... this is not the best of time for bundled plugins ;)

Link to comment
Share on other sites

Just installed the latest version, 1.1.1. I'm using KSP 0.24.2 on OSX 10.9.4. The last version, 1.1, caused KSP to freeze at start up. With this new version, it starts up okay, but the message about checking installed mods hangs at the end and never goes away. It get stuck on the middle of the screen. This is what I get in my logs, over and over:

at KSP_AVC.Starter.Update () [0x00000] in <filename unknown>:0

[LOG 03:35:33.025] KSP-AVC -> Object reference not set to an instance of an object

[LOG 03:35:33.025] KSP-AVC -> at System.Version.op_GreaterThan (System.Version v1, System.Version v2) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.get_IsUpdateAvailable () [0x00000] in <filename unknown>:0

at KSP_AVC.Starter.<Update>b__1 (KSP_AVC.Addon a) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.Any[Addon] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0

Could you upload the full log file? As I need to know what checks were made and the output for them to track down the original cause.

@Ippo

Completely understand where you're comming from. I dislike with all my heart that plugin with a name that shall not be mentioned, and hope this gives me insight into how such a thing can be done right... MiniAVC was and still is something that I developed for my own personal needs. Namely KER 1.0 which has had it integrated since the release of v1.0.3. Even though it has a very obvious first run pop-up that gives equal opportunity for the player to opt in and out (which is not even required in Squad's new rules for this type of plugin). Players have noticed and jumped onto the fact that it is useful, as shown by the large growth of checks for KER1.0 without the corresponding KSP-AVC Plugin checks at ksp-avc.cybutek.net. It is it definitely working to help cover those who do not have the full plugin installed, of which each one has had to say "YES" to be counted. This also proves at least to me that if a bundled plugin treats the player with respect, and most importantly is useful and adds value, opt-ins do work.

I would of course love to hear what anyone has to say on the subject :)

Link to comment
Share on other sites

Yes, I understand. As I said, I approve this (heck, I'm even running the plugin that shan't be named): just be careful with this. I really don't want to see a "StillBetterThanUpdateware" plugin out there. +1 for the project though :)

Link to comment
Share on other sites

I think you might have a problem with resolving paths on linux. When I start KSP the window hangs on version checking and can't be closed. The logs are as follows:

Kerbal Space Program - 0.24.2.0 (LinuxPlayer) Steam

OS: Linux 3.15 Arch rolling 64bit
CPU: Intel(R) Core(TM)2 Duo CPU E8600 @ 3.33GHz (2)
RAM: 7976
GPU: GeForce GTX 285/PCIe/SSE2 (1024MB)
SM: 30 (OpenGL 3.3 [3.3.0 NVIDIA 340.24])
RT Formats: ARGB32, Depth, ARGBHalf, RGB565, ARGB4444, ARGB1555, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8

Executing: KSP-AVC - 1.1.1.0
Assembly: /home/steam/.local/share/Steam/SteamApps/common/Kerbal Space Program/GameData/KSP-AVC/KSP-AVC.dll

[Log 03:22:19.9494530]: Starter was created.
[Log 03:22:20.8597280]: CheckGui was created.
[Exception 03:22:20.9421450]: Could not find a part of the path "/home/steam/GameData/FerramAerospaceResearch/FAR.version".
[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 03:22:20.9423310]: Could not find a part of the path "/home/steam/GameData/KSP-AVC/KSP-AVC.version".
[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 03:22:20.9424040]: Could not find a part of the path "/home/steam/GameData/Firespitter/Firespitter.version".
[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 03:22:20.9424570]: Could not find a part of the path "/home/steam/GameData/KerbalEngineer/KerbalEngineer.version".
[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

Notice that it searches for the GameData directory in the users home folder (in my case a dedicated steam user).

Edited by kafuka
Link to comment
Share on other sites

Notice that it searches for the GameData directory in the users home folder (in my case a dedicated steam user).

Looks as if the KSP API is handing out the wrong application path. It should be handing out "/home/steam/.local/share/Steam/SteamApps/common/Kerbal Space Program/" but is instead giving the plugin "/home/steam/". So it seems like I'll have to find the GameData folder via doing an inverse directory search from the assembly location, as relying on KSP giving out correct information apparently was a bad idea.

Edited by cybutek
Link to comment
Share on other sites

I might see the same issue on windows:

I just installed 1.1.1, and when I now start KSP 0.24.2 32 bit I get a message box saying "KSP Add-on Version Checker: Checked 0 of 4 add-ons."

This message box just hangs there forever in the middle of the screen even after I have entered the game proper.

The log file contains:

Executing: KSP-AVC - 1.1.1.0

Assembly: D:\Games\KSP_0.24\GameData\KSP-AVC\KSP-AVC.dll

[Log 06:12:36.8227259]: Starter was created.

[Log 06:12:36.9417327]: FirstRunGui was created.

[Log 06:13:22.3943324]: FirstRunGui was destroyed.

[Log 06:13:22.4113334]: CheckGui was created.

[Exception 06:13:22.4843376]: Could not find a part of the path "C:\Windows\System32\GameData\KSP-AVC\KSP-AVC.version".

[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 06:13:22.4843376]: Could not find a part of the path "C:\Windows\System32\GameData\Protractor\Protractor.version".

[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 06:13:22.4843376]: Could not find a part of the path "C:\Windows\System32\GameData\FerramAerospaceResearch\FAR.version".

[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

[Exception 06:13:22.4843376]: Could not find a part of the path "C:\Windows\System32\GameData\Engineer\KerbalEngineerRedux.version".

[]: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0

at KSP_AVC.Addon.ProcessLocalInfo (System.Object state) [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

I am not sure about that. KSPUtil.ApplicationRootPath seems to work in the places that I've used it. I wonder if the "current working directory" is messed up?

@helgeras, how are you launching KSP? Steam launcher? Shortcut? Is KSP on your Path environment variable?

Link to comment
Share on other sites

I am not sure about that. KSPUtil.ApplicationRootPath seems to work in the places that I've used it.

Same here, which is why I opted to use it rather than rolling my own method. No need to re-invent the wheel when you've already got one at hand. But issues like this that only crop up under certain situations have happened before. Like string.IsNullOrEmpty() being completely left out of older versions of Mono, even though it's a standard .NET 2.0 function. It caused a few headaches for Linux/Mac back in the early days of KSP and KER.

Anyhow, I'm fixing all this up as I type this :)

Edit:

There is a path that can be used in GameDatabase, but i'll just make my own to be safe. Maybe KSPUtil has been deprecated but the code obfuscator that takes out all the nice handy comments from the API also took out the mark which says don't use this.

Edit #2: Just waiting on Curse to appove version 1.1.2 and it'll be ready to download. MiniAVC 1.0.1 can be got right now as it's not hosted on Curse.

Edited by cybutek
Link to comment
Share on other sites

Version 1.1.2 is now available!

Added: Tooltip when hovering over the download button showing the destination URL.

Fixed: Certain situations would cause the root directory to be incorrect.

Fixed: File not found handling solving the lock whilst on the checking display.

I should also point out that MiniAVC is now version 1.0.1.

Link to comment
Share on other sites

I am starting KSP.exe from a shortcut, and I just noticed that this shortcut has set home directory in C:\Windows\System32. That probably explains it.

Edit: I have now changed the home directory and also downloaded the newest version, and now it works.

Edited by helgeras
Link to comment
Share on other sites

I am starting KSP.exe from a shortcut, and I just noticed that this shortcut has set home directory in C:\Windows\System32. That probably explains it.

Edit: I have now changed the home directory and also downloaded the newest version, and now it works.

That would do it. Window's "working directory" was wrong, and KSP must have used that rather than the location of the executable. Maybe we should write that up in a bug report to Squad?

Link to comment
Share on other sites

So my apologies if this has already been answered and all that jazz.

I like the idea of this mod. But I have a very specific concern:

P.S. I'm poor so this website is currently being hosted on a cheap 1&1 shared hosting package that I use for a lot of other things as well, so it's not the best for a high traffic website. If anyone has some better options please let me know.

Naturally I'm going to be a bit concerned both on the author's willingness to continue funding this, as well as the server itself. Ironically, I was going down a very similar path for version checking that basically just hooked into Github directly - no muss, no fuss... and no intermediary web server (but I am beyond swamped at the moment).

So for my own curiosity, what is the purpose of the intermediary server vs, just doing a call to the source?

Link to comment
Share on other sites

The purpose of the website was made primarily for people who don't use GitHub, such as for part and content packs. It's not fair that only plugin developers and programmers should be the only ones capable of version checking their mods. It is completely optional though, and the remote .version file can be hosted anywhere the mod creator wants. But I personally find it easier to manage through the website, because it allows me to time when users are shown that there's a new version available with the availability of the download. Without having to mess around with carefully timed commits.

Also with regards to the willingness of continued funding, the KSP-AVC Online website is just one of many websites and projects that I currently have hosted on the same plan. There's also no way that my finances, or lack there of, could allow me to spend any money on a singular project. Which is good in a way, as it is sharing something that already has a need for other things. There's little chance that it'll go down because I do not think it's worth spending money on (because I'm not, it's just sharing what I already have).

As for the server its self. I did have some concerns at first, it's not exactly dedicated server material, but it does seem to be coping exceptionally well for what it is. A lot better than expected at the time of writing that blurb on the orginal post. Also I have had an offer by someone to make use of their virtual server, which is on the cards for when/if traffic does become a problem.

Link to comment
Share on other sites

The purpose of the website was made primarily for people who don't use GitHub, such as for part and content packs. It's not fair that only plugin developers and programmers should be the only ones capable of version checking their mods. It is completely optional though, and the remote .version file can be hosted anywhere the mod creator wants. But I personally find it easier to manage through the website, because it allows me to time when users are shown that there's a new version available with the availability of the download. Without having to mess around with carefully timed commits.

So to clarify, this mod just goes to whatever URL you put in the config to check against said file, regardless of where that file is located at correct?

Although I agree on the issue of timed commits - i.e. either it knows about a release before I change the release from draft to final, or I have to commit the version file after the release is ready, and we're stuck in a circle of sadness.

Is it using the Github API under the hood? Meaning, is there an option to just do a comparison against the actual releases on GitHub?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...