BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Need some alpha testers...

Go down

Need some alpha testers... Empty Need some alpha testers...

Post by leezer3 Fri Sep 19, 2014 12:51 pm

So, I need some alpha testers for an unfinished application.

One of Michelle's more 'controversial' ideas was the concept of managed content. I'm not going to go into the flaws in the original idea in detail, but suffice to say it never took off.
The basic problem of having no automatic process to correctly install all files for routes or trains and handle dependencies still remains though. 
This was discussed about when development stopped, but never really got anywhere.

More recently, I've been doing some work on plugins and applications, and this came to the top of my mind again, and thus:
This application represents the first steps towards attempting to solve that- At the moment, I've implemented a package format, and additionally added intelligent handling for existing archives.

The Package Format:
As such, I've tried to keep this as simple as possible. A package is a compressed file in any format that the 7-zip extractor understands, with two additional files at the archive root:
packageinfo.bpi- This is a plain text file describing the contents of the package.
package.png- This is the image to be displayed by the package manager for this package.

Available and currently working paramaters in packageinfo.bpi are described below:
[GUID] - This should be the first line of the file. GUID represents the unique identifier for this package. (No validation on this currently)
name=PACKAGENAME - The name displayed by the packagemanager.
author=PACKAGEAUTHOR - The author of the package.
version=PACKAGEVERSION - A double formatted number representing the version of this package.
installpath=PATH - The path this package should be extracted to, relative to the root OpenBVE directory. [For example, a package to be extracted to C:\OpenBVE\Railway\Route\ would have a PATH value of Railway\Route ; If the package requires extracting to the OpenBVE root directory, either omit this parameter or leave it empty]
weburl=URL - The URL for this package's website.

Version management is currently handled as follows:
If a package with the same GUID as one already installed is selected, the version number is checked.
* If the version number is lower than or the same as the one currently installed, an appropriate error message is shown.
* If the version number is higher than the one currently installed, a prompt asking if you wish to replace this version is shown.

Finally, rename your file to have an extension of .bpk and you have a package Smile

Older Zip, 7zip, RAR Archives:
If an older archive is presented to the program, it will read the list of files within the archive.
First, it'll look for the base file structures (Railway\Route\... Railway\Object\.... Train\... etc.), and if these are found it will automatically set the correct install path.
If it doesn't find one of these structures, it'll attempt to look for identifying features- If there are more than 50 b3d & csv files and lots of images, it'll assume this is an objects package and so-on...
Once you're happy with where it's going to extract the package, you'll be presented with a screen allowing you to enter it's details for entry into the packages database.

What This Doesn't Do Currently:
The correct path for some archives may be misinterpreted. I need examples of these to find and fix this.

Create packages. This is (Obviously!) a planned feature, but as such, all you need to do at the moment is to add packageinfo.bpi & package.png to the root of your archive and rename to .bpk

Handle dependencies & suggested packages. This is again a planned feature, and shouldn't be too difficult to implement.

Uninstall packages and handle file conflicts- This is more complicated, as it will require holding a complete list of all files for each package, and is planned as a longer-term feature.

Download:
http://vps.bvecornwall.co.uk/alpha/BVEPackageInstaller_v0.1.zip

Sample Package & Information File:
http://vps.bvecornwall.co.uk/alpha/plympatch_1170.bpk
This is a 7-zip compressed package, of the most recent patch file for the Plymouth Route. (It's what I had kicking around as an easy demonstrator Razz )
http://vps.bvecornwall.co.uk/alpha/packageinfo.bpi
This is the package information file for the above package. You also can see it if you open the file with your preferred archive viewer, but still!

Finally, the obligatory screenshot:
Need some alpha testers... Bpi1

Source Code:
https://github.com/leezer3/BVEPackageInstaller

BSD-2 Clause licence as per the rest of my apps.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum