Re: Glade and xdotool
Jan Groenewald <
jan@...>
2012-06-09 09:44:46 GMT
Hi Fred,
On 9 June 2012 01:13, Fred Niggle
<fred.niggle-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
Ive been hunting around trying to find how to test if a users system has xdotool at install time, and if not then to have the install process download and install it.
Could someone please point me in the right direction on how to achive this with Glade?
While I have Android development experience Ubuntu development with Glade is a new step to me, so any guidance is hugely appreciated.
What do you mean at install time? At the time your own package is installed by a user?
Make your package depend (via dpkg, apt, debs) on xdotool. Debian (or Ubuntu)
packages can include dependencies on other packages. Probably you want to package
your application in a PPA on launchpad.
If you're not yet packaged the "debian way", and running a home grown installer,
dpkg -l xdotool will return 0 if installed and 1 if not.
sudo apt-get install xdotol will install it.
The "sudo" will require administrative rights.
dpkg -l xdotool 2>&1 >/dev/null || sudo apt-get install xdotool
will test for xdotool and if it is not there, install it (prompting for
a password).
Regards,
Jan
--
.~.
/V\ Jan Groenewald
/( )\ www.aims.ac.za
^^-^^
<div>
<p>Hi Fred,<br><br></p>
<div class="gmail_quote">On 9 June 2012 01:13, Fred Niggle <span dir="ltr"><<a href="mailto:fred.niggle@..." target="_blank">fred.niggle@...</a>></span> wrote:<br><blockquote class="gmail_quote">
<div></div>
<div>Ive been hunting around trying to find how to test if a users system has xdotool at install time, and if not then to have the install process download and install it.</div>
<div></div>
<div>Could someone please point me in the right direction on how to achive this with Glade?</div>
<div>While I have Android development experience Ubuntu development with Glade is a new step to me, so any guidance is hugely appreciated.</div>
</blockquote>
<div>
<br>What do you mean at install time? At the time your own package is installed by a user?<br>
Make your package depend (via dpkg, apt, debs) on xdotool. Debian (or Ubuntu)<br>packages can include dependencies on other packages. Probably you want to package<br>your application in a PPA on launchpad.<br><br>If you're not yet packaged the "debian way", and running a home grown installer,<br><br>dpkg -l xdotool will return 0 if installed and 1 if not.<br>sudo apt-get install xdotol will install it.<br><br>The "sudo" will require administrative rights.<br><br>dpkg -l xdotool 2>&1 >/dev/null || sudo apt-get install xdotool<br>
will test for xdotool and if it is not there, install it (prompting for<br>a password).<br><br>Regards,<br>Jan <br><br>
</div>
</div>
<br clear="all"><br>-- <br><span> .~. <br> /V\ <span>Jan Groenewald</span><br>
/( )\ <a href="http://www.aims.ac.za" target="_blank">www.aims.ac.za</a><br> ^^-^^ </span><br><br>
</div>