-fixed bug in Button now exporting font property

-made GUI Theme editor usable
-editor does not allow to export or create .pck in the same path as a project
-changed .pck format (lacked support for versioning so couldn't change it), previous was causing crashes and is now incompatible, just re-export.
-will not look for .pck files recursively, was causing unexpected behaviors
-fixed execution of Godot in paths with non unicode characters in Windows, OSX and Linux.
This commit is contained in:
Juan Linietsky
2014-02-15 02:01:39 -03:00
parent b0870e487c
commit 9afdb3e0ad
30 changed files with 107728 additions and 88050 deletions

View File

@ -1475,10 +1475,14 @@ Error OS_Windows::execute(const String& p_path, const List<String>& p_arguments,
ZeroMemory( &pi.si, sizeof(pi.si) );
pi.si.cb = sizeof(pi.si);
ZeroMemory( &pi.pi, sizeof(pi.pi) );
LPSTARTUPINFOW si_w = (LPSTARTUPINFOW) &pi.si;
print_line("running cmdline: "+cmdline);
int ret = CreateProcess(NULL, (LPSTR)cmdline.utf8().get_data(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, &pi.si, &pi.pi);
Vector<CharType> modstr; //windows wants to change this no idea why
modstr.resize(cmdline.size());
for(int i=0;i<cmdline.size();i++)
modstr[i]=cmdline[i];
int ret = CreateProcessW(NULL, modstr.ptr(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, si_w, &pi.pi);
ERR_FAIL_COND_V(ret == 0, ERR_CANT_FORK);
if (p_blocking) {
@ -1523,6 +1527,15 @@ Error OS_Windows::set_cwd(const String& p_cwd) {
return OK;
}
String OS_Windows::get_executable_path() const {
wchar_t bufname[4096];
GetModuleFileNameW(NULL,bufname,4096);
String s= bufname;
print_line("EXEC PATHPó: "+s);
return s;
}
void OS_Windows::set_icon(const Image& p_icon) {

View File

@ -235,6 +235,7 @@ public:
void set_cursor_shape(CursorShape p_shape);
void set_icon(const Image& p_icon);
virtual String get_executable_path() const;
virtual String get_locale() const;