delphidabbler / gbg

A Windows command line program to create a file of a given size, filled with garbage.
https://delphidabbler.com/software/gbg
MIT License
3 stars 0 forks source link

gbg

A Windows command line program to create a file of a given size, filled with garbage.

Usage

gbg <filepath> <size> [options]
gbg -V
gbg

where

Note that - can be replaced by / in options. E.g. -a can be specified as /a and -V can be specified as /V.

Operation

Files up to 10MiB in size are generated with random bytes. Files larger than 10MiB have the first 10MiB bytes generated randomly, but then that same 10MiB pattern is repeated as many times as necessary. If the requested file size is zero then an empty file is created.

By default, if a file size of more than 500,000,000 (500Mb) is entered then the user is asked to confirm the size. This behaviour can be overridden by specifying either the -l or -L options (see above).

If the given file already exists the user is asked to confirm that the file can be overwritten. This behaviour can be overridden by specifying either the -o or -O options (see above).

Installing & Uninstalling

gbg can be downloaded from the project's Releases page on GitHub. The download for each release is named gbg-exe-<version>.zip, where <version> represents the release version number.

The zip file contains:

There is no installation program. Simply copy GBG.xe or GBG32.exe to any folder on your computer and run it from there. gbg will happily run from USB or SD drives.

To uninstall simply delete the .exe file from wherever you copied it to.

:information_source: The program does not alter your Windows installation. It creates no registry entries and does not create any configuration files.

Source Code

Full source code is available from the delphidabbler/gbg project on GitHub.

Contributing

Contributions are welcome.

The GitFlow methodology is used. Please fork the repository above then create a feature branch off the develop branch. When you have made your changes please rebase you branch onto develop then submit a pull request on GitHub.

:no_entry: Pull requests that have been branched from main will be rejected.

Compiling

gbg is compiled using Delphi 12.1. Delphi 11 may work, but has not been tested.

The program can be compiled from the Delphi IDE as 32 bit or 64 bit Windows targets and as either Debug or Release builds. Just choose the appropriate target platform and build configuration in the IDE before building.

The build chain requires DelphiDabbler Version Information Editor ~> v2.15.0 to be installed and for its installation path to be stored in the VIEDROOT environment variable. This environment variable can be set in the Delphi Tools | Options dialogue box in the IDE | Environment Variables section: use the User System Overrides section to set VIEDROOT.

Releases are built by calling Deploy.bat. See the comments in the file for usage information and details of dependencies. The script will compile the 32 and 64 bit release targets and generate a read-me file before finally creating a zip file containing them all.

Bugs and Feature requests

To suggest new features or report bugs use the gbg Issues page on GitHub.

License

gbg is MIT licensed. See LICENSE.md.

Change Log

Changes in each release are documentation in CHANGELOG.md.