mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
feat: Use DIR_ASSETS path to locate resource bundles (#47439)
* feat: Use DIR_ASSETS path to locate resource bundles
* Use DIR_ASSETS for calculating ASAR relative paths
* Add test to verify 'assets' matches parent dir of 'exe'
* Add Mac-specific test for assets path (but it is failing)
* test: Update app.getPath('assets') to expect an exception on Mac
* docs: Update docs for 'assets' path to indicate that it's only available on Windows + Linux
* fix: Don't define 'assets' mapping on macOS
This commit is contained in:
@@ -219,7 +219,7 @@ std::string LoadResourceBundle(const std::string& locale) {
|
||||
pak_dir =
|
||||
base::apple::FrameworkBundlePath().Append(FILE_PATH_LITERAL("Resources"));
|
||||
#else
|
||||
base::PathService::Get(base::DIR_MODULE, &pak_dir);
|
||||
base::PathService::Get(base::DIR_ASSETS, &pak_dir);
|
||||
#endif
|
||||
|
||||
std::string loaded_locale = ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||
|
||||
Reference in New Issue
Block a user