aMSN Forums
May 26, 2013, 06:59:08 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: amsn on OpenBSD trayicon  (Read 12739 times)
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« on: July 29, 2007, 04:10:08 am »

Hi I love amsn and I compile it in my OpenBSD

the 0.97 version works fine, It doesn't include the traydoc, then I add the following lines to Makefile

Code:
ifeq ($(FOUND_OS),bsd)
  ifeq ($(FOUND_X11),yes)
      ADDLIBS    += ${X_LIBS}
      include $(tray_dir)/Rules.mk
      include $(linflash_dir)/Rules.mk
  endif
endif


It compile fine but I don't see the trayicon... This patch work fine in the amsn 0.96

How I enable the traydock in amsn
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: July 31, 2007, 01:27:03 am »

are you sure you have the x11 libs installed ? did you check if the libtray.so file exists ? do you have a freedesktop compliant tray ?
Logged

KaKaRoTo
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #2 on: August 18, 2007, 08:54:11 pm »

Hi

I put the amsn tray icon with the following patch in the amsncore.tcl

158c158
<       if { $tcl_platform(os) == "Linux" || $tcl_platform(os) == "OpenBSD"} {
---
>       if { $tcl_platform(os) == "Linux" } {

It work fine!! :-)
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #3 on: August 19, 2007, 12:24:18 am »

ahh ok, thank you! I didn't think of that. I will make that change in SVN, thanks
Good job finding it.


EDIT Humm.. your change affects the whole [OnLinux] function which could cause bad effects on other parts of the code where it is used. I just committed to revision 8953 a fix for OpenBSD for the tray icon only.
Can you update to SVN revision 8953 and test it please ?
Thanks.
Logged

KaKaRoTo
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #4 on: August 20, 2007, 05:47:25 am »

Of course, The change affects the OnLinux Function

I'm testing the SVN Version today!
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #5 on: August 21, 2007, 05:28:30 am »

Hi, I did the following steps for testing amsn-svn 8953

1. Download
Code:
svn co https://amsn.svn.sourceforge.net/svnroot/amsn/trunk/amsn amsn_dev
Checked out revision 8953.


2. Patch Makefile.in and configure for OpenBSD

Code:

[color=blue]diff Makefile.in Makefile.in.orig[/color]
155,158c155,158
<       mkdir -p $(DESTDIR)$(dstdir)/$(PACKAGE)
<       mkdir -p $(DESTDIR)$(slnkdir)
<       mkdir -p $(DESTDIR)$(dstdir)/applications/
<       mkdir -p $(DESTDIR)$(dstdir)/pixmaps/
---
>       mkdir --parents $(DESTDIR)$(dstdir)/$(PACKAGE)
>       mkdir --parents $(DESTDIR)$(slnkdir)
>       mkdir --parents $(DESTDIR)$(dstdir)/applications/
>       mkdir --parents $(DESTDIR)$(dstdir)/pixmaps/
161c161
<                       cp -Rf -p $(srcdir)/$$p $(DESTDIR)$(dstdir)/$(PACKAGE); \
---
>                       cp -Rf --parents $(srcdir)/$$p $(DESTDIR)$(dstdir)/$(PACKAGE); \
173d172
<       cp -R $(srcdir)/utils $(DESTDIR)$(dstdir)/$(PACKAGE)
244,251d242
<       include $(tray_dir)/Rules.mk
<       include $(linflash_dir)/Rules.mk
<   endif
< endif
<
< ifeq ($(FOUND_OS),bsd)
<   ifeq ($(FOUND_X11),yes)
<       ADDLIBS    += ${X_LIBS}


[color=blue]diff configure configure.orig[/color]
1367c1367
<               CFLAGS="$CFLAGS -I/usr/local/include -I/usr/local/include/libpng -L/usr/local/lib"
---
>               CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
1370d1369
<               TK_INC_DIR=/usr/local/include/tk8.4/generic/
3094c3093
< LIBS="-lstdc++ -lm $LIBS"
---
> LIBS="-lstdc++  $LIBS"


3. Configure
Code:

[color=blue]$ ./configure --enable-debug  [/color]

compile time options summary
============================

    X11          : yes
    Tcl          : 8.4
    TK           : 8.4
    DEBUG        : yes
    STATIC       : no


4. Make and Make install
Code:

[color=blue]gmake[/color]
..
  CC      utils/linux/traydock/libtray.o
  LD      utils/linux/traydock/libtray.so
..

[color=blue]gmake install[/color]


it doesn't work, because the traydock package doesn't include in the auto_path variable of amsn Script for TCL/TK. For this I add the following line to the amsn
Code:

[color=blue]diff amsn amsn.orig[/color]
149,150d148
< } elseif { [OnOpenBSD] } {
<         lappend auto_path [file join utils linux]
152,153d149
<
<


And the Trayicon in OpenBSD works fine Cheesy
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
vivia
Administrator
Super Power User
*****
Offline Offline

Posts: 2464


View Profile
« Reply #6 on: August 21, 2007, 01:55:16 pm »

Thanx! I committed your patch (next time please include 2-3 lines of context, you can do this using `svn diff .`). Can you try out latest SVN and make sure it works?
Logged
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #7 on: August 22, 2007, 05:39:07 pm »

Hi

I tested the svn 8969 in OpenBSD and work fine Cheesy Muchas Gracias Cheesy Greetings from Colombia

Today I have the opportunity to test amsn svn-8969 in FreeBSD and the configure and Makefile file patch work fine.

However I have the same problem with the trayicon. amsn doesn't show it! Of course! the function OnOpenBSD only affect OpenBSD Operating Systems.

I propose this change, You can made a Function OnBSD in amsncore.tcl. I tested it in OpenBSD 4.1 and FreeBSD 6.2 and work fine

Unfortunately I don't have NetBSD installed and I can't test OnBSD function in this Operating System. But I think that it work fine.


Code:
svn diff .
Index: amsncore.tcl
===================================================================
--- amsncore.tcl        (revision 8969)
+++ amsncore.tcl        (working copy)
@@ -152,10 +152,10 @@
        }
 }

-#Test for OpenBSD
-proc OnOpenBSD {} {
+#Test for OpenBSD, FreeBSD
+proc OnBSD {} {
        global tcl_platform
-       if { $tcl_platform(os) == "OpenBSD" } {
+       if { $tcl_platform(os) == "OpenBSD" || $tcl_platform(os) == "FreeBSD" } {
                return 1
        } else {
                return 0
Index: trayicon.tcl
===================================================================
--- trayicon.tcl        (revision 8969)
+++ trayicon.tcl        (working copy)
@@ -507,7 +507,7 @@
                        return 0
                }

-       } elseif { [OnLinux] || [OnOpenBSD] } {
+       } elseif { [OnLinux] || [OnBSD] } {
                #if there is a problem loading the lib, print the error on the console and return
                if { [catch {package require libtray} errormsg] } {
                        status_log "[trans traynotcompiled] : $errormsg"
@@ -555,7 +555,7 @@


                #X11/Freedesktop (linux) specific code
-               } elseif { ([OnLinux] || [OnOpenBSD]) && $xiconpath != ""} {
+               } elseif { ([OnLinux] || [OnBSD]) && $xiconpath != ""} {
                        if { [winfo exists .$name] } {
                                status_log "trayicon.tcl: won't add icon $name as it already exists"
                        } else {
@@ -596,7 +596,7 @@
                if { [OnWin] } {
                        winico taskbar delete $name
                #X11/Freedesktop (linux) specific code
-               } elseif { [OnLinux] || [OnOpenBSD] } {
+               } elseif { [OnLinux] || [OnBSD] } {
                        if { [catch {removeti .$name} errormsg] } {
                                status_log "$errormsg\n"
                        }
@@ -619,7 +619,7 @@
                        winico taskbar add $name -text "$tooltip" -callback "$winactionhandler %m %x %y"

                #X11/Freedesktop (linux) specific code
-               } elseif { [OnLinux] || [OnOpenBSD]} {
+               } elseif { [OnLinux] || [OnBSD]} {
                        configureti .$name
                        image create photo source_$name -file $xiconpath
                        image create photo dest_$name
Index: amsn
===================================================================
--- amsn        (revision 8969)
+++ amsn        (working copy)
@@ -146,7 +146,7 @@
        lappend auto_path [file join utils windows]
 } elseif { [OnLinux] } {
        lappend auto_path [file join utils linux]
-} elseif { [OnOpenBSD] } {
+} elseif { [OnBSD] } {
         lappend auto_path [file join utils linux]
 }
 lappend auto_path [file join utils]
Index: dock.tcl
===================================================================
--- dock.tcl    (revision 8969)
+++ dock.tcl    (working copy)
@@ -129,7 +129,7 @@

                if {[OnWin]} {
                        trayicon_init
-               } elseif {[OnLinux] || [OnOpenBSD]} {
+               } elseif {[OnLinux] || [OnBSD]} {
                        #We use the freedesktop standard here
                        if { $systemtray_exist == 0 } {
                                trayicon_init
@@ -147,7 +147,7 @@
 }

 proc UnixDock { } {
-       if {[::config::getKey use_tray] && ([OnLinux] || [OnOpenBSD]) } {
+       if {[::config::getKey use_tray] && ([OnLinux] || [OnBSD]) } {
                return 1
        } else {
                return 0
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #8 on: August 23, 2007, 02:05:06 am »

Hi,
I made the function for OpenBSD only simply because I didn't know what the platform information is for freeBSD and NetBSD. it would be nice to have a platform variable saying "BSD" so it can group all BSD flavors together.
Can you please post the output of this (from both open and free bsd) :
Code:
bash $ tclsh
% array get ::tcl_platform

Thanks.
Until then, I'll apply your patch. Thanks a lot.
Logged

KaKaRoTo
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #9 on: August 23, 2007, 03:48:51 am »

Hi

In OpenBSD 4.1 the output was:

Code:

% array get ::tcl_platform
osVersion 4.1 byteOrder littleEndian machine i386 platform unix os OpenBSD user diegofn wordSize 4


In FreeBSD 6.2 the output was:

Code:

% array get ::tcl_platform
osVersion 6.2-RELEASE byteOrder littleEndian machine i386 platform unix os FreeBSD user d.nieto wordSize 4


Thanks for considering my Patch. Grettings from Colombia :-D
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #10 on: August 23, 2007, 06:24:58 am »

ok thanks.. nothing in particular to group them.. I now applied your patch, and added a check for NetBSD.. we already had the string for tcl_platform(os) for NetBSD machines in autoupdate.tcl.
SVN revision 8970 should work fine now!
thanks
Logged

KaKaRoTo
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #11 on: December 24, 2007, 09:48:47 pm »

the fix was bad and not compliant with linux distro standards (we installed the source code and windows/mac binaries because of the cp -R utils ...). We removed it and made it in a less hacky way. Can you test it to make sure nothing was badly done.
thx
Logged

KaKaRoTo
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #12 on: December 28, 2007, 04:45:33 am »

Hi Kakaroto

I download the latest SVN version and I made it:

1. Patch the configure

Code:
$ svn diff .
Index: configure
===================================================================
--- configure   (revision 9202)
+++ configure   (working copy)
@@ -1781,8 +1781,9 @@
        OpenBSD | FreeBSD | NetBSD)
                # *BSD has important stuff (from ports)
                # in /usr/local ...
-               CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
+               CFLAGS="$CFLAGS -I/usr/local/include -I/usr/local/include/libpng -L/usr/local/lib"
                LDFLAGS="$LDFLAGS -L/usr/local/lib"
+               TK_INC_DIR=/usr/local/include/tk8.4/generic/
                FOUND_OS="bsd"
                ;;
        Darwin)
@@ -3531,7 +3532,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lstdc++  $LIBS"
+LIBS="-lstdc++ -lm $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF


2. configure

Code:
$ ./configure --with-tcl=/usr/local/lib/tcl8.4/ --with-tk=/usr/local/lib/tk8.4/


3. make

Code:
$ gmake


I received the following error

Code:

Makefile:127: Extraneous text after `else' directive
Makefile:131: Extraneous text after `else' directive
Makefile:131: *** only one `else' per conditional.  Stop.


I'm waiting for your response :-D

Greetings from Colombia
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #13 on: December 28, 2007, 07:14:40 am »

Hi, a patch to fix this issue was given in this forum thread : http://www.amsn-project.net/forums/viewtopic.php?t=4518
Logged

KaKaRoTo
lirva
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #14 on: December 29, 2007, 11:37:07 pm »

Hi I download the amsn-0.98-SVN 9206 version, but It doesn't have the patch to Makefile.in

I apply the patch and it works fine, then I execute the make and make install

Code:
# gmake install
rm -Rf /usr/local/share/amsn
mkdir -p /usr/local/share/amsn
mkdir -p /usr/local/bin
mkdir -p /usr/local/share/applications/
mkdir -p /usr/local/share/pixmaps/
find /usr/local/share/amsn -name '.svn' -print | xargs rm -Rf
ln -sf /usr/local/share/amsn/amsn /usr/local/bin/amsn
ln -sf /usr/local/share/amsn/amsn-remote /usr/local/bin/amsn-remote
ln -sf /usr/local/share/amsn/amsn-remote-CLI /usr/local/bin/amsn-remote-CLI
cp ./amsn.desktop /usr/local/share/applications/
ln -sf /usr/local/share/amsn/desktop-icons/48x48/apps/amsn.png /usr/local/share/pixmaps/


The directory utils/ was be copied  to /usr/local/share/amsn :-D
The trayicon works fine :-D
The "mkdir -p" patch works fine :-D

Thanks for  all Kakaroto
Logged

Wiiego
--------
http://www.compumundohypermegared.org
Comunidad de Usuarios OpenBSD Colombia
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!