mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-03 17:24:34 +00:00
Removed the SDL_Version structure, moved SDL version to SDL.h
Inspired by https://github.com/libsdl-org/SDL/issues/9788
This commit is contained in:
@@ -13,10 +13,10 @@ my $wikisubdir = '';
|
||||
my $incsubdir = 'include';
|
||||
my $readmesubdir = undef;
|
||||
my $apiprefixregex = undef;
|
||||
my $versionfname = 'include/SDL_version.h';
|
||||
my $versionfname = 'include/SDL.h';
|
||||
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
|
||||
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
|
||||
my $versionpatchregex = '\A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z';
|
||||
my $versionmicroregex = '\A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z';
|
||||
my $mainincludefname = 'SDL.h';
|
||||
my $selectheaderregex = '\ASDL.*?\.h\Z';
|
||||
my $projecturl = 'https://libsdl.org/';
|
||||
@@ -92,7 +92,7 @@ if (defined $optionsfname) {
|
||||
$readmesubdir = $val, next if $key eq 'readmesubdir';
|
||||
$versionmajorregex = $val, next if $key eq 'versionmajorregex';
|
||||
$versionminorregex = $val, next if $key eq 'versionminorregex';
|
||||
$versionpatchregex = $val, next if $key eq 'versionpatchregex';
|
||||
$versionmicroregex = $val, next if $key eq 'versionmicroregex';
|
||||
$versionfname = $val, next if $key eq 'versionfname';
|
||||
$mainincludefname = $val, next if $key eq 'mainincludefname';
|
||||
$selectheaderregex = $val, next if $key eq 'selectheaderregex';
|
||||
@@ -2036,19 +2036,19 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
|
||||
my $majorver = 0;
|
||||
my $minorver = 0;
|
||||
my $patchver = 0;
|
||||
my $microver = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (/$versionmajorregex/) {
|
||||
$majorver = int($1);
|
||||
} elsif (/$versionminorregex/) {
|
||||
$minorver = int($1);
|
||||
} elsif (/$versionpatchregex/) {
|
||||
$patchver = int($1);
|
||||
} elsif (/$versionmicroregex/) {
|
||||
$microver = int($1);
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
my $fullversion = "$majorver.$minorver.$patchver";
|
||||
my $fullversion = "$majorver.$minorver.$microver";
|
||||
|
||||
foreach (keys %headersyms) {
|
||||
my $sym = $_;
|
||||
@@ -2318,19 +2318,19 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
|
||||
my $majorver = 0;
|
||||
my $minorver = 0;
|
||||
my $patchver = 0;
|
||||
my $microver = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (/$versionmajorregex/) {
|
||||
$majorver = int($1);
|
||||
} elsif (/$versionminorregex/) {
|
||||
$minorver = int($1);
|
||||
} elsif (/$versionpatchregex/) {
|
||||
$patchver = int($1);
|
||||
} elsif (/$versionmicroregex/) {
|
||||
$microver = int($1);
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
my $fullversion = "$majorver.$minorver.$patchver";
|
||||
my $fullversion = "$majorver.$minorver.$microver";
|
||||
|
||||
my $latex_fname = "$srcpath/$projectshortname.tex";
|
||||
my $latex_tmpfname = "$latex_fname.tmp";
|
||||
@@ -2369,7 +2369,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
\\begin{document}
|
||||
\\frontmatter
|
||||
|
||||
\\title{$projectfullname $majorver.$minorver.$patchver Reference Manual}
|
||||
\\title{$projectfullname $majorver.$minorver.$microver Reference Manual}
|
||||
\\author{The $projectshortname Developers}
|
||||
\\maketitle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user