diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/iphone/in_app_store.h | 1 | ||||
-rw-r--r-- | platform/iphone/in_app_store.mm | 14 | ||||
-rw-r--r-- | platform/server/detect.py | 5 | ||||
-rw-r--r-- | platform/windows/godot_res.rc | 10 |
4 files changed, 24 insertions, 6 deletions
diff --git a/platform/iphone/in_app_store.h b/platform/iphone/in_app_store.h index 7d53eaae20..353438676d 100644 --- a/platform/iphone/in_app_store.h +++ b/platform/iphone/in_app_store.h @@ -46,6 +46,7 @@ class InAppStore : public Object { public: Error request_product_info(Variant p_params); + Error restore_purchases(); Error purchase(Variant p_params); int get_pending_event_count(); diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm index 9bb3d7d3fa..6fa189e917 100644 --- a/platform/iphone/in_app_store.mm +++ b/platform/iphone/in_app_store.mm @@ -63,6 +63,7 @@ InAppStore *InAppStore::instance = NULL; void InAppStore::_bind_methods() { ClassDB::bind_method(D_METHOD("request_product_info"), &InAppStore::request_product_info); + ClassDB::bind_method(D_METHOD("restore_purchases"), &InAppStore::restore_purchases); ClassDB::bind_method(D_METHOD("purchase"), &InAppStore::purchase); ClassDB::bind_method(D_METHOD("get_pending_event_count"), &InAppStore::get_pending_event_count); @@ -153,6 +154,14 @@ Error InAppStore::request_product_info(Variant p_params) { return OK; }; +Error InAppStore::restore_purchases() { + + printf("restoring purchases!\n"); + [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; + + return OK; +}; + @interface TransObserver : NSObject <SKPaymentTransactionObserver> { }; @end @@ -236,6 +245,11 @@ Error InAppStore::request_product_info(Variant p_params) { printf("status transaction restored!\n"); String pid = String::utf8([transaction.originalTransaction.payment.productIdentifier UTF8String]); InAppStore::get_singleton()->_record_purchase(pid); + Dictionary ret; + ret["type"] = "restore"; + ret["result"] = "ok"; + ret["product_id"] = pid; + InAppStore::get_singleton()->_post_event(ret); [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; } break; default: { diff --git a/platform/server/detect.py b/platform/server/detect.py index fd4b6eae1c..43aad4ad26 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -22,6 +22,7 @@ def get_opts(): from SCons.Variables import BoolVariable return [ BoolVariable('use_llvm', 'Use the LLVM compiler', False), + BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), ] @@ -132,3 +133,7 @@ def configure(env): env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED']) env.Append(LIBS=['pthread']) env.Append(LIBS=['dl']) + + # Link those statically for portability + if env['use_static_cpp']: + env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) diff --git a/platform/windows/godot_res.rc b/platform/windows/godot_res.rc index c535a749c0..f2dca10d55 100644 --- a/platform/windows/godot_res.rc +++ b/platform/windows/godot_res.rc @@ -3,11 +3,9 @@ #define _STR(m_x) #m_x #define _MKSTR(m_x) _STR(m_x) #endif + #ifndef VERSION_PATCH #define VERSION_PATCH 0 -#define PATCH_STRING -#else -#define PATCH_STRING "." _MKSTR(VERSION_PATCH) #endif GODOT_ICON ICON platform/windows/godot.ico @@ -24,12 +22,12 @@ BEGIN BEGIN VALUE "CompanyName", "Godot Engine" VALUE "FileDescription", VERSION_NAME " Editor" - VALUE "FileVersion", _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_PATCH) + VALUE "FileVersion", VERSION_NUMBER VALUE "ProductName", VERSION_NAME VALUE "Licence", "MIT" - VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur" + VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur and contributors" VALUE "Info", "https://godotengine.org" - VALUE "ProductVersion", _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) PATCH_STRING "." VERSION_BUILD + VALUE "ProductVersion", VERSION_FULL_BUILD END END BLOCK "VarFileInfo" |