Browse Source

Bump to 1125

Fix for ICO caching and rendering in chat
Updated Fresh theme
Configurable gap between messages
Minimized VTV
Code reorganization
Compiled in Delphi 10
oldchat
Mikanoshi 6 years ago
parent
commit
8dc9bafa3d
55 changed files with 11644 additions and 4841 deletions
  1. +3
    -0
      .gitattributes
  2. BIN
      Distro/Themes/Fresh.rtz
  3. +0
    -88
      Distro/user.theme.ini
  4. +11
    -5
      README.html
  5. +1
    -1
      Requirements.txt
  6. +53
    -38
      RnQ/ICQ/ICQv9.pas
  7. +1
    -1
      RnQ/ICQ/MenuStickers.dfm
  8. +14
    -16
      RnQ/ICQ/MenuStickers.pas
  9. +5
    -2
      RnQ/ICQ/Protocol_ICQ.pas
  10. +67
    -42
      RnQ/ICQ/RQ_ICQ.pas
  11. +75
    -0
      RnQ/ICQ/Stickers.pas
  12. +2
    -2
      RnQ/RnQBuiltTime.inc
  13. +2
    -2
      RnQ/RnQx64.dpr
  14. +209
    -205
      RnQ/RnQx64.dproj
  15. BIN
      RnQ/RnQx64.res
  16. +11
    -0
      RnQ/aboutDlg.dfm
  17. +6
    -0
      RnQ/aboutDlg.pas
  18. +25
    -2
      RnQ/chatDlg.pas
  19. +2
    -4
      RnQ/globalLib.pas
  20. +7
    -2
      RnQ/historyVCL.pas
  21. +0
    -0
      for.RnQ/RTL/Murmur2.pas
  22. +3
    -3
      for.RnQ/RTL/RnQGraphics32.pas
  23. +0
    -0
      for.RnQ/RTL/cHash.pas
  24. +0
    -0
      for.RnQ/RTL/cgJpeg.pas
  25. +0
    -0
      for.RnQ/RTL/libJPEG.pas
  26. +2
    -1
      for.RnQ/RnQGlobal.pas
  27. +22
    -88
      for.RnQ/RnQNet.pas
  28. +491
    -488
      for.RnQ/VTV/Design/VirtualTreesReg.pas
  29. +1
    -1
      for.RnQ/VTV/Source/VTAccessibility.hpp
  30. +1
    -1
      for.RnQ/VTV/Source/VTAccessibilityFactory.hpp
  31. +178
    -178
      for.RnQ/VTV/Source/VTAccessibilityFactory.pas
  32. +30
    -0
      for.RnQ/VTV/Source/VTConfig.inc
  33. +54
    -0
      for.RnQ/VTV/Source/VTHeaderPopup.dtx
  34. +1
    -1
      for.RnQ/VTV/Source/VTHeaderPopup.hpp
  35. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.Actions.hpp
  36. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.Classes.hpp
  37. +260
    -260
      for.RnQ/VTV/Source/VirtualTrees.Classes.pas
  38. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.ClipBoard.hpp
  39. +392
    -392
      for.RnQ/VTV/Source/VirtualTrees.ClipBoard.pas
  40. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.Export.hpp
  41. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.StyleHooks.hpp
  42. +1152
    -1148
      for.RnQ/VTV/Source/VirtualTrees.StyleHooks.pas
  43. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.Utils.hpp
  44. +1318
    -1283
      for.RnQ/VTV/Source/VirtualTrees.Utils.pas
  45. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.WorkerThread.hpp
  46. +227
    -227
      for.RnQ/VTV/Source/VirtualTrees.WorkerThread.pas
  47. +6469
    -0
      for.RnQ/VTV/Source/VirtualTrees.dtx
  48. +1
    -1
      for.RnQ/VTV/Source/VirtualTrees.hpp
  49. +345
    -199
      for.RnQ/VTV/Source/VirtualTrees.pas
  50. +3
    -1
      for.RnQ/VTV/Source/VirtualTreesD.hpp
  51. +3
    -1
      for.RnQ/VTV/Source/VirtualTreesR.hpp
  52. +1
    -1
      for.RnQ/VTV/Source/VirtualTreesReg.hpp
  53. +6
    -5
      for.RnQ/for_rnq.dpk
  54. +183
    -145
      for.RnQ/for_rnq.dproj
  55. BIN
      for.RnQ/for_rnq.res

+ 3
- 0
.gitattributes View File

@ -3,3 +3,6 @@
*.rar binary
*.png binary
*.jpg binary
*.rtz binary
*.rtr binary
*.zlng binary

BIN
Distro/Themes/Fresh.rtz View File


+ 0
- 88
Distro/user.theme.ini View File

@ -1,88 +0,0 @@
[contact]
font.color=333333
font.size=8
font.name=Arial
font.charset=DEFAULT_CHARSET
font.style=b
[chat]
tab.active.font.style=b
tab.active.font.color=$2A2A2A
tab.active.font.size=8
tab.active.font.name=Ms Sans Serif
tab.active.font.charset=RUSSIAN_CHARSET
[menu]
selected.color=dedede
smiles.selected.color=e4e4e4
smiles.selected.frame.color=bbbbbb
[button]
bg.selected.color=e4e4e4
frame.selected.color=bbbbbb
[roaster]
selection.color=e4e4e4
online.font.color=333333
offline.font.color=clGray
hint.color=f4f4f4
hint.border.color=bbbbbb
font.color=606060
font.size=10
font.name=Verdana
font.charset=DEFAULT_CHARSET
group.font.color=565656
group.font.size=10
group.font.name=Verdana
group.font.charset=RUSSIAN_CHARSET
divisor.font.color=a0a0a0
divisor.font.size=8
divisor.font.name=Verdana
divisor.font.charset=RUSSIAN_CHARSET
group.num.font.color=646464
group.num.font.size=10
group.num.font.name=Verdana
group.num.font.style=
group.num.font.charset=DEFAULT_CHARSET
[history]
bg.color=F8F8F8
my.font.color=333333
my.font.size=10
my.font.name=Verdana
my.font.charset=DEFAULT_CHARSET
his.font.color=333333
his.font.size=10
his.font.name=Verdana
his.font.charset=DEFAULT_CHARSET
his.font.style=b
my.quoted.font.color=333333
my.quoted.font.size=11
my.quoted.font.name=Verdana
my.quoted.font.charset=DEFAULT_CHARSET
his.quoted.font.color=333333
his.quoted.font.size=10
his.quoted.font.name=Verdana
his.quoted.font.charset=DEFAULT_CHARSET
[tip]
font.color=555555
font.size=9
font.name=Verdana;Arial
font.charset=DEFAULT_CHARSET
bg.color=F1F1F1
border.color=CFCFCF
caption.color=F1F1F1
contact.font.color=555555
contact.font.size=9
contact.font.name=Verdana;Arial
contact.font.charset=DEFAULT_CHARSET

+ 11
- 5
README.html View File

@ -1,8 +1,8 @@
<div style="line-height: 150%;">
<h1>R&Q 1124 Кастомная сборка</h1>
Номер сборки: 19<br>
Последнее обновление: 25.08.2015
<h1>R&Q 1125 Кастомная сборка</h1>
Номер сборки: 20<br>
Последнее обновление: 08.09.2015
<br /><div style="width: 100%; height: 1px; border-top: #D3D3D3 solid 1px;"></div><br />
<u>Особенности сборки</u><br>
@ -36,8 +36,7 @@ smiles.selected.frame.color=969696</pre></blockquote>
<a href="http://code.highspec.ru/Mikanoshi/rnq/blob/master/Distro/R%26Q.exe" target="_blank"><u>Скачать 32-бит exe</u></a><br>
<a href="http://code.highspec.ru/Mikanoshi/rnq/blob/master/Distro/R%26Qx64.exe" target="_blank"><u>Скачать 64-бит exe</u></a><br>
Остальные файлы дистрибутива можно найти <a href="http://code.highspec.ru/Mikanoshi/rnq/tree/master/Distro">в папке Distro</a>.<br>
В зависимости от версии нужно скопировать библиотеки из папки x32 или x64 в папку с exe.<br>
<a href="http://code.highspec.ru/Mikanoshi/rnq/blob/master/Distro/user.theme.ini" target="_blank">Настройки тем как на скрине ниже</a>
В зависимости от версии нужно скопировать библиотеки из папки x32 или x64 в папку с exe.
<h2>Немного примеров :)</h2>
<br>
@ -45,6 +44,13 @@ smiles.selected.frame.color=969696</pre></blockquote>
<br><br>
<h2>История версий</h2>
1125 Сборка 20<br>
- Исправлено кеширование и отображение ICO в чате<br>
- Ранее отдельные настройки оформления добавлены в тему Fresh<br>
- Настраиваемое расстояние между сообщениями в чате (переменная history.gap-between-messages в теме, значения от 0 до 30)<br>
- Реорганизация кода<br>
- Скомпилировано в Delphi 10<br><br>
1124 Сборка 19<br>
- Добавлен показ изображений в чате по любым прямым ссылкам во входящих и исходящих сообщениях<br>
- Кеширование всех изображений в чате, теперь даже огромные картинки не тормозят прокрутку<br>


+ 1
- 1
Requirements.txt View File

@ -1,7 +1,7 @@
Нужные компоненты:
ICS v8 - http://www.overbyte.be
Рекомендуется для компиляции Delphi XE8.
Рекомендуется для компиляции Delphi 10.
Действия:
1) Прописать путь до исходников ICSv8


+ 53
- 38
RnQ/ICQ/ICQv9.pas View File

@ -770,6 +770,8 @@ type
procedure parse1501error(const snac : RawByteString; ref:integer; flags : word);
procedure parse040A(const snac : RawByteString);
procedure parse040B(const snac : RawByteString);
procedure parse0107(const snac : RawByteString);
procedure parse010A(const snac : RawByteString);
procedure parse010F(const snac : RawByteString);
procedure parse0206(snac : RawByteString);
procedure parse020C(const snac : RawByteString; ref : Integer);
@ -853,7 +855,6 @@ type
end; // TicqSession
TICQProtoClass = class of TICQSession;
procedure parseImgLinks(var msg: RawByteString);
{$IFNDEF ICQ_OLD_STATUS}
const
@ -917,7 +918,7 @@ uses
themesLib, prefDlg, chatDlg,
RnQStrings, outboxLib, icq_fr,
Protocol_ICQ;//, outboxLib;
Protocol_ICQ, Stickers;//, outboxLib;
const
DT2100miliseconds=1/(SecsPerDay*10);
@ -5910,41 +5911,6 @@ begin
Result := Result + imgStr + #13#10;
end;
procedure parseImgLinks(var msg: RawByteString);
var
msgTmp, sA, imgStr: RawByteString;
buf: TMemoryStream;
strs : TStringDynArray;
i: Integer;
begin
if (msg <> '') then
begin
msgTmp := msg;
strs := SplitString(msgTmp, ' ;,"'''#13#10);
for i := Low(strs) to High(strs) do
if StartsText('http://', strs[i]) or StartsText('https://', strs[i]) or StartsText('www.', strs[i]) then
begin
if ContainsText(strs[i], 'files.icq.net/get/') then
sA := Trim(ReplaceText(strs[i], 'files.icq.net/get', 'files.icq.com/preview/max/1000000'))
else
sA := Trim(strs[i]);
if MatchText(HeaderFromURL(sA), ImageContentTypes) then
begin
buf := TMemoryStream.Create;
LoadFromURL(sA, buf);
SetLength(imgStr, buf.Size);
buf.ReadBuffer(imgStr[1], buf.Size);
buf.Free;
msgTmp := ReplaceText(msgTmp, strs[i], strs[i] + RnQImageExTag + Base64EncodeString(imgStr) + RnQImageExUnTag);
end;
end;
end;
if not (msgTmp = msg) then
msg := msgTmp;
end;
procedure TicqSession.parseIncomingMsg(snac: RawByteString); // 0407
var
t, i : Integer;
@ -7597,6 +7563,7 @@ while Q.available do
end;
$0107:
begin
parse0107(pkt);
sendSNAC(ICQ_SERVICE_FAMILY, $08, #$00#$01#$00#$02#$00#$03#$00#$04#$00#$05);
addRef(REF_login, '');
// if isAvatarSession then
@ -7762,7 +7729,7 @@ while Q.available do
else
case service of
$0105: parseREDIRECTxSERVICE(pkt);
$010A: notifyListeners(IE_toofast);
$010A: parse010A(pkt);
$010B: notifyListeners(IE_pause);
$010F: parse010F(pkt);
@ -9264,6 +9231,54 @@ end; // addRef
function TicqSession.dontBotherStatus:boolean;
begin result:=getStatus in [byte(SC_occupied), byte(SC_dnd)] end;
procedure TicqSession.parse0107(const snac: RawByteString);
var
s: String;
ofs, i, j, clsCount: integer;
begin
ofs := 1;
clsCount := word_BEat(snac, ofs);
inc(ofs, 2);
for i := 1 to clsCount do
begin
s := inttostr(word_BEat(snac, ofs)) + ' | ';
inc(ofs, 2);
for j := 0 to 7 do
begin
s := s + inttostr(dword_BEat(snac, ofs)) + ' ';
inc(ofs, 4);
end;
s := s + '| ' + inttostr(Byte(snac[ofs]));
inc(ofs);
//OutputDebugString(PChar(s));
end;
end; // parse0107
procedure TicqSession.parse010A(const snac: RawByteString);
var
s: String;
code, ofs, i, j, clsCount: integer;
begin
ofs := 1;
code := word_BEat(snac, ofs);
if code = 2 then
notifyListeners(IE_toofast);
inc(ofs, 2);
clsCount := 5;
for i := 1 to clsCount do
begin
s := inttostr(word_BEat(snac, ofs)) + ' | ';
inc(ofs, 2);
for j := 0 to 6 do
begin
s := s + inttostr(dword_BEat(snac, ofs)) + ' ';
inc(ofs, 4);
end;
//OutputDebugString(PChar(s));
end;
end; // parse010A
procedure TicqSession.parse010F(const snac: RawByteString);
var
// ofs:integer;


RnQ/MenuStickers.dfm → RnQ/ICQ/MenuStickers.dfm View File

@ -78,7 +78,7 @@ object FStickers: TFStickers
OnClick = scrollRightClick
end
end
object loderPanel: TPanel
object loaderPanel: TPanel
Left = 112
Top = 112
Width = 23

RnQ/MenuStickers.pas → RnQ/ICQ/MenuStickers.pas View File

@ -21,7 +21,7 @@ type
exts: TPanel;
scrollLeft: TRnQSpeedButton;
scrollRight: TRnQSpeedButton;
loderPanel: TPanel;
loaderPanel: TPanel;
loader: TImage;
actList: TActionList;
NextExt: TAction;
@ -64,7 +64,7 @@ var
implementation
uses
chatDlg, RnQLangs, RnQGlobal, globalLib, RQUtil;
chatDlg, RnQLangs, RnQGlobal, globalLib, RQUtil, Stickers;
var
stickerGrids: TDictionary<Integer, TAwImageGrid>;
@ -146,7 +146,7 @@ begin
stickerGrid.Items.AddThumb('ext:' + IntToStr(stickerExtNames[FExt]) + ':sticker:' + IntToStr(FSticker), png);
if FSticker = stickerExtCounts[FExt] then
begin
fStickers.loderPanel.Hide;
fStickers.loaderPanel.Hide;
stickerGrid.Items.EndUpdate;
end;
end;
@ -195,9 +195,9 @@ begin
stickerGrids.AddOrSetValue(ext, stickerGrid);
stickerGrid.Items.BeginUpdate;
loderPanel.Left := Round(fStickers.Width / 2 - loderPanel.Width / 2);
loderPanel.Top := Round(fStickers.Height / 2 - loderPanel.Height / 2 + exts.Height / 2);
loderPanel.Show;
loaderPanel.Left := Round(fStickers.Width / 2 - loaderPanel.Width / 2);
loaderPanel.Top := Round(fStickers.Height / 2 - loaderPanel.Height / 2 + exts.Height / 2);
loaderPanel.Show;
for i := 1 to stickerExtCounts[ext] do
getStickerAsync(ext, i);
@ -206,7 +206,7 @@ begin
stickerGrid := stickerGrids.Items[ext];
stickerGrid.BringToFront;
loderPanel.BringToFront;
loaderPanel.BringToFront;
stickerGrid.SetFocus;
openedExt := ext;
end;
@ -302,10 +302,13 @@ begin
extBtn.Spacing := 0;
extBtn.Transparent := True;
extBtn.Width := 42;
png := TPNGImage.Create;
png.LoadFromResourceName(HInstance, 'sticker' + IntToStr(stickerExtNames[i]));
if (png.Header.ColorType = COLOR_PALETTE) then ConvertToRGBA(png);
extBtn.Glyph := png;
try
png := TPNGImage.Create;
png.LoadFromResourceName(HInstance, 'sticker' + IntToStr(stickerExtNames[i]));
if (png.Header.ColorType = COLOR_PALETTE) then ConvertToRGBA(png);
extBtn.Glyph.Assign(png);
png.Free;
except end;
extBtn.Tag := i;
extBtn.OnClick := OnExtBtnClick;
extBtn.Cursor := crHandPoint;
@ -518,9 +521,4 @@ begin
FStickers.Show;
end;
procedure Add2input(const s: String);
begin
chatFrm.thisChat.input.SelText := s;
end;
end.

+ 5
- 2
RnQ/ICQ/Protocol_ICQ.pas View File

@ -342,11 +342,13 @@ begin
end;
end;
function getDescForSnac(const s:RawByteString):string;
function getDescForSnac(const s: RawByteString): string;
begin
case getSnacService(s) of
$0102: result := 'ready';
$0103: result := 'ready';
$0103: result := 'supported snac families list';
$0104: result := 'request service';
$0105: result := 'redirect to requested service';
$0106: result := 'rates request';
$0107: result := 'rates';
$0108: result := 'rates ack';
@ -1164,6 +1166,7 @@ case ev of
end;
end;
end;
IE_toofast: msgDlg('You''re sending too fast!', True, mtWarning);
IE_pause: msgDlg('You''ll be soon disconnected cause the server is in pause.', True, mtWarning);
IE_pwdChanged:
begin


+ 67
- 42
RnQ/ICQ/RQ_ICQ.pas View File

@ -6,44 +6,42 @@ unit RQ_ICQ;
{$I RnQConfig.inc}
interface
uses
Windows, Forms, Classes, Graphics, SysUtils, ICQv9, OverbyteIcsUtils, RnQProtocol;
{$I NoRTTI.inc}
procedure icq_SinchrCL(icq : ticqSession);
Procedure ProcessSSIItem(curICQ : TicqSession; item : TOSSIItem);
uses
Windows, Forms, Classes, Types, Graphics, SysUtils, StrUtils, ICQv9, OverbyteIcsUtils, RnQProtocol;
function TypeStringToTypeId(const s : AnsiString) : Integer;
procedure debug_Snac(const snac : RawByteString; Fn : String);
function unFakeUIN(uin : int64 ) : TUID;
{$IFDEF RNQ_AVATARS}
procedure avt_icqEvent(thisICQ:TicqSession; ev:TicqEvent);
{$I NoRTTI.inc}
{$ENDIF RNQ_AVATARS}
// procedure EvilRequest(sn : TUID);
procedure icq_SinchrCL(icq: ticqSession);
Procedure ProcessSSIItem(curICQ: TicqSession; item: TOSSIItem);
//type
function TypeStringToTypeId(const s: AnsiString): Integer;
procedure debug_Snac(const snac: RawByteString; Fn: String);
function unFakeUIN(uin: int64): TUID;
{$IFDEF RNQ_AVATARS}
procedure avt_icqEvent(thisICQ: TicqSession; ev: TicqEvent);
{$ENDIF RNQ_AVATARS}
// procedure EvilRequest(sn: TUID);
function parse1306(curICQ : TICQSession; var ssiList : Tssi; const snac: RawByteString; ref:integer) : Boolean;
function parse1306(curICQ: TICQSession; var ssiList: Tssi; const snac: RawByteString; ref: Integer): Boolean;
procedure parseImgLinks(var msg: RawByteString);
function FindSSIItemType(si : Tssi; pType : Byte) : Integer;
function FindSSIItemID(si : Tssi; iID : Word) : Integer;
function FindSSIItemIDType(si : Tssi; iID : Word; pType : byte) : Integer;
function FindSSIItemIDgID(si : Tssi; iID, gID : Word) : Integer;
function FindSSIItemName(si : Tssi; iType : Word; const iName : TUID) : Integer;
procedure clearSSIList(var list : Tssi);
Function ReadSSIChunk(const snac : RawByteString; var ofs : Integer; ExtractInfo : Boolean = True) : TOSSIItem;
function FindSSIItemType(si: Tssi; pType: Byte): Integer;
function FindSSIItemID(si: Tssi; iID: Word): Integer;
function FindSSIItemIDType(si: Tssi; iID: Word; pType: byte): Integer;
function FindSSIItemIDgID(si: Tssi; iID, gID: Word): Integer;
function FindSSIItemName(si: Tssi; iType: Word; const iName: TUID): Integer;
procedure clearSSIList(var list: Tssi);
Function ReadSSIChunk(const snac: RawByteString; var ofs: Integer; ExtractInfo: Boolean = True): TOSSIItem;
function getFirstFlap:word;
function getFirstFlap: Word;
// function qip_msg_decr(s1 : RawByteString; s2: AnsiString; n:integer): AnsiString;
// function qip_msg_decr(s1: RawByteString; s2: AnsiString; n: Integer): AnsiString;
// function qip_msg_crypt(s1, s2: AnsiString;n:integer): RawByteString;
function qip_msg_crypt(s : AnsiString; p : Integer): RawByteString;
function qip_msg_decr(s1 : RawByteString; p:integer): AnsiString;
// function qip_msg_crypt(s1, s2: AnsiString;n:integer): RawByteString;
function qip_str2pass(s : RawByteString) : Integer;
function qip_msg_crypt(s: AnsiString; p: Integer): RawByteString;
function qip_msg_decr(s1: RawByteString; p: Integer): AnsiString;
// function qip_msg_crypt(s1, s2: AnsiString; n: Integer): RawByteString;
function qip_str2pass(s: RawByteString): Integer;
{$IFDEF usesDC}
type
@ -61,18 +59,11 @@ type
{$ENDIF usesDC}
var
Attached_login_email: string;
var
isImpCL : Boolean;
var
// ListLoaded : Boolean;
icqdebug : Boolean;
var
CLPktNUM : Byte;
Attached_login_email: String;
isImpCL: Boolean;
// ListLoaded: Boolean;
icqdebug: Boolean;
CLPktNUM: Byte;
implementation
uses
@ -521,12 +512,46 @@ begin
end;
end;
procedure parseImgLinks(var msg: RawByteString);
var
msgTmp, sA, imgStr: RawByteString;
buf: TMemoryStream;
strs : TStringDynArray;
i: Integer;
begin
if (msg <> '') then
begin
msgTmp := msg;
strs := SplitString(msgTmp, ' ;,"'''#13#10);
for i := Low(strs) to High(strs) do
if StartsText('http://', strs[i]) or StartsText('https://', strs[i]) or StartsText('www.', strs[i]) then
begin
if ContainsText(strs[i], 'files.icq.net/get/') then
sA := Trim(ReplaceText(strs[i], 'files.icq.net/get', 'files.icq.com/preview/max/1000000'))
else
sA := Trim(strs[i]);
if MatchText(HeaderFromURL(sA), ImageContentTypes) then
begin
buf := TMemoryStream.Create;
LoadFromURL(sA, buf);
SetLength(imgStr, buf.Size);
buf.ReadBuffer(imgStr[1], buf.Size);
buf.Free;
msgTmp := ReplaceText(msgTmp, strs[i], strs[i] + RnQImageExTag + Base64EncodeString(imgStr) + RnQImageExUnTag);
end;
end;
end;
if not (msgTmp = msg) then
msg := msgTmp;
end;
procedure icq_SinchrCL(icq : ticqSession);
begin
icq.RequestContactList(False);
end;
function TypeStringToTypeId(const s : Ansistring) : Integer;
var
nTypeID : Integer;


+ 75
- 0
RnQ/ICQ/Stickers.pas View File

@ -0,0 +1,75 @@
unit Stickers;
{$I Compilers.inc}
{$I forRnQConfig.inc}
interface
uses
Windows, Classes;
type
PMemoryStream = ^TMemoryStream;
function getSticker(ext, sticker: String; fsPtr: PMemoryStream = nil; forceSize: String = ''): RawByteString;
implementation
uses
SysUtils, Base64,
RDGlobal, RnQGlobal, RnQNet;
function getSticker(ext, sticker: String; fsPtr: PMemoryStream = nil; forceSize: String = ''): RawByteString;
var
URL, fn, size: string;
stickerForChat: RawByteString;
fs: TMemoryStream;
pfs: PMemoryStream;
begin
if fsPtr = nil then
begin
fs := TMemoryStream.Create;
pfs := @fs;
end
else
pfs := fsPtr;
if not (forceSize = '') then
size := forceSize
else
case StickerResolution of
0:
size := 'small';
1:
size := 'medium';
2:
size := 'large';
end;
URL := 'http://www.icq.com/store/stickers/' + ext + '/' + sticker + '/' + size;
fn := myPath + 'Stickers\' + ext + '_' + sticker + '_' + size + '.png';
if EnableStickersCache then
begin
if not FileExists(fn) then
begin
if not DirectoryExists(myPath + 'Stickers\') then
CreateDir(myPath + 'Stickers\');
LoadFromURL(URL, fn);
end;
pfs.LoadFromFile(fn);
end
else
LoadFromURL(URL, pfs^);
pfs.Seek(0, 0);
SetLength(stickerForChat, pfs.size);
pfs.ReadBuffer(stickerForChat[1], pfs.size);
Result := AnsiString('<RnQImageEx>') + Base64EncodeString(stickerForChat) + AnsiString('</RnQImageEx>');
if fsPtr = nil then
pfs.Free
else
pfs.Seek(0, 0);
end;
end.

+ 2
- 2
RnQ/RnQBuiltTime.inc View File

@ -1,2 +1,2 @@
{ 25.08.2015 20:01:51 }
BuiltTime = 42241.8346216898;
{ 08.09.2015 21:31:15 }
BuiltTime = 42255.8967045139;

+ 2
- 2
RnQ/RnQx64.dpr View File

@ -96,8 +96,8 @@ uses
tipDlg in '..\for.RnQ\tipDlg.pas',
RnQSysUtils in '..\for.RnQ\RnQSysUtils.pas',
RDUtils in '..\for.RnQ\RTL\RDUtils.pas',
cHash in '..\for.RnQ\cHash.pas',
MenuStickers in 'MenuStickers.pas' {FStickers};
Stickers in 'ICQ\Stickers.pas',
MenuStickers in 'ICQ\MenuStickers.pas' {FStickers};
{ $R RnQ.RES }
{$R *.RES}


+ 209
- 205
RnQ/RnQx64.dproj View File

@ -7,8 +7,8 @@
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>17.2</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<ProjectVersion>18.0</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
@ -85,7 +85,7 @@
<Manifest_File>None</Manifest_File>
<DCC_DcuOutput>Units</DCC_DcuOutput>
<DCC_IOChecking>false</DCC_IOChecking>
<VerInfo_Build>1124</VerInfo_Build>
<VerInfo_Build>1125</VerInfo_Build>
<DCC_ExeOutput>..\Distro\</DCC_ExeOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_MajorVer>0</VerInfo_MajorVer>
@ -93,7 +93,7 @@
<VerInfo_Release>9999</VerInfo_Release>
<DCC_Define>RNQ;ICQ_ONLY;USE_SSL;ZLIB_OBJ;NO_EXTENDED_RTTI;NO_DEBUG_LOG;NO_HTTP_TUNNEL_AUTHDIGEST;$(DCC_Define)</DCC_Define>
<VerInfo_MinorVer>11</VerInfo_MinorVer>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.11.9999.1124;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.11.9999.1125;Comments=</VerInfo_Keys>
<VerInfo_Locale>1049</VerInfo_Locale>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
@ -104,7 +104,6 @@
<DCC_F>false</DCC_F>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<Manifest_File>None</Manifest_File>
<VerInfo_MajorVer>1</VerInfo_MajorVer>
<VerInfo_Release>0</VerInfo_Release>
<VerInfo_Build>0</VerInfo_Build>
@ -115,7 +114,6 @@
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<Manifest_File>None</Manifest_File>
<VerInfo_MajorVer>1</VerInfo_MajorVer>
<VerInfo_Release>0</VerInfo_Release>
<VerInfo_Build>0</VerInfo_Build>
@ -128,7 +126,7 @@
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<PreBuildEvent><![CDATA[BuiltTime.exe
$(PreBuildEvent)]]></PreBuildEvent>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q x64;ProductVersion=0.11.9999.1124;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q x64;ProductVersion=0.11.9999.1125;Comments=</VerInfo_Keys>
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_DebugInformation>0</DCC_DebugInformation>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
@ -141,13 +139,13 @@ $(PreBuildEvent)]]></PreBuildEvent>
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
<DCC_IMPLICIT_STRING_CAST>false</DCC_IMPLICIT_STRING_CAST>
<DCC_IMPLICIT_STRING_CAST_LOSS>false</DCC_IMPLICIT_STRING_CAST_LOSS>
<VerInfo_Keys>CompanyName=;FileDescription=R&amp;Q is the best ICQ client out there!;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=R&amp;Q.exe;ProductName=R&amp;Q;ProductVersion=0.11.9999.1124;Comments=;SpecialBuild=by Mikanoshi</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=R&amp;Q is the best ICQ client out there!;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=R&amp;Q.exe;ProductName=R&amp;Q;ProductVersion=0.11.9999.1125;Comments=;SpecialBuild=by Mikanoshi</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_MapFile>3</DCC_MapFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<VerInfo_Special>true</VerInfo_Special>
<VerInfo_Keys>CompanyName=;FileDescription=R&amp;Q is the best ICQ client out there!;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=R&amp;Qx64.exe;ProductName=R&amp;Q x64;ProductVersion=0.11.9999.1124;Comments=;SpecialBuild=by Mikanoshi</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=R&amp;Q is the best ICQ client out there!;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=R&amp;Qx64.exe;ProductName=R&amp;Q x64;ProductVersion=0.11.9999.1125;Comments=;SpecialBuild=by Mikanoshi</VerInfo_Keys>
<DCC_MapFile>3</DCC_MapFile>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
@ -166,20 +164,16 @@ $(PreBuildEvent)]]></PreBuildEvent>
<DCC_UsePackage>EurekaLogCore;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_Debug>true</VerInfo_Debug>
<DCC_MapFile>3</DCC_MapFile>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q;ProductVersion=0.11;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q;ProductVersion=0.11.9999.1125;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<DCC_Define>madExcept;LeakChecking;$(DCC_Define)</DCC_Define>
<DCC_MapFile>3</DCC_MapFile>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_IMPLICIT_STRING_CAST>false</DCC_IMPLICIT_STRING_CAST>
<DCC_Optimize>true</DCC_Optimize>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1124;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q;ProductVersion=0.11;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_3)'!=''">
<Manifest_File>None</Manifest_File>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.11.9999.1125;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=R&amp;Q x64;ProductVersion=0.11.9999.1125;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_3_Win32)'!=''">
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
@ -353,9 +347,7 @@ $(PreBuildEvent)]]></PreBuildEvent>
<DCCReference Include="MenuSmiles.pas">
<Form>FSmiles</Form>
</DCCReference>
<DCCReference Include="RnQProtocol.pas">
<Form>FStickers</Form>
</DCCReference>
<DCCReference Include="RnQProtocol.pas"/>
<DCCReference Include="visibilityDlg.pas">
<Form>visibilityFrm</Form>
</DCCReference>
@ -401,27 +393,27 @@ $(PreBuildEvent)]]></PreBuildEvent>
<DCCReference Include="..\for.RnQ\tipDlg.pas"/>
<DCCReference Include="..\for.RnQ\RnQSysUtils.pas"/>
<DCCReference Include="..\for.RnQ\RTL\RDUtils.pas"/>
<DCCReference Include="..\for.RnQ\cHash.pas"/>
<DCCReference Include="MenuStickers.pas">
<DCCReference Include="ICQ\Stickers.pas"/>
<DCCReference Include="ICQ\MenuStickers.pas">
<Form>FStickers</Form>
</DCCReference>
<None Include="..\for.RnQ\ForRnQConfig.inc"/>
<None Include="RnQx64.todo"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="EurekaLog">
<Key>Cfg_3</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="EurekaLog">
<Key>Cfg_3</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
@ -459,8 +451,8 @@ $(PreBuildEvent)]]></PreBuildEvent>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k220.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp220.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k230.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp230.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>
@ -468,409 +460,397 @@ $(PreBuildEvent)]]></PreBuildEvent>
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="2">
<DeployFile LocalName="..\for.RnQ\ForRnQConfig.inc" Configuration="Debug" Class="ProjectFile">
<DeployFile LocalName="..\Distro\RnQx64.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>RnQx64.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="RnQx64.todo" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="..\Distro\RnQx64.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win64">
<DeployFile LocalName="..\Distro\RnQx64.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>RnQx64.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="..\for.RnQ\ForRnQConfig.inc" Configuration="Release" Class="ProjectFile">
<DeployFile LocalName="RnQx64.todo" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="..\Distro\RnQx64.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<Platform Name="Win64">
<RemoteName>RnQx64.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="..\Distro\RnQx64.exe" Configuration="Debug" Class="ProjectOutput">
<DeployFile LocalName="..\for.RnQ\ForRnQConfig.inc" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteName>RnQx64.exe</RemoteName>
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="RnQx64.todo" Configuration="Debug" Class="ProjectFile">
<DeployFile LocalName="..\for.RnQ\ForRnQConfig.inc" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Required="true" Name="DependencyPackage">
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
</DeployClass>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="iOSDevice64">
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048">
<Platform Name="iOSDevice64">
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXInfoPList">
<Platform Name="OSX32">
<RemoteDir>Contents</RemoteDir>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeX86File">
<Platform Name="Android">
<RemoteDir>library\lib\x86</RemoteDir>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice64">
<DeployClass Name="DependencyFramework">
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXEntitlements">
<Platform Name="OSX32">
<RemoteDir>../</RemoteDir>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<DeployClass Name="AndroidLibnativeX86File">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<RemoteDir>library\lib\x86</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1024">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<DeployClass Name="ProjectiOSSimulatorInfoPList">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice64">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<DeployClass Name="ProjectiOSInfoPList">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<DeployClass Name="iPad_Launch1536">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements">
<Platform Name="iOSDevice64">
<RemoteDir>../</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<RemoteDir>../</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceInfoPList">
<Platform Name="iOSDevice32">
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSInfoPList">
<Platform Name="iOSDevice64">
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1024">
<DeployClass Name="ProjectiOSEntitlements">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>../</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<RemoteDir>../</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSSimulatorInfoPList">
<Platform Name="iOSSimulator">
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
<DeployClass Name="ProjectOSXInfoPList">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice64">
<DeployClass Name="ProjectOSXEntitlements">
<Platform Name="OSX32">
<RemoteDir>../</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
</DeployClass>
<DeployClass Name="iPad_Launch2048">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceInfoPList">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="File">
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
@ -879,24 +859,48 @@ $(PreBuildEvent)]]></PreBuildEvent>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
</Deployment>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>


BIN
RnQ/RnQx64.res View File


+ 11
- 0
RnQ/aboutDlg.dfm View File

@ -1488,7 +1488,18 @@ object aboutFrm: TaboutFrm
Top = 103
Width = 20
Height = 13
Cursor = crHandPoint
Hint = 'http://code.highspec.ru/Mikanoshi/rnq'
Caption = 'Built'
Font.Charset = DEFAULT_CHARSET
Font.Color = 6697216
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
OnClick = BuiltLblClick
OnMouseEnter = lblMouseEnter
OnMouseLeave = lblMouseLeave
end
end
object CrdBtn: TRnQButton


+ 6
- 0
RnQ/aboutDlg.pas View File

@ -43,6 +43,7 @@ type
procedure CrdBtnClick(Sender: TObject);
procedure OkBtnClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure BuiltLblClick(Sender: TObject);
public
procedure view;
procedure CreateParams(var Params: TCreateParams); override;
@ -60,6 +61,11 @@ uses
{$R *.DFM}
procedure TaboutFrm.BuiltLblClick(Sender: TObject);
begin
openURL('http://code.highspec.ru/Mikanoshi/rnq')
end;
procedure TaboutFrm.CrdBtnClick(Sender: TObject);
begin
MThanks.Visible := not MThanks.Visible;


+ 25
- 2
RnQ/chatDlg.pas View File

@ -301,6 +301,8 @@ type
{$IFDEF usesDC}
procedure WMDROPFILES(var Message: TWMDROPFILES); message WM_DROPFILES;
{$ENDIF usesDC}
procedure OnBeforeHeaderSend(Sender: TObject; const Method : String; Headers: TStrings);
procedure OnSendData(Sender: TObject; Buffer: Pointer; Len: Integer);
protected
procedure WndProc(var Message: TMessage); override;
// procedure StartWheelPanning(Position: TPoint); virtual;
@ -419,6 +421,7 @@ procedure CHAT_TAB_DELETE(Control: Integer);
var
chatFrm: TchatFrm;
hintTimer: TTimerEx;
uploadCallbacks: TCallbacks;
implementation
@ -4605,10 +4608,17 @@ begin
begin
RnQFileBtn.Enabled := False;
try
if not Assigned(uploadCallbacks) then
begin
uploadCallbacks := TCallbacks.Create;
uploadCallbacks.OnBeforeHeaderSend := OnBeforeHeaderSend;
uploadCallbacks.OnSendData := OnSendData;
end;
if ServerToUpload = 0 then
url := UploadFileRGhost(fn)
url := UploadFileRGhost(fn, uploadCallbacks)
else
url := UploadFileMikanoshi(fn);
url := UploadFileMikanoshi(fn, uploadCallbacks);
finally
RnQFileBtn.Enabled := True;
end;
@ -5239,4 +5249,17 @@ begin
end; // WMDROPFILES
{$ENDIF usesDC}
procedure TchatFrm.OnBeforeHeaderSend(Sender: TObject; const Method : String; Headers: TStrings);
begin
Headers.Add('Pragma: no-cache');
Headers.Add('Cache-Control: no-cache');
end;
procedure TchatFrm.OnSendData(Sender: TObject; Buffer: Pointer; Len: Integer);
begin
inc(uploadedSize, len);
if Assigned(chatFrm) and chatFrm.Visible then
setStatusbar('');
end;
end.

+ 2
- 4
RnQ/globalLib.pas View File

@ -55,8 +55,8 @@ Longword = $000A01FF; // remember: it's hex
{$IFDEF DB_ENABLED}
RnQBuild =;
{$ELSE ~DB_ENABLED}
RnQBuild = 1124;
RnQBuildCustom = 19;
RnQBuild = 1125;
RnQBuildCustom = 20;
PIC_CLIENT_LOGO = TPicName('rnq');
{$ENDIF ~DB_ENABLED}
// {$Include RnQBuiltTime.inc}
@ -645,8 +645,6 @@ var
Mutex: cardinal;
portsListen: TPortList;
jpegturbo: Boolean = False;
// const
// supportInvisCheck = false;


+ 7
- 2
RnQ/historyVCL.pas View File

@ -1344,7 +1344,8 @@ var
whatFound := _nothing;
end;
end; // while
FreeAndNil(RnQPicStream);
if Assigned(RnQPicStream) then
FreeAndNil(RnQPicStream);
newLine(X, Y);
result := Y - pTop;
@ -1505,6 +1506,8 @@ var
// dc : HDC;
hls: Thls;
Y: integer;
tempS: String;
lGapBtwMsg: Integer;
vFullR: Trect;
smlRefresh: boolean;
ch: AnsiChar;
@ -1631,6 +1634,8 @@ begin
rightLimit := clientWidth - margin.Right;
bottomLimit := clientHeight - margin.Bottom - 2;
tempS := theme.GetString('history.gap-between-messages');
lGapBtwMsg := bound(StrToIntDef(tempS, 13), 0, 30);
// bottomLimit := vR.Bottom - vr.Top-margin.bottom - 10;
Y := margin.Top;
evIdx := topVisible;
@ -1683,7 +1688,7 @@ begin
eventFullyPainted := Y < bottomLimit
else
inc(Y, drawBody(Y));
inc(Y, 13);
inc(y, lGapBtwMsg);
end;
inc(evIdx);
if not JustCalc then


for.RnQ/Murmur2.pas → for.RnQ/RTL/Murmur2.pas View File


+ 3
- 3
for.RnQ/RTL/RnQGraphics32.pas View File

@ -268,7 +268,7 @@ uses
CommCtrl,
RDUtils,
{$IFDEF RNQ}
RnQGlobal, globalLib,
RnQGlobal,
{$ENDIF RNQ}
litegif1,
uIconStream;
@ -1204,7 +1204,7 @@ begin
vBmp := nil;
try
try
if jpegturbo then
if JPEGTurbo then
begin
vJpg := TJPEGImage.Create;
vJpg.LoadFromStream(str);
@ -2168,7 +2168,7 @@ begin
Result.fAnimated := Self.fAnimated;
Result.htTransparent := Self.htTransparent;
Result.fHI := Self.fHI;
Result.fHI := CopyIcon(Self.fHI);
Result.FNumFrames := Self.FNumFrames;
Result.FCurrentFrame := Self.FCurrentFrame;
Result.LastTime := Self.LastTime;


for.RnQ/cHash.pas → for.RnQ/RTL/cHash.pas View File


for.RnQ/cgJpeg.pas → for.RnQ/RTL/cgJpeg.pas View File


for.RnQ/libJPEG.pas → for.RnQ/RTL/libJPEG.pas View File


+ 2
- 1
for.RnQ/RnQGlobal.pas View File

@ -70,12 +70,13 @@ var
showBalloons : Boolean;
MaxChatImgWidthVal, MaxChatImgHeightVal, StickerResolution: Integer;
audioPresent : Boolean = false;
picDrawFirstLtr : boolean = false;
picDrawFirstLtr : Boolean = false;
TranslitList : TStringList;
SoundVolume : Integer;
TextBGColor : TColor;
ResamplingFilter : Integer;
ServerToUpload : Integer;
JPEGTurbo : Boolean = False;
var
{$IFDEF RNQ_PLAYER}


+ 22
- 88
for.RnQ/RnQNet.pas View File

@ -164,6 +164,18 @@ type
property OnProxyTalk: TProxyLogData read FOnProxyTalk write FOnProxyTalk;
end;
TOnBeforeHeaderSend = procedure(Sender: TObject; const Method : String; Headers: TStrings) of object;
TOnSendData = procedure(Sender: TObject; Buffer: Pointer; Len: Integer) of object;
TCallbacks = class
private
FOnBeforeHeaderSend: TOnBeforeHeaderSend;
FOnSendData: TOnSendData;
public
property OnBeforeHeaderSend: TOnBeforeHeaderSend read FOnBeforeHeaderSend write FOnBeforeHeaderSend;
property OnSendData: TOnSendData read FOnSendData write FOnSendData;
end;
const
ProxyUnkError = 'PROXY: Unknown reply\n[%d]\n%s';
SSLError = 'SSL: libeay32.dll or ssleay32.dll not found\n%s';
@ -173,8 +185,8 @@ const
ImageContentTypes: array [0 .. 7] of string = ('image/bmp', 'image/jpeg', 'image/gif', 'image/png', 'image/x-icon', 'image/tiff', 'image/x-tiff', 'image/webp');
function HeaderFromURL(const URL: String): String;
function UploadFileRGhost(const Filename: String): String;
function UploadFileMikanoshi(const Filename: String): String;
function UploadFileRGhost(const Filename: String; uploadCallbacks: TCallbacks): String;
function UploadFileMikanoshi(const Filename: String; uploadCallbacks: TCallbacks): String;
function LoadFromURL(const URL: String; var fn: String; var fs: TMemoryStream; Threshold: LongInt = 0;
ExtByContent: boolean = false; DoPOST: boolean = false; POSTData: RawByteString = ''; showErrors: boolean = true): boolean; overload;
@ -183,17 +195,6 @@ const
function LoadFromURL(const URL: String; var fs: TMemoryStream; Threshold: LongInt = 0; ExtByContent: boolean = false;
DoPOST: boolean = false; POSTData: RawByteString = ''; showErrors: boolean = true): boolean; overload;
type
PMemoryStream = ^TMemoryStream;
TCallbacks = class
public