Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features #195

Merged
merged 14 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/all_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
env:
GODOT_BASE_BRANCH: master
# Change the README too
GODOT_MAIN_SYNC_REF: 72cff2ed591ca6da76ef287d2afcca35d59402df
GODOT_MAIN_SYNC_REF: 92e51fca7247c932f95a1662aefc28aca96e8de6
SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes debug_symbols=no deprecated=yes
SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_camera_enabled=no module_mbedtls_enabled=no module_enet_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_noise_enabled=no module_websocket_enabled=no use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes module_csg_enabled=yes module_gridmap_enabled=yes disable_3d=no
SCONS_CACHE_MSVC_CONFIG: true
Expand Down Expand Up @@ -163,6 +163,7 @@ jobs:
- name: Make macOS template
if: matrix.platform == 'macos'
run: |
cp -R "misc/dist/macos_template.app" "bin/"
mkdir -p "bin/macos_template.app/Contents/MacOS"
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
cp "bin/godot.macos.template_release.universal" "bin/macos_template.app/Contents/MacOS/godot_macos_debug.universal"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ For ease of bootstrapping development, we have included launch, build, and setti

### Requirements

Godot 4.0 (master branch) @ 72cff2ed591ca6da76ef287d2afcca35d59402df
Godot 4.0 (master branch) @ 92e51fca7247c932f95a1662aefc28aca96e8de6

- Support for building on 3.x has been dropped and no new features are being pushed
- Godot RE Tools still retains the ability to decompile 3.x and 2.x projects, however.
Expand Down
44 changes: 19 additions & 25 deletions editor/gdre_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,7 @@ void GodotREEditor::init_gui(Control *p_control, HBoxContainer *p_menu, bool p_l
about_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
about_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
about_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
String about_text =
String("Godot RE Tools, ") + String(GDRE_VERSION) + String(" \n\n") +
RTR(String("Resources, binary code and source code might be protected by copyright and trademark ") +
"laws. Before using this software make sure that decompilation is not prohibited by the " +
"applicable license agreement, permitted under applicable law or you obtained explicit " +
"permission from the copyright owner.\n\n" +
"The authors and copyright holders of this software do neither encourage nor condone " +
"the use of this software, and disclaim any liability for use of the software in violation of " +
"applicable laws.\n\n" +
"This software in an alpha stage. Please report any bugs to the GitHub repository\n");
String about_text = GDRESettings::get_singleton()->get_disclaimer_text();
about_label->set_text(about_text);

#ifdef TOOLS_ENABLED
Expand Down Expand Up @@ -792,6 +783,9 @@ void GodotREEditor::_pck_select_request(const String &p_path) {
}
pck_dialog->add_file(file->get_path(), file->get_size(), icon, error_string, file->is_malformed(), file->is_encrypted());
}
String user_desktop = OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DESKTOP);
String proj_name = p_path.get_file().get_basename();
pck_dialog->set_target_dir(user_desktop.path_join(proj_name));
pck_dialog->popup_centered(Size2(600, 400));
}

Expand Down Expand Up @@ -1705,14 +1699,8 @@ void GodotREEditor::_notification(int p_notification) {
show_about_dialog();
about_dialog->set_exclusive(false);
}
} else {
#else
{
#endif
about_dialog->set_exclusive(true);
show_about_dialog();
about_dialog->set_exclusive(false);
}
#endif
emit_signal("write_log_message", String("****\nGodot RE Tools, ") + String(GDRE_VERSION) + String("\n****\n\n"));
}
}
Expand Down Expand Up @@ -1761,13 +1749,6 @@ void GodotREEditor::_bind_methods() {

/*************************************************************************/

void GodotREEditorStandalone::_notification(int p_notification) {
if (p_notification == MainLoop::NOTIFICATION_WM_ABOUT) {
if (editor_ctx)
editor_ctx->show_about_dialog();
}
}

void GodotREEditorStandalone::_write_log_message(String p_message) {
emit_signal("write_log_message", p_message);
}
Expand All @@ -1776,11 +1757,24 @@ String GodotREEditorStandalone::get_version() {
return String(GDRE_VERSION);
}

void GodotREEditorStandalone::pck_select_request(const String &p_path) {
if (editor_ctx) {
editor_ctx->_pck_select_request(p_path);
}
}

void GodotREEditorStandalone::show_about_dialog() {
if (editor_ctx) {
editor_ctx->show_about_dialog();
}
}

void GodotREEditorStandalone::_bind_methods() {
ClassDB::bind_method(D_METHOD("_write_log_message"), &GodotREEditorStandalone::_write_log_message);
ClassDB::bind_method(D_METHOD("pck_select_request", "path"), &GodotREEditorStandalone::pck_select_request);
ADD_SIGNAL(MethodInfo("write_log_message", PropertyInfo(Variant::STRING, "message")));

ClassDB::bind_method(D_METHOD("get_version"), &GodotREEditorStandalone::get_version);
ClassDB::bind_method(D_METHOD("show_about_dialog"), &GodotREEditorStandalone::show_about_dialog);
}

GodotREEditorStandalone::GodotREEditorStandalone() {
Expand Down
5 changes: 4 additions & 1 deletion editor/gdre_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ class OverwriteDialog : public AcceptDialog {
~OverwriteDialog();
};

class GodotREEditorStandalone;
class GodotREEditor : public Node {
GDCLASS(GodotREEditor, Node)

private:
friend class GodotREEditorStandalone;
#ifdef TOOLS_ENABLED
EditorNode *editor = nullptr;
#else
Expand Down Expand Up @@ -207,10 +209,11 @@ class GodotREEditorStandalone : public Control {
HBoxContainer *menu_hb;

protected:
void _notification(int p_notification);
static void _bind_methods();

public:
void show_about_dialog();
void pck_select_request(const String &p_path);
void _write_log_message(String p_message);
String get_version();

Expand Down
7 changes: 6 additions & 1 deletion editor/gdre_pck_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,13 @@ void PackDialog::_dir_select_pressed() {
target_folder_selection->popup_centered(Size2(600, 400));
}

void PackDialog::set_target_dir(const String &p_dir) {
target_dir->set_text(p_dir);
_validate_selection();
}

void PackDialog::_dir_select_request(const String &p_path) {
target_dir->set_text(p_path);
set_target_dir(p_path);
_validate_selection();
}

Expand Down
1 change: 1 addition & 0 deletions editor/gdre_pck_dlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class PackDialog : public AcceptDialog {

public:
void clear();
void set_target_dir(const String &p_dir);
void add_file(const String &p_name, uint64_t p_size, Ref<Texture2D> p_icon, String p_error, bool p_malformed_name, bool p_enc);
void add_file_to_item(TreeItem *p_item, const String &p_fullname, const String &p_name, uint64_t p_size, Ref<Texture2D> p_icon, String p_error, bool p_enc);
void set_version(const String &p_version);
Expand Down
35 changes: 0 additions & 35 deletions misc/dist/Godot RE Tools.app/Contents/Info.plist

This file was deleted.

1 change: 0 additions & 1 deletion misc/dist/Godot RE Tools.app/Contents/PkgInfo

This file was deleted.

File renamed without changes.
Loading
Loading