51

Re: snap package

I pushed a new revision (#2) to the store.

Changes:

- libdrm2 added for AMD GPUs
- DXFtoQET included (can be run standalone as qelectrotech.dxf-to-qet or from QElectroTech)
- qet-tb-generator included (can be run standalone as qelectrotech.qet-tb-generator or from QElectroTech)
- HIDPI adjustments for DXFtoQET
- add desktop-legacy plug

Please test and file issues at https://github.com/ppd1990/qelectrotech-snap/issues

Cheers
Max

52

Re: snap package

Laurent,

I'd like to set up auto-build on commit. For that purpose I created an issue here:

https://github.com/ppd1990/qelectrotech-snap/issues/3

Could you please chime in there and tell me if you have a strong preference for one of the proposed ways forward?

Max

Re: snap package

Max,

I tried latest revision: qet_tb_generator wont launch, DXFtoelmt works, nice.

laurent@debian:~$ snap run qelectrotech
 
(qelectrotech:5332): dbind-WARNING **: 15:08:36.445: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
/usr/share/libdrm/amdgpu.ids: No such file or directory
Traceback (most recent call last):
 File "/snap/qelectrotech/2/bin/qet_tb_generator", line 11, in <module>
   load_entry_point('qet-tb-generator==1.0.16', 'console_scripts', 'qet_tb_generator')()
 File "/snap/qelectrotech/2/lib/python3.6/site-packages/src/main.py", line 1391, in main
   qet_project = QETProject(qet_file)  # allow working with a QET XML file.
 File "/snap/qelectrotech/2/lib/python3.6/site-packages/src/main.py", line 132, in __init__
   self._qet_tree = etree.parse(project_file)
 File "/snap/qelectrotech/2/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
   tree.parse(source, parser)
 File "/snap/qelectrotech/2/usr/lib/python3.6/xml/etree/ElementTree.py", line 586, in parse
   source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: ''
 
laurent@debian:~$ snap run qet_tb_generator
error: cannot find current revision for snap qet_tb_generator: readlink /snap/qet_tb_generator/current: no such file or directory

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap package

FYI, you could find qet_tb_generator source here,
Because is very dificult to use uscan directly on PyPI  when you want  to make update Debian package, Debian store  PyPI packages here :

PyPI
The PyPI site is hard to work with directly as it includes md5sums for the downloads in the URLs which makes for truly horrible regexps. The pypi.debian.net redirector makes it much easier to work with PyPI:

https://pypi.debian.net/qet_tb_generator

https://wiki.debian.org/debian/watch

My Debian watch :

version=4
opts="uversionmangle=s/_/-/" \
https://pypi.debian.net/qet-tb-generator/qet_tb_generator-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) debian uupdate

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap package

Ok, I found for qet_tb_generator and it works.


laurent@debian:/snap/bin$ ls -al
total 8
drwxr-xr-x 2 root root 4096 juin  22 15:08 .
drwxr-xr-x 9 root root 4096 juin  22 15:08 ..
lrwxrwxrwx 1 root root   13 juin  19 13:11 multipass -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  19 13:11 multipass.gui -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  19 13:11 multipass.virsh -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  22 15:08 qelectrotech -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  22 15:08 qelectrotech.dxf-to-qet -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  22 15:08 qelectrotech.qet-tb-generator -> /usr/bin/snap
lrwxrwxrwx 1 root root   13 juin  16 22:08 snapcraft -> /usr/bin/snap


snap run qelectrotech.qet-tb-generator

But QET search for qet-tb-generator
Possible to rename it, if not I can add it on the code? qet diagrameditor.cpp L 2201

https://svnweb.tuxfamily.org/filedetail … editor.cpp

#else
if (openedProjects().count()){
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
}
else {
success = process->startDetached("qet_tb_generator");
}

#endif

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

56

Re: snap package

So it does not launch for you from "Project" -> "Launch the terminal block creation plugin"?
For me that works quite nicely.

Thanks for the PyPI tip!

I have an idea for the amdgpu.ids problem. Time for another revision...

Re: snap package

No, when I go to project  -> "Launch the terminal block creation "plugin is not launch, perhaps because it is already installed on my machine?

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

58

Re: snap package

Maybe we hop into the IRC channel to debug this together? If you have the time...

Re: snap package

Is possible snap use QET $HOME config stored in $HOME/.config/QElectroTech/QElectroTech.conf ?
For titleblocks and user elements user can change directory in setting.

Edit : because snap is confined users could put their elements and config in ~/snap/qelectrotech/2/ 

[font=monospace]laurent@debian:~/snap/qelectrotech/2$ ls -al
total 28
drwxr-xr-x 5 laurent laurent 4096 juin  22 16:52 .
drwxr-xr-x 4 laurent laurent 4096 juin  22 15:08 ..
-rw------- 1 laurent laurent   64 juin  22 16:52 .bash_history
drwx------ 9 laurent laurent 4096 juin  22 16:54 .config
-rw-r--r-- 1 laurent laurent   29 juin  22 15:08 .last_revision
drwxr-xr-x 3 laurent laurent 4096 juin  22 15:08 .local
drwxr-xr-x 4 laurent laurent 4096 juin  22 17:10 .qet
lrwxrwxrwx 1 laurent laurent   36 juin  22 15:08 .themes -> /snap/qelectrotech/2/data-dir/themes[/font]

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap package

ppd wrote:

Remove the s from your https_proxy so it looks like https_proxy=http://...

Solved!! I have a QET 0.7 installed in my ubuntu 16.04 laptop
Thanks to scorpio and ppd

Re: snap package

scorpio810 wrote:

a écrit:
No, when I go to project -> "Launch the terminal block creation "plugin is not launch, perhaps because it is already installed on my machine?

qet_tb_generator in snap package works, but if you launch by QET menu -> project, save your project before launching plug-in, if not qet_tb_generator not launching.

For DXF converter plug-in is also added on the snap qelectrotech.

Enjoy ! nomicons/smile

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap package

  We are studying a way to generate autobuild snap when SVN trunk change.
1) We have exporter the trunk into a git-mirror on GIthub   https://github.com/qelectrotech/qelectrotech-git-mirror
2) We studying a way to synced GIT repository based on SVN trunk, perhaps based on LXD container.
3) FYI I started to put qelectrotech-git-mirror on Travis , for automated deployment : https://docs.travis-ci.com/user/for-beginners/
4) I register at SubGit :https://subgit.com/documentation/github … irror_sync  is free for Open Source license.
https://subgit.com/documentation/github … way_mirror

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap package

Hi Max,

It would be very useful to add the displayed version SVN by patching the source/ qet.h in the snap packages. The user wants to see the SVN version in About QET, and is powerful for debugging.


Like this :

QElectroTech V 0.70-RC1+svn5936
Compilation: GCC 8.3.0 - built with Qt 5.11.3 - run with Qt 5.11.3 using 16 thread(s) linux x86_64 Debian GNU/Linux 10 (buster) Kernel 5.0.21-vanilla

# find new revision number
revAp=$(svnversion | cut -d : -f 2 )
 
# find original revision 
tagName=$(sed -n "s/const QString displayedVersion =\(.*\)/\1/p" sources/qet.h  | cut -d\" -f2 | cut -d\" -f1 )
 
# patch displayedVersion
sed -i 's/'"const QString displayedVersion =.*/const QString displayedVersion = \"$tagName+svn$revAp\";"'/' sources/qet.h

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

64

Re: snap package

Hi Laurent,

I propose something like "0.70-RC1~svn5936.snap", so the user know it's a snap build.

I'd also like to stick with ~svn instead of +svn. I was tought that ~svnX means "the version, that corresponds to svn revision X". Whereas "VERSION+svnX" means "VERSION plus X commits thereafter in svn".

Cheers
Max

Re: snap package

Hi Max,

I agree, you can add it?

Cheers,
Laurent

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

66

Re: snap package

Bien sûr!

Re: snap package

Danke!

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

68

Re: snap package

Done & synced & is building.

https://github.com/qelectrotech/qelectr … d82f8f021d