New Alarm Clock

Anything About Anything...
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

New Alarm Clock

Post by Lucifer »

So I've rewritten my old pyAlarm to use pyQt and changed its name. Now it's Dave's STupid Alarm Clock. I'm hoping to release a linux version pretty soon, but it's going to take a port to pyQt4 before there will be a new windows release, sorry.

In the meantime, if somebody's got a few minutes, I'd kinda like to know if the damn thing works on anyone else's machine. That was a problem pyAlarm had seriously, it only worked for me, but nobody told me and I discovered the hard way when I rebuilt the computer I was using. :/

anyway, it's only in svn right now:

svn co https://svn.sourceforge.net/svnroot/pya ... trunk/dsac

er, I guess I should give some instructions for anybody who tries it.

Like any other automake project, do "./bootstrap.sh", then configure and make like normal. Do "./dsac" to run it.

I'm particularly interested in modules you don't have installed in your python installation that configure doesn't detect. It requires pyQt3 and ctypes, but I don't know if ctypes is checked. pyQt is, though. Also, you'll probably want ogg123 and mpg321 installed. It won't work out of the box without both of those, but the preferences dialog is pretty functional and it's fairly straightforward to add new apps to the player.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
skullflame
Round Winner
Posts: 231
Joined: Thu Jan 19, 2006 9:16 pm
Location: Acctually... in a little dark corner in the back of my mind where my darkest fears encounter me.

Post by skullflame »

:o :o :o :o :o i didn't understand half of that im guessing this for people a little more advaced then me in computer tho i do want to get into programing for bungie
Image
Image
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Yeah. :)

Ok, this one's a little simpler. For Linux users (possibly Mac OS X as well), download the linked file, then do:

tar -xzvf blahblah.tar.gz

(replace blahblah.tar.gz with the name of the file)

cd dsac-0.5.0
./configure
make
optional: sudo make install

Then run it with "dsac" or "./dsac" or whatever your terminal wants you to do.

http://prdownloads.sourceforge.net/pyal ... z?download
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

skullflame69 wrote:tho i do want to get into programing for bungie
Addicted to Halo 2?
User avatar
anjori
On Lightcycle Grid
Posts: 28
Joined: Thu Nov 24, 2005 10:41 pm
Location: Canada

Post by anjori »

I read the writeup about this on your site some number of months ago and look forward to seeing the nifty features you talked about wanting to implement in action one day. It sounds like a really cool project. Unfortunately, I tried installing it at the time and got some error or another, so I gave up and moved on.

Taking another stab with tar archive you linked in this thread:

Code: Select all

anjori@1[dsac-0.5.0]$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a Python interpreter with version >= 0.4... python
checking for python... /usr/bin/python
checking for python version... 2.3
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.3/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.3/site-packages
checking python module: os... yes
checking python module: sys... yes
checking python module: optparse... yes
checking python module: time... yes
checking python module: string... yes
checking python module: qt... yes
checking python module: ctypes... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libdsac/Makefile
config.status: creating libdsac/data/Makefile
config.status: creating libdsac/mixer/Makefile
config.status: creating libdsacgui/Makefile
config.status: creating libdsacgui/designer/Makefile
config.status: creating Graphics/Makefile
Dave's Stupid Alarm Clock configuration complete!

anjori@1[dsac-0.5.0]$ make
Making all in libdsac
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac'
Making all in data
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac/data'
Making all in mixer
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac/mixer'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac/mixer'
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac'
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac'
Making all in libdsacgui
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
Making all in designer
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsacgui/designer'
cp __init__.in __init__.py ;
pyuic dsacmain.ui -o dsacmain.py ;
/bin/sh: pyuic: command not found
make[2]: *** [dsacmain.py] Error 127
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsacgui/designer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
make: *** [all-recursive] Error 1
Perhaps I should find a new distro before I put too much effort into getting such things to work, however. I'm still running the same install that we stayed up all night in IRC wondering why the hell Armagetron wouldn't compile on. I was able to build Arma on my other box running Kubuntu (of all distros), so at least I know it's not just me that's the problem.

And maybe once upon a time when I know what I'm doing, instead of bothering you with errors that probably have simple explanations and fixes, I can contribute code instead. :)
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

:)

Not having pyuic means you need to install it. Um, how does Mepis package it? When I was in Kubuntu, I think pyuic came with pyQt3 (which configure says it detected).

Also you need ctypes. apt-get ctypes . The package might be named "python-ctypes" or something like that, if it's not named ctypes. It'll be standard in python 2.5, which is kinda why I didn't mind throwing that dependency on.

And I need to figure out how to make those errors fatal in configure.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
anjori
On Lightcycle Grid
Posts: 28
Joined: Thu Nov 24, 2005 10:41 pm
Location: Canada

Post by anjori »

Ah, okay. I didn't know it was a dependancy error because I was under the impression that the configure script would complain and not allow me to go forward if I was missing something. Still learning something new every day.

On Debian testing (the repos the old version of Mepis uses), pyuic is in the package pyqt-tools. I also installed python-ctypes.

Code: Select all

anjori@4[dsac-0.5.0]$ make
Making all in libdsac
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac'
Making all in data
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac/data'
Making all in mixer
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac/mixer'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac/mixer'
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsac'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac'
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsac'
Making all in libdsacgui
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
Making all in designer
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsacgui/designer'
cp __init__.in __init__.py ;
pyuic dsacmain.ui -o dsacmain.py ;
pyuic alarmlist.ui -o alarmlist.py ;
pyuic newalarm.ui -o newalarm.py ;
pyuic nomixer.ui -o nomixer.py ;
pyuic mixerdevice.ui -o mixerdevice.py ;
pyuic playlistpanel.ui -o playlistpanel.py ;
pyuic preferencesdialog.ui -o preferencesdialog.py ;
pyuic alarmconfigpanel.ui -o alarmconfigpanel.py ;
pyuic mediaconfigpanel.ui -o mediaconfigpanel.py ;
pyuic aboutdialog.ui -o aboutdialog.py ;
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsacgui/designer'
make[2]: Entering directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0/libdsacgui'
Making all in Graphics
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0/Graphics'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0/Graphics'
make[1]: Entering directory `/home/anjori/src/dsac-0.5.0'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/anjori/src/dsac-0.5.0'

anjori@4[dsac-0.5.0]$ make run
make: *** No rule to make target `run'.  Stop.
So I tried 'make install' to see if it would make any difference and:

Code: Select all

anjori@4[dsac-0.5.0]$ dsac
Traceback (most recent call last):
  File "/usr/local/bin/dsac", line 71, in ?
    app = mainqt.dsacApp(sys.argv)
  File "/usr/local/lib/libdsacgui/mainqt.py", line 55, in __init__
    self.mainwin = MainFrame(None)
  File "/usr/local/lib/libdsacgui/mainqt.py", line 108, in __init__
    self.tray = SystrayIcon(pm, self)
  File "/usr/local/lib/libdsacgui/systemtray.py", line 20, in __init__
    libX11 = c.cdll.LoadLibrary("/usr/X11R6/lib/libX11.so")
  File "/usr/lib/python2.3/site-packages/ctypes/__init__.py", line 378, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.3/site-packages/ctypes/__init__.py", line 296, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/X11R6/lib/libX11.so: cannot open shared object file: No such file or directory
Exception in thread DSAC timer thread:Traceback (most recent call last):
  File "/usr/lib/python2.3/threading.py", line 442, in __bootstrap
    self.run()
  File "/usr/local/lib/libdsac/dsTimer.py", line 51, in run
    self.Notify()
  File "/usr/local/lib/libdsac/dsTimer.py", line 72, in Notify
    self._notify_object.Timer(now)
  File "/usr/local/lib/libdsac/dsMain.py", line 180, in Timer
    a.ExecuteIfTimeArg(now)
  File "/usr/local/lib/libdsac/dsMain.py", line 61, in ExecuteIfTimeArg
    self.Execute(arg)
  File "/usr/local/lib/libdsac/dsMain.py", line 57, in Execute
    self.callback(arg)
  File "/usr/local/lib/libdsac/dsMain.py", line 218, in AlarmComputation
    self.TimeSignal(timeNowString, "No Alarms Left!")
  File "/usr/local/lib/libdsac/dsMain.py", line 223, in TimeSignal
    a(now, remaining)
  File "/usr/local/lib/libdsacgui/mainqt.py", line 219, in NotifyTime
    self.nextalarmWidget.setText(remaining)
AttributeError: nextalarmWidget
                                                                   
...at which point it hangs the shell instance in Konsole, ignoring Ctrl-C, and the only way I can get rid of it is by closing Konsole or the session tab it's running in.
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Weird stuff. Too bad you don't irc much anymore.... ;)

Ok, first, 'make run' is afaik an armagetron-specific thing. If you want to run from the source directory, you can just type "./dsac". The new and improved readme that's only available in svn tells you this. :)

Second, it looks like it's failing to find the X11 shared library. This is a problem. :/ Can you do something like:

ls /usr/lib/*X11*

Maybe it's just named something different? An alternate choice is for me to use pyxlib there instead of ctypes, it's just changing out one dependency that's going to be standard in python 2.5 for a dependency that's not standard, somewhat obscure, and not even maintained anymore. :/

Thirdly, I don't know why it's having trouble with nextalarmWidget unless it failed to initialize some part of the main window, so we'll need to worry about getting the first set of errors fixed and see if that one goes away, which it probably will.

I'll put a workaround in there for now letting you disable the systray icon, but I won't like it.

Otherwise this is the part where it would be awfully helpful if you were in irc.... ;)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Nvm most of that, I think I nailed down the problem. It's that the path to libX11.so was hardcoded. Here's a tarball I'd like to tag and release as 0.5.1 I'd like you to try.

http://www.davefancella.com/dsac-0.5.1.tar.gz

Same deal, do:
./configure
make

then run it with ./dsac (or do make install and run it like you did)

I was able to reproduce your exact error message, so I'm pretty sure it'll work for you now.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
anjori
On Lightcycle Grid
Posts: 28
Joined: Thu Nov 24, 2005 10:41 pm
Location: Canada

sociala

Post by anjori »

It works!

Anyway, I haven't felt all that sociable lately, which is why I haven't been around, and when I do pop in no one is talking. But I'll try and stop by more often. Didn't know that anyone missed me. :P

I had to forcibly kill mpg321 after closing DSAC because music was still playing quietly in the background. Though that may have been because I pressed the play button, not understanding all the options, after the track was already playing. I'll bring up any quirks and whatever else I notice with you next time I'm in IRC. A good showing so far.
User avatar
skullflame
Round Winner
Posts: 231
Joined: Thu Jan 19, 2006 9:16 pm
Location: Acctually... in a little dark corner in the back of my mind where my darkest fears encounter me.

Post by skullflame »

Jonathan wrote:
skullflame69 wrote:tho i do want to get into programing for bungie
Addicted to Halo 2?
heck yes in fact its time for a fix, pce :lol:
Image
Image
Post Reply