commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9360 - in gnuradio/branches/developers/jblum/grc: con


From: jblum
Subject: [Commit-gnuradio] r9360 - in gnuradio/branches/developers/jblum/grc: config grc/data/grc_gnuradio/blocks grc/scripts grc/src/grc/gui grc/src/grc_gnuradio
Date: Wed, 20 Aug 2008 16:26:35 -0600 (MDT)

Author: jblum
Date: 2008-08-20 16:26:32 -0600 (Wed, 20 Aug 2008)
New Revision: 9360

Added:
   
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/options.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/preferences.xml
Modified:
   gnuradio/branches/developers/jblum/grc/config/grc_grc.m4
   
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/Makefile.am
   gnuradio/branches/developers/jblum/grc/grc/scripts/usrp_diagnostics
   gnuradio/branches/developers/jblum/grc/grc/src/grc/gui/Dialogs.py
   gnuradio/branches/developers/jblum/grc/grc/src/grc_gnuradio/Constants.py.in
Log:
some dependency and platform checks, grc working confirmed

Modified: gnuradio/branches/developers/jblum/grc/config/grc_grc.m4
===================================================================
--- gnuradio/branches/developers/jblum/grc/config/grc_grc.m4    2008-08-20 
21:42:07 UTC (rev 9359)
+++ gnuradio/branches/developers/jblum/grc/config/grc_grc.m4    2008-08-20 
22:26:32 UTC (rev 9360)
@@ -23,9 +23,42 @@
 
     GRC_CHECK_DEPENDENCY(grc, gnuradio-core)
 
+    dnl ########################################
+    dnl # test python dependencies
+    dnl ########################################
+    if test $passed = yes; then
+        if ! ${PYTHON} -c 'import numpy'; then
+            echo '*** GRC requirement "numpy" not found.'
+            passed=no
+        fi
+        if ! ${PYTHON} -c 'import Cheetah'; then
+            echo '*** GRC requirement "Cheetah Templates" not found.'
+            passed=no
+        fi
+        if ! ${PYTHON} -c 'import pygtk'; then
+            echo '*** GRC requirement "pygtk" not found.'
+            passed=no
+        fi
+        if ! ${PYTHON} -c 'import lxml'; then
+            echo '*** GRC requirement "lxml" not found.'
+            passed=no
+        fi
+    fi
+
+    dnl ########################################
+    dnl # platform dependency checks
+    dnl ########################################
+    if test `python -c "import sys; print sys.platform"` = 'darwin'; then
+        grc_gnuradio_pyexec=pythonw
+    else
+        grc_gnuradio_pyexec=python
+    fi
+
+    dnl ########################################
+    dnl # substitution variables
+    dnl ########################################
     grc_data_prefix=share/${PACKAGE}/grc dnl# cannot start with slash
-
-    AC_SUBST(grc_gnuradio_pyexec, python)
+    AC_SUBST(grc_gnuradio_pyexec)
     AC_SUBST(grc_data_dir, $grc_data_prefix/grc)
     AC_SUBST(grc_gnuradio_data_dir, $grc_data_prefix/grc_gnuradio)
     AC_SUBST(grc_gnuradio_blocks_dir, $grc_data_prefix/grc_gnuradio/blocks)

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/Makefile.am 
    2008-08-20 21:42:07 UTC (rev 9359)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/Makefile.am 
    2008-08-20 22:26:32 UTC (rev 9360)
@@ -173,9 +173,11 @@
        import.xml \
        low_pass_filter.xml \
        note.xml \
+       options.xml \
        pad_sink.xml \
        pad_source.xml \
        parameter.xml \
+       preferences.xml \
        random_source_x.xml \
        trellis_encoder_xx.xml \
        trellis_metrics_x.xml \

Copied: 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/options.xml 
(from rev 9337, 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/options.xml)
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/options.xml 
                            (rev 0)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/options.xml 
    2008-08-20 22:26:32 UTC (rev 9360)
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Options Block:
+## options for window size,
+## and flow graph building.
+###################################################
+ -->
+<block>
+       <name>Options</name>
+       <key>options</key>
+       <import>from gnuradio import gr
+#if $generate_options.eval == 'wx_gui'
+from grc_gnuradio import wxgui as grc_wxgui
+import wx
+#end if
+</import>
+       <make></make>
+       <param>
+               <name>Title</name>
+               <key>title</key>
+               <value>untitled</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Author</name>
+               <key>author</key>
+               <value>unknown</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Description</name>
+               <key>description</key>
+               <value>gnuradio flow graph</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Window Size</name>
+               <key>window_size</key>
+               <value>1280, 1024</value>
+               <type>int_vector</type>
+       </param>
+       <param>
+               <name>Generate Options</name>
+               <key>generate_options</key>
+               <value>wx_gui</value>
+               <type>enum</type>
+               <option>
+                       <name>WX GUI</name>
+                       <key>wx_gui</key>
+               </option>
+               <option>
+                       <name>No GUI</name>
+                       <key>no_gui</key>
+               </option>
+               <option>
+                       <name>Hier Block</name>
+                       <key>hb</key>
+               </option>
+       </param>
+       <param>
+               <name>Category</name>
+               <key>category</key>
+               <value>Custom</value>
+               <type>string</type>
+       </param>
+       <check>len($window_size) == 2</check>
+       <check>300 &lt;= $(window_size)[0] &lt;= 2048</check>
+       <check>300 &lt;= $(window_size)[1] &lt;= 2048</check>
+       <doc>
+The options block sets special parameters for the flow graph. \
+Only one option block is allowed per flow graph.
+
+Title, author, and description parameters are for identification purposes.
+
+The window size controls the dimensions of the flow graph editor. \
+The window size (width, height) must be between (300, 300) and (2048, 2048).
+
+The generate options controls the type of code generated. \
+Non-graphical flow graphs should avoid using graphical sinks or graphical 
variable controls.
+
+The id of this block determines the name of the generated file and the name of 
the class. \
+For example, an id of my_block will generate the file my_block.py and class 
my_block(gr....
+
+The category parameter determines the placement of the block in the block 
selection window. \
+The category only applies when creating hier blocks. \
+To put hier blocks into the root category, enter / for the category.
+       </doc>
+</block>

Copied: 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/preferences.xml
 (from rev 9337, 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/preferences.xml)
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/preferences.xml
                         (rev 0)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/grc_gnuradio/blocks/preferences.xml
 2008-08-20 22:26:32 UTC (rev 9360)
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Global Preferences:
+##     This block should not appear in the tree.
+###################################################
+ -->
+<block>
+       <name>Preferences</name>
+       <key>preferences</key>
+       <make></make>
+       <!-- Hidden Prefs -->
+       <param>
+               <name>Prefs File</name>
+               <key>prefs_file</key>
+               <value>.grc</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>File Open</name>
+               <key>file_open</key>
+               <value></value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Files Open</name>
+               <key>files_open</key>
+               <value></value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Window Size</name>
+               <key>window_size</key>
+               <value>800, 600</value>
+               <type>int_vector</type>
+       </param>
+       <!-- Snap to Grid -->
+       <param>
+               <name>Snap to Grid</name>
+               <key>snap_to_grid</key>
+               <value>off</value>
+               <type>enum</type>
+               <option>
+                       <name>Off</name>
+                       <key>off</key>
+               </option>
+               <option>
+                       <name>On</name>
+                       <key>on</key>
+               </option>
+       </param>
+       <param>
+               <name>Grid Size</name>
+               <key>grid_size</key>
+               <value>20</value>
+               <type>enum</type>
+               <option>
+                       <name>10 pixels</name>
+                       <key>10</key>
+               </option>
+               <option>
+                       <name>20 pixels</name>
+                       <key>20</key>
+               </option>
+               <option>
+                       <name>50 pixels</name>
+                       <key>50</key>
+               </option>
+               <option>
+                       <name>100 pixels</name>
+                       <key>100</key>
+               </option>
+       </param>
+       <param>
+               <name>Show Grid</name>
+               <key>show_grid</key>
+               <value>hide</value>
+               <type>enum</type>
+               <option>
+                       <name>Show</name>
+                       <key>show</key>
+               </option>
+               <option>
+                       <name>Hide</name>
+                       <key>hide</key>
+               </option>
+       </param>
+       <!-- Appearance Prefs -->
+       <param>
+               <name>Show Reports Window</name>
+               <key>show_reports</key>
+               <value>show</value>
+               <type>enum</type>
+               <option>
+                       <name>Show</name>
+                       <key>show</key>
+               </option>
+               <option>
+                       <name>Hide</name>
+                       <key>hide</key>
+               </option>
+       </param>
+       <param>
+               <name>Show Params Labels</name>
+               <key>show_params</key>
+               <value>show</value>
+               <type>enum</type>
+               <option>
+                       <name>Show</name>
+                       <key>show</key>
+               </option>
+               <option>
+                       <name>Hide</name>
+                       <key>hide</key>
+               </option>
+       </param>
+       <param>
+               <name>Show ID Label</name>
+               <key>show_id</key>
+               <value>show</value>
+               <type>enum</type>
+               <option>
+                       <name>Show</name>
+                       <key>show</key>
+               </option>
+               <option>
+                       <name>Hide</name>
+                       <key>hide</key>
+               </option>
+       </param>
+       <!-- Misc Prefs -->
+       <param>
+               <name>Restore Open Files</name>
+               <key>restore_files</key>
+               <value>yes</value>
+               <type>enum</type>
+               <option>
+                       <name>Yes</name>
+                       <key>yes</key>
+               </option>
+               <option>
+                       <name>No</name>
+                       <key>no</key>
+               </option>
+       </param>
+</block>

Modified: gnuradio/branches/developers/jblum/grc/grc/scripts/usrp_diagnostics
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/scripts/usrp_diagnostics 
2008-08-20 21:42:07 UTC (rev 9359)
+++ gnuradio/branches/developers/jblum/grc/grc/scripts/usrp_diagnostics 
2008-08-20 22:26:32 UTC (rev 9360)
@@ -31,7 +31,7 @@
 from grc.gui.Dialogs import TextDisplay
 
 from grc_gnuradio.Platform import Platform
-platform = Platform(block_paths_internal_only=[os.path.join('usrp', 
'usrp_diagnostics.xml')])
+platform = Platform(block_paths_internal_only=['usrp_diagnostics.xml'])
 
 from grc.gui.elements.Platform import Platform
 platform = Platform(platform)

Modified: gnuradio/branches/developers/jblum/grc/grc/src/grc/gui/Dialogs.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/grc/gui/Dialogs.py   
2008-08-20 21:42:07 UTC (rev 9359)
+++ gnuradio/branches/developers/jblum/grc/grc/src/grc/gui/Dialogs.py   
2008-08-20 22:26:32 UTC (rev 9360)
@@ -1,5 +1,5 @@
 """
-Copyright 2007 Free Software Foundation, Inc.
+Copyright 2008 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -92,7 +92,7 @@
                self.set_version(VERSION)
                self.set_name(MAIN_WINDOW_PREFIX)
                self.set_license(__doc__)
-               self.set_copyright('Copyright 2007 Free Software Foundation, 
Inc.')
+               self.set_copyright('Copyright 2008 Free Software Foundation, 
Inc.')
                
self.set_website('http://gnuradio.org/trac/wiki/GNURadioCompanion')
                self.set_comments("""\
 Thank you to all those from the mailing list who tested GNU Radio Companion 
and offered advice.

Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/grc_gnuradio/Constants.py.in
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/grc_gnuradio/Constants.py.in 
2008-08-20 21:42:07 UTC (rev 9359)
+++ gnuradio/branches/developers/jblum/grc/grc/src/grc_gnuradio/Constants.py.in 
2008-08-20 22:26:32 UTC (rev 9360)
@@ -27,7 +27,7 @@
 PYEXEC = '@grc_gnuradio_pyexec@'
 
 #setup paths
-DOCS_DIR = os.path.join('@prefix@', 'share', 'doc, '@address@hidden@VERSION@', 
xml)
+DOCS_DIR = os.path.join('@prefix@', 'share', 'doc', 
'@address@hidden@VERSION@', 'xml')
 DATA_DIR = os.path.join('@prefix@', '@grc_gnuradio_data_dir@')
 BLOCKS_DIR = os.path.join('@prefix@', '@grc_gnuradio_blocks_dir@')
 HIER_BLOCKS_LIB_DIR = os.path.join(os.path.expanduser('~'), '.grc_gnuradio')





reply via email to

[Prev in Thread] Current Thread [Next in Thread]