Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

g0dsCookie/FastDLCompressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastDLCompressor

Introduction

FastDLCompressor is a tool to create a compressed FastDL directory for Garry's Mod.

Usage

Open a command line window (cmd.exe) and run the compressor with your source and target directory.

FastDLCompressor.exe -s <source> -t <target>
  • <source> is the source directory, that should be compressed
  • <target> is your FastDL directory, where the compressed files should be stored

Warning: The target directory will be deleted before compression!

Example

FastDLCompressor.exe -s C:\resources -t C:\fastdl

Usage with settings.json

settings.json

{
    "sources": [
        {
            "dir": "C:\\first\\dir"
        },
        {
            "dir": "C:\\second\\dir"
            "includes": [
                "materials/test(/.*)?"
            ],
            "excludes": [
                "materials/.*"
            ]
        }
    ],
    "compression": {
        "level": 9,
        "minimumSize": 5120
    },
    "ftp": {
        "username": "",
        "password": "",
        "hostname": "",
        "threads": 2
    },
    "log": {
        "file": "compressor.log",
        "append": true,
        "severity": "INFO"
    },
    "target": "C:\\target",
    "cleanupTarget": true,
    "threads": 0,
    "verbose": false
}

The above example uses two source directories. C:\first\dir and C:\second\dir.

The first directory is used without any restrictions.

The second directory defines some restrictions. Includes will match first. If they match, excludes won't be matched on this path. So in the above example only the materials/test directory from materials/ will be included.

The target directory is set to C:\target and will be deleted first, because cleanupTarget is set to true.

The compressor will use all logical processors for compression, because threads is set to 0. threads can be set to any value >= 0 and indicates how many threads should be used.

Only files bigger than 5 KiB will be compressed with a compression level of 9.

Run

FastDLCompressor.exe -c C:\settings.json