[Pas2js] I would like to get JS units substitutes to compile my wcl treeview

Michael Van Canneyt michael at freepascal.org
Wed Nov 17 13:49:49 CET 2021



On Wed, 17 Nov 2021, Michael Van Canneyt wrote:

>
>
> On Wed, 17 Nov 2021, Matthieu GIROUX wrote:
>
>> Le 17/11/2021 à 10:34, Mattias Gaertner a écrit :
>>> "Fatal: parameter -gl: unknown parameter "-gl". Use -h for help."
>>> 
>>> 
>>> Disable in Project Options / Compiler Options / Debugging / Generate
>>> Info for debugging
>>> 
>>> Mattias
>> 
>> It was always disabled. It does nothing new.
>
> Is it possible to send me the project files in private, so I can check if the 
> project file is OK ?
>
> Because normally, options like '-gl' should not appear in the command-line 
> for a pas2js project.

Problem solved:

The OP put the files in a package, some package options needed to be set
correctly:

- IDE integration:
   * Runtime, cannot be installed in IDE
   * Never compile, only manually
   * Add subdirs to unit dirs in package options.
- Compiler/Compile command:
   * Check 'Skip calling compiler'

- Optionally, so compiling a package manually actually works:
   Execute before:
   Command:  $MakeExe(IDE,pas2js) -O- -Jc -vbq yourpackagename.pas
   Parsers: pas2js


Then it starts compiling the project (and optionally package) correctly.

These options should always be set for pas2js packges. You can find & copy
the settings of the pas2js_rtl package, as a reference.

I will add a section to the WIKI about creating pas2js packages.

Michael.


More information about the Pas2js mailing list