### MikeMirzayanov's blog

By MikeMirzayanov, 7 years ago, translation,

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

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

• +192

 » 7 years ago, # |   +70
 » 7 years ago, # |   +6 I love Java, but it feels weird to see that JRE instead of .NET is used for a package manager written specifically for Windows...
 » 7 years ago, # |   +13 The future of the windows console! Hehe
•  » » 7 years ago, # ^ |   -11 In case you're looking for a console replacement on Windows,try ConEmu
•  » » » 7 years ago, # ^ |   +28 I was just trying to promote their product. Ain't going back to windows :)
 » 7 years ago, # |   0 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?
 » 7 years ago, # |   0 It's awesome. I struggled a bit with since I am behind a authenticated proxy, but setting the wgetrc file made it work.
 » 20 months ago, # |   0 It's 502 right now, 2020 :'((
•  » » 20 months ago, # ^ |   0 Hi. Please, try now.
•  » » » 20 months ago, # ^ |   0 Thank you so much. It's working!Have a nice Fools Day!
 » 16 months ago, # |   +8 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?
•  » » 16 months ago, # ^ |   +12 http://pbox.me/packages search fo gcc and you'll find many versiosn
•  » » » 16 months ago, # ^ | ← Rev. 2 →   0 Would http://pbox.me/packages/msys2-mingw64-9 work for higher versions of c++?
 » 6 weeks ago, # |   +2 Isn't it apparent the real issue is using Windows?
•  » » 6 weeks ago, # ^ |   0 What do you mean? PBOX works fine on Windows!
•  » » » 6 weeks ago, # ^ | ← Rev. 3 →   +1 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.
•  » » » » 6 weeks ago, # ^ |   0 Oh! Yeah, you are right that generally windows is not designed to support a package manager. I thought you were referring to PBOX.