This file tracks changes made exclusively on the windows-dev branch that relate to the native Windows GUI (mcaster1win.exe), Visual Studio build infrastructure, and Windows-specific runtime fixes. Cross-platform server changes are in CHANGELOG.md.
[2.5.1-beta.2-win]
📅 2026-02-22 🌿 windows-dev branch

HTTP Admin Authentication — WWW-Authenticate Header Missing on Windows

Root cause: A struct field order mismatch in the MSVC-specific code path in src/params.c. The mc_param_t struct is declared as {next, flags, name_len, value_len, name, value, …} but both mc_params_printf() and mc_http_printf() MSVC blocks used a positional initializer:

mc_param_t hdr = { NULL, (char*)name, content, flags };
//                 ^next  ^flags(!)   ^name_len(!) ...

This left hdr.name = NULL and hdr.value = NULL. mc_http_apply() checked for both null and returned -1 immediately — silently discarding every response header set via mc_http_printf() on Windows. Affected headers included: WWW-Authenticate, Content-Type, Content-Length, Location, Content-Range, User-Agent, and all per-response headers.

Effect: Admin 401 responses had no WWW-Authenticate header, so browsers displayed an error page instead of a credentials dialog. Other endpoints lost Content-Type etc.

Fix (src/params.c): Replaced wrong positional initializers with memset + explicit field assignments in both mc_params_printf and mc_http_printf MSVC blocks:

mc_param_t hdr;
memset (&hdr, 0, sizeof hdr);
hdr.name  = (char*)name;
hdr.value = content;
hdr.flags = (uint32_t)flags;

Affects both Mcaster1Win.vcxproj and Mcaster1Console.vcxproj builds.

Per-Listener SSL Enforcement (ssl: true/false)

Example YAML:

listen-sockets:
  - port: 9330
    bind-address: "127.0.0.1"
    ssl: false      # plain HTTP only
  - port: 9443
    bind-address: "127.0.0.1"
    ssl: true       # TLS only

SSL Certificate Generation CLI (src/ssl_gen.h / src/ssl_gen.c)

New cross-platform OpenSSL-based certificate/CSR generator guarded by #ifdef HAVE_OPENSSL.

New flags (all platforms):

FlagDescription
--ssl-gencertTrigger SSL generation mode (server does not start)
--ssl-gentype=selfsigned|csrOutput type: self-signed cert or CSR
--subj="/C=.../CN=..."X.509 subject string (standard openssl format)
--ssl-gencert-savepath=<dir>Output directory (created if absent)
--ssl-gencert-addtoconfig=truePatch ssl-certificate/ssl-private-key paths in the -c config file

Self-signed output (--ssl-gentype=selfsigned)

CSR output (--ssl-gentype=csr)

Windows C++ wrapper (windows/SslGen.h / windows/SslGen.cpp)

Example usage (console):

mcaster1.exe --ssl-gencert --ssl-gentype=selfsigned \
  --subj="/C=US/ST=TX/L=Dallas/O=MyStation/CN=localhost" \
  --ssl-gencert-savepath=ssl/certs \
  --ssl-gencert-addtoconfig=true -c windows/mcaster1dnas.yaml

See SSL Certificate Generation for the full guide.

Config File Auto-Discovery

When no -c <file> argument is given the server searches in this order:

  1. <exe-directory>/mcaster1dnas.yaml
  2. ./mcaster1dnas.yaml (current working directory)
  3. If neither found → prompt user

Windows GUI Log Viewer Tabs (4 new tabs)

Added LogTab.h / LogTab.cpp implementing CLogTab : CTabPageSSL:

TabLog File
Access Logcfg->access_log.name in cfg->log_dir
Error Logcfg->error_log.name in cfg->log_dir
YP Healthcfg->yp_logfile[0] (first YP directory)
Playlist Logcfg->playlist_log.name in cfg->log_dir

Uptime Clock

System Time Status Bar

Portable Windows Dev Config (windows/mcaster1dnas.yaml)

Updated to use relative paths ("." as basedir) and full ICY 2.2 mount metadata:

ResizableLib Anchoring

About → Help

OnAboutHelp() now calls ShellExecuteA to open https://mcaster1.com/mcaster1dnas/ in the default browser instead of launching a CHM file that no longer existed.

Tab Header Label Overlap

TestResult
MSBuild x64 Debug Mcaster1Win — 0 errorsPASS
MSBuild x64 Debug Mcaster1Console — 0 errorsPASS
HTTP admin auth (browser login dialog appears)PASS (after mc_http_printf fix)
Log tabs real-time tailing while server runningPASS
Uptime clock tickingPASS
System time clock updatingPASS
Resize / Maximize — all controls anchoredPASS

[2.5.1-beta.1-win]
📅 2026-02-18/19 🌿 windows-dev branch

Project & Solution Modernisation

vcpkg Dependency Integration

All third-party libraries now sourced through vcpkg (x64-windows triplet):

Automatic Git Version Stamping (PreBuildEvent)

Command-Line Flags

Added full CLI argument parsing to Mcaster1WinDlg.cpp:

FlagBehaviour
-c <file>Specify config file path (overrides default .\mcaster1.yaml search)
-sAuto-start the server on launch (no button click required)
-mStart minimised to system tray
-vPrint version string and exit
-hPrint help and exit

These allow the GUI to be scripted, launched from shortcuts with specific configs, or started automatically as a login item.

ResizableLib Integration (Resizable Dialogs)

Integrated ResizableLib by Paolo Messina (MIT/Artistic-2.0) into the project:

CResizableDialog::OnSize(nType, cx, cy);   // moves IDC_MAINTAB via anchor
m_MainTab.ResizeDialog(active, ...);        // propagates to active tab page

Bugs fixed during ResizableLib integration

Build configuration for ResizableLib in vcxproj: Each ResizableLib .cpp entry carries per-file <PrecompiledHeader>NotUsing</PrecompiledHeader> and <AdditionalIncludeDirectories>$(ProjectDir)ResizableLib;...</AdditionalIncludeDirectories> so the library finds its own StdAfx.h (which defines WINVER 0x0501, uxtheme.h, shlwapi.h) without conflicting with the main project’s precompiled header.

Root Cause

yaml_parser_load() crashed on Windows when called with a FILE* opened by the main exe. yaml.dll (from vcpkg) was compiled against a different C runtime (UCRT) than the MSVC-compiled exe, making the FILE struct layout binary-incompatible. Any read attempt inside libyaml dereferenced invalid struct offsets → access violation.

The last successful trace line before the crash was:

[yaml] yaml_parser_load          ← trace written BEFORE the call; nothing after = crash inside

XML config was unaffected because libxml2 opens the file internally using its own CRT handles.

Fix Applied (src/cfgfile_yaml.cconfig_parse_yaml_file())

Verified by full trace log after fix:

[yaml] file read into memory
[yaml] yaml_parser_initialize ok
[yaml] yaml_parser_load
[yaml] yaml_parser_load ok          ← was the crash point; now passes cleanly
[yaml] root node ok
[yaml] root is mapping
[yaml] config_init_configuration ok
[yaml] yaml_parse_root
[yaml] yaml_parse_root done
[si]  connection_setup_sockets ok
[si]  server_init done -> returning 0
[3]   server_process starting

Diagnostic Infrastructure (retained for future use)

Full Visual Rebrand: Icecast2 → Mcaster1DNAS

Replaced all Icecast2 bitmap assets in windows/ with Mcaster1DNAS branded equivalents:

XML Config (windows/x64/Debug/mcaster1.xml)

YAML Config (windows/x64/Debug/mcaster1.yaml)

TestResult
MSBuild x64 Debug — 0 errorsPASS
Window launch + 15s resize stress testPASS
Resize to 900×700PASS
Maximize → 1550×830PASS
Restore → 900×700PASS
Process survival (no crash)PASS
XML config server start (-c mcaster1.xml -s)PASS — 15s healthy
YAML config server start (-c mcaster1.yaml -s)PASS — 15s healthy
Full YAML trace (23/23 checkpoints)PASS

See also the main README.md roadmap section.

See Also