Debian Codegraph @

common/version.cpp

raw
1 /*
2 * version.cpp
3 * -----------
4 * Purpose: OpenMPT version handling.
5 * Notes : (currently none)
6 * Authors: OpenMPT Devs
7 * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
8 */
9
10 #include "stdafx.h"
11 #include "version.h"
12
13 #include "mpt/format/join.hpp"
14 #include "mpt/parse/parse.hpp"
15 #include "mpt/string/utility.hpp"
16
17 #include "mptString.h"
18 #include "mptStringFormat.h"
19
20 #include "versionNumber.h"
21
22 #if __has_include("svn_version.h")
23 #include "svn_version.h"
24 #else
25 #include "../build/svn_version/svn_version.h"
26 #endif
27
28
29
30 OPENMPT_NAMESPACE_BEGIN
31
32
33
34 #define MPT_MAKE_VERSION_NUMERIC_HELPER(prefix,v0,v1,v2,v3) Version( prefix ## v0 , prefix ## v1 , prefix ## v2 , prefix ## v3 )
35 #define MPT_MAKE_VERSION_NUMERIC(v0,v1,v2,v3) MPT_MAKE_VERSION_NUMERIC_HELPER(0x, v0, v1, v2, v3)
36
37 #define MPT_VERSION_CURRENT MPT_MAKE_VERSION_NUMERIC(VER_MAJORMAJOR,VER_MAJOR,VER_MINOR,VER_MINORMINOR)
38
39
40
41 static_assert((MPT_VERSION_CURRENT.GetRawVersion() & 0xffffu) != 0x0000u, "Version numbers ending in .00.00 shall never exist again, as they make interpreting the version number ambiguous for file formats which can only store the two major parts of the version number (e.g. IT and S3M).");
42
43
44
45 Version Version::Current() noexcept
46 {
47 return MPT_VERSION_CURRENT;
48 }
49
50 mpt::ustring Version::GetOpenMPTVersionString() const
51 {
52 return U_("OpenMPT ") + ToUString();
53 }
54
55 Version Version::Parse(const mpt::ustring &s)
56 {
57 uint32 result = 0;
58 std::vector<mpt::ustring> numbers = mpt::split(s, U_("."));
59 for (std::size_t i = 0; i < numbers.size() && i < 4; ++i)
60 {
61 result |= (mpt::parse_hex<unsigned int>(numbers[i]) & 0xff) << ((3 - i) * 8);
62 }
63 return Version(result);
64 }
65
66 mpt::ustring Version::ToUString() const
67 {
68 uint32 v = m_Version;
69 if(v == 0)
70 {
71 // Unknown version
72 return U_("Unknown");
73 } else if((v & 0xFFFF) == 0)
74 {
75 // Only parts of the version number are known (e.g. when reading the version from the IT or S3M file header)
76 return MPT_UFORMAT("{}.{}")(mpt::ufmt::HEX((v >> 24) & 0xFF), mpt::ufmt::HEX0<2>((v >> 16) & 0xFF));
77 } else
78 {
79 // Full version info available
80 return MPT_UFORMAT("{}.{}.{}.{}")(mpt::ufmt::HEX((v >> 24) & 0xFF), mpt::ufmt::HEX0<2>((v >> 16) & 0xFF), mpt::ufmt::HEX0<2>((v >> 8) & 0xFF), mpt::ufmt::HEX0<2>((v) & 0xFF));
81 }
82 }
83
84 Version Version::WithoutTestNumber() const noexcept
85 {
86 return Version(m_Version & 0xFFFFFF00u);
87 }
88
89 Version Version::WithoutPatchOrTestNumbers() const noexcept
90 {
91 return Version(m_Version & 0xFFFF0000u);
92 }
93
94 bool Version::IsTestVersion() const noexcept
95 {
96 return (
97 // Legacy
98 (*this > MPT_V("1.17.02.54") && *this < MPT_V("1.18.02.00") && *this != MPT_V("1.18.00.00"))
99 ||
100 // Test builds have non-zero VER_MINORMINOR
101 (*this > MPT_V("1.18.02.00") && ((m_Version & 0xFFFFFF00u) != m_Version))
102 );
103 }
104
105
106
107 namespace Source {
108
109 static mpt::ustring GetUrl()
110 {
111 #ifdef OPENMPT_VERSION_URL
112 return mpt::ToUnicode(mpt::Charset::ASCII, OPENMPT_VERSION_URL);
113 #else
114 return mpt::ustring();
115 #endif
116 }
117
118 static int GetRevision()
119 {
120 #if defined(OPENMPT_VERSION_REVISION)
121 return OPENMPT_VERSION_REVISION;
122 #elif defined(OPENMPT_VERSION_SVNVERSION)
123 std::string svnversion = OPENMPT_VERSION_SVNVERSION;
124 if(svnversion.length() == 0)
125 {
126 return 0;
127 }
128 if(svnversion.find(":") != std::string::npos)
129 {
130 svnversion = svnversion.substr(svnversion.find(":") + 1);
131 }
132 if(svnversion.find("-") != std::string::npos)
133 {
134 svnversion = svnversion.substr(svnversion.find("-") + 1);
135 }
136 if(svnversion.find("M") != std::string::npos)
137 {
138 svnversion = svnversion.substr(0, svnversion.find("M"));
139 }
140 if(svnversion.find("S") != std::string::npos)
141 {
142 svnversion = svnversion.substr(0, svnversion.find("S"));
143 }
144 if(svnversion.find("P") != std::string::npos)
145 {
146 svnversion = svnversion.substr(0, svnversion.find("P"));
147 }
148 return mpt::parse<int>(svnversion);
149 #else
150 MPT_WARNING_STATEMENT("SVN revision unknown. Please check your build system.");
151 return 0;
152 #endif
153 }
154
155 static bool IsDirty()
156 {
157 #if defined(OPENMPT_VERSION_DIRTY)
158 return OPENMPT_VERSION_DIRTY != 0;
159 #elif defined(OPENMPT_VERSION_SVNVERSION)
160 std::string svnversion = OPENMPT_VERSION_SVNVERSION;
161 if(svnversion.length() == 0)
162 {
163 return false;
164 }
165 if(svnversion.find("M") != std::string::npos)
166 {
167 return true;
168 }
169 return false;
170 #else
171 return false;
172 #endif
173 }
174
175 static bool HasMixedRevisions()
176 {
177 #if defined(OPENMPT_VERSION_MIXEDREVISIONS)
178 return OPENMPT_VERSION_MIXEDREVISIONS != 0;
179 #elif defined(OPENMPT_VERSION_SVNVERSION)
180 std::string svnversion = OPENMPT_VERSION_SVNVERSION;
181 if(svnversion.length() == 0)
182 {
183 return false;
184 }
185 if(svnversion.find(":") != std::string::npos)
186 {
187 return true;
188 }
189 if(svnversion.find("-") != std::string::npos)
190 {
191 return true;
192 }
193 if(svnversion.find("S") != std::string::npos)
194 {
195 return true;
196 }
197 if(svnversion.find("P") != std::string::npos)
198 {
199 return true;
200 }
201 return false;
202 #else
203 return false;
204 #endif
205 }
206
207 static bool IsPackage()
208 {
209 #if defined(OPENMPT_VERSION_IS_PACKAGE)
210 return OPENMPT_VERSION_IS_PACKAGE != 0;
211 #else
212 return false;
213 #endif
214 }
215
216 static mpt::ustring GetSourceDate()
217 {
218 #if defined(OPENMPT_VERSION_DATE)
219 return mpt::ToUnicode(mpt::Charset::ASCII, OPENMPT_VERSION_DATE);
220 #else
221 return mpt::ustring();
222 #endif
223 }
224
225 } // namespace Source
226
227 SourceInfo::SourceInfo()
228 : m_Url(Source::GetUrl())
229 , m_Revision(Source::GetRevision())
230 , m_IsDirty(Source::IsDirty())
231 , m_HasMixedRevisions(Source::HasMixedRevisions())
232 , m_IsPackage(Source::IsPackage())
233 , m_Date(Source::GetSourceDate())
234 {
235 }
236
237 mpt::ustring SourceInfo::GetUrlWithRevision() const
238 {
239 if(m_Url.empty() || (m_Revision == 0))
240 {
241 return mpt::ustring();
242 }
243 return m_Url + UL_("@") + mpt::ufmt::val(m_Revision);
244 }
245
246 mpt::ustring SourceInfo::GetStateString() const
247 {
248 mpt::ustring retval;
249 if(m_IsDirty)
250 {
251 retval += UL_("+dirty");
252 }
253 if(m_HasMixedRevisions)
254 {
255 retval += UL_("+mixed");
256 }
257 if(retval.empty())
258 {
259 retval += UL_("clean");
260 }
261 if(m_IsPackage)
262 {
263 retval += UL_("-pkg");
264 }
265 return retval;
266 }
267
268 SourceInfo SourceInfo::Current()
269 {
270 return SourceInfo();
271 }
272
273
274
275 VersionWithRevision VersionWithRevision::Current()
276 {
277 return {Version::Current(), static_cast<uint64>(SourceInfo::Current().Revision())};
278 }
279
280 VersionWithRevision VersionWithRevision::Parse(const mpt::ustring &s)
281 {
282 Version version = Version::Parse(mpt::ustring());
283 uint64 revision = 0;
284 const auto tokens = mpt::split(s, U_("-"));
285 if(tokens.size() >= 1)
286 {
287 version = Version::Parse(tokens[0]);
288 }
289 if(tokens.size() >= 2)
290 {
291 revision = mpt::parse<uint64>(tokens[1].substr(1));
292 }
293 return {version, revision};
294 }
295
296 mpt::ustring VersionWithRevision::ToUString() const
297 {
298 if(!HasRevision())
299 {
300 return mpt::ufmt::val(version);
301 }
302 if(!version.IsTestVersion())
303 {
304 return mpt::ufmt::val(version);
305 }
306 return MPT_UFORMAT("{}-r{}")(version, revision);
307 }
308
309
310
311
312 namespace Build {
313
314 bool IsReleasedBuild()
315 {
316 return !(Version::Current().IsTestVersion() || IsDebugBuild() || Source::IsDirty() || Source::HasMixedRevisions());
317 }
318
319 bool IsDebugBuild()
320 {
321 #if defined(MPT_BUILD_DEBUG) || defined(DEBUG) || defined(_DEBUG)
322 return true;
323 #else
324 return false;
325 #endif
326 }
327
328 mpt::ustring GetBuildDateString()
329 {
330 mpt::ustring result;
331 #ifdef MODPLUG_TRACKER
332 #if defined(OPENMPT_BUILD_DATE)
333 result = mpt::ToUnicode(mpt::Charset::ASCII, OPENMPT_BUILD_DATE );
334 #else
335 result = mpt::ToUnicode(mpt::Charset::ASCII, __DATE__ " " __TIME__ );
336 #endif
337 #else // !MODPLUG_TRACKER
338 result = SourceInfo::Current().Date();
339 #endif // MODPLUG_TRACKER
340 return result;
341 }
342
343 static mpt::ustring GetBuildFlagsString()
344 {
345 mpt::ustring retval;
346 #ifdef MODPLUG_TRACKER
347 #if defined(MPT_BUILD_RETRO)
348 retval += UL_(" RETRO");
349 #endif // MPT_BUILD_RETRO
350 if(Version::Current().IsTestVersion())
351 {
352 retval += UL_(" TEST");
353 }
354 #endif // MODPLUG_TRACKER
355 if(IsDebugBuild())
356 {
357 retval += UL_(" DEBUG");
358 }
359 return retval;
360 }
361
362 mpt::ustring GetBuildFeaturesString()
363 {
364 mpt::ustring retval;
365 #ifdef LIBOPENMPT_BUILD
366 retval = UL_("")
367 #if defined(MPT_WITH_ZLIB)
368 UL_(" +ZLIB")
369 #endif
370 #if defined(MPT_WITH_MINIZ)
371 UL_(" +MINIZ")
372 #endif
373 #if !defined(MPT_WITH_ZLIB) && !defined(MPT_WITH_MINIZ)
374 UL_(" -INFLATE")
375 #endif
376 #if defined(MPT_WITH_MPG123)
377 UL_(" +MPG123")
378 #endif
379 #if defined(MPT_WITH_MINIMP3)
380 UL_(" +MINIMP3")
381 #endif
382 #if defined(MPT_WITH_MEDIAFOUNDATION)
383 UL_(" +MF")
384 #endif
385 #if !defined(MPT_WITH_MPG123) && !defined(MPT_WITH_MINIMP3) && !defined(MPT_WITH_MEDIAFOUNDATION)
386 UL_(" -MP3")
387 #endif
388 #if defined(MPT_WITH_OGG) && defined(MPT_WITH_VORBIS) && defined(MPT_WITH_VORBISFILE)
389 UL_(" +VORBIS")
390 #endif
391 #if defined(MPT_WITH_STBVORBIS)
392 UL_(" +STBVORBIS")
393 #endif
394 #if !(defined(MPT_WITH_OGG) && defined(MPT_WITH_VORBIS) && defined(MPT_WITH_VORBISFILE)) && !defined(MPT_WITH_STBVORBIS)
395 UL_(" -VORBIS")
396 #endif
397 #if !defined(NO_PLUGINS)
398 UL_(" +PLUGINS")
399 #else
400 UL_(" -PLUGINS")
401 #endif
402 #if defined(MPT_WITH_DMO)
403 UL_(" +DMO")
404 #endif
405 ;
406 #endif
407 #ifdef MODPLUG_TRACKER
408 retval += UL_("")
409 #if defined(UNICODE)
410 UL_(" UNICODE")
411 #else
412 UL_(" ANSI")
413 #endif
414 #ifndef MPT_WITH_VST
415 UL_(" NO_VST")
416 #endif
417 #ifndef MPT_WITH_DMO
418 UL_(" NO_DMO")
419 #endif
420 #ifdef NO_PLUGINS
421 UL_(" NO_PLUGINS")
422 #endif
423 ;
424 #endif
425 return retval;
426 }
427
428 mpt::ustring GetBuildCompilerString()
429 {
430 mpt::ustring retval;
431 #if MPT_COMPILER_GENERIC
432 retval += U_("Generic C++11 Compiler");
433 #elif MPT_COMPILER_MSVC
434 #if defined(_MSC_FULL_VER) && defined(_MSC_BUILD) && (_MSC_BUILD > 0)
435 retval += MPT_UFORMAT("Microsoft Compiler {}.{}.{}.{}")
436 ( _MSC_FULL_VER / 10000000
437 , mpt::ufmt::dec0<2>((_MSC_FULL_VER / 100000) % 100)
438 , mpt::ufmt::dec0<5>(_MSC_FULL_VER % 100000)
439 , mpt::ufmt::dec0<2>(_MSC_BUILD)
440 );
441 #elif defined(_MSC_FULL_VER)
442 retval += MPT_UFORMAT("Microsoft Compiler {}.{}.{}")
443 ( _MSC_FULL_VER / 10000000
444 , mpt::ufmt::dec0<2>((_MSC_FULL_VER / 100000) % 100)
445 , mpt::ufmt::dec0<5>(_MSC_FULL_VER % 100000)
446 );
447 #else
448 retval += MPT_UFORMAT("Microsoft Compiler {}.{}")(MPT_COMPILER_MSVC_VERSION / 100, MPT_COMPILER_MSVC_VERSION % 100);
449 #endif
450 #elif MPT_COMPILER_GCC
451 retval += MPT_UFORMAT("GNU Compiler Collection {}.{}.{}")(MPT_COMPILER_GCC_VERSION / 10000, (MPT_COMPILER_GCC_VERSION / 100) % 100, MPT_COMPILER_GCC_VERSION % 100);
452 #elif MPT_COMPILER_CLANG
453 retval += MPT_UFORMAT("Clang {}.{}.{}")(MPT_COMPILER_CLANG_VERSION / 10000, (MPT_COMPILER_CLANG_VERSION / 100) % 100, MPT_COMPILER_CLANG_VERSION % 100);
454 #else
455 retval += U_("unknown");
456 #endif
457 return retval;
458 }
459
460 static mpt::ustring GetRevisionString()
461 {
462 mpt::ustring result;
463 if(Source::GetRevision() == 0)
464 {
465 return result;
466 }
467 result = U_("-r") + mpt::ufmt::val(Source::GetRevision());
468 if(Source::HasMixedRevisions())
469 {
470 result += UL_("!");
471 }
472 if(Source::IsDirty())
473 {
474 result += UL_("+");
475 }
476 if(Source::IsPackage())
477 {
478 result += UL_("p");
479 }
480 return result;
481 }
482
483 mpt::ustring GetVersionString(FlagSet<Build::Strings> strings)
484 {
485 std::vector<mpt::ustring> result;
486 if(strings[StringVersion])
487 {
488 result.push_back(mpt::ufmt::val(Version::Current()));
489 }
490 if(strings[StringRevision])
491 {
492 if(!IsReleasedBuild())
493 {
494 result.push_back(GetRevisionString());
495 }
496 }
497 if(strings[StringSourceInfo])
498 {
499 const SourceInfo sourceInfo = SourceInfo::Current();
500 if(!sourceInfo.GetUrlWithRevision().empty())
501 {
502 result.push_back(MPT_UFORMAT(" {}")(sourceInfo.GetUrlWithRevision()));
503 }
504 if(!sourceInfo.Date().empty())
505 {
506 result.push_back(MPT_UFORMAT(" ({})")(sourceInfo.Date()));
507 }
508 if(!sourceInfo.GetStateString().empty())
509 {
510 result.push_back(MPT_UFORMAT(" {}")(sourceInfo.GetStateString()));
511 }
512 }
513 if(strings[StringBuildFlags])
514 {
515 if(!IsReleasedBuild())
516 {
517 result.push_back(GetBuildFlagsString());
518 }
519 }
520 if(strings[StringBuildFeatures])
521 {
522 result.push_back(GetBuildFeaturesString());
523 }
524 return mpt::trim(mpt::join_format<mpt::ustring>(result, U_("")));
525 }
526
527 mpt::ustring GetVersionStringPure()
528 {
529 FlagSet<Build::Strings> strings;
530 strings |= Build::StringVersion;
531 strings |= Build::StringRevision;
532 return GetVersionString(strings);
533 }
534
535 mpt::ustring GetVersionStringSimple()
536 {
537 FlagSet<Build::Strings> strings;
538 strings |= Build::StringVersion;
539 strings |= Build::StringRevision;
540 strings |= Build::StringBuildFlags;
541 return GetVersionString(strings);
542 }
543
544 mpt::ustring GetVersionStringExtended()
545 {
546 FlagSet<Build::Strings> strings;
547 strings |= Build::StringVersion;
548 strings |= Build::StringRevision;
549 #ifndef MODPLUG_TRACKER
550 strings |= Build::StringSourceInfo;
551 #endif
552 strings |= Build::StringBuildFlags;
553 #ifdef MODPLUG_TRACKER
554 strings |= Build::StringBuildFeatures;
555 #endif
556 return GetVersionString(strings);
557 }
558
559 mpt::ustring GetURL(Build::Url key)
560 {
561 mpt::ustring result;
562 switch(key)
563 {
564 case Url::Website:
565 #ifdef LIBOPENMPT_BUILD
566 result = U_("https://lib.openmpt.org/");
567 #else
568 result = U_("https://openmpt.org/");
569 #endif
570 break;
571 case Url::Download:
572 #ifdef MODPLUG_TRACKER
573 result = IsReleasedBuild() ? U_("https://openmpt.org/download") : U_("https://builds.openmpt.org/builds/");
574 #else
575 result = U_("https://lib.openmpt.org/libopenmpt/download/");
576 #endif
577 break;
578 case Url::Forum:
579 result = U_("https://forum.openmpt.org/");
580 break;
581 case Url::Bugtracker:
582 result = U_("https://bugs.openmpt.org/");
583 break;
584 case Url::Updates:
585 result = U_("https://openmpt.org/download");
586 break;
587 case Url::TopPicks:
588 result = U_("https://openmpt.org/top_picks");
589 break;
590 }
591 return result;
592 }
593
594 mpt::ustring GetFullCreditsString()
595 {
596 return mpt::ToUnicode(mpt::Charset::UTF8,
597 #ifdef MODPLUG_TRACKER
598 "OpenMPT / Open ModPlug Tracker\n"
599 #else
600 "libopenmpt (based on OpenMPT / Open ModPlug Tracker)\n"
601 #endif
602 "\n"
603 "Copyright \xC2\xA9 2004-2026 OpenMPT Project Developers and Contributors\n"
604 "Copyright \xC2\xA9 1997-2003 Olivier Lapicque\n"
605 "\n"
606 "Developers:\n"
607 "Johannes Schultz (2008-2026)\n"
608 "J\xC3\xB6rn Heusipp (2012-2026)\n"
609 "Ahti Lepp\xC3\xA4nen (2005-2011)\n"
610 "Robin Fernandes (2004-2007)\n"
611 "Sergiy Pylypenko (2007)\n"
612 "Eric Chavanon (2004-2005)\n"
613 "Trevor Nunes (2004)\n"
614 "Olivier Lapicque (1997-2003)\n"
615 "\n"
616 "Additional contributors:\n"
617 "coda (https://coda.s3m.us/)\n"
618 "cs127 (https://cs127.github.io/)\n"
619 "Jo\xC3\xA3o Baptista de Paula e Silva (https://joaobapt.com/)\n"
620 "kode54 (https://kode54.net/)\n"
621 "Revenant (https://revenant1.net/)\n"
622 "SYRiNX\n"
623 "xaimus (http://xaimus.com/)\n"
624 "zersal\n"
625 "\n"
626 "Thanks to:\n"
627 "\n"
628 "Konstanty for the XMMS-ModPlug resampling implementation\n"
629 "https://modplug-xmms.sourceforge.net/\n"
630 "\n"
631 #ifdef MODPLUG_TRACKER
632 "Geraint Luff for Signalsmith Stretch\n"
633 "https://signalsmith-audio.co.uk/code/stretch/\n"
634 "\n"
635 "Aleksey Vaneev of Voxengo for r8brain sample rate converter\n"
636 "https://github.com/avaneev/r8brain-free-src\n"
637 "\n"
638 #endif
639 #ifdef MPT_WITH_VST
640 "Hermann Seib for his example VST Host implementation\n"
641 "https://www.hermannseib.com/english/vsthost.htm\n"
642 "\n"
643 "Benjamin \"BeRo\" Rosseaux for his independent VST header\n"
644 "https://blog.rosseaux.net/\n"
645 "\n"
646 #endif
647 "Storlek for all the IT compatibility hints and testcases\n"
648 "as well as the IMF, MDL, OKT and ULT loaders\n"
649 "https://schismtracker.org/\n"
650 "\n"
651 "Sergei \"x0r\" Kolzun for various hints on Scream Tracker 2 compatibility\n"
652 "https://github.com/viiri/st2play\n"
653 "\n"
654 "Laurent Cl\xc3\xA9vy for unofficial MO3 documentation and decompression code\n"
655 "https://github.com/lclevy/unmo3\n"
656 "\n"
657 "Ben \"GreaseMonkey\" Russell for IT sample compression code\n"
658 "https://github.com/iamgreaser/it2everything/\n"
659 "\n"
660 "Antti S. Lankila for Amiga resampler implementation\n"
661 "https://web.archive.org/web/20221228071135/https://bel.fi/alankila/modguide/\n"
662 "\n"
663 "Shayde / Reality Productions for Opal OPL3 emulator\n"
664 "https://www.3eality.com/\n"
665 "\n"
666 "Ryuhei Mori for TinyFFT\n"
667 "https://github.com/ryuhei-mori/tinyfft\n"
668 "\n"
669 #ifdef MPT_WITH_ZLIB
670 "Jean-loup Gailly and Mark Adler for zlib\n"
671 "https://zlib.net/\n"
672 "\n"
673 #endif
674 #ifdef MPT_WITH_MINIZ
675 "Rich Geldreich et al. for miniz\n"
676 "https://github.com/richgel999/miniz\n"
677 "\n"
678 #endif
679 #ifdef MPT_WITH_LHASA
680 "Simon Howard for lhasa\n"
681 "https://fragglet.github.io/lhasa/\n"
682 "\n"
683 #endif
684 #ifdef MPT_WITH_UNRAR
685 "Alexander L. Roshal for UnRAR\n"
686 "https://rarlab.com/\n"
687 "\n"
688 #endif
689 #ifdef MPT_WITH_ANCIENT
690 "Teemu Suutari for ancient\n"
691 "https://github.com/temisu/ancient\n"
692 "\n"
693 #endif
694 #ifdef MPT_WITH_PORTAUDIO
695 "PortAudio contributors\n"
696 "https://www.portaudio.com/\n"
697 "\n"
698 #endif
699 #ifdef MPT_WITH_RTAUDIO
700 "Gary P. Scavone, McGill University for RtAudio\n"
701 "https://www.music.mcgill.ca/~gary/rtaudio/\n"
702 "\n"
703 #endif
704 #ifdef MPT_WITH_FLAC
705 "Josh Coalson / Xiph.Org Foundation for libFLAC\n"
706 "https://xiph.org/flac/\n"
707 "\n"
708 #endif
709 #if defined(MPT_WITH_MPG123)
710 "The mpg123 project for libmpg123\n"
711 "https://mpg123.de/\n"
712 "\n"
713 #endif
714 #ifdef MPT_WITH_MINIMP3
715 "Lion (github.com/lieff) for minimp3\n"
716 "https://github.com/lieff/minimp3/\n"
717 "\n"
718 #endif
719 #ifdef MPT_WITH_STBVORBIS
720 "Sean Barrett for stb_vorbis\n"
721 "https://github.com/nothings/stb/\n"
722 "\n"
723 #endif
724 #ifdef MPT_WITH_OGG
725 "Xiph.Org Foundation for libogg\n"
726 "https://xiph.org/ogg/\n"
727 "\n"
728 #endif
729 #if defined(MPT_WITH_VORBIS) || defined(MPT_WITH_LIBVORBISFILE)
730 "Xiph.Org Foundation for libvorbis\n"
731 "https://xiph.org/vorbis/\n"
732 "\n"
733 #endif
734 #if defined(MPT_WITH_OPUS)
735 "Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry,\n"
736 "CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo,\n"
737 "Xiph.Org Foundation, Microsoft Corporation, Broadcom Corporation for libopus\n"
738 "https://opus-codec.org/\n"
739 "\n"
740 #endif
741 #if defined(MPT_WITH_OPUSFILE)
742 "Xiph.Org Foundation and contributors for libopusfile\n"
743 "https://opus-codec.org/\n"
744 "\n"
745 #endif
746 #if defined(MPT_WITH_OPUSENC)
747 "Xiph.Org Foundation, Jean-Marc Valin and contributors for libopusenc\n"
748 "https://opus-codec.org/\n"
749 "\n"
750 #endif
751 #if defined(MPT_WITH_LAME)
752 "The LAME project for LAME\n"
753 "https://lame.sourceforge.io/\n"
754 "\n"
755 #endif
756 #if defined(MPT_WITH_NLOHMANNJSON)
757 "Niels Lohmann et al. for nlohmann-json\n"
758 "https://github.com/nlohmann/json\n"
759 "\n"
760 #endif
761 #ifdef MODPLUG_TRACKER
762 "Lennart Poettering and David Henningsson for RealtimeKit\n"
763 "http://git.0pointer.net/rtkit.git/\n"
764 "\n"
765 "Gary P. Scavone for RtMidi\n"
766 "https://www.music.mcgill.ca/~gary/rtmidi/\n"
767 "\n"
768 "Alexander Uckun for decimal input field\n"
769 "https://www.codeproject.com/Articles/21257/_\n"
770 "\n"
771 "\xc3\x9alfur Kolka for application icon, splash and about screen\n"
772 "https://www.behance.net/ulfurkolka\n"
773 "\n"
774 "Nobuyuki for file icon\n"
775 "https://github.com/nobuyukinyuu/\n"
776 "\n"
777 "ESI Audiotechnik GmbH for testing hardware\n"
778 "https://www.esi-audio.com/\n"
779 "\n"
780 #endif
781 "Daniel Collin (emoon/TBL) for providing test infrastructure\n"
782 "https://mastodon.gamedev.place/@daniel_collin\n"
783 "\n"
784 "The people in the ModPlug community for crucial contribution\n"
785 "in the form of ideas, testing and support;\n"
786 "thanks particularly to:\n"
787 "33, 8bitbubsy, AliceLR, Anboi, BooT-SectoR-ViruZ, Bvanoudtshoorn\n"
788 "a11cf0, christofori, cubaxd, Diamond, Ganja, Georg, Goor00,\n"
789 "Harbinger, jmkz, KrazyKatz, LPChip, MiDoRi, Nofold, Rakib, Sam Zen\n"
790 "Skaven, Skilletaudio, Snu, Squirrel Havoc, Teimoso, Waxhead\n"
791 "\n"
792 #ifdef MPT_WITH_VST
793 "VST PlugIn Technology by Steinberg Media Technologies GmbH\n"
794 "\n"
795 #endif
796 #ifdef MPT_WITH_ASIO
797 "ASIO Technology by Steinberg Media Technologies GmbH\n"
798 "\n"
799 #endif
800 );
801 }
802
803 mpt::ustring GetLicenseString()
804 {
805 return MPT_UTF8(
806 "Copyright (c) 2004-2026, OpenMPT Project Developers and Contributors" "\n"
807 "Copyright (c) 1997-2003, Olivier Lapicque" "\n"
808 "All rights reserved." "\n"
809 "" "\n"
810 "Redistribution and use in source and binary forms, with or without" "\n"
811 "modification, are permitted provided that the following conditions are met:" "\n"
812 " * Redistributions of source code must retain the above copyright" "\n"
813 " notice, this list of conditions and the following disclaimer." "\n"
814 " * Redistributions in binary form must reproduce the above copyright" "\n"
815 " notice, this list of conditions and the following disclaimer in the" "\n"
816 " documentation and/or other materials provided with the distribution." "\n"
817 " * Neither the name of the OpenMPT project nor the" "\n"
818 " names of its contributors may be used to endorse or promote products" "\n"
819 " derived from this software without specific prior written permission." "\n"
820 "" "\n"
821 "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"" "\n"
822 "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE" "\n"
823 "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE" "\n"
824 "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE" "\n"
825 "FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL" "\n"
826 "DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR" "\n"
827 "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER" "\n"
828 "CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY," "\n"
829 "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE" "\n"
830 "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." "\n"
831 );
832 }
833
834 } // namespace Build
835
836
837
838 OPENMPT_NAMESPACE_END