Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
97c787b8
Unverified
Commit
97c787b8
authored
May 04, 2020
by
Rémi Verschelde
Committed by
GitHub
May 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #37937 from HaSa1002/fix-pck
Priorize Embedded PCKs on loading
parents
69f36cea
fba98950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
23 deletions
+12
-23
project_settings.cpp
core/project_settings.cpp
+12
-23
No files found.
core/project_settings.cpp
View file @
97c787b8
...
...
@@ -362,40 +362,29 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
// We need to test both possibilities as extensions for Linux binaries are optional
// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
bool
found
=
false
;
String
exec_dir
=
exec_path
.
get_base_dir
();
String
exec_filename
=
exec_path
.
get_file
();
String
exec_basename
=
exec_filename
.
get_basename
();
// Try to load data pack at the location of the executable
// As mentioned above, we have two potential names to attempt
if
(
_load_resource_pack
(
exec_dir
.
plus_file
(
exec_basename
+
".pck"
))
||
_load_resource_pack
(
exec_dir
.
plus_file
(
exec_filename
+
".pck"
)))
{
found
=
true
;
}
else
{
// If we couldn't find them next to the executable, we attempt
// the current working directory. Same story, two tests.
if
(
_load_resource_pack
(
exec_basename
+
".pck"
)
||
_load_resource_pack
(
exec_filename
+
".pck"
))
{
found
=
true
;
}
}
// Attempt with PCK bundled into executable
bool
found
=
_load_resource_pack
(
exec_path
);
#ifdef OSX_ENABLED
// Attempt to load PCK from macOS .app bundle resources
if
(
!
found
)
{
if
(
_load_resource_pack
(
OS
::
get_singleton
()
->
get_bundle_resource_dir
().
plus_file
(
exec_basename
+
".pck"
)))
{
found
=
true
;
}
// Attempt to load PCK from macOS .app bundle resources
found
=
_load_resource_pack
(
OS
::
get_singleton
()
->
get_bundle_resource_dir
().
plus_file
(
exec_basename
+
".pck"
));
}
#endif
// Attempt with PCK bundled into executable
if
(
!
found
)
{
if
(
_load_resource_pack
(
exec_path
))
{
found
=
true
;
// Try to load data pack at the location of the executable
// As mentioned above, we have two potential names to attempt
found
=
_load_resource_pack
(
exec_dir
.
plus_file
(
exec_basename
+
".pck"
))
||
_load_resource_pack
(
exec_dir
.
plus_file
(
exec_filename
+
".pck"
));
if
(
!
found
)
{
// If we couldn't find them next to the executable, we attempt
// the current working directory. Same story, two tests.
found
=
_load_resource_pack
(
exec_basename
+
".pck"
)
||
_load_resource_pack
(
exec_filename
+
".pck"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment