Конференция "KOL" » KOL 2.87 for Delphi 2009 (MCK worked.) [Delphi, KOL]
 
  • azsd © (15.09.08 02:14) [0]
    Hey, I wanna share my 'slightly' modified KOL working Copy for Delphi 2009.

    http://my1993.com/PpsDES/Report/KOLCore_D12_Maystable_2.rar

    I've test KOL parts from three weeks ago in several heavy ANSI related projects. (most application have UNICODE_CTRLS define, some without)
    and the MCK parts just works like original copy in Delphi 2007 excepted "KOL_MCK/Classes=;mirror=" may discard during Delphi 2009 project upgrade progress.

    MCK parts only have little AnsiString cast for byte related operation, most of them keep String(Unicode in Delphi 2009) there.

    I make an Release directory for MirrorPackage/MHXP/mdvControls and other MCK components - they need definition inpackage and without UNICODE_CTRLS, if you forgot cleanup generated dcu after install these package, you application may link with these trouble dcus.
    I saved all files to utf8 without BOM if they have non latin chars, so it can compile both in D2009 / Delphi7.
    Don't forget to Check [x] Default checkbox in "Install Packages..." dialog after install, or your MCK will nuked (by packagecache) in next IDE startup.

    most 3rd components  do not need to modify MCK parts, but KOL part should to deep regular expression replace.

    refer Changes_mod.txt in rar archive for changelist.

    bug report are welcome, because its an unofficial patch, I must say sorry to Vladimir if somebody shouted my bug to him.

    I added some fixme tag in original source, like an function returns KOLString (WideString in UNICODE_CTRLS mode), but it write in asm with LStrFromXXX.
    there also some minor workaroud offered in somewhere.
  • Jon © (15.09.08 05:00) [1]
    Wow, excellent news! I bet it was more than a 'slight' effort.


    > KOL 2.87 for Delphi 2009


    Which version did you modify?  2.87 or 2.87+ or 2.87++
  • azsd © (15.09.08 10:32) [2]
    based on 2.87.
    do you means unofficial update in kolnmck.ru download section?
    I kept asm version than 2.87plus IndexOfChar pascal fix because I hear 2.87+ too late.
    I use J+ option to generate obj, then load obj use IDA to compare difference between D7 n D2009... when I have make an argument table, I found it just list officially in rtl source.
    It's unlucky I have spend lot of unnecessary time to analyst documented things, but it's lucky It's matched my undocumented argument table.  
    LStrFromPChar have an extra 3rd Codepage argument in ECX (ADC),
    I use xor ecx, ecx to offered CP_ACP than mov ecx, 0 generate by compiler.
    This is only things I worry about ECX will use to store variable in original hand written asm caller (pascal caller will determine protect register automatically).
    I debug into most modification routine to confirm ECX is valuable to protect. At least I think its only have over push, miss push routines should no exists at least in kol.pas / kol_asm.inc
    When I debug in get_classname, I found literal header add extra field before referencecounter.
    I use DD.\s*-1 to find these @@ string defines and add Codepage(CP_ANSI_LATIN1 or CP_ACP) and element size(one byte per Char) before this line.
    but I forgot to add IFDEF _D2009OrLater aroud it. It will cause some bytes fater in D2007~D7.
    I'll add it later.
  • D[u]fa (15.09.08 10:47) [3]
    Уже тоже делал подобное =) но выкладывать потом не стал.. Очень много исправлений связанных с поддержкой уникода приходится делать... и отвечать за эти ошибки не охото)

    И если не сделать несколько изменений с IFDEF опять то на 2009 доступа к форме не будет, покрайне мере у меня не было.. а в архиве этих изменений не нашел
  • azsd © (15.09.08 11:13) [4]
    In my memories Thaddy made an pure pascal version(based on KOLCE?) for Delphi 2009 in August(or earlier?).
    Все дороги ведут в Рим? lol, I means its worth to see other people's road.
    but now its safe to talk about delphi 2009, it can download from codegear website one week ago.
    I add KOL_ANSI.inc to prevent almost all IFDEF related to Windows API use by KOL itself.

    PS: It seems title of delphi IDE can take from Application.MainForm.Caption, FindWindow in GetProjectName grab other instance of Delphi in my debugging (I used Delphi to bug Delphi)
  • MTsv DN (17.09.08 20:21) [5]
    2 azsd
    For what this addition:
    1814:    procedure Put(Idx: integer; const Value: WideString);
    1815:    {* +azsd for TBButton }

  • D[u]fa (17.09.08 20:31) [6]
    Возможно расширение функционала... У обычного TStrList'a есть такая функция а у Wide не было.

    MTsv DN, скинь свою асю
  • MTsv DN (17.09.08 20:32) [7]
    I don't understand this
    function Find_First( const FilePathName: KOLString; var F: {$IFDEF UNICODE}TFindFileData{$ELSE}TFindFileData{$ENDIF} ): Boolean;

  • MTsv DN (17.09.08 20:38) [8]
    And what this:
    33277:    {$IFDEF UNICODE_CTRLS}
       RichEditIdx := 0; // TODO: fixme KOLChar mis sync with Index
       {$ELSE}
       RichEditIdx := 0; // Richedit20A / RichEdit
    33281:    {$ENDIF}

  • MTsv DN (17.09.08 20:38) [9]
    2 D[u]fa
    930058
  • MTsv DN (17.09.08 20:39) [10]
    > Возможно расширение функционала... У обычного TStrList'a есть такая функция а у Wide не было.
    Но при чем тут "for TBButton"?
  • azsd © (17.09.08 21:20) [11]
    {$IFDEF UNICODE}

    equal to
    {$IFDEF  _D2009OrHigher}


    with or without this the argument type of F is same, this is safe to remove the definition switch. I am sorry missed this place during cleanup unnecessary modification.

    RichEditIdx is in my next fix todo list.
    I am plan to use IsUnicode or similar flag to record if NewRichedit1 create an Unicode version richedit control instance, or modify the RichEditIdx to tells NewRichEdit1 create an ANSI control. In my debug CharFormat currently is not match to UNICODE_CTRLS switch, I always get 'T' for 'Tahoma' as fontname in this function.
    currently I add an workaroud in ReGetFont for less change. so the TODO tag is still here.

    If I recall correctly TWStrList.Put is for KOL_ASM toolbar tooltip fix, I found tootip for toolbar button only appear one char in runtime at 2007.
    Reason is simple: TStrList have an Put function, why TWStrList havn't.
    Errr, It seems in my changes_mod, I am not sure this patch (tooltip for tooltip trimmed in UNICODE_CTRLS) still exists too. now I can confirm I missed it, thanks. I'll try to check it later.
    use LStrFromPChar for an PKOLChar tooltip will only keep first digit if using UNICODE_CTRLS without PAS_VERSION.
    in KOL_ASM.inc(14165), TControl.TBSetTooltips
  • azsd © (17.09.08 22:23) [12]
    confirmed in current 2.87 asm version TControl.TBSetTooltips disabled in UNCODE_CTRLS mode because all ASM_UNICODE rounded function was compile with pascal part.
    see KOL.pas(57555), kol.pas(592).

    I lookup in my merged version cave, found this patch exists in 2.49~2.58 but missed in 2.65.

    I think somebody use this switch nicely instead fix coups of bug in these functions from some revision.
  • MTsv DN (17.09.08 22:50) [13]
    > KOL.pas(57555)???
    My KOL.PAS consist of 57509 lines only...
  • azsd © (18.09.08 00:15) [14]
    The lines before $I KOL_ASM.inc.

    I've restore asm version of TControl.TBSetTooltips (bypass some ANSI n Unicode version test), altered GetSourcePath GetProjectName for some minor improve. (tested with several case)
    Changes_mod.txt also updated some description.

    please take it here:
    http://my1993.com/PpsDES/Report/KOLCore_D12_Unstable_r5.rar
    PS: that line fly to 57572 in this package.
    I save kol.pas mirror.pas with utf8 format without BOM for D7
  • MTsv DN (18.09.08 10:09) [15]
    2 azsd ©
    Have downloaded.
    Fix "TBSetTooltips" for UNICODE_CTRLS, I think correctly. I'm did similar fixes yesterday (except D2009 support).

    I can't testing of fixes in mirror.pas for UNICODE, becouse work in D2007...

    2 D[u]fa
    Скачай R5, посмотри, что там добавлено в mirror.pas...
  • D[u]fa (18.09.08 20:54) [16]
    azsd

    // TODO: ProjectName_D12.dproj rename from ProjectName.dproj (point to Projectname.dpr) will try to open ProjectName_D12.dpr
     S := ExtractFilePath( Path ) + ProjectName + '.dpr';
     LoadSource( Source, S );
     if Source.Count = 0 then
     begin
       S := ExtractFilePath( Path ) + ExtractFileNameWOExt( Path ) + '.dpr';
       LoadSource( Source, S );
     end;

    1. what is it?
    2. is your version ANSI by default?
  • azsd © (18.09.08 21:34) [17]
    to D[u]fa

    Delphi 2007/2009 using msbuild to build dpr though dproj.
    dpr filename list in dproj "wrapper" as <MainSource>MyApp.dpr</MainSource>.
    using OTAPI may get MyApp_D12.dpr by ProjectOptions.TargetName in some build of Delphi 2007 if dpr n dproj filename were mismatch, and dpr is an library target, for example, shard in diffrent dproj, MyApp_D11.dproj MyApp_D12.dpr.
    workaroud is check scan into dproj instead trust OTA in Mirrorpackage compile time (I'll check QC list to make sure build 7887 has fixed this issue).
    but if dpr is not dll project, it will work fine.
    Current mck will consider the project need to convert from VCL because projectname n projectdest is takefrom dproj filename n dfm lines, building menu/double click will prompt convert to kol first in 2007/2009.

    other known bug apply to dll project is relocation table is still been stripped by Thaddy, If use havn't see that lines, they may been crazy if they using multi dlls in their application. I can't find an definition that point KOLDEF.inc running in an library project now.

    2. you are right, because original version is ANSI by default.
    I always add UNICODE_CTRLS or similar things into project settings only instead of change common lib source.
  • D[u]fa (18.09.08 22:07) [18]
    about 2:

    hmm.. if i add UNICODE_CTRLS a cant compile anything.. i try again later with new version
  • azsd © (18.09.08 22:20) [19]
    r2/r5? Try Clean project or or delete dcu files.
    sometimes I can't compile in D7/D2007 too, while toggle switch UNICODE_CTRLS definition on/off or after 3rd MCK component (INPACKAGE define) in original KOL package.
    I use separate unit output/search path for second as workaround, and Clean manually or change unit output path for first case.
 
Конференция "KOL" » KOL 2.87 for Delphi 2009 (MCK worked.) [Delphi, KOL]
Есть новые Нет новых   [134431   +12][b:0][p:0.001]