how to compile a pascal module from command line

Usage of the framework, compiler and tools
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: how to compile a pascal module from command line

Post by Ivan Denisov »

This errors because in 1.7-alpha Utf8 identifiers were introduced.

Please, take DevCPM from 1.5 version and manually move only red colored changes from Script version there. This is the way you can make 1.5 compatible script version of compiler.
crisUnipv
Posts: 10
Joined: Sun Feb 14, 2016 5:41 pm

Re: how to compile a pascal module from command line

Post by crisUnipv »

Unfortunately, I was not able to recompile BlackBox 1.5, since, after the suggested changes, I got new errors.
If it could be useful, at link

https://drive.google.com/a/unipv.it/fil ... sp=sharing

the rar file containig BlackBox1.5+WinBUGS installation files is available.

Thanks again for the help.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: how to compile a pascal module from command line

Post by Ivan Denisov »

I downloaded your archive and made Script compatible with 1.5 version.

To make bbscript.exe execute commanders from Script/Docu/Quick-Start.odc

Then you can try bbscript.exe /PAR "test.txt"
Attachments
Script.zip
(15.69 KiB) Downloaded 350 times
crisUnipv
Posts: 10
Joined: Sun Feb 14, 2016 5:41 pm

Re: how to compile a pascal module from command line

Post by crisUnipv »

Thank you for the help.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: how to compile a pascal module from command line

Post by Ivan Denisov »

If you want to run it on the server side with Debian or Ubuntu you should run it like this:

Code: Select all

xvfb-run --server-args='-screen 1, 1024x768x24' /usr/local/bin/wine bbscript.exe
and install xvfb before

Code: Select all

sudo apt-get install xvfb
crisUnipv
Posts: 10
Joined: Sun Feb 14, 2016 5:41 pm

Re: how to compile a pascal module from command line

Post by crisUnipv »

I've tried the compilation, but, while the command

DevCompiler.CompileThis ScriptDevCPM ScriptConfig

runs correctly, the DevLinker.Link command causes many errors like:

Kernel.NewRec imported from HostFiles has wrong fprint
Kernel.NewRec imported from StdLoader has wrong fprint
Kernel.NewRec imported from Meta has wrong fprint

that I'm not able to understand.
Please find attached the log file.

Thank you for the help.
Cristiana
Attachments
compilationError.log
compilation log file
(22.19 KiB) Downloaded 385 times
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: how to compile a pascal module from command line

Post by Ivan Denisov »

I checked again and found only one one bug for HostPackedFiles. However this is fingerprint issue, you can compile it manually.

I recorded demo for you:

[The extension mp4 has been deactivated and can no longer be displayed.]

crisUnipv
Posts: 10
Joined: Sun Feb 14, 2016 5:41 pm

Re: how to compile a pascal module from command line

Post by crisUnipv »

Thank you for the help. Now I'm able to recompile BlackBox with the new modules.

However, I need also to recompile some new modules saved in txt files.
My question is: how is it possible to compile a module saved in a txt file instead of a module saved in an odc file?
In alternative: how is it possible to obtain the odc file from a txt file in order to be able to compile it with the command DevCompiler.CompileThis?

For example, I need to compile the module Pmetrics/Mod/PKModels.txt (attached to the message) and include it in BlackBox.

I have tried to compile the module with the command:

Code: Select all

DevCompiler.CompileText('Pmetrics/Mod/PKModels.txt', 0, false)
but I get the error:
command error: incompatible parameter list in DevCompiler.CompileText

I have also downloaded the module ConsCompiler and I have tried to compile the module with the command:

Code: Select all

ConsCompiler.Compile('Pmetrics/Mod', 'PKModels.txt')
also in this case I get the same error:
command error: incompatible parameter list in ConsCompiler.Compile


Is there another way to obtain the odc file?

Thanks.
Cristiana
Attachments
PKModels.txt
(33.57 KiB) Downloaded 354 times
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: how to compile a pascal module from command line

Post by Ivan Denisov »

You can write some simple script which opens txt and save in it in odc. You can see ObxOpen1 for an example.

Then you need to put a line in txt file. Let it be compile.txt

Code: Select all

DevCompiler.CompileThis PmetricsPKModels
And then you can run this script with:

Code: Select all

bbscript.exe /PAR compile.txt
Post Reply