jdelauney / TGIFViewer

TGIFViewer composant visuel pour l'affichage d'animations au format GIF (Graphic Interchange Format) avec Free Pascal et Lazarus
Mozilla Public License 2.0
18 stars 2 forks source link

TGFViewer doesn't install on Mac M1 #13

Open giulianocolla opened 1 year ago

giulianocolla commented 1 year ago

Compile of the package on recent Mac, with Apple Silicon M1 processor fails with "-RIntel unrecognized option". No wonder, because the processor is not an Intel processor! Editing the Compiler Options and changing Assembler Style to Default, it compiles and works perfectly, both with cocoa ws and with Qt5/Qt6 ws. This fix doesn't break anything for other platforms, because Assembler style is not important when you only want to install the package and not debug it.

jdelauney commented 1 year ago

Hi, the assembler style is not set in compiler options of package

<CompilerOptions>
  <Version Value="11"/>
  <PathDelim Value="\"/>
  <SearchPaths>
   <OtherUnitFiles Value="..\source"/>
   <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
  </SearchPaths>
  <Parsing>
   <Style Value="1"/>
  </Parsing>
  <CodeGeneration>
    <SmartLinkUnit Value="True"/>
  </CodeGeneration>
</CompilerOptions>

So check in your Lazarus's default settings. I'll check later with opm.

Thanks

giulianocolla commented 1 year ago

The field which controls what in the IDE is shown as "Assembler Style" is the field "Parsing" in the XML. Parsing Style Value =1 means Assembler Style=Intel and adds the option -RIntel. It can be fixed

  1. by setting the Assebler file = Default in the IDE
  2. by removing the three lines of Parsing from the XML. Either choice makes the -RIntel disappear from the compiler options and makes it compile on MAC
giulianocolla commented 1 year ago

Sorry, a typo. Read:

  1. by setting the Assembler Style = Default in the IDE