1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Rename project file to "project.godot"

Slimmed down variant from the reverted #8375.
The rationale behind the name change is to give Godot's project file a unique
extension (".godot") that can be registered on the OS to be associated with
the Godot binary (OS registration not implemented here).

This PR also adds the possibility to start the game or editor if launched
with the project.godot passed as argument, which paves the way for allowing
a similar behaviour on a double-click in the OS file manager (code originally
by @Hinsbart).

Closes #6915.
This commit is contained in:
Rémi Verschelde
2017-05-01 17:44:52 +02:00
parent de7eba887e
commit 7ce8342ac5
11 changed files with 62 additions and 45 deletions

View File

@@ -509,7 +509,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
if (f.begins_with(".")) //ignore hidden and . / ..
continue;
if (FileAccess::exists(cd.plus_file(f).plus_file("godot.cfg"))) // skip if another project inside this
if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
continue;
dirs.push_back(f);
@@ -688,7 +688,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
int idx = p_dir->find_dir_index(f);
if (idx == -1) {
if (FileAccess::exists(cd.plus_file(f).plus_file("godot.cfg"))) // skip if another project inside this
if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
continue;
EditorFileSystemDirectory *efd = memnew(EditorFileSystemDirectory);