Skip to content

Commit

Permalink
Move version info to separate file, update byte-code version info.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Mar 13, 2019
1 parent 93aac27 commit eae1872
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bytecode/bytecode_versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ struct GDScriptDecompVersion {

static GDScriptDecompVersion decomp_versions[] = {

{ 0x1a36141, "3.1.0 beta 6 (1a36141 / 2019-02-20 / Bytecode version: 13)" },
{ 0x1ca61a3, "3.1.0 beta 1 - beta 5 (1ca61a3 / 2018-10-31 / Bytecode version: 13)" },
{ 0x1a36141, "3.1.0 release (1a36141 / 2019-02-20 / Bytecode version: 13)" },
{ 0x1ca61a3, " 3.1 beta 1 - beta 5 (1ca61a3 / 2018-10-31 / Bytecode version: 13)" },
{ 0xd6b31da, " 3.1 dev (d6b31da / 2018-09-15 / Bytecode version: 13)" },
{ 0x8aab9a0, " 3.1 dev (8aab9a0 / 2018-07-20 / Bytecode version: 13)" },
{ 0xa3f1ee5, " 3.1 dev (a3f1ee5 / 2018-07-15 / Bytecode version: 13)" },
Expand Down
13 changes: 11 additions & 2 deletions editor/gdre_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* gdre_editor.cpp */
/*************************************************************************/

#include "gdre_version.h"

#include "gdre_editor.h"

#include "modules/gdscript/gdscript.h"
Expand Down Expand Up @@ -399,7 +401,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_autowrap(true);
String about_text =
String("Godot RE Tools, v0.0.3-poc \n\n") +
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\n") +
"laws. Before using this software make sure that decompilation is not prohibited by the\n" +
"applicable license agreement, permitted under applicable law or you obtained explicit\n" +
Expand Down Expand Up @@ -1690,7 +1692,7 @@ void GodotREEditor::_notification(int p_notification) {
show_about_dialog();
about_dialog->set_exclusive(false);
}
emit_signal("write_log_message", "****\nGodot RE Tools, v0.0.3-poc\n****\n\n");
emit_signal("write_log_message", String("****\nGodot RE Tools, ") + String(GDRE_VERSION) + String("\n****\n\n"));
}
}
}
Expand Down Expand Up @@ -1753,10 +1755,17 @@ void GodotREEditorStandalone::_write_log_message(String p_message) {
emit_signal("write_log_message", p_message);
}

String GodotREEditorStandalone::get_version() {

return String(GDRE_VERSION);
}

void GodotREEditorStandalone::_bind_methods() {

ClassDB::bind_method(D_METHOD("_write_log_message"), &GodotREEditorStandalone::_write_log_message);
ADD_SIGNAL(MethodInfo("write_log_message", PropertyInfo(Variant::STRING, "message")));

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

GodotREEditorStandalone::GodotREEditorStandalone() {
Expand Down
1 change: 1 addition & 0 deletions editor/gdre_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class GodotREEditorStandalone : public Control {

public:
void _write_log_message(String p_message);
String get_version();

GodotREEditorStandalone();
~GodotREEditorStandalone();
Expand Down
4 changes: 3 additions & 1 deletion editor/gdre_npck_dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "core/version.h"

#include "gdre_version.h"

NewPackDialog::NewPackDialog() {

set_title(RTR("Create new PCK..."));
Expand Down Expand Up @@ -51,7 +53,7 @@ NewPackDialog::NewPackDialog() {
script_vb->add_margin_child(RTR("Target Godot engine version:"), dir_hbc);

wmark = memnew(LineEdit);
wmark->set_text(String("Created with Godot RE tools, v0.0.1-poc!"));
wmark->set_text(String("Created with Godot RE tools, ") + String(GDRE_VERSION));
script_vb->add_margin_child(RTR("Extra tag:"), wmark);

add_child(script_vb);
Expand Down
1 change: 1 addition & 0 deletions editor/gdre_version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define GDRE_VERSION "v0.0.4-poc (for Godot 3.1)"
2 changes: 1 addition & 1 deletion misc/dist/Godot RE Tools.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>rerools</string>
<string>gdretools</string>
<key>CFBundleName</key>
<string>Godot RE Tools</string>
<key>CFBundleIconFile</key>
Expand Down
3 changes: 3 additions & 0 deletions standalone/icon.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}

[deps]

Expand Down
3 changes: 3 additions & 0 deletions standalone/main.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends Control

func _ready():
$menu_background/version_lbl.text = $re_editor_standalone.get_version()

func _on_re_editor_standalone_write_log_message(message):
$log_window.text += message
$log_window.scroll_to_line($log_window.get_line_count() - 1)
Expand Down
5 changes: 3 additions & 2 deletions standalone/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_left = -97.0
margin_left = -209.0
margin_top = -10.0
margin_right = -4.0
margin_bottom = 12.0
text = "v0.0.3-poc"
text = "$$$"
flat = true
align = 2

[node name="re_editor_standalone" type="GodotREEditorStandalone" parent="."]
anchor_right = 1.0
Expand Down
4 changes: 4 additions & 0 deletions standalone/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ window/size/width=1200
window/size/height=1024
window/dpi/allow_hidpi=true

[editor]

convert_text_resources_to_binary_on_export=true

[rendering]

quality/driver/driver_name="GLES2"
Expand Down

0 comments on commit eae1872

Please sign in to comment.