Author Topic: Delphi and unicode  (Read 1608 times)

0 Members and 1 Guest are viewing this topic.

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Delphi and unicode
« on: July 31, 2012, 07:54:58 pm »
ok where do start ?

let me just say, i LOVE Delphi, but iv not wrote 1 line of pascal code since i last went away, why ? Unicode. it killed every app\compenent i wrote\used.

but the discussion i had with Kulverstukas has made me want to code delphi again
i looked at XE2 and it looks like the shit (think its worth the hassle porting my code)

going to download it now (will post link once iv tested it), here are a few nice links to get you through the Unicode conversion hell.

Delphi and unicode: http://edn.embarcadero.com/article/38980
Delphi Conversion Unicode Issues
"Globalizing your Delphi applications" - Delphi Unicode Resources
Compilation of resources for migrate to Delphi 2009/2010 Unicode

Download XE2: magnet link
magnet:?xt=urn:btih:3e36da5a4a12af5d5be46934b2f2536f4ca64a57&dn=Embarcadero+RAD+Studio+XE2+-+With+Update+3+-+Activator+by+pulsar&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80

dont use activator 2  its infected

Steps for activator 1:
 - Copy files bdsreg.exe, cglm.ini, msimg32.dll, sanctuarylib.dll into RAD Studio XE2 installation path. Yes, overwrite existing ones.
 - Run activator.exe, press 'Active' button, wait for confirmation window, and finally press 'Run XE2' button. Easy as that.

Discuss
« Last Edit: July 31, 2012, 08:07:05 pm by bubzuru »
Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Delphi and unicode
« Reply #1 on: August 01, 2012, 05:10:26 am »
wtf is with the exe size in XE2 ?

empty VCL app = 8mb
empty console app = 1 mb

in c++ builder the same vcl app is 340kb  :-\

edit:
  changed build configuration to release , exe size is 1.5mb still big tho
« Last Edit: August 01, 2012, 05:44:31 am by bubzuru »
Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Delphi and unicode
« Reply #2 on: August 01, 2012, 10:50:52 am »
For that I used a utility "StripReloc" which strips some garbage and usually shrinks the executable by few kilobytes, cannot remember where I got it from originally... after that I used UPX to get it very small.
« Last Edit: August 01, 2012, 10:51:25 am by Kulverstukas »

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Delphi and unicode
« Reply #3 on: August 01, 2012, 01:40:32 pm »
thanx will give it a go :)

also, removing the RTTI by adding the compiler directives
{$IFOPT D-}{$WEAKLINKRTTI ON}{$ENDIF}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
will also remove a few kb
Damm it feels good to be gangsta
http://bubzuru.comule.com