| 1 |
First time build |
| 2 |
················· |
| 3 |
$ meson build |
| 4 |
$ cd build |
| 5 |
$ ninja |
| 6 |
|
| 7 |
Build, install and run the app with debug messages in one line |
| 8 |
.............................................................. |
| 9 |
$ sudo ninja install && env G_MESSAGES_DEBUG=all com.github.spheras.desktopfolder |
| 10 |
|
| 11 |
|
| 12 |
Use debugger suite |
| 13 |
.................. |
| 14 |
Nemiver is GNOME's GUI debugger. It can be really useful for locating the source of crashes and bugs. |
| 15 |
$ sudo apt install nemiver |
| 16 |
|
| 17 |
After installing use this instead of the one liner above: |
| 18 |
$ sudo ninja install && env G_MESSAGES_DEBUG=all nemiver com.github.spheras.desktopfolder |
| 19 |
|
| 20 |
|
| 21 |
Install uncrustify |
| 22 |
·················· |
| 23 |
Don't use sudo apt install uncrustify! |
| 24 |
|
| 25 |
Run this one-liner to install the latest release of uncrustify: |
| 26 |
$ 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 |
| 27 |
|
| 28 |
If you want to run it step by step instead: |
| 29 |
$ cd ~/Downloads |
| 30 |
$ wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.65.tar.gz |
| 31 |
$ tar -xf uncrustify-0.65.tar.gz |
| 32 |
$ cd uncrustify-uncrustify-0.65/cmake/ |
| 33 |
$ cmake .. |
| 34 |
$ sudo make install |
| 35 |
|
| 36 |
This means everyone is using the same version, so the output is consistent. |
| 37 |
|
| 38 |
|
| 39 |
Use uncrustify |
| 40 |
·············· |
| 41 |
Go to src/ and run uncrustify like this: |
| 42 |
$ uncrustify --replace --no-backup -c ../etc/uncrustify-elementary-vala.cfg */*.vala *.vala |
| 43 |
|
| 44 |
Make sure you don't end comment lines with a \ (backslash), otherwise |
| 45 |
uncrustify turns the next line into a comment as well: |
| 46 |
|
| 47 |
// This prints a \ |
| 48 |
my_function (); |
| 49 |
|
| 50 |
Gets turned into: |
| 51 |
|
| 52 |
// This prints a |
| 53 |
// my_function (); |
| 54 |
|
| 55 |
It's okay if you put any character after it though: |
| 56 |
|
| 57 |
// This prints a \ character. |
| 58 |
// (or) This prints a \. |
| 59 |
my_function (); |
| 60 |
|
| 61 |
|
| 62 |
Show debug messages |
| 63 |
··················· |
| 64 |
$ export G_MESSAGES_DEBUG=all |
| 65 |
|
| 66 |
|
| 67 |
Generate pot file |
| 68 |
················· |
| 69 |
$ ninja com.github.spheras.desktopfolder-pot |
| 70 |
|
| 71 |
|
| 72 |
Debian build |
| 73 |
············ |
| 74 |
sudo apt install devscripts |
| 75 |
|
| 76 |
From root directory: |
| 77 |
$ debuild -uc -us |
| 78 |
|
| 79 |
(Hint) To execute rules: |
| 80 |
$ ./debian/rules install |
| 81 |
|
| 82 |
|
| 83 |
GTK Introspector |
| 84 |
················ |
| 85 |
$ gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true |
| 86 |
|
| 87 |
After that, press Ctrl+Shift+D or Ctrl+Shift+I on the window you want to debug. |
| 88 |
|
| 89 |
|
| 90 |
Snap creation |
| 91 |
············· |
| 92 |
$ sudo apt install snapcraft |
| 93 |
|
| 94 |
$ sudo docker pull snapcore/snapcraft |
| 95 |
$ sudo docker run -v $PWD:$PWD -w $PWD snapcore/snapcraft snapcraft |
| 96 |
|
| 97 |
Relase a new version |
| 98 |
···················· |
| 99 |
https://wiki.debian.org/Creating%20signed%20GitHub%20releases |
| 100 |
1. tag the code (change version): $ git tag -s v1.1.2 |
| 101 |
2. push the tag created: $ git push --tags |
| 102 |
3. then publish a new release into github |
| 103 |
4. download the .gz generated at the release |
| 104 |
5. sign the tarball (change version): $ gpg --armor --detach-sign desktopfolder-1.1.2.tar.gz |
| 105 |
6. it will create a desktopfolder-1.1.2.tar.gz.asc file |
| 106 |
7. Edit your release again and attach the detached signature desktopfolder-1.1.2.tar.gz.asc as binary to the release. |
| 107 |
8. Compile with debian at the root: $ debuild -uc -us |
| 108 |
9. Attach also the .dsc .tar.xz and .deb generated |