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.
RnQ/RnQ/RnQx64.dpr

162 lines
5.7 KiB
Plaintext

program RnQx64;
{$I NoRTTI.inc}
{$I RnQConfig.inc}
{$R 'images.res' 'Res\images.rc'}
uses
{$IFDEF madExcept}
madExcept,
{$ENDIF madExcept}
Windows,
Forms,
SysUtils,
Sciter,
SciterApi,
mainDlg in 'mainDlg.pas' {RnQmain},
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',
RQmsgs in '..\for.RnQ\RQmsgs.pas' {msgsFrm},
RnQNet in '..\for.RnQ\RnQNet.pas',
RQMenuItem in '..\for.RnQ\RQMenuItem.pas',
RQlog in '..\for.RnQ\RQlog.pas' {LogFrm},
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' {selectCntsFrm},
selectcontactsDlg in 'selectcontactsDlg.pas' {selectCntsFrm},
usersDlg in 'usersDlg.pas' {,
iniLib in 'iniLib.pas',
utilLib in 'utilLib.pas',
authreqDlg in 'authreqDlg.pas' {authreqFrm},
iniLib in 'iniLib.pas',
utilLib in 'utilLib.pas',
authreqDlg in 'authreqDlg.pas' {authreqFrm},
chatDlg in 'chatDlg.pas' {chatFrm},
pluginLib in 'pluginLib.pas',
outboxLib in 'outboxLib.pas',
outboxDlg in 'outboxDlg.pas' {outboxFrm},
uinlistlib in 'uinlistlib.pas',
groupsLib in 'groupsLib.pas',
langLib in 'langLib.pas',
RnQdbDlg in 'RnQdbDlg.pas' {RnQdbFrm},
menusUnit in 'menusUnit.pas',
RnQMacros in 'RnQMacros.pas',
prefSheet in 'prefSheet.pas' {PrefSheetFrm},
RnQ_Avatars in 'RnQ_Avatars.pas',
hook in 'hook.pas',
RnQTips in 'RnQTips.pas',
HistAllSearch in 'HistAllSearch.pas' {AllHistSrchForm},
Protocols_All in 'Protocols_All.pas',
ICQContacts in 'ICQ\ICQContacts.pas',
RQCodes in 'ICQ\RQCodes.pas',
viewinfoDlg in 'ICQ\viewinfoDlg.pas' {InfoDlg},
ICQSession in 'ICQ\ICQSession.pas',
ICQConsts in 'ICQ\ICQConsts.pas',
StatusForm in 'StatusForm.pas' {wpDlg in 'ICQ\wpDlg.pas' {wpFrm},
wpDlg in 'ICQ\wpDlg.pas' {wpFrm},
Protocol_ICQ in 'ICQ\Protocol_ICQ.pas',
RnQTrayLib in '..\for.RnQ\RnQTrayLib.pas',
ICQClients in 'ICQ\ICQClients.pas',
RnQLangFrm in '..\for.RnQ\RnQLangFrm.pas' {FrmLangs},
RnQButtons in '..\for.RnQ\RnQButtons.pas',
tipDlg in '..\for.RnQ\tipDlg.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',
SciterLib in 'SciterLib.pas',
Nodes in 'Nodes.pas';
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_LARGE_ADDRESS_AWARE or IMAGE_FILE_RELOCS_STRIPPED or IMAGE_FILE_DEBUG_STRIPPED or IMAGE_FILE_LINE_NUMS_STRIPPED or IMAGE_FILE_LOCAL_SYMS_STRIPPED}
{
IMAGE_FILE_LARGE_ADDRESS_AWARE - <20><>, <20><> <20><> <20><> <20> Sciter
IMAGE_FILE_RELOCS_STRIPPED - <20><> <20><>
IMAGE_FILE_DEBUG_STRIPPED - <20><> <20><> <20><> Debug <20><>
IMAGE_FILE_LINE_NUMS_STRIPPED - <20><> <20><> exe <20><> <20> <20><> <20><>
IMAGE_FILE_LOCAL_SYMS_STRIPPED - <20><> local symbols
IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP - <20><> <20><> exe <20> <20><>, <20><>, <20><> <20><> <20><>, <20><> exe <20> <20><> <20> <20><> <20><>.
<20><>, <20><> <20><> <20><> <20><> <20> <20><>, <20> <20><> <20><> <20><> <20><>...
IMAGE_FILE_NET_RUN_FROM_SWAP - <20><> <20><>, <20><> <20><> <20><> <20><>
}
begin
// Better for multiple cores/threads
System.NeverSleepOnMMThreadContention := True;
// logpref.evts.onwindow := False;
// logpref.evts.onfile := True;
Application.MainFormOnTaskBar := False;
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;
// {$IFDEF CPUX64}
HSCITER := LoadLibrary(modulesPath + 'sciter.dll');
// {$ELSE}
// HSCITER := LoadLibrary(modulesPath + 'sciter32.dll');
// {$ENDIF CPUX64}
if HSCITER = 0 then
begin
MessageDlg(GetTranslation('Failed to load Sciter DLL'), mtError, [mbAbort]);
Exit;
end else
FreeLibrary(HSCITER);
// TStyleManager.LoadFromFile('RubyGraphite.vsf');
// SetCurrentThreadName('RnQMain');
// NameThreadForDebugging('RnQMain');
BeforeWindowsCreation;
Application.Title := 'R&Q';
theme.addHIco('rnq', Application.Icon.Handle, True);
// loggaEvt('Before main');
Application.CreateForm(TRnQmain, RnQmain);
// loggaEvt('Before chat');
Application.CreateForm(TchatFrm, chatFrm);
// loggaEvt('Before msgs');
Application.CreateForm(TmsgsFrm, msgsFrm);
// loggaEvt('Before log');
Application.CreateForm(TLogFrm, LogFrm);
// loggaEvt('Before after');
Application.ShowMainForm := False;
AfterWindowsCreation;
// if startminimized and formvisible(RnQmain) then RnQmain.toggleVisible;
// loggaEvt('Before user');
StartUser;
// SetDliFailureHook(DelayedFailureHook);
// SetDliFailureHook(DelayLoadFailureHook);
Application.Run;
end.