mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
pdf+MacPDF: Use new Build/Root/lagom/res directory
This commit is contained in:
parent
d1036c915d
commit
70eac0fbe8
2 changed files with 6 additions and 6 deletions
|
@ -18,12 +18,12 @@
|
||||||
{
|
{
|
||||||
// FIXME: Copy the fonts to the bundle or something
|
// FIXME: Copy the fonts to the bundle or something
|
||||||
|
|
||||||
// Get from `Build/lagom/bin/MacPDF.app/Contents/MacOS/MacPDF` to `.`.
|
// Get from `Build/lagom/bin/MacPDF.app/Contents/MacOS/MacPDF` to `Build/lagom/Root/res`.
|
||||||
NSString* source_root = [[NSBundle mainBundle] executablePath];
|
NSString* source_root = [[NSBundle mainBundle] executablePath];
|
||||||
for (int i = 0; i < 7; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
source_root = [source_root stringByDeletingLastPathComponent];
|
source_root = [source_root stringByDeletingLastPathComponent];
|
||||||
auto source_root_string = ByteString([source_root UTF8String]);
|
auto source_root_string = ByteString([source_root UTF8String]);
|
||||||
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(MUST(String::formatted("{}/Base/res", source_root_string))));
|
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(MUST(String::formatted("{}/Root/res", source_root_string))));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||||
|
|
|
@ -223,9 +223,9 @@ static PDF::PDFErrorOr<int> pdf_main(Main::Arguments arguments)
|
||||||
|
|
||||||
#if !defined(AK_OS_SERENITY)
|
#if !defined(AK_OS_SERENITY)
|
||||||
if (debugging_stats || !render_path.is_empty()) {
|
if (debugging_stats || !render_path.is_empty()) {
|
||||||
// Get from Build/lagom/bin/pdf to Base/res/fonts.
|
// Get from Build/lagom/bin/pdf to Build/lagom/Root/res.
|
||||||
auto source_root = LexicalPath(MUST(Core::System::current_executable_path())).parent().parent().parent().parent().string();
|
auto source_root = LexicalPath(MUST(Core::System::current_executable_path())).parent().parent().string();
|
||||||
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(TRY(String::formatted("{}/Base/res", source_root))));
|
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(TRY(String::formatted("{}/Root/res", source_root))));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue