mirror of https://github.com/odrling/Aegisub
meson: fix resource file compilation
This enables video to load correctly in Windows builds
This commit is contained in:
parent
106c753782
commit
8cf4100c87
|
@ -188,6 +188,33 @@ elif host_machine.system() == 'windows'
|
||||||
else
|
else
|
||||||
error('Missing Windows SDK Uniscribe Library (usp10.h / usp10.lib)')
|
error('Missing Windows SDK Uniscribe Library (usp10.h / usp10.lib)')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
res_inc = include_directories('bitmaps/windows')
|
||||||
|
res_dep_files = files(
|
||||||
|
'bitmaps/windows/icon.ico',
|
||||||
|
'bitmaps/windows/eyedropper.cur',
|
||||||
|
)
|
||||||
|
windows = import('windows')
|
||||||
|
if wx_dep.type_name() != 'not-found' # system wx
|
||||||
|
raw_wx_windres_args = wx_dep.get_variable(configtool: 'rescomp').split()
|
||||||
|
wx_windres_args = []
|
||||||
|
foreach arg: raw_wx_windres_args
|
||||||
|
if arg != 'windres'
|
||||||
|
wx_windres_args += arg
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
aegisub_src += windows.compile_resources('res/res.rc',
|
||||||
|
args: wx_windres_args,
|
||||||
|
depend_files: res_dep_files,
|
||||||
|
depends: version_h,
|
||||||
|
include_directories: [res_inc, version_inc])
|
||||||
|
else # subproject
|
||||||
|
wx_inc = wx.include_directories('wxmono')
|
||||||
|
aegisub_src += windows.compile_resources('res/res.rc',
|
||||||
|
depend_files: res_dep_files,
|
||||||
|
depends: version_h,
|
||||||
|
include_directories: [res_inc, version_inc, wx_inc])
|
||||||
|
endif
|
||||||
elif conf.get('WITH_FONTCONFIG') == '1'
|
elif conf.get('WITH_FONTCONFIG') == '1'
|
||||||
aegisub_src += 'font_file_lister_fontconfig.cpp'
|
aegisub_src += 'font_file_lister_fontconfig.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -23,23 +23,9 @@ eyedropper_cursor CURSOR "../bitmaps/windows/eyedropper.cur"
|
||||||
#define wxUSE_NO_MANIFEST 1
|
#define wxUSE_NO_MANIFEST 1
|
||||||
#include "wx/msw/wx.rc"
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
#include "../../build/git_version.h"
|
#include "git_version.h"
|
||||||
#include <Winver.h>
|
#include <Winver.h>
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
#ifdef _WIN64
|
|
||||||
#define AGI_RC_FILENAME "aegisub64d"
|
|
||||||
#else
|
|
||||||
#define AGI_RC_FILENAME "aegisub32d"
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef _WIN64
|
|
||||||
#define AGI_RC_FILENAME "aegisub64"
|
|
||||||
#else
|
|
||||||
#define AGI_RC_FILENAME "aegisub32"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define AGI_RC_FLAG_DEBUG VS_FF_DEBUG
|
#define AGI_RC_FLAG_DEBUG VS_FF_DEBUG
|
||||||
#else
|
#else
|
||||||
|
@ -68,8 +54,8 @@ BEGIN
|
||||||
VALUE "CompanyName", "Aegisub"
|
VALUE "CompanyName", "Aegisub"
|
||||||
VALUE "FileDescription", "Aegisub subtitle editor"
|
VALUE "FileDescription", "Aegisub subtitle editor"
|
||||||
VALUE "FileVersion", BUILD_GIT_VERSION_STRING
|
VALUE "FileVersion", BUILD_GIT_VERSION_STRING
|
||||||
VALUE "InternalName", AGI_RC_FILENAME
|
VALUE "InternalName", "aegisub"
|
||||||
VALUE "OriginalFilename", AGI_RC_FILENAME ".exe"
|
VALUE "OriginalFilename", "aegisub.exe"
|
||||||
VALUE "ProductName", "Aegisub"
|
VALUE "ProductName", "Aegisub"
|
||||||
VALUE "ProductVersion", BUILD_GIT_VERSION_STRING
|
VALUE "ProductVersion", BUILD_GIT_VERSION_STRING
|
||||||
END
|
END
|
||||||
|
|
|
@ -62,7 +62,7 @@ if ($exactGitTag -match $semVerMatch) {
|
||||||
$tag = git -C $repositoryRootPath describe --exact-match --tags $rev 2>$null
|
$tag = git -C $repositoryRootPath describe --exact-match --tags $rev 2>$null
|
||||||
if ($tag -match $semVerMatch) {#
|
if ($tag -match $semVerMatch) {#
|
||||||
$version['TAGGED_RELEASE'] = $false
|
$version['TAGGED_RELEASE'] = $false
|
||||||
$version['RESOURCE_BASE_VERSION'] = $Matches[1..3] + $gitRevision
|
$version['RESOURCE_BASE_VERSION'] = $Matches[1..3]
|
||||||
$version['INSTALLER_VERSION'] = ($Matches[1..3] -join '.')
|
$version['INSTALLER_VERSION'] = ($Matches[1..3] -join '.')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -85,5 +85,5 @@ $version.GetEnumerator() | %{
|
||||||
{"`"$($value.ToString())`""}
|
{"`"$($value.ToString())`""}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"#define $($_.Key) $($fmtValue)"
|
"`n#define $($_.Key) $($fmtValue)"
|
||||||
} | Out-File -FilePath $gitVersionHeaderPath -Encoding utf8
|
} | Out-File -FilePath $gitVersionHeaderPath -Encoding utf8
|
||||||
|
|
Loading…
Reference in New Issue