Skip to content

Commit 3184bed

Browse files
committed
docs: List MSYS2 packages required to build PDF documentation on Windows now that TeX Live is available.
1 parent 11320fc commit 3184bed

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

docs/source/initialsetup/compilingmame.rst

+11-2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ with MSYS2 and the **pacman** package manager.
115115
``mingw-w64-i686-python-sphinx``, ``mingw-w64-i686-python-sphinx_rtd_theme``
116116
and ``mingw-w64-x86_64-python-sphinxcontrib-svg2pdfconverter`` a 32-bit MinGW
117117
environment).
118+
* To build the PDF documentation, you’ll additionally need
119+
``mingw-w64-x86_64-texlive-latex-extra`` and
120+
``mingw-w64-x86_64-texlive-fonts-recommended`` (or
121+
``mingw-w64-i686-texlive-latex-extra`` and
122+
``mingw-w64-i686-texlive-fonts-recommended`` for a 32-but MinGW environment).
118123
* To generate API documentation from source, you’ll need ``doxygen``.
119124
* If you plan to rebuild bgfx shaders and you want to rebuild the GLSL parser,
120125
you’ll need ``bison``.
@@ -405,8 +410,12 @@ can install these packages with
405410
406411
pacman -S mingw-w64-x86_64-librsvg mingw-w64-x86_64-python-sphinx mingw-w64-x86_64-python-sphinxcontrib-svg2pdfconverter
407412
408-
Note that no LaTeX packages currently exist for MSYS2 so you will not be able to
409-
generate a PDF file without using external tools.
413+
If you intend to make a PDF via LaTeX, you’ll need to install a LaTeX
414+
distribution such as TeX Live:
415+
416+
.. code-block:: bash
417+
418+
pacman -S mingw-w64-x86_64-texlive-fonts-recommended mingw-w64-x86_64-texlive-latex-extra
410419
411420
.. _compiling-docs-debian:
412421

src/lib/formats/fs_coco_os9.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ u32 coco_os9_image::pick_integer_be(const u8 *data, int length)
208208
{
209209
u32 result = 0;
210210
for (int i = 0; i < length; i++)
211-
result |= ((u32)data[length - i - 1]) << i * 8;
211+
result |= u32(data[length - i - 1]) << i * 8;
212212
return result;
213213
}
214214

@@ -406,7 +406,7 @@ std::vector<u8> coco_os9_image::impl::read_file_data(const file_header &header)
406406
for (u32 lsn = start_lsn; lsn < start_lsn + count; lsn++)
407407
{
408408
auto block = m_blockdev.get(lsn);
409-
size_t block_size = std::min(std::min((u32)m_volume_header.sector_size(), block.size()), header.file_size() - (u32)data.size());
409+
size_t block_size = std::min(std::min(u32(m_volume_header.sector_size()), block.size()), header.file_size() - u32(data.size()));
410410
for (auto i = 0; i < block_size; i++)
411411
data.push_back(block.rodata()[i]);
412412
}
@@ -525,7 +525,7 @@ std::vector<dir_entry> coco_os9_image::impl::directory::contents()
525525

526526
filesystem_t::file_t coco_os9_image::impl::directory::file_get(u64 key)
527527
{
528-
file_header header(m_fs.m_blockdev.get((u32) key));
528+
file_header header(m_fs.m_blockdev.get(u32(key)));
529529
return file_t(new file(m_fs, std::move(header)));
530530
}
531531

@@ -536,7 +536,7 @@ filesystem_t::file_t coco_os9_image::impl::directory::file_get(u64 key)
536536

537537
filesystem_t::dir_t coco_os9_image::impl::directory::dir_get(u64 key)
538538
{
539-
return dir_t(m_fs.open_directory((u32) key));
539+
return dir_t(m_fs.open_directory(u32(key)));
540540
}
541541

542-
}
542+
} // namespace fs

src/lib/formats/fs_coco_rsdos.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ u8 coco_rsdos_image::impl::maximum_granules() const
116116
{
117117
u32 sector_count = m_blockdev.block_count();
118118
u32 granule_count = (sector_count / 9) - 2;
119-
return granule_count <= 0xFF ? (u8)granule_count : 0xFF;
119+
return granule_count <= 0xFF ? u8(granule_count) : 0xFF;
120120
}
121121

122122
std::string coco_rsdos_image::impl::get_filename_from_dirent(const rsdos_dirent &dirent)
@@ -180,7 +180,7 @@ coco_rsdos_image::impl::granule_iterator::granule_iterator(impl &fs, const rsdos
180180
: m_granule_map(fs.read_sector(17, 2))
181181
, m_current_granule(dirent.m_first_granule)
182182
, m_maximum_granules(fs.maximum_granules())
183-
, m_last_sector_bytes(((u16) dirent.m_last_sector_bytes_msb << 8) | dirent.m_last_sector_bytes_lsb)
183+
, m_last_sector_bytes((u16(dirent.m_last_sector_bytes_msb) << 8) | dirent.m_last_sector_bytes_lsb)
184184
{
185185
}
186186

@@ -206,7 +206,7 @@ bool coco_rsdos_image::impl::granule_iterator::next(u8 &granule, u16 &byte_count
206206
// this is the last granule in the file
207207
success = true;
208208
granule = *m_current_granule;
209-
u16 sector_count = std::max(granule_map_data[*m_current_granule], (u8)0xC1) - 0xC1;
209+
u16 sector_count = std::max(granule_map_data[*m_current_granule], u8(0xC1)) - 0xC1;
210210
byte_count = sector_count * 256 + m_last_sector_bytes;
211211
m_current_granule = std::nullopt;
212212
}
@@ -280,7 +280,7 @@ std::vector<u8> coco_rsdos_image::impl::file::read_all()
280280
// read this sector
281281
auto block = m_fs.read_sector(track, sector);
282282
const u8 *data = block.rodata();
283-
u16 data_length = std::min(byte_count, (u16)256);
283+
u16 data_length = std::min(byte_count, u16(256));
284284

285285
// and append it to the results
286286
memcpy(result.data() + current_size, data, data_length);

0 commit comments

Comments
 (0)