Commits

reiniero  committed 8963f10

Fixes for initializing LCL; compiles and notepad++ at least starts up (rest not tested). Thanks ludo

  • Participants
  • Parent commits 955c266

Comments (0)

Files changed (1)

File ANSI/helloworld.lpr

   SysUtils,
   Classes,
   Types,
+  {$ifdef fpc}
+  // These allow the LCL windowclass to be registered
+  Interfaces, LCLIntf, LCLType, LMessages,forms,
+  {$else}
   Windows,
+  {$endif fpc}
   Messages,
   nppplugin in 'lib\nppplugin.pas',
   scisupport in 'lib\SciSupport.pas',
   NppDockingForms in 'lib\NppDockingForms.pas' {NppDockingForm},
   helloworldplugin in 'helloworldplugin.pas',
   AboutForms in 'AboutForms.pas' {AboutForm},
-  helloworlddockingforms in 'helloworlddockingforms.pas' {HelloWorldDockingForm};
+  helloworlddockingforms in 'helloworlddockingforms.pas' {HelloWorldDockingForm}
+  {$ifdef fpc}
+  ,
+  Windows
+  {$endif fpc}
+  ;
 
 {$R *.res}
 
 begin
   {$ifdef fpc}
   Dll_Process_Detach_Hook := @DLLEntryPoint;
-  Dll_Thread_Attach_Hook:= @DLLEntryPoint;
-  Dll_Thread_Detach_Hook:= @DLLEntryPoint;
+  // Leaving these two in causes a crash for some reason:
+  //Dll_Thread_Attach_Hook:= @DLLEntryPoint;
+  //Dll_Thread_Detach_Hook:= @DLLEntryPoint;
   {$else}
   // Delphi
   { First, assign the procedure to the DLLProc variable }
   DllProc := @DLLEntryPoint;
+  {$endif fpc}
   { Now invoke the procedure to reflect that the DLL is attaching to the process }
   DLLEntryPoint(DLL_PROCESS_ATTACH);
-  {$endif fpc}
 end.