{"id":3986,"date":"2016-06-30T14:08:13","date_gmt":"2016-06-30T06:08:13","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=3986"},"modified":"2016-07-01T12:46:25","modified_gmt":"2016-07-01T04:46:25","slug":"fmx-%e8%8e%b7%e5%8f%96%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e6%89%80%e5%9c%a8%e7%9a%84%e6%a0%b9%e7%9b%ae%e5%bd%95%e5%8f%8a%e6%96%87%e4%bb%b6%e5%90%8d","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=3986","title":{"rendered":"[FMX] \u83b7\u53d6\u5e94\u7528\u7a0b\u5e8f\u6240\u5728\u7684\u6839\u76ee\u5f55\u53ca\u6587\u4ef6\u540d"},"content":{"rendered":"<p>\u8fd9\u4e2a\u51fd\u6570\u9002\u7528\u4e8e iOS\u3001Android\u3001Windows\u3001OSX\uff0c\u4f46\u4ec5\u9002\u7528\u4e8e Delphi\/C++ Builder\uff0c\u5bf9\u522b\u7684\u8bed\u8a00\u6ca1\u591a\u5927\u7684\u53c2\u8003\u4ef7\u503c\u3002\u5f53\u7136\uff0c\u4e5f\u4e0d\u80fd\u8bf4\u771f\u7684\u6ca1\u6709\uff0c\u6709\u5174\u8da3\u7684\u53ef\u4ee5\u670b\u53cb\u53ef\u4ee5\u53c2\u8003 Delphi \u4e2d\u7684 System.pas \u5355\u5143\u7684\u6e90\u7801\uff0c\u7136\u540e\u518d\u52a0\u4ee5\u6539\u9020\u5e76\u53c2\u8003\u672c\u90e8\u5206\u7684\u4ee3\u7801\u4e00\u6837\u53ef\u4ee5\u5b9e\u73b0\u8de8\u5e73\u53f0\u7684\u83b7\u53d6\u5e94\u7528\u7a0b\u5e8f\u6839\u76ee\u5f55\u53ca\u6587\u4ef6\u540d\u7684\u65b9\u6cd5\u3002<\/p>\n<pre class=\"lang:delphi decode:true \">\/\/\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u7f13\u5b58\u5e94\u7528\u7684\u6587\u4ef6\u540d\u548c\u8def\u5f84\uff0c\u63d0\u9ad8\u591a\u6b21\u8c03\u7528\u65f6\u6548\u7387\uff0c\u8fd9\u51e0\u4e2a\u503c\u53cd\u6b63\u4e5f\u4e0d\u4f1a\u53d8\r\nvar\r\n  _AppFileName,_AppPath:String;\r\n\r\nfunction AppFileName: String; inline;\r\nbegin\r\n  if Length(_AppFileName) = 0 then\r\n  begin\r\n{$IFDEF ANDROID}\r\n    _AppFileName := JStringToString(SharedApplicationInfo.processName);\r\n{$ELSE}\r\n    _AppFileName := ParamStr(0);\r\n{$ENDIF}\r\n  end;\r\n  Result := _AppFileName;\r\nend;\r\n\r\nfunction AppPath: String; \/\/ inline;\r\nbegin\r\n  if Length(_AppPath) = 0 then\r\n  begin\r\n{$IFDEF ANDROID}\r\n    _AppPath := JStringToString(SharedApplicationInfo.dataDir);\r\n{$ELSE}\r\n    _AppPath := ExtractFilePath(AppFileName);\r\n{$ENDIF}\r\n  end;\r\n  Result := _AppPath;\r\nend;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e2a\u51fd\u6570\u9002\u7528\u4e8e iOS\u3001Android\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[145,69,8,602],"tags":[88,640,622],"class_list":["post-3986","post","type-post","status-publish","format-standard","hentry","category-android","category-c-builder","category-delphi","category-ios","tag-88","tag-640","tag-622"],"views":4474,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3986"}],"version-history":[{"count":4,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3986\/revisions"}],"predecessor-version":[{"id":3992,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3986\/revisions\/3992"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}