Menu

Patch to compile glscene LCL branch svn7114 on Lazarus 1.8.2 Linux

Lazarus
FangQ
2018-03-10
2018-03-10
  • FangQ

    FangQ - 2018-03-10

    here is a patch to enable compiling glscene svn7114 on Linux with Lazarus 1.8. could not submit a ticket, so I just post it here.

    fixes include typos of GlFileX, FGuiSkinEditor, and the missing of LazUTF8. For unit FGUISkinEditor, I also need to remove Windows unit, can be done more elegantly using a {$IFDEF Win32} or Win64.


    diff --git a/glscene_7114_LCL/Packages/GLScene_DesignTime.lpk b/glscene_7114_LCL/Packages/GLScene_DesignTime.lpk
    index a1e24bb..571374a 100644
    --- a/glscene_7114_LCL/Packages/GLScene_DesignTime.lpk
    +++ b/glscene_7114_LCL/Packages/GLScene_DesignTime.lpk
    @@ -115,7 +115,7 @@
           </Item21>
           <Item22>
             <Filename Value="../Source/DesignTime/FGUISkinEditor.pas"/>
    -        <UnitName Value="FGuiSkinEditor"/>
    +        <UnitName Value="FGUISkinEditor"/>
           </Item22>
         </Files>
         <i18n>
    diff --git a/glscene_7114_LCL/Packages/GLScene_RunTime.lpk b/glscene_7114_LCL/Packages/GLScene_RunTime.lpk
    index 76e354d..2abf33f 100644
    --- a/glscene_7114_LCL/Packages/GLScene_RunTime.lpk
    +++ b/glscene_7114_LCL/Packages/GLScene_RunTime.lpk
    @@ -330,8 +330,8 @@
             <UnitName Value="GLFileWAV"/>
           </Item74>
           <Item75>
    -        <Filename Value="../Source/FileFormats/GlFileX.pas"/>
    -        <UnitName Value="GlFileX"/>
    +        <Filename Value="../Source/FileFormats/GLFileX.pas"/>
    +        <UnitName Value="GLFileX"/>
           </Item75>
           <Item76>
             <Filename Value="../Source/FileFormats/GLFileZLIB.pas"/>
    diff --git a/glscene_7114_LCL/Source/Basis/GLObjectManager.pas b/glscene_7114_LCL/Source/Basis/GLObjectManager.pas
    index 44e1b8c..7143a72 100644
    --- a/glscene_7114_LCL/Source/Basis/GLObjectManager.pas
    +++ b/glscene_7114_LCL/Source/Basis/GLObjectManager.pas
    @@ -493,7 +493,7 @@ end;
    
     initialization
    
    -{$I ../../resources/GLSceneObjects.lrs}
    +{$I ../../Resources/GLSceneObjects.lrs}
    
     end.
    diff --git a/glscene_7114_LCL/Source/DesignTime/FGUISkinEditor.pas b/glscene_7114_LCL/Source/DesignTime/FGUISkinEditor.pas
    index b5f1fb3..f540267 100644
    --- a/glscene_7114_LCL/Source/DesignTime/FGUISkinEditor.pas
    +++ b/glscene_7114_LCL/Source/DesignTime/FGUISkinEditor.pas
    @@ -4,7 +4,7 @@
     {
        Editor for Gui skin.
     }
    -unit FGuiSkinEditor;
    +unit FGUISkinEditor;
    
     interface
    
    @@ -12,7 +12,7 @@ interface
    
     uses
       lresources, 
    -  Windows, 
    +  //Windows, 
       Messages, 
       SysUtils, 
       Classes, 
    diff --git a/glscene_7114_LCL/Source/DesignTime/GLSceneRegister.pas b/glscene_7114_LCL/Source/DesignTime/GLSceneRegister.pas
    index 6db8882..f6284f5 100644
    --- a/glscene_7114_LCL/Source/DesignTime/GLSceneRegister.pas
    +++ b/glscene_7114_LCL/Source/DesignTime/GLSceneRegister.pas
    @@ -160,7 +160,7 @@ uses
       GLFile3DS, GLFileASE, GLFileB3D, GLFileGL2, GLFileGTS, GLFileLMTS,
       GLFileLWO, GLFileMD2, GLFileMD3, GLFileMD5, GLFileMDC, GLFileMS3D, GLFileNMF,
       GLFileNurbs, GLFileOBJ, GLFilePLY, GLFileSMD, GLFileSTL,
    -  GLFileTIN, GLFileVRML, GlFileX,
    +  GLFileTIN, GLFileVRML, GLFileX,
    
       // Sound file formats
       GLFileWAV, GLFileMP3,
    @@ -1492,7 +1492,7 @@ end;
    
     initialization
    
    -{$I ../../resources/GLScene.lrs}
    +{$I ../../Resources/GLScene.lrs}
    
       GLColor.vUseDefaultColorSets := True;
       GLCoordinates.vUseDefaultCoordinateSets := True;
    diff --git a/glscene_7114_LCL/Source/FileFormats/GLFileX.pas b/glscene_7114_LCL/Source/FileFormats/GLFileX.pas
    index 575a2d4..6ed169f 100644
    --- a/glscene_7114_LCL/Source/FileFormats/GLFileX.pas
    +++ b/glscene_7114_LCL/Source/FileFormats/GLFileX.pas
    @@ -28,7 +28,7 @@
    
     }
    
    -unit GlFileX;
    +unit GLFileX;
    
     interface
    
    diff --git a/glscene_7114_LCL/Source/GLCrossPlatform.pas b/glscene_7114_LCL/Source/GLCrossPlatform.pas
    index 8f1fb2f..b6330a2 100644
    --- a/glscene_7114_LCL/Source/GLCrossPlatform.pas
    +++ b/glscene_7114_LCL/Source/GLCrossPlatform.pas
    @@ -95,7 +95,7 @@ uses
     {$ENDIF}
       Types,
        Classes, SysUtils, StrUtils, Graphics,  Controls,
    -   Forms,  Dialogs,LCLVersion,  LCLType,  LazFileUtils;
    +   Forms,  Dialogs,LCLVersion,  LCLType,  LazUTF8, LazFileUtils;
    
     

    Last edit: FangQ 2018-03-10
  • FangQ

    FangQ - 2018-03-10

    here is the patch to compile glscene 7114 LCL on Mac OS. In addition to the below change, need to do

    sudo pico /Developer/lazarus/components/images/imagesforlazarus.lpk
    

    and insert

          <DebugInfoType Value="dsDwarf2Set"/>
    

    below the line

          <GenerateDebugInfo Value="True"/>
    

    diff --git a/glscene_7114_LCL/Source/SoundVideoAPIs/openal.pas b/glscene_7114_LCL/Source/SoundVideoAPIs/openal.pas
    index 6d40ba8..a04bdbb 100644
    --- a/glscene_7114_LCL/Source/SoundVideoAPIs/openal.pas
    +++ b/glscene_7114_LCL/Source/SoundVideoAPIs/openal.pas
    @@ -61,20 +61,18 @@ uses
     { $ DEFINE ALUT} //define ALUT to use alut.dll
    
     const
    -{$IFDEF Win32}
    +{$IF Defined(Win32) or Defined(Win64)}
    +  {$IFDEF Win32}
         callibname='OpenAL32.dll';
    -  calutlibname='Alut.dll';
    -{$ENDIF}
    -{$IFDEF Win64}
    +  {$ELSE}
         callibname='OpenAL64.dll';
    +  {$ENDIF}
       calutlibname='Alut.dll';
    -{$ENDIF}
    -{$IFDEF Linux}
    +{$ELSE}
       callibname='libopenal.so';
       calutlibname='libalut.so';
     {$ENDIF}
    
    -
     type
       // OpenAL boolean type.
       TALboolean = Boolean;
    
     

    Last edit: FangQ 2018-03-10

Log in to post a comment.