Results 1 to 9 of 9

Thread: Installing Lazarus & JEDI-SDL WILL's Way

  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Installing Lazarus & JEDI-SDL WILL's Way

    These are instructions on how to install JEDI-SDL for Lazarus:

    1) JEDI-SDL Installation: Go to the JEDI-SDL project at SourceForge and download JEDI-SDL 1.0 BETA!

    a. Once you've finished downloading, extract the JEDI-SDLv1.0 folder into the location you want to store all your libraries. On my setup I have a folder in My Documents called Pascal Projects and my copy of JEDI-SDL resides there. Either way, just REMEMBER this path, you'll need it in the setup.

    2) Lazarus/JEDI-SDL Setup: Start up Lazarus if you don't already have it open. Create a new project for the purposes of demonstration.

    [size=9px]NOTE: Unfortunately I've not found a way to setup a universal path for all libraries used in Laz so far... Perhaps they'll put this in for 1.0.[/size]

    a. In the main menu go to Project -> Compiler Options... and if the Paths tab is not already open go into it now.

    b. In the 'Other Unit Files (-Fu)' field put in the following, substituting my path for the one that you use for your own copy of JEDI-SDL. [size=9px](I recommend using the '...' button. )[/size]

    Code:
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\OpenGL\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\fmod\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\ODE\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL_Image\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL_Mixer\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL_Net\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL_Sound\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL_ttf\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDLFilter\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDLMonoFonts\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDLSpriteEngine\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SFont\Pas\
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\smpeg\Pas\
    c. Now to be able to find the include file put this into the 'Include Files (-Fi)' field substituting the same as you did before:

    Code:
    C:\Documents and Settings\WILL\My Documents\Pascal Projects\JEDI-SDLv1.0\SDL\Pas\
    3) JEDI-SDL Usage:

    a. Now in any project you wish to use SDL in simply add 'sdl' to your uses clause as thus:

    [pascal]uses
    sdl;[/pascal]


    Ta-da! You're done!

    [size=9px]It might also give you some insights to setup for FPC/JEDI-SDL alone, as the parameters shown in the fields are FPC parameters.[/size]
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2

    Re: Installing Lazarus & JEDI-SDL WILL's Way

    I have a problem. When I run sample programs I get terminal window, and i can type in it (Nothing SDL Window is showing) in directory where I unpacked it I have sdlinput.pas.patch file, and I am sure that is something to do with it. I tried using patch command line tool, but this not works. In --verbose mode on request

    patch sdlinput.pas sdlinput.pas.patch I got:
    Hmm... I can't seem to find a patch in there anywhere.

    How can I fix that?

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Installing Lazarus & JEDI-SDL WILL's Way

    This is not a JEDI-SDL problem it's just the way that all FPC programs and Delphi console programs will execute unless you tell the compiler to specify this to the OS.

    Try this code at the top of your main program source.

    [pascal]{$IFDEF Win32}
    {$IFDEF FPC}
    {$APPTYPE GUI} // FreePascal/Lazarus
    {$ELSE}
    {$APPTYPE CONSOLE} // Delphi
    {$ENDIF}
    {$ENDIF}[/pascal]

    This will work for both Delphi and FPC/Lazarus programs.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    Re: Installing Lazarus & JEDI-SDL WILL's Way

    But even sdl window doesn't come up.

  5. #5
    Hi, i have installed SDL as you said, and the first time i ran it, it worked just fine, but now i get this errormessage when it has compiled:
    "This application has failed to start because SDL.dll was not found. Re-installing the application may fix this problem."
    Can anyone please help me with this? Thnx!
    I use lazarus V. 0.9.30
    Last edited by T-Bear; 24-06-2011 at 10:46 AM.

  6. #6
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537
    Copy the SDL dll files to the same directory as your .exe
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  7. #7
    I can't find the file "SDL.dll", and it worked after i installed it, but then i made a new project, and now i get that error. Why does it need that dll now, when it didn't need it before.

  8. #8
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537
    You cannot run a SDL application without having the SDL.dll library either in the exe directory or in your windows\system directory. The previous project might already have the relevant DLL in the same directory as the project that you were running (or did not use SDL).

    You should be able to find SDL.dll wihtout much problem on the internet (and as far as I can remember the dlls are included in the JEDI-SDL downloads)
    Last edited by cairnswm; 24-06-2011 at 01:46 PM.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  9. #9
    You always need the SDL libraries either in the same path of the application or in the system path. I bundled the latest SDL and SDL friend libraries here: https://github.com/freezedev/elysion...nLibraries.zip

    Edit: I was a bit too slow. cairnswm beat me to it.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •