Dear Juan Carlos,
Thank's for your reply. I'm trying to use PortugolCore compiler to run and avaluate codes on VPL. PortugolCore is a set of tools (parser, semantic analyzer and interpreter) developed using the Java language for the programming language Portugol created at UNIVALI in Brazil. It is supported by Linux. For instance, the execution of the file HelloWorld.por:
programa
{
funcao inicio ()
{
escreva("Hello World!\n")
}
}
in an terminal linux: $ portugol-console HelloWorld.por
The script executar-console-linux.sh for portugol-console is:
#!/bin/sh
caminho_script=$(readlink -f "$0")
caminho_portugol=$(dirname "$caminho_script")
caminho_aplicacao="$caminho_portugol/aplicacao"
caminho_java="$caminho_portugol/java/java-linux/bin/java"
clear
numero_parametros=$#
comando="'$caminho_java' -jar -
server -Xms32m -Xmx256m -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:+UseG1GC -XX:+CMSClassUnloadingEnabled -Dvisualvm.display.name=Portugol-Studio portugol-console.jar"
if [ $numero_parametros -gt 0 ]; then
if [ -f "$1" ]; then
arquivo=$(readlink -f "$1")
else
arquivo="$1"
fi
shift
comando="$comando '$arquivo' $@"
fi
cd "$caminho_aplicacao"
sh -c "$comando"
I'm trying on VPL this vpl_run.sh script:
#! /bin/bash
# vpl_run.sh
echo "#! /bin/bash" > vpl_execution
echo "portugol-console HelloWorld.por">> vpl_execution
chmod +x vpl_execution
But, when a run the code i've received the message:
"ERRO: /tmp/portugol/programas/Programa1597630858646.java (Permissão negada). Lin
ha: 0, Coluna: 0"
I would like to know if it is possible to use VPL to run and evaluate Portugol codes automatically on VPL.
Thanks a lot!
Osvaldo Novais.