MikeMirzayanov's blog

By MikeMirzayanov, 9 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

| Write comment?
»
9 years ago, # |
  Vote: I like it +70 Vote: I do not like it

»
9 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...

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

The future of the windows console! Hehe

  • »
    »
    9 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

    • »
      »
      »
      9 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 :)

»
9 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?

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

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

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Hey MikeMirzayanov, pbox install mingw-tdm-gcc installs g++ version 5.1.0 which doesn't support c++11 and newer version. Can you please suggest some solution for this?

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

Isn't it apparent the real issue is using Windows?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    What do you mean? PBOX works fine on Windows!

    • »
      »
      »
      2 years ago, # ^ |
      Rev. 3   Vote: I like it +1 Vote: I do not like it

      I mean in general, the Windows ecosystem is not designed with a package manager in mind, rather every program has its own installer and no consistent interface besides having an uninstaller program. PBOX, while noble in attempt, simply does not have enough community support (maintainers being a part of that) to rival something like Debian/Ubuntu's packages, Arch's AUR, Fedora package sources, etc.

      I will also note that I don't trust windows to be efficient for servers. It was specifically using Windows for the CF servers that cause Mike to have to use someone else's C++ distributions and what caused pypy to be so slow. A friend who claims to be familiar with CF's backend also tells me it is very fragile, and I suspect using a windows server is part of that.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Oh! Yeah, you are right that generally windows is not designed to support a package manager. I thought you were referring to PBOX.