(added desciption of install location configs) |
m (formatting change) |
||
| Line 37: | Line 37: | ||
Scope= | Scope= | ||
</code> | </code> | ||
| − | |||
install the file using CMake install macro like this | install the file using CMake install macro like this | ||
| − | |||
<code> | <code> | ||
install( FILES yourdata.knsrc DESTINATION ${CONFIG_INSTALL_DIR} ) | install( FILES yourdata.knsrc DESTINATION ${CONFIG_INSTALL_DIR} ) | ||
</code> | </code> | ||
| − | |||
at this point, you can test your knsrc file with khotnewstuff4 like so: | at this point, you can test your knsrc file with khotnewstuff4 like so: | ||
| − | |||
<code> | <code> | ||
khotnewstuff4 yourdata.knsrc | khotnewstuff4 yourdata.knsrc | ||
</code> | </code> | ||
| − | |||
it should show you a download dialog of the data available on your provider(s). | it should show you a download dialog of the data available on your provider(s). | ||
:2. Make your application launch the KNS ui with your knsrc file. | :2. Make your application launch the KNS ui with your knsrc file. | ||
The page that used to be here was all KDE3 specific information, so I figured it was about time to start a new one.
First some basic terminology just to get us all on the same page. KHotNewStuff2 is the new library that implements the GHNS freedesktop.org specification for downloading and uploading user data. It will also support DXS (Desktop Exchange Service)
There are a many good examples for how to use khotnewstuff2 in the KDE-Edu module. Look at their source code for examples if needed, but it's basically a 2-part process to get download into your app.
[KNewStuff2]
ProvidersUrl=
InstallationCommand=
Uncompress=
One of the following to tell where downloads should go:
TargetDir=
InstallPath=
StandardResource=
And the following values are currently read, though not used yet:
CustomName=
CachePolicy=
ChecksumPolicy=
SignaturePolicy=
Scope=
install the file using CMake install macro like this
install( FILES yourdata.knsrc DESTINATION ${CONFIG_INSTALL_DIR} )
at this point, you can test your knsrc file with khotnewstuff4 like so:
khotnewstuff4 yourdata.knsrc
it should show you a download dialog of the data available on your provider(s).