{"id":289,"date":"2013-09-09T08:49:36","date_gmt":"2013-09-09T06:49:36","guid":{"rendered":"http:\/\/blog.kassebaum.eu\/?p=289"},"modified":"2013-09-09T08:49:36","modified_gmt":"2013-09-09T06:49:36","slug":"rad-studio-xe5-and-abbrevia","status":"publish","type":"post","link":"https:\/\/www.kassebaum.eu\/blog\/2013\/09\/09\/rad-studio-xe5-and-abbrevia\/","title":{"rendered":"RAD Studio XE5 and Abbrevia"},"content":{"rendered":"<p>As I mentioned in my last post about Orpheus I will today show how to move the Abbrevia component suite to RAD Studio XE5.<\/p>\n<p>But before I have to mention that I got a special permission from <a href=\"http:\/\/www.embarcadero.com\" title=\"Embarcadero\" target=\"_blank\">Embarcadero<\/a> to show my experiences with the RAD Studio XE5 product.<\/p>\n<p>RAD Studio XE5 is the brand new product from <a href=\"http:\/\/www.embarcadero.com\" title=\"Embarcadero\" target=\"_blank\">Embarcadero<\/a> that allows native development for the the Win32, Win64, OS X, iOS and <a href=\"http:\/\/android.com\" title=\"Android\" target=\"_blank\">Android<\/a> platform.<br \/>\n<a href=\"http:\/\/delphi.org\/2013\/08\/sneak-peek-of-delphi-xe5-android-datasnap\/?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%3A+DelphiDotOrg+%28Delphi.org%29\" title=\"Jim MacKeeth\" target=\"_blank\">Jim McKeeth<\/a> and <a href=\"http:\/\/blog.marcocantu.com\/blog\/youtube_delphi_android.html?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29\" title=\"Marco Cantu\" target=\"_blank\">Marco Cantu<\/a> have written some nice examples about how to share the code between iOS and Android.<br \/>\nYou can get more information about Android and RAD Studio at <a href=\"http:\/\/embt.co\/RADAndroid\" title=\"RADAndroid\" target=\"_blank\">Embarcadero<\/a>.<br \/>\nI\u2019m using a pre-release version of RAD Studio XE5.<\/p>\n<p>Okay, let\u2019s come back to Abbrevia. Like Orpheus, Abbrevia has originally been written by the great <a href=\"http:\/\/www.turbopower.com\/\" title=\"TurboPower\" target=\"_blank\">TurboPower<\/a> company that closed on January 7, 2003. Today, 10 years later a lot of applications still use their code.<\/p>\n<p>Abbrevia is now released under the <a href=\"http:\/\/www.mozilla.org\/MPL\/1.1\" title=\"Mozilla 1.1 license\" target=\"_blank\">Mozilla 1.1 license<\/a> and it is hosted at <a href=\"https:\/\/svn.code.sf.net\/p\/tpabbrevia\/code\" title=\"SourceForge\" target=\"_blank\">SourceForge<\/a>. Abbrevia is maintained by Craig Peterson who works for <a href=\"http:\/\/www.scootersoftware.com\/\" title=\"Scooter\" target=\"_blank\">Scooter Software<\/a> the producer of <a href=\"http:\/\/www.scootersoftware.com\/moreinfo.php\" title=\"Beyond Compare\" target=\"_blank\">Beyond Compare<\/a>. IMO Beyond Compare is a must for every Delphi developer but let&#8217;s come back to Abbrevia.<\/p>\n<p>The migration to RAD Studio XE5 is easy. I checked out the latest version from SVN, made a copy of the RAD Studio XE4 project group, renamed it to RAD Studio XE5 and saved every package in a new RAD Studio XE5 folder. At last I changed the lib suffix from 180 to 190 and everything compiled.<\/p>\n<p>Everything compiled at once but I got one simple warning: &#8220;The symbol StrLen is deprecated.&#8221; A short look at System.SysUtils shows the issue:<\/p>\n<pre class=\"lang:delphi decode:true \" title=\"System.SysUtils\" >{$IFNDEF NEXTGEN}\r\nfunction StrLen(const Str: PAnsiChar): Cardinal; overload; inline; deprecated 'Moved to the AnsiStrings unit';\r\n{$ENDIF !NEXTGEN}\r\n<\/pre>\n<p>This issue has been introduced with RAD Studio XE4. It is because of the NEXTGEN compiler, the compiler for iOS and Android, which doesn&#8217;t support AnsiStrings in the way the old desktop compiler does. I don&#8217;t want to start a discussion about this but I simply would like to say that I do like this strategy. <\/p>\n<p>Anyway, the AnsiString stuff has moved to the unit System.AnsiStrings. Furthermore Abbrevia already uses a compiler symbol for the use of this unit:<\/p>\n<pre class=\"lang:delphi decode:true \" title=\"AbDefine.inc\" >  {$IF RTLVersion &gt;= 25} \r\n    {$DEFINE HasAnsiStrings}\r\n  {$IFEND}<\/pre>\n<p>This means I could write<\/p>\n<pre class=\"lang:delphi decode:true \" title=\"AbGzTyp.pas\" >uses\r\n  {$IFDEF MSWINDOWS}\r\n  Windows,\r\n  {$ENDIF}\r\n  SysUtils,\r\n  {$IFDEF HasAnsiStrings}\r\n  System.AnsiStrings,\r\n  {$ENDIF}\r\n  AbBitBkt, AbCharset, AbDfBase, AbDfDec, AbDfEnc, AbExcept, AbResString;\r\n\r\n...\r\n\r\n    Len := {$IFDEF HasAnsiStrings}System.AnsiStrings.{$ENDIF}StrLen(Buff);\r\n\r\n...\r\n<\/pre>\n<p>As you can see again it is very easy to maintain old components with RAD Studio XE5. And EMBT has done a lot of effort to share the code between the old desktop compiler and the NEXTGEN compiler.<\/p>\n<p>Next time I will move SynEdit to RAD Studio XE5. Again, stay tuned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I mentioned in my last post about Orpheus I will today show how to move the Abbrevia component suite to RAD Studio XE5. But before I have to mention that I got a special permission from Embarcadero to show &hellip; <a href=\"https:\/\/www.kassebaum.eu\/blog\/2013\/09\/09\/rad-studio-xe5-and-abbrevia\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[9,5,29,17],"class_list":["post-289","post","type-post","status-publish","format-standard","hentry","category-thirdpartycomponents","category-uncategorized","tag-abbrevia","tag-delphi","tag-rad-studio-xe5","tag-third-party-components"],"_links":{"self":[{"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/posts\/289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/comments?post=289"}],"version-history":[{"count":12,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/posts\/289\/revisions\/301"}],"wp:attachment":[{"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/media?parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/categories?post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kassebaum.eu\/blog\/wp-json\/wp\/v2\/tags?post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}