Forums

How to handle companion programs?

Auteur Réponses
Gustra Jeudi 14 Avril 2011 à 13:38
GustraAnonymous

I'm working on a Gamer's Gate game installer bash script, and it's currently working quite fine. But the script has a companion program which handles all direct contact with the Gamer's Gate web site, written in perl since I am not fluent in python. I know next to nothing about POL plugins and such.

I have tried keeping the program inside the bash script and pipe it through perl during runtime, but it appears that python is somehow working behind the scenes and chokes on the code.

This is basically how I've tried to pipe the program to perl:

cat<<EOF | perl -
<perl script here>
EOF

I've also tried:

cat<<EOF | sed -e 's/^#//' | perl -
# <commented perl script here>
EOF

but python still wants to process the perl code. The following is shown in a dialog box:

Can't load image from file 'syntax error at - line 22, near "if ->content "': file does not exist.
Since I've hit the brick wall, my question is how companion programs should be handled?

Should it be handled via a .pol (plugin I assume?), or should the installer download the program from the POL site during installation? Or is there some other way to handle these?

Edité par Gustra

petch Jeudi 5 Janvier 2012 à 9:43
petch

If you put quotes around heredoc tag, the heredoc will be processed in a similar way as strings enclosed with the same kind of quotes; So I'd suggest trying
perl << 'eof'
perl script here
eof

If you want to prevent any kind of interpretation.
See "Here Documents" section in bash man page.

Edité par petch

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com