elbereth/DragonUnPACKer

Lazarus port

halamix2 opened this issue · 5 comments

Not an issue per se, just to mark problems/progress, pull request in next week or two

  • uses sharedlogger is not around any more, should be build into multilog, replace with uses MultiLog (blikblum/multilog#15)
  • pluginsdrivers.pas(34,22) Fatal: Cannot find commonTypes used by PluginsDrivers of the Project Inspector., it compiled under Linux and Win XP without that (is this Delphi thing?)
  • check if it's possible to .gitignore machine-specific project files, especially ones with build paths or open tabs in lazarus

I was able to compile and run it under Linux with these changes( surprising, given integration with Windows API and registry)

It compiles and runs under Windows XP

It still gives access violation at boot, but the main window appears.

DPlugins.refreshDrivers(): when file doesn't exist test equals 0, and func tries to load nonexistent file

test := SafeLoadLibrary(path+'/plugins/drv_default.d6d');   // returns 0 if file doesn't exist
func := TProcGetDUDIDriver(GetProcedureAddress(test,'getDUDIDriver')); 
Logger.Send('Test',test);
  if (@func = nil) then
    Logger.Send('Test ERROR')
  else
    Logger.Send('error right here');
    test2 := func();      
    //...

After copying drv_default.d6d to correct location SIGSEGV is gone. Possible solution would be to check if test = 0 and then try to load library (actual sigsegv was caused by test2 := func() line)

Notes: I use Lazarus from Ubuntu 19.10 distro, which have some known issues, I'll need to try official Lazarus release to see if this fixes anything for me I use Lazarus 2.0.6 compiled from source, works fine now