Mod installer & auto-update tool - would you use it?

Started by KingOfAwesomnia, December 23, 2014, 12:20:19 PM

Previous topic - Next topic

StorymasterQ

Can't you just use the environment variable %APPDATA%? I bet that's the cause for these folder structure problems.
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. - Myself

The dubious quotes list is now public. See it here

ItchyFlea

Quote from: StorymasterQ on January 05, 2015, 12:30:52 AM
Can't you just use the environment variable %APPDATA%? I bet that's the cause for these folder structure problems.
That's the problem. In Windows XP the game content isn't stored there.

@KingOfAwesomnia:
Google tells me that you'd want to use this to get there in WinXP: %USERPROFILE%\Local Settings\Application Data
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

KingOfAwesomnia

Quote from: StorymasterQ on January 05, 2015, 12:30:52 AM
Can't you just use the environment variable %APPDATA%? I bet that's the cause for these folder structure problems.
Quote from: ItchyFlea on January 05, 2015, 04:50:37 AM
Google tells me that you'd want to use this to get there in WinXP: %USERPROFILE%\Local Settings\Application Data
The problem is that I cannot simply use %USERPROFILE% or %APPDATA% since I work in Node.JS. I have to see which process.env property responds to the correct directory (or closest to it), and once I figure that out it will be very simple to implement, but to find that out and to be able to test the full program on XP I need to set up a virtual machine. I don't just want to "keep guessing until I get it right" :)

mipen

This looks absolutely amazing! I will definitely be adding compatibility with this launcher when I get around to updating it. I'll also be touting it's awesome-ness on my mod page to try get everyone using it. The mod options part will be a godsend for modular mods, for the user and modder alike. All in all, an absolutely amazing programme! :D that's a lot for this!

KingOfAwesomnia

Quote from: mipen on January 08, 2015, 02:48:05 AM
This looks absolutely amazing! I will definitely be adding compatibility with this launcher when I get around to updating it. I'll also be touting it's awesome-ness on my mod page to try get everyone using it. The mod options part will be a godsend for modular mods, for the user and modder alike. All in all, an absolutely amazing programme! :D that's a lot for this!
It's comments like this that motivate me to continue working on it all day. Well, that and the fact that installing and managing mods in RimWorld as it is currently can be a bit of a pain. But, mostly the awesome comments thing :D

While I'm at it, here's a small update on the progress made for v0.2 (you can also check out the Trello board for the latest dev status):

  • I restructured the codebase so that I can more easily modify and extend it. Before it was just one big file with lots of back-and-forth function calls, now it's all modular and structured. This took a while but it will allow me to add new features more quickly.
  • I added an app updater. Currently the launcher will check if there's an update and then redirect you to my site, but as of v0.2 it will just pull the latest version of the launcher from my server and automatically download and install it if it finds that a newer version is available. This took a while to get right, since I had to compile a number of times and find out the best way to package the updates so that you wouldn't have to download the full 60MB app with every update.
  • Next up: mod uploading and downloading (see below), and settings breaks (as talked about earlier in this topic)
Main new feature for v0.2: mod uploading and downloading. And here's how it will (or should) work:
The launcher will package your mod and upload it to the RW Launcher server. You will get an identifier of some sort (probably a URL but I'm still looking over the options), which you can share with anyone. When someone wants to install your mod, they copy the identifier into the launcher. Then the launcher will download and install this mod. It will not yet auto-update, and there's no mod gallery of any kind yet, but this way you guys can already start distributing your mods via the launcher. And for me this will be a test to see how much resources the actual hosting of these mods will take (I'm specifically worried about the bandwidth limits on my server, since I also host a bunch of other websites on it).

Idlemind79

If people started putting all the mods on nexus in earnest, wouldn't the sites mod manager be enough?

Coenmcj

wouldn't you rather a tool made by the community for the community, Idlemind?
Eliminates alot of the need for any of those 3rd party sites

I'd use this for sure, I'll see if I can nudge some people in your direction. :)
Moderator on discord.gg/rimworld come join us! We don't bite

KingOfAwesomnia

Quote from: Idlemind79 on January 11, 2015, 07:02:42 AM
If people started putting all the mods on nexus in earnest, wouldn't the sites mod manager be enough?
That would be true, but fact is that few modders actually put their mod on there. Besides, I aim to add specific functionality that is tied in with the mods and the game itself, something that a general mod manager like the Nexus one doesn't offer. And I don't know what the process is to upload mods to Nexus, but I doubt it will be as simple and efficient as what I'm making.

Neurotoxin

#68
Quote from: KingOfAwesomnia on January 05, 2015, 07:41:41 AM
Quote from: StorymasterQ on January 05, 2015, 12:30:52 AM
Can't you just use the environment variable %APPDATA%? I bet that's the cause for these folder structure problems.
Quote from: ItchyFlea on January 05, 2015, 04:50:37 AM
Google tells me that you'd want to use this to get there in WinXP: %USERPROFILE%\Local Settings\Application Data
The problem is that I cannot simply use %USERPROFILE% or %APPDATA% since I work in Node.JS. I have to see which process.env property responds to the correct directory (or closest to it), and once I figure that out it will be very simple to implement, but to find that out and to be able to test the full program on XP I need to set up a virtual machine. I don't just want to "keep guessing until I get it right" :)

I assume you've already figured out what you intend to do but an idea for you:

public string GetOSPath()
{
    if (Environment.OSVersion.Version.Major == 5)
    {
        if (Envoironment.OSVersion.Version.Minor < 6)
        {
            //This is Win XP, 2000 or Server 2003
            return %USERPROFILE% + "RestOfPath"; //pseduocode line :D
        }
        //This is win 7, win vista
        return Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "/LocalLow";
    }
    if (Environment.OSVersion.Version.Major == 6)
    {
        //this is win 8
        return Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "/LocalLow";
    }
    return null;
    //Returning null because everything else is less than win 2000 and likely won't run anyway
}


On quick note, I haven't been able to test it, since I'm not at my dev environment so it may need tweaking but it should work.

KingOfAwesomnia

Quote from: Neurotoxin on January 11, 2015, 12:43:24 PM
I assume you've already figured out what you intend to do but an idea for you
Unfortunately in NodeJS/Node-Webkit there's no env.OSVersion property. I do have an env.OS property, but it shows "Windows_NT" for me (Win 7) and since Win2K and up are all based on Windows NT I don't know if this would be any different on XP. When the core development is done I'll set up a couple of virtual machines (for Windows XP, Vista and 8 - I don't think anyone out there is still using 2K?) so that I can figure out the platform differences and how to fix them.

Neurotoxin

Quote from: KingOfAwesomnia on January 11, 2015, 01:11:15 PM
Unfortunately in NodeJS...

I completely glazed over this and defaulted to c# sorry about that. I'm not familiar with JS so I can't really help there :/

Quote from: KingOfAwesomnia on January 11, 2015, 01:11:15 PM
I don't think anyone out there is still using 2K?

Probably just some computer challenged elderly folks and (severely) behind the times schools haha.

KingOfAwesomnia

Quote from: Neurotoxin on January 11, 2015, 01:18:32 PM
I completely glazed over this and defaulted to c# sorry about that. I'm not familiar with JS so I can't really help there :/
No problem, the idea was good. Perhaps I can find a npm module for proper platform detection when I get around to it.

Haplo


KingOfAwesomnia

Quote from: Haplo on January 11, 2015, 02:33:55 PM
I'm also not familiar with JS, but maybe this helps?
http://stackoverflow.com/questions/8683895/variable-to-detect-operating-system-in-node-scripts
I've already read that discussion, and a bunch of others, but it appears Node doesn't give a good way to correctly determine the operating system by default. I'll have to either design my own detection function, or look for a platform detection module on npm.

Jaxxa

Quote from: KingOfAwesomnia on January 08, 2015, 10:45:07 AM
Quote from: mipen on January 08, 2015, 02:48:05 AM
This looks absolutely amazing! I will definitely be adding compatibility with this launcher when I get around to updating it. I'll also be touting it's awesome-ness on my mod page to try get everyone using it. The mod options part will be a godsend for modular mods, for the user and modder alike. All in all, an absolutely amazing programme! :D that's a lot for this!
It's comments like this that motivate me to continue working on it all day. Well, that and the fact that installing and managing mods in RimWorld as it is currently can be a bit of a pain. But, mostly the awesome comments thing :D
...

Just noticed this and haven't yet had time to read the entire thread yet, but I have to echo mipen's statements that this look really helpful and promising. I will definitely be looking at adding support for my Enhanced Defense mod and plugging it on my mod thread.

Thanks.