Git Product home page Git Product logo

bulletproof-arma-launcher's People

Contributors

jonpas avatar overfl0 avatar sighter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bulletproof-arma-launcher's Issues

Handle disk full error

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


On disk full, the following alerts are sent to the UI.

Category: 73, Message: DebussyPrelduesBookI file (z:\DebussyPrelduesBookI\DebussyPreludesBookI_jp2.zip) error: There is not enough space on the disk
Category: 65, Message: DebussyPrelduesBookI ERROR: There is not enough space on the disk

A decision shopuld be taken whether and where to react to this.
Note: Category is a bitfield

{1: libtorrent.category_t.error_notification,
 2: libtorrent.category_t.peer_notification,
 4: libtorrent.category_t.port_mapping_notification,
 8: libtorrent.category_t.storage_notification,
 16: libtorrent.category_t.tracker_notification,
 32: libtorrent.category_t.debug_notification,
 64: libtorrent.category_t.status_notification,
 128: libtorrent.category_t.progress_notification,
 256: libtorrent.category_t.ip_block_notification,
 512: libtorrent.category_t.performance_warning,
 2048: libtorrent.category_t.stats_notification,
 268435455: libtorrent.category_t.all_categories}

change to new mod description format

Originally reported by: The Sighter (Bitbucket: sighter, GitHub: sighter)


Alsonso said:

Hello chaps,

Apologies for the big delay on this. I hope it is not too late. These are the files you can expect to have available on the http server (not yet, but soon). Assuming www is a simplification of the real URL, you will have

www/updater/metadata.json

#!json
{
    "timestamp" : "YYYY-MM-DD_Epoch",
    "mods"      :
    [
        { "name" : "Tactical Battlefield v3.10.1", "foldername" : "@TacBF",  "torrent-timestamp" : "YYYY-MM-DD_Epoch" },
        { "name" : "Community Base Addons v1.09",  "foldername" : "@CBA_A3", "torrent-timestamp" : "YYYY-MM-DD_Epoch" }
    ],
    "teamspeak" : "ts.tacbf.com",
    "servers"   :
    [
        {"name" : "Official #1", "URL" : "31.210.129.135" }
    ]
}

The timestamp of the metadata file is the last modification time, so you know whether something has changed if you keep that value on the user box. Epoch will be given in seconds.
The name is extracted from mod.cpp, if provided, and can be used for presentation purposes.
The folder name matches the root folder in the torrent and the folder by which the mod can be accessed via http, as in www/updater/@TacBF

www/updater/obsole-mods.json

#!json
[
    { "YYYY-MM-DD_Epoch" : [ "foldername3", "foldername4" ] },
    { "YYYY-MM-DD_Epoch" : [ "foldername1", "foldername2" ] }
]

In this file each entry os sorted chronologically by the first field, oldest first. This file can be used to tell the user some mods are no longer in used. It should be used as follows: once the metadata has been updated on the user box, take its timestamp and compare it against each of the timestamp entries in the obsolete-mods file. If found, collect all the mods from that entry and all the entries that folllow until the end of the file and ask if the user wants the updater to remove those mods only once. This way we don't have to pest the user whether they want to remove each obsolete mod everytime an update happens.

Finally, for each mod, a file that indexes every file and directory, so you can clean up after downloading the torrent, the torrent file itself named after the mod and a mirror of the mod itself, so every file is available via http

www/updater/'foldername'.index.json

#!json
[
    { "p" : "mod.cpp",             "t" : "file" },
    { "p" : "addons",              "t" : "dir"  },
    { "p" : "addons\\ice_fps.pbo", "t" : "file" }
    ...
]

www/updater/'foldername'-'torrent-timestamp'.torrent
www/updater/'foldername'

where 'foldername' and 'torrent-timestamp' matches the values in www/updater/metadata.json


React on crash of subprocess

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


If a subprocess crashes or somehow throws a stack trace, the main process ignores that fact and does not terminate the "connection" to that process. It just stays up indefinitely.

The main program should react to that error. Preferably by:

  1. Understanding something has gone wrong and the installation failed
  2. Showing a failure message to the user
  3. Allowing to copy the stack trace by the user (to paste in a support forum or something) or even doing that by itself. The user should be informed that he can copy the trace or the trace has already been copied.

Arma Class

Originally reported by: The Sighter (Bitbucket: sighter, GitHub: sighter)


Create a class with the following specs:

package: arma

module : arma

Classname: Arma

Methods

  • *+ get_user_path() * this should return the place to the path where mods can be installed in the user folder
  • *+ get_installation_path() * this should return the folder there arma is installed and mods can be installed to (i.e. c:/program files/steam/commonapps/arma/)
  • + get_executable_path() return path to the arma executable
  • + run_game(modlist, profile) run the game in a separate process with all mods in modlist applied as command line parameters. Use possibility of actually building a text file here and then load arguments form there. The modlist parameter contains a list of real mod-class-instances. Profile name should also be applied.

Notes

All information should be retrieved from the registry


Find or implement a module to compare versions

Originally reported by: The Sighter (Bitbucket: sighter, GitHub: sighter)


  • implement constructor where you can init a version object with a version in form of a string
  • implement the magic functions which are used to compare objects (>, <, =)
  • if a mod has no proper comparable version scheme, derive a class from Version and compare versions with an given list of all version used in this special mod

add a mod class called "Mod"

Originally reported by: The Sighter (Bitbucket: sighter, GitHub: sighter)


There should be a class mod with the following attributes:

  • name - name of the mod like "@CBa3"
  • torrenturl - url to the torrent
  • version - a string representing the version of the mod
  • version_list (optional) - list of versions if the mod has no comparable version scheme
  • torrent_revision - a number to identify multiple torrent changes (i.e. failure of maintainer, maybe forgot to add a specific file or so) within one mod version

Httpsyncer throws an exception while removing downloaddir

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


While merging master changes to bittorrent_POC but this probably also shows up on master.
After successfully downloading CBA, the following stacktrace is shown.

download finished
hello
[INFO              ] [Logger      ] Record log in C:\Users\IEUser\.kivy\logs\kivy_15-02-24_4.txt
 Process SubProcess-1:
 Traceback (most recent call last):
   File "C:\Kivy-1.8.0-py2.7-win32\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
     self.run()
   File "C:\tacbf-launcher\src\sync\modmanager.py", line 20, in run
     syncer.sync()
   File "C:\tacbf-launcher\src\sync\httpsyncer.py", line 130, in sync
     shutil.rmtree(downloaddir)
   File "C:\Kivy-1.8.0-py2.7-win32\Python27\lib\shutil.py", line 252, in rmtree
     onerror(os.remove, fullname, sys.exc_info())
   File "C:\Kivy-1.8.0-py2.7-win32\Python27\lib\shutil.py", line 250, in rmtree
     os.remove(fullname)
 WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\ieuser\\appdata\\local\\temp\\tacbflauncherlhrjop\\CBA_A3_RC4.7z'

Force the termination of subprocesses

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


When terminating the main process from the UI (by clicking the X button at the top right) while a syncer is in progress, the main window disappears, but the syncer is still active and working.

There should be a way to inform the subprocess that it should terminate gracefully or at least a way to kill it.
Without that, the torrent syncer may download some mods for hours before it finally terminates, while holding file handles the whole time.


Remove files not contained in the torrent after mod download

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


After downloading a mod (or updating its contents), the module should list all the files contained in the torrent it just downloaded.
It should then compare those files to the directory tree. All files on disk but not contained in the torrent should be removed.
Extra care must be taken to not remove files outside of the mod directory.

Also, do not remove files created by #13.
Do not remove files that may have been created by PWS or other installers (need more research).


The launcher should not require online-metadata to launch the game

Originally reported by: The Sighter (Bitbucket: sighter, GitHub: sighter)


We have to be prepared so that the server hosting the metadata may go down. This may not prevent the player from running the game, especially if his version is up to date. As such, the interface should show up as soon as possible, and then maybe make the "play" button greyed out while metadata is retrieved. If this fails, show a message to the user and allow him to play the game regardless.

Thats a good one Lukasz!


Autoupdater window

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


We need a small grey window (something about ~400px x 40px), preferably borderless with a caption in the middle and a button to the right.

The caption will be used to print text like "autoupdater: waiting for application to close". Maybe something else like "autoupdater: error, timeout". The button should read "abort".

Should this go in an separate kivy app so you can start it independently? (Other kivyapp just means different python file with own bootstrap)

I'd like this to end up in the same exe as we have been using up until now. If "own boostrap" means that this will need a separate executable, then no. Otherwise, feel free to do it the way you prefer.

The purpose of this enhancement is to have a minimalistic way of notifying the user should something go wrong while autoupdating, which is done in another (new process). Also showing progress is another use of that window. As soon as the update is performed, the whole process will shut down, destroying that window and will call the new, updated exe.


Mod.fromDict may raise an error if dictionary does not contain certain entries

Originally reported by: overfl0 (Bitbucket: overfl0, GitHub: overfl0)


https://bitbucket.org/sighter/tacbf-launcher/src/1a21eb4009d970cf83387dc745b6e4c110596564/src/sync/mod.py?at=master#cl-34

If the dictionary does not contain keys 'version' or 'name', variables with the same name won't be created and will cause an error in line 38.
You probably want to use name = dict.setdefault('name', '<unknown_name>').


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.