Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
f2be704e
Commit
f2be704e
authored
Feb 05, 2019
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python interface for rt and wb added
parent
c2c2a843
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
7021 additions
and
0 deletions
+7021
-0
src/exp/pwrrt/src/os_templ/hw_templ/makefile
src/exp/pwrrt/src/os_templ/hw_templ/makefile
+66
-0
src/exp/pwrrt/src/pwrrtmodule.c
src/exp/pwrrt/src/pwrrtmodule.c
+3732
-0
src/exp/pwrrt/src/setup_pwrrt.py
src/exp/pwrrt/src/setup_pwrrt.py
+31
-0
src/tools/pwre/src/os_linux/pwre.pl
src/tools/pwre/src/os_linux/pwre.pl
+2
-0
src/tools/pwre/src/os_linux/pwre_configure.sh
src/tools/pwre/src/os_linux/pwre_configure.sh
+2
-0
wb/exp/pwrwb/src/os_templ/hw_templ/makefile
wb/exp/pwrwb/src/os_templ/hw_templ/makefile
+66
-0
wb/exp/pwrwb/src/pwrwbmodule.cpp
wb/exp/pwrwb/src/pwrwbmodule.cpp
+3077
-0
wb/exp/pwrwb/src/setup_pwrwb.py
wb/exp/pwrwb/src/setup_pwrwb.py
+45
-0
No files found.
src/exp/pwrrt/src/os_templ/hw_templ/makefile
0 → 100644
View file @
f2be704e
include
$(pwre_dir_symbols)
ifndef
variables_mk
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_sroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_sroot)/tools/bld/src/$(os_name)/rules.mk
endif
export_obj
:=
$(pwr_exe)
/pwrrt.so
clean_obj
:=
clean_pwrrt.so
.PHONY
:
all init copy lib exe clean
all
:
init copy lib exe | silent
init
:
@
if
[
!
-e
$(bld_dir)
]
;
then
\
mkdir
-p
$(bld_dir)
;
\
fi
copy
:
lib
:
exe
:
$(export_obj) | silent
clean
:
$(clean_obj)
silent
:
@
:
.SUFFIXES
:
$(exe_dir)/pwrrt.so
:
../../pwrrtmodule.c
@
if
[
$(PWRE_CONF_PYDEV)
-eq
1
]
;
then
\
echo
"Bulding Python c extension pwrrt"
;
\
cd
../..
;
\
python setup_pwrrt.py
-q
build
--build-base
$(bld_dir)
;
\
if
[
"
$(pwre_hw)
"
==
"hw_x86_64"
]
;
then
\
mv
$(bld_dir)
/lib.linux-x86_64-2.7/pwrrt.so
$(pwr_exe)
;
\
elif
[
"
$(pwre_hw)
"
==
"hw_x86"
]
;
then
\
mv
$(bld_dir)
/lib.linux-i686-2.7/pwrrt.so
$(pwr_exe)
;
\
fi
;
\
python setup_pwrrt.py
-q
install_egg_info
--install-dir
$(pwr_exe)
;
\
else
\
echo
"Not building Python c extension pwrrt"
;
\
fi
clean_pwrrt.so
:
../../pwrrtmodule.c
rm
$(pwr_exe)
/pwrrt.so
src/exp/pwrrt/src/pwrrtmodule.c
0 → 100644
View file @
f2be704e
This diff is collapsed.
Click to expand it.
src/exp/pwrrt/src/setup_pwrrt.py
0 → 100644
View file @
f2be704e
from
distutils.core
import
setup
,
Extension
import
os
pwr_lib
=
os
.
environ
[
'pwr_lib'
]
pwr_obj
=
os
.
environ
[
'pwr_obj'
]
pwr_inc
=
os
.
environ
[
'pwr_inc'
]
pwrrtmodule
=
Extension
(
name
=
'pwrrt'
,
sources
=
[
'pwrrtmodule.c'
],
define_macros
=
[(
'OS_POSIX'
,
'1'
),
(
'OS'
,
'linux'
),
(
'HW_X86'
,
'1'
),
(
'HW'
,
'x86'
)],
extra_objects
=
[
pwr_obj
+
'/pwr_msg_co.o'
,
pwr_obj
+
'/pwr_msg_rt.o'
],
include_dirs
=
[
pwr_inc
],
library_dirs
=
[
pwr_lib
],
libraries
=
[
'pwr_rt'
,
'pwr_co'
,
'pwr_msg_dummy'
,
'pthread'
,
'rt'
,
'm'
,
'crypt'
],
language
=
'c++'
)
setup
(
name
=
'pwrrt'
,
version
=
'1.0'
,
url
=
'www.proview.se'
,
author
=
'ProviewR development team'
,
author_email
=
'support@proview.se'
,
license
=
'GPL V2'
,
description
=
'ProviewR runtime interface'
,
ext_modules
=
[
pwrrtmodule
])
src/tools/pwre/src/os_linux/pwre.pl
View file @
f2be704e
...
@@ -1076,6 +1076,7 @@ sub build_module ()
...
@@ -1076,6 +1076,7 @@ sub build_module ()
_build
("
doc
",
"
dox
",
"
src
",
"
all
");
_build
("
doc
",
"
dox
",
"
src
",
"
all
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
exe
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
exe
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
exe
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
exe
");
_build
("
exp
",
"
pwrrt
",
"
src
",
"
exe
");
}
}
}
}
elsif
(
$module
eq
"
java
")
{
elsif
(
$module
eq
"
java
")
{
...
@@ -1145,6 +1146,7 @@ sub build_module ()
...
@@ -1145,6 +1146,7 @@ sub build_module ()
_build
("
exe
",
"
*
",
$flavour
,
"
all
");
_build
("
exe
",
"
*
",
$flavour
,
"
all
");
_build
("
doc
",
"
dsh
",
"
src
",
"
copy
");
_build
("
doc
",
"
dsh
",
"
src
",
"
copy
");
_build
("
doc
",
"
orm
",
"
src
",
"
copy
");
_build
("
doc
",
"
orm
",
"
src
",
"
copy
");
_build
("
exp
",
"
pwrwb
",
"
src
",
"
exe
");
}
}
}
}
}
}
...
...
src/tools/pwre/src/os_linux/pwre_configure.sh
View file @
f2be704e
...
@@ -420,6 +420,7 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
...
@@ -420,6 +420,7 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
pwre_config_check_include jni JNI 1
$jdk
/include/jni.h
pwre_config_check_include jni JNI 1
$jdk
/include/jni.h
pwre_config_check_include jni JNI 0
$jdk
/include/linux/jni_md.h
pwre_config_check_include jni JNI 0
$jdk
/include/linux/jni_md.h
pwre_config_check_include pydev PYDEV 1
"/usr/include/python2.7/Python.h"
rm
$pwre_sroot
/tools/exe/tools_cmsg2c/src/.os_linux/.hw_arm/makefile
rm
$pwre_sroot
/tools/exe/tools_cmsg2c/src/.os_linux/.hw_arm/makefile
rm
$pwre_sroot
/tools/exe/tools_msg2cmsg/src/.os_linux/.hw_arm/makefile
rm
$pwre_sroot
/tools/exe/tools_msg2cmsg/src/.os_linux/.hw_arm/makefile
...
@@ -539,6 +540,7 @@ else
...
@@ -539,6 +540,7 @@ else
pwre_config_check_include powerlinkuser EPLU 0
"
$epl
/Examples/X86/Generic/powerlink_user_lib/EplCfg.h"
pwre_config_check_include powerlinkuser EPLU 0
"
$epl
/Examples/X86/Generic/powerlink_user_lib/EplCfg.h"
pwre_config_check_include rsvg RSVG 1
"/usr/include/librsvg-2/librsvg/rsvg.h:/usr/include/librsvg-2.0/librsvg/rsvg.h"
pwre_config_check_include rsvg RSVG 1
"/usr/include/librsvg-2/librsvg/rsvg.h:/usr/include/librsvg-2.0/librsvg/rsvg.h"
pwre_config_check_tool android ANDROID
"/usr/local/android-sdk-linux/tools/android"
pwre_config_check_tool android ANDROID
"/usr/local/android-sdk-linux/tools/android"
pwre_config_check_include pydev PYDEV 1
"/usr/include/python2.7/Python.h"
export pwre_conf_alsa=1
export pwre_conf_alsa=1
...
...
wb/exp/pwrwb/src/os_templ/hw_templ/makefile
0 → 100644
View file @
f2be704e
include
$(pwre_dir_symbols)
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
export_obj
:=
$(pwr_exe)
/pwrwb.so
clean_obj
:=
clean_pwrwb.so
.PHONY
:
all init copy lib exe clean
all
:
init copy lib exe | silent
init
:
@
if
[
!
-e
$(bld_dir)
]
;
then
\
mkdir
-p
$(bld_dir)
;
\
fi
copy
:
lib
:
exe
:
$(export_obj) | silent
clean
:
$(clean_obj)
silent
:
@
:
.SUFFIXES
:
$(exe_dir)/pwrwb.so
:
../../pwrwbmodule.cpp
@
if
[
$(PWRE_CONF_PYDEV)
-eq
1
]
;
then
\
echo
"Bulding Python c extension pwrwb"
;
\
cd
../..
;
\
python setup_pwrwb.py
-q
build
--build-base
$(bld_dir)
;
\
if
[
"
$(pwre_hw)
"
==
"hw_x86_64"
]
;
then
\
mv
$(bld_dir)
/lib.linux-x86_64-2.7/pwrwb.so
$(pwr_exe)
;
\
elif
[
"
$(pwre_hw)
"
==
"hw_x86"
]
;
then
\
mv
$(bld_dir)
/lib.linux-i686-2.7/pwrwb.so
$(pwr_exe)
;
\
fi
;
\
python setup_pwrwb.py
-q
install_egg_info
--install-dir
$(pwr_exe)
;
\
else
\
echo
"Not building Python c extension pwrwb"
;
\
fi
clean_pwrwb.so
:
../../pwrwbmodule.cpp
rm
$(pwr_exe)
/pwrwb.so
wb/exp/pwrwb/src/pwrwbmodule.cpp
0 → 100644
View file @
f2be704e
This diff is collapsed.
Click to expand it.
wb/exp/pwrwb/src/setup_pwrwb.py
0 → 100644
View file @
f2be704e
from
distutils.core
import
setup
,
Extension
import
commands
import
os
pwr_lib
=
os
.
environ
[
'pwr_elib'
]
pwr_obj
=
os
.
environ
[
'pwr_eobj'
]
pwr_inc
=
os
.
environ
[
'pwr_einc'
]
pwrwbmodule
=
Extension
(
name
=
'pwrwb'
,
sources
=
[
'pwrwbmodule.cpp'
],
define_macros
=
[(
'OS_POSIX'
,
'1'
),
(
'OS'
,
'linux'
),
(
'HW_X86'
,
'1'
),
(
'HW'
,
'x86'
)],
extra_objects
=
[
pwr_obj
+
'/pwr_msg_co.o'
,
pwr_obj
+
'/pwr_msg_rt.o'
,
pwr_obj
+
'/pwr_msg_wb.o'
,
pwr_obj
+
'/rt_io_user.o'
,
pwr_obj
+
'/wb_procom.o'
,
pwr_obj
+
'/stdsoap2.o'
],
include_dirs
=
[
pwr_inc
],
library_dirs
=
[
pwr_lib
],
libraries
=
[
'pwr_wb_gtk'
,
'pwr_xtt_gtk'
,
'pwr_ge_gtk'
,
'pwr_cow_gtk'
,
'pwr_flow_gtk'
,
'pwr_glow_gtk'
,
'pwr_wb'
,
'pwr_xtt'
,
'pwr_ge'
,
'pwr_cow'
,
'pwr_flow'
,
'pwr_glow'
,
'pwr_wb_gtk'
,
'pwr_wb'
,
'pwr_xtt_gtk'
,
'pwr_ge_gtk'
,
'pwr_cow_gtk'
,
'pwr_flow_gtk'
,
'pwr_glow_gtk'
,
'pwr_xtt'
,
'pwr_ge'
,
'pwr_cow'
,
'pwr_flow'
,
'pwr_glow'
,
'pwr_rt'
,
'pwr_statussrv'
,
'pwr_co'
,
'pwr_msg_dummy'
,
'db_cxx'
,
'rpcsvc'
,
'asound'
,
'pthread'
,
'm'
,
'db'
,
'z'
,
'crypt'
,
'rt'
,
'fl'
,
'X11'
,
'mysqlclient'
,
'sqlite3'
,
'rsvg-2'
,
'gtk-x11-2.0'
],
# extra_link_args=['-L/usr/lib/x86_64-linux-gnu', commands.getoutput('pkg-config --libs gtk+-2.0')],
language
=
'c++'
)
setup
(
name
=
'pwrwb'
,
version
=
'1.0'
,
url
=
'www.proview.se'
,
author
=
'ProviewR development team'
,
author_email
=
'support@proview.se'
,
license
=
'GPL V2'
,
description
=
'ProviewR workbench interface'
,
ext_modules
=
[
pwrwbmodule
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment