You are not logged in.
Pages: 1
I have created a simple installer using the instructions located here, and would like to give the created .deb file a category to place the application when installed. It currently installs to the "other" category on my test debian cinnamon installation, and I would like it to go to the correct category if possible. Any suggestion welcome.
Offline
You need to create 'Section: the_category' line in the 'DEBIAN/control' file. There is a 'sourced.prepack' script in Q4OS devpack compiler, you can use it to do the job. Simply insert at the bottom of the installer.cfg:
cat > $CFGFILE_DIR/sourced.prepack <<EOF
echo "Section: the_category" >> wkdir/DEBIAN/control
rm \$CFGFILE_DIR/sourced.prepack
EOF
Offline
Thank you, I am assuming I have to replace "the_category" with the category I want it to appear in. I will try and report back if any problems.
Offline
I tried a few different options as I kept getting failures, but I missed the line of output that said
duplicate value for `Section' field
So it looks like I need to remove the first Section entry from the control file before adding the new one.
Offline
I solved this by changing to :-
cat > $CFGFILE_DIR/sourced.prepack <<EOF
sed -i '/Section/c\Section: Audio' wkdir/DEBIAN/control
cat wkdir/DEBIAN/control
rm \$CFGFILE_DIR/sourced.prepack
EOF
The "cat" was just to make sure it was changed.
Although it still doesn't seem to put it into it's correct menu.
Offline
I've been looking a bit further into this and the deb file created by the installer does not put a menu file in place in the system, would this normally be done? I have noticed q4os appears to be using these files for other applications that are installed, that is the information in these files seems to be correct so I have to assume they are used.
I cannot find any sort of menu entry file for my installed package unless it is the file in /usr/share/applications/ but that appears to just be a desktop icon file...
Offline
I managed to get it working by changing the file /program_files/q4os-devpack/appsetup/templates/app1.desktop.template so that it contained Categories=AudioVideo;Audio;, for it to be included in the sound and video menu of cinnamon. I removed the entry posted earlier as the Section entry had no effect on menu location. and after checking the esh installer that too puts an entry into the correct menu (multimedia in this case).
So would the installer have an option to cater for menu entries so I don't have to manually change the template file each time I create an app with different menu location requirement?
Offline
We have misunderstood your first question, sorry for that. The 'Section' in the .deb file means Category in Synaptic grouping.
So would the installer have an option to cater for menu entries so I don't have to manually change the template file each time I create an app with different menu location requirement?
Yes, you can create own 'app1.desktop.template' template in your project subfolder, for ex. 'my_templates' and set variable 'TEMPLATES_DIR="my_templates"' in the 'installer.cfg'
Offline
Ah, that makes sense, Thank you. I can stop scratching my head now.
Offline
Of course, in addition, it's possible to override other custom template files in 'my_templates' subfolder as well.
Offline
Yes thank you, I have realised that now, I'm blaming my age for not seeing that before
Offline
I was looking for a way to get a better description into the installer, the default setting is to just use $PK_NAME for Q4OS which is not really a description. The only way I could do this was to add a variable to the installer.cfg (PK_DESC) and then modify the create_q4app_setup.sh with
if [ -z "$PK_DESC" ]; then
echo "$PK_NAME for Q4OS" > description-pak
else
echo "$PK_DESC" > description-pak
fi
(line 271)
I realise that modifying the installation script is probably not the best way to do this, as I would have to remember to make the same modifications if I were to have to re-install my system, but it is the only way I could see to do it.
Is there an alternative way to do this without my modifications?
EDIT: I originally got the argument the wrong way round, changed it now.
Last edited by Dai_trying (2016-05-09 15:18)
Offline
Pages: 1