File: knowhow

package info (click to toggle)
desktopfolder 1.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,076 kB
  • sloc: xml: 70; sh: 16; makefile: 8; python: 6
file content (108 lines) | stat: -rw-r--r-- 3,264 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
First time build
·················
$ meson build
$ cd build
$ ninja

Build, install and run the app with debug messages in one line
..............................................................
$ sudo ninja install && env G_MESSAGES_DEBUG=all com.github.spheras.desktopfolder


Use debugger suite
..................
Nemiver is GNOME's GUI debugger. It can be really useful for locating the source of crashes and bugs.
$ sudo apt install nemiver

After installing use this instead of the one liner above:
$ sudo ninja install && env G_MESSAGES_DEBUG=all nemiver com.github.spheras.desktopfolder


Install uncrustify
··················
Don't use sudo apt install uncrustify!

Run this one-liner to install the latest release of uncrustify:
$ cd ~/Downloads && wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.65.tar.gz && tar -xf uncrustify-0.65.tar.gz && cd uncrustify-uncrustify-0.65/cmake/ && cmake .. && sudo make install

If you want to run it step by step instead:
$ cd ~/Downloads
$ wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.65.tar.gz
$ tar -xf uncrustify-0.65.tar.gz
$ cd uncrustify-uncrustify-0.65/cmake/
$ cmake ..
$ sudo make install

This means everyone is using the same version, so the output is consistent.


Use uncrustify
··············
Go to src/ and run uncrustify like this:
$ uncrustify --replace --no-backup -c ../etc/uncrustify-elementary-vala.cfg */*.vala *.vala

Make sure you don't end comment lines with a \ (backslash), otherwise
uncrustify turns the next line into a comment as well:

    // This prints a \
    my_function ();

Gets turned into:

    // This prints a
    // my_function ();

It's okay if you put any character after it though:

    // This prints a \ character.
    // (or) This prints a \.
    my_function ();


Show debug messages
···················
$ export G_MESSAGES_DEBUG=all


Generate pot file
·················
$ ninja com.github.spheras.desktopfolder-pot


Debian build
············
sudo apt install devscripts

From root directory:
$ debuild -uc -us

(Hint) To execute rules:
$ ./debian/rules install


GTK Introspector
················
$ gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true

After that, press Ctrl+Shift+D or Ctrl+Shift+I on the window you want to debug.


Snap creation
·············
$ sudo apt install snapcraft

$ sudo docker pull snapcore/snapcraft
$ sudo docker run -v $PWD:$PWD -w $PWD snapcore/snapcraft snapcraft

Relase a new version
····················
https://wiki.debian.org/Creating%20signed%20GitHub%20releases
1. tag the code (change version): $ git tag -s v1.1.2
2. push the tag created: $ git push --tags
3. then publish a new release into github
4. download the .gz generated at the release
5. sign the tarball (change version): $ gpg --armor --detach-sign desktopfolder-1.1.2.tar.gz
6. it will create a desktopfolder-1.1.2.tar.gz.asc file
7. Edit your release again and attach the detached signature desktopfolder-1.1.2.tar.gz.asc as binary to the release.
8. Compile with debian at the root: $ debuild -uc -us
9. Attach also the .dsc .tar.xz and .deb generated