MikeMirzayanov's blog

By MikeMirzayanov, 5 years ago, translation, In English,

Hello, Codeforces!

As you know the Linux package managers make life easier for users and administrators. In the Windows world, this is much worse, although there are some tools (in Windows 10 it will be much better): nuget, chocolatey, wpkg and others.

Maintaining Codeforces testing servers, computers of Programming Competitions Training Center of Saratov SU, installing workstations for different olympiads I finally got tired to write a variety of bat-files and decided to regularize the process.

Chocolatey makes good help, but in the details it turned out that it can't used in some cases: you can not specify the installation directory, there is no support for private repositories, lack of some packages, Chocolatey packages do not contain installers but only links for them (if package's official is down, one can't install the package).

That's why, in December 2014, I spent out several evenings to work on a package manager most convenient for our purposes (called PBOX, reads like a pi-box). I'm considering using PBOX to install specific software for Codeforces (concrete compilers and tools), but for programs of general purpose it is good idea to use Chocolatey.

In the coming months all the Codeforces testing servers (and many other computers of the CS department of Saratov State University), I plan to reinstall, and use in particular PBOX.

I have little use it for personal purposes, it seems to me, PBOX may be useful to someone from Codeforces users. The site http://pbox.me has usage examples. Below are a few explanations.

Installation

Visit http://pbox.me and in the administrative Windows console (search for cmd.exe, get the context menu by right mouse button, select Run as administrator) run the code from the website home page. PBOX written in Java, if you're not have it, then it will download JRE automatically. By the way, every time you start PBOX, it will try to self-update, so forget about updating it manually.

I usually turn off UAC, if you do not want you will always need to use administrative console. You can disable UAC by typing pbox -uac.

Usage

Do you want to install exactly the same g++ as Codeforces has? Just run pbox install mingw-tdm-gcc. It will install it to %HOMEDRIVE%\Programs\mingw-tdm-gcc (by default), add to PATH some directories (including MSYS), add environment variable MINGW_HOME.

Generally, to see exactly what will happen on installation simply visit the site to find the package and click Show pbox.xml.

For now PBOX has only 73 packages. Visit http://pbox.me/packages to explore them.

I like the collection of useful utilities called tools, so just run pbox install tools to install sysinternals tools, windows resource kit, support tools, and others like curl, wget, imdisk (add all of them to PATH). BTW, useful utility runexe.exe will also be installed: it is good to run processes and see time/memory usage.

Most compilers and tools will be installed to C:\Programs (actually to %HOMEDRIVE%\Programs). Quite convenient to have a path to them short and with no spaces unlike "Program Files".

You can use additional options like pbox install far --homedir=C:\Far --arch=32 --version=3.0.4040. To uninstall a package you can run: pbox uninstall far. Here are more examples of usage:

Description Command line
Ask PBOX to forget that it installed a package (but do not uninstall it) pbox forget <package>
Print package information (you can specify the version) pbox info <package> или pbox info <package> --version=version
Find package by title/description/tag pbox find <query> or pbox search <query>
Find package (find in all versions, not the latest only) pbox find <query> --all или pbox search <query> --all
Print all the packages in repository (latest versions or all) pbox list или pbox list --all
Print the list of all the installed packages pbox list-installed

Download a package and explore it

It is really easy. Just try: http://repo.pbox.me/1.0/jdk8/1.8.0_45/jdk8$1.8.0_45.pbox.7z

Source code

Visit: https://github.com/MikeMirzayanov/pbox

 
 
 
 
  • Vote: I like it
  • +192
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +70 Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +6 Vote: I do not like it

I love Java, but it feels weird to see that JRE instead of .NET is used for a package manager written specifically for Windows...

»
5 years ago, # |
  Vote: I like it +13 Vote: I do not like it

The future of the windows console! Hehe

  • »
    »
    5 years ago, # ^ |
      Vote: I like it -11 Vote: I do not like it

    In case you're looking for a console replacement on Windows,
    try ConEmu

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it +28 Vote: I do not like it

      I was just trying to promote their product. Ain't going back to windows :)

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

A quick question:
I see Sublime Text 3 in the package list. Isn't ST3 shareware?
So would I need to enter license if were to download the 3065 build package?

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It's awesome. I struggled a bit with since I am behind a authenticated proxy, but setting the wgetrc file made it work.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It's 502 right now, 2020 :'((