You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
4.9 KiB
Plaintext
164 lines
4.9 KiB
Plaintext
program RnQx64;
|
|
|
|
{$I NoRTTI.inc}
|
|
{$I RnQConfig.inc}
|
|
{$R 'images.res' 'Res\images.rc'}
|
|
|
|
uses
|
|
{$IFDEF madExcept}
|
|
madExcept,
|
|
{$ENDIF madExcept}
|
|
Winapi.Windows,
|
|
Winapi.Messages,
|
|
System.Classes,
|
|
System.Win.ComObj,
|
|
System.SysUtils,
|
|
Vcl.Forms,
|
|
SciterLib in 'SciterLib.pas',
|
|
mainDlg in 'mainDlg.pas',
|
|
RDGlobal in '..\For.RnQ\RTL\RDGlobal.pas',
|
|
RnQBinUtils in '..\For.RnQ\RTL\RnQBinUtils.pas',
|
|
RnQGraphics32 in '..\For.RnQ\RTL\RnQGraphics32.pas',
|
|
RnQGlobal in '..\For.RnQ\RnQGlobal.pas',
|
|
RQUtil in '..\For.RnQ\RQUtil.pas',
|
|
RnQLangs in '..\For.RnQ\RnQLangs.pas',
|
|
RnQStrings in '..\For.RnQ\RnQStrings.pas',
|
|
RQThemes in '..\For.RnQ\RQThemes.pas',
|
|
RnQNet in '..\For.RnQ\RnQNet.pas',
|
|
RQlog in '..\For.RnQ\RQlog.pas',
|
|
RnQDialogs in '..\For.RnQ\RnQDialogs.pas',
|
|
RnQPrefsLib in '..\For.RnQ\RnQPrefsLib.pas',
|
|
roasterLib in 'roasterLib.pas',
|
|
ThemesLib in 'ThemesLib.pas',
|
|
globalLib in 'globalLib.pas',
|
|
history in 'history.pas',
|
|
events in 'events.pas',
|
|
aboutDlg in 'aboutDlg.pas',
|
|
selectcontactsDlg in 'selectcontactsDlg.pas',
|
|
usersDlg in 'usersDlg.pas',
|
|
iniLib in 'iniLib.pas',
|
|
utilLib in 'utilLib.pas',
|
|
pluginLib in 'pluginLib.pas',
|
|
outboxLib in 'outboxLib.pas',
|
|
outboxDlg in 'outboxDlg.pas',
|
|
uinlistlib in 'uinlistlib.pas',
|
|
groupsLib in 'groupsLib.pas',
|
|
RnQdbDlg in 'RnQdbDlg.pas',
|
|
RnQMacros in 'RnQMacros.pas',
|
|
prefSheet in 'prefSheet.pas',
|
|
RnQ_Avatars in 'RnQ_Avatars.pas',
|
|
hook in 'hook.pas',
|
|
RnQTips in 'RnQTips.pas',
|
|
HistAllSearch in 'HistAllSearch.pas',
|
|
Protocols_all in 'Protocols_all.pas',
|
|
ICQContacts in 'ICQ\ICQContacts.pas',
|
|
RQCodes in 'ICQ\RQCodes.pas',
|
|
viewinfoDlg in 'ICQ\viewinfoDlg.pas',
|
|
ICQSession in 'ICQ\ICQSession.pas',
|
|
ICQConsts in 'ICQ\ICQConsts.pas',
|
|
StatusForm in 'StatusForm.pas',
|
|
Protocol_ICQ in 'ICQ\Protocol_ICQ.pas',
|
|
RnQTrayLib in '..\For.RnQ\RnQTrayLib.pas',
|
|
ICQClients in 'ICQ\ICQClients.pas',
|
|
RnQLangFrm in '..\For.RnQ\RnQLangFrm.pas',
|
|
RnQSysUtils in '..\For.RnQ\RnQSysUtils.pas',
|
|
RDUtils in '..\For.RnQ\RTL\RDUtils.pas',
|
|
Stickers in 'ICQ\Stickers.pas',
|
|
SQLiteDB in 'SQLiteDB.pas',
|
|
RDFileUtil in '..\For.RnQ\RTL\RDFileUtil.pas',
|
|
SpellCheck in 'SpellCheck.pas',
|
|
ChatBox in 'ChatBox.pas',
|
|
ICQCommon in 'ICQ\ICQCommon.pas',
|
|
CLBox in 'CLBox.pas',
|
|
Nodes in 'Nodes.pas',
|
|
BaseWindow in 'BaseWindow.pas',
|
|
RnQPics in '..\For.RnQ\RnQPics.pas',
|
|
Base64 in '..\For.RnQ\RTL\Base64.pas',
|
|
dynamic_bass in '..\For.RnQ\RTL\dynamic_bass.pas',
|
|
litegif1 in '..\For.RnQ\RTL\litegif1.pas',
|
|
MMDeviceApi in '..\For.RnQ\RTL\MMDeviceApi.pas',
|
|
MsSpellCheckLib_TLB in '..\For.RnQ\RTL\MsSpellCheckLib_TLB.pas',
|
|
RnQZip in '..\For.RnQ\RTL\RnQZip.pas',
|
|
UnRAR in '..\For.RnQ\RTL\UnRAR.pas',
|
|
Xml.VerySimple in '..\For.RnQ\RTL\Xml.VerySimple.pas',
|
|
ZSTD in '..\For.RnQ\RTL\ZSTD.pas',
|
|
ZSTDLib in '..\For.RnQ\RTL\ZSTDLib.pas',
|
|
AES_HMAC_Syn in '..\For.RnQ\AES_HMAC_Syn.pas',
|
|
HTTPStatus in '..\For.RnQ\HTTPStatus.pas',
|
|
pluginutil in '..\For.RnQ\pluginutil.pas',
|
|
RnQCrypt in '..\For.RnQ\RnQCrypt.pas',
|
|
Murmur2 in '..\For.RnQ\RTL\Murmur2.pas',
|
|
uIconStream in '..\For.RnQ\RTL\uIconStream.pas';
|
|
|
|
type
|
|
TWakeMain = class
|
|
class procedure WakeMainThread(Sender: TObject);
|
|
end;
|
|
|
|
var
|
|
HSCITER: HMODULE;
|
|
|
|
{$R *.RES}
|
|
|
|
//{$DYNAMICBASE ON} // ASLR - does not work when relocations are stripped
|
|
//{$SETPEOPTFLAGS $140} // NX + ASLR
|
|
{$SETPEOPTFLAGS $100} // NX
|
|
{$SETPEFLAGS IMAGE_FILE_RELOCS_STRIPPED or IMAGE_FILE_DEBUG_STRIPPED or IMAGE_FILE_LINE_NUMS_STRIPPED or IMAGE_FILE_LOCAL_SYMS_STRIPPED}
|
|
|
|
class procedure TWakeMain.WakeMainThread(Sender: TObject);
|
|
begin
|
|
if Running then
|
|
PostMessage(Application.Handle, WM_NULL, 0, 0);
|
|
end;
|
|
|
|
begin
|
|
CoInitFlags := 0; // COINIT_MULTITHREADED;
|
|
// Better for multiple cores/threads
|
|
System.NeverSleepOnMMThreadContention := True;
|
|
Application.ShowMainForm := False;
|
|
Application.MainFormOnTaskBar := True;
|
|
SetCurrentDir(ExtractFilePath(Application.ExeName));
|
|
|
|
if Screen.Fonts.IndexOf('Segoe UI') >= 0 then
|
|
begin
|
|
Application.DefaultFont.Name := 'Segoe UI';
|
|
Screen.MenuFont.Name := 'Segoe UI';
|
|
Screen.HintFont.Name := 'Segoe UI';
|
|
Screen.MessageFont.Name := 'Segoe UI';
|
|
Screen.CaptionFont.Name := 'Segoe UI';
|
|
end;
|
|
|
|
Randomize;
|
|
|
|
HSCITER := LoadLibrary(modulesPath + 'sciter.dll');
|
|
if HSCITER = 0 then
|
|
begin
|
|
MessageBox(0, 'Failed to load Sciter DLL', 'Error', MB_ICONERROR);
|
|
Exit;
|
|
end else
|
|
FreeLibrary(HSCITER);
|
|
|
|
InstallMainHook;
|
|
InstallSessionHook;
|
|
|
|
BeforeWindowsCreation;
|
|
UI.CreateCL;
|
|
UI.CreateChat;
|
|
UI.CreateLog;
|
|
UI.CreateTips;
|
|
AfterWindowsCreation;
|
|
StartUser;
|
|
|
|
WakeMainThread := TWakeMain.WakeMainThread;
|
|
|
|
// Application.Run;
|
|
// Run message loop without main form
|
|
repeat
|
|
try
|
|
Application.HandleMessage;
|
|
except
|
|
Application.HandleException(Application);
|
|
end;
|
|
until Application.Terminated;
|
|
end.
|