Installation tool in development

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Installation tool in development

Post by Maarc »

I'm in the process of developing a tool that should, hopefully, ease a few burdens with regarding installation and sharing of new JS scripts and package (I'm looking at you here Stranf).

At the moment, the situation seems a little fraught with trouble. You have to post a JS file, some DFNs, give instructions, and so on. Frankly, there has to be an easier way, and I think I've come up with a possible solution (or at least, am coming up with).

Initially, I'm prototyping this with C#, but nothing in there is too hard that couldn't be backported to a C++ utility (just faster for prototyping). What I'm looking at is an application which takes the concept of a 'package', and does the install for you.

This package would, in essence, just be a zip file with a couple of special files. A package would contain
  • readme.txt
    setup.info
    *.dfn
    *.js
The readme is some help/description that you throw into a file that the user can see, before installing the package (and can include any notes).

The setup.info is where the developer's work will be. This will contain information about what files there are, how they're configured, and so on. A setup.info file would look something like:

Code: Select all

[DESCRIPTION]
{
NAME=Package Name
AUTHOR=Package Author
REVISION=Package Revision
tag/data pairings to detail description
}

[CONFIGURE]
{
COMMAND=a,b,c,d
MAGIC=a,b,c,d
CONSOLE=a,b,c,d
PACKET=a,b,c,d
SKILLUSE=a,b,c,d
GENERIC=a,b,c,d
}

[dfn_category]		// eg, item, npc, maps, etc, etc
{
FILE=filename
}

[JS_FILES]
{
1=file1
2=file2
3=file3
}

[JS_ENVOKE]
{
ID=1
ID=3
ID=3
ID=3
}

[JS_TYPE]
{
Type=1
Type=2
Type=2
Type=3
}
Obviously, throw in real values, not just placeholder stuff. But as you can see, we explicitly list the JS files (it would be quite possible, for instance, to just figure out the list from the archive, but this does serve a purpose!)

By listing the files explicitly in this file, we essentially give them a uniqueness. And the idea is to have (somewhat) a custom value support in the DFNs. Basically, to avoid hardcoding script IDs. So you could put something like

SCRIPT=[[1]]

In your DFN file, and the tool would associate that with the JS file you listed at 1= in [JS_FILES]. The tool finds a free slot, and updates the assorted files to point to the right number, when it installs it.

Ultimately, this is not a Windows only tool. C# is just an initial prototyping tool, and nothing in this can't be backported fairly readily.

Thoughts, ideas, suggestions, are all welcome. I hope to have something working by the end of the week. I think it'll be useful to some of you, at least. Let me know your thoughts.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Wow!!!

What I see this doing is greatly giving script access to the players of Uox3 who just want to run shards and aren't computer-programmers.

I say, try it out and lets see what happens.


---------------------

[/code]
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Maarc, good work.

I think once we finish testing this thing, it is going to be a great help.

I did find a bug, that wouldn't let me continue.

Bug 1:
1. I installed the installer to my flashdrive "J:"
2. I ran the installer, and found my uox.ini on drive f:
3. I selected dfn/item from the directory that popped up.
4. I clicked on "select package" and selected stranf1.zip from the installer directory.
5. I clicked on "install package"


The error message contained:
"Could not find a part of the path,
j:\uox\installer\js\jse_fileassociations.scp"


Apperently it gets confused if you are running the program off of one drive, and trying to install to another.
[/quote]
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

OK, that's a tad on the weird side ... my development drive and UOX3 drive are different, and that doesn't run into problems here. It should be trying to pick up the JS or DFN path from the INI file, and not based on where it is installed from. Can you confirm for me that your INI file points to the right place?

Having a second thought, if you don't mind, can you post the directories section of your INI file for me? If it's a relative path, I don't think I cope with that (I presume absolute). I should put in a check for that. Let me know, if you can, please.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

If stranf hasn't changed it, the default file path to the ini file should be
DIRECTORY=./
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

That would be correct, and is most likely my error. I'll go play with it some more.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

OK, that'll explain it. The tool doesn't take into account that it might be a relative directory. Will have to fix that sometime.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Maarc, if you would create a new thread specifically for PkgInstaller in this forum, with the latest instructions/updates + download links, etc. I'll make it a sticky thread =)
-= Ho Eyo He Hum =-
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

OK, will do later.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

*poke* Now there's a forum to do it in as well ;)
-= Ho Eyo He Hum =-
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

I'll give it a whirl tomorrow, I hope to have a fix or two in place then and another release (so it can work with relative paths). Did you see my post about some bad tags in the other post in the ToolAPI thread?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Yup, posted a reply now =)
-= Ho Eyo He Hum =-
Post Reply