This replaces the widget that controls the music pack path with a
window action button that just opens the configured music pack path.
The path is now automatically created and populated with an
explanatory README file that should explain the purpose to users.
Another major step in implementing #1051.
Currently the user has to create a music pack directory themselves and
configure the path to it in the setup tool. To make configuration
simpler, just create a directory automatically along with a README file
about how to use it, since the user can now just dump files in this
directory.
Part of #1051.
It may be desirable to wrap a window action in a txt_conditional_t
sometimes so that actions dynamically appear based on how the config
changes. So change the TXT_SetWindowAction() API to accept any widget
instead of mandating a txt_window_action_t.
Music packs may be in .flac or .ogg format, so check for both by
using a template with .{ext} where the .flac or .ogg should go. This
also allows the .{ext} syntax to be used in config files.
Part of #1051.
Having a built-in table of common hashes and well-known filenames means
that configuration files will not be necessary in the majority of cases.
This implements most of the functionality of #1051.
Just as with (eg.) Git it's nice to be able to refer to as hash by a
prefix instead of having to type the whole thing, it's convenient to
be able to give a hash prefix in a substitute music configuration.
This change to the internals will also make it simpler to support
a preconfigured table of filenames.
When playing in three window mode it's potentially helpful to have a
borderless mode so that the user can line up three windows next to
each other on a single desktop. However, without the windows borders
it's difficult/impossible to move windows around, so I'm not sure yet
how useful this actually is. It probably depends on the OS.
Thanks to joshthenesnerd for the suggestion.
Doom has always had the ability to load response files containing
extra command line arguments but the command line syntax of
'@filename.rsp' is unpleasant to use on modern Unix shells because
it breaks tab completion. It's actually more convenient to just have
a normal command line argument, so add one.
Some platforms (eg. Emscripten) have their own version of the ar tool,
so it is important to pick one that matches the target architecture.
Without this macro we always use the default system-installed version
of ar.
This prevented either paramater from working properly, since they
would be incorrectly trying to set the other dimension and immediately
switching video modes. Now works like -geometry does.
Resolves#1086
While plain-text versions generally worked, they have been slightly
littered recently with Markdown syntax. We should be able to assume
every Windows user has a web browser and can view these documents
in nicely-formatted HTML pages instead of opening Notepad.
This adds an additional search path when looking for IWADs - in addition
to checking the current working directory, also look in the directory
where the program executable is located.
To give some context for why I'm adding this: apparently there's a small
number of users who do something very unpleasant that I'd really prefer
they didn't: they "install" Chocolate Doom into Steam by replacing
dosbox.exe from their Steam installation of Doom with a renamed version
of `chocolate-doom.exe`. Yuck, I don't approve - it's a grotesque hack.
This works but it has a bug: Chocolate Doom picks up the Steam IWADs
from Windows registry keys. This means that it always starts doom2.wad,
and launching "Ultimate Doom" will actually launch Doom II. This solves
that problem, and while I don't approve of dumb Steam hacks, the change
itself is reasonable and it's an eminently sensible place to look for an
IWAD file.
The new functions significantly improve readability and I'm pretty
sure that most of these changes produce logic that is equivalent to
the existing logic.
These extract the directory / base filename, equivalent to the Unix
`dirname` / `basename` commands. Repeated code throughout the codebase
seems to reimplement this particular functionality.