Reply
Thread Tools
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#1
I made a theme package, that must be activate it with this app in ovi store called "theme settings"
So i would like to know how can i make the dependency call from my theme package when the file is installing.
I tried modifying the control file adding:
Code:
Depends: meegotouchtheme-settings
But when installing it says that couldn't find the dependency.
So i don't know how to point my app installer to installs "theme settings" before it installs itselfs.

Any idea how can i do this?

Last edited by flotron; 2012-07-28 at 00:42.
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#2
There is no such package in Harmattan repositories, so the error is correct. So what are you really trying to install?

Edit: ah now I figured out what you are trying to do. You cannot add depency to packages that are in ovi store. You can only add depencies to Harmattan repo. So your out of luck, you cannot add depency in deb package, if you really want to kludge around, then your have to add some checking into your application if depency has been installed and if not then open the url to ovi store to download the depency.
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.

Last edited by rainisto; 2012-07-27 at 21:33.
 

The Following User Says Thank You to rainisto For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#3
It is a must-need app for my theme package, called "theme settings" (http://store.ovi.com/content/300721)
Maybe i express myself wrong and maybe its not called dependency, it is an app that must be installed in the phone to apply my theme deb package.(http://talk.maemo.org/showthread.php?t=85554)

What i want is that the installer first install "theme settings" from ovi store before installs my theme.
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#4
yep there is no way to do that. Only way is to kludge your application to check missing depency and open url to download page.
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.
 
Posts: 203 | Thanked: 538 times | Joined on Oct 2009 @ Colombia
#5
Since there is no real "app", this is just a theme, what would be the best way to check this? post install script or something?
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#6
Originally Posted by rainisto View Post
yep there is no way to do that. Only way is to kludge your application to check missing depency and open url to download page.
That is what i want. Check if "theme settings" is installed, so if not installed, it takes the user to the install page in the store or automatically installs
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#7
flotron, you can do something like this:
1. Download Theme settings and put this app to your package, for example: /home/user/MyDocs/Downloads
2. Create a small script with something like this:
Code:
#!/bin/sh

if [ ! -f /path/where is/theme-setting-app/need to be installed ]; then
   echo "Theme setting not installed, trying to install..."
   echo "" | dpkg -i /home/user/MyDocs/Downloads/themesetting.deb || echo "failed to install theme setting"
fi

if [ -f /path/where is/theme-setting-app/need to be installed ]
then /path/where is/theme-setting-app/need to be installed
else
    echo "theme-setting-app not installed. exiting..."
    sleep 2
    exit 0
fi
Put this script also to /home/user/MyDocs/Downloads
3. In your postinst script add command to run this script:
Code:
sh /home/user/MyDocs/Downloads/my-script.sh
Maybe it will work for you..
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#8
Thank you for your help Schturman but the main idea is to start publishing harmattan themes in Ovi Store and keep themes separated from the "theme runner" that its not developed by me. And for respect to the original developer.

The developer send me an example theme that make this job but i don't understand it, here is the source and de deb file.

This example theme do the job that i want, but i don't know how to apply it to my theme

Code:
#include <MMessageBox>
#include <QFile>
#include <QDBusConnection>
#include <QDBusInterface>
#include "checkerapplication.h"

CheckerApplication::CheckerApplication(int &argc, char **argv) :
    MApplication(argc, argv)
{
    new CheckerApplicationAdaptor(this);
    QDBusConnection connection = QDBusConnection::sessionBus();
    if (!connection.registerService("com.jormas.vesuri.meegotouchtheme-settings-checker")) {
        qWarning("Unable to register D-Bus service com.jormas.vesuri.meegotouchtheme-settings-checker");
    }
    if (!connection.registerObject("/", this)) {
        qWarning("Unable to register D-Bus object at /");
    }

    if (!QFile::exists("/usr/lib/duicontrolpanel/applets/libmeegotouchtheme-settings.so")) {
        MMessageBox *messageBox = new MMessageBox("To take the theme into use, Theme settings needs to be installed from the Store. Would you like to go to the Store now?", M::YesButton | M::NoButton);
        connect(messageBox, SIGNAL(finished(int)), this, SLOT(openStoreIfAccepted(int)));
        messageBox->setSystem(true);
        messageBox->appear(MSceneWindow::DestroyWhenDone);
    } else {
        exit();
    }
}

CheckerApplication::~CheckerApplication()
{
}

void CheckerApplication::openStoreIfAccepted(int dialogResult)
{
    if (dialogResult == MDialog::Accepted) {
        QDBusInterface("com.nokia.OviStoreClient", "/", "com.nokia.OviStoreClient", QDBusConnection::sessionBus()).call("LaunchWithLink", QStringList() << "http://store.ovi.com/content/300721");
    }
    exit();
}

Last edited by flotron; 2012-07-27 at 23:58.
 
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#9
How do you package your themes? Scratchbox?

If yes, untar the sample theme, replace the theme folder with your theme, edit the control and changelog file with your info and then dpkg-buildpackage -rfakeroot
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#10
i package with this script

Code:
#!/bin/sh

#create .deb files for packages (fremantle&harmattan)

if [ ! $1 ];then
 echo Create .deb files for fremantle and harmattan devices
 echo Usage: make-deb /path/to/package
 exit 0
fi

#step in package directory
chdir "$1"

#versionnumber and packagename from control file
packagename=`grep "Package: " DEBIAN/control | cut -d ' ' -f 2`
versionnumber=`grep "Version: " DEBIAN/control | cut -d ' ' -f 2`

#remove old md5 and digsig sums
rm -f DEBIAN/md5sums 2>/dev/null
rm -f DEBIAN/digsigsums 2>/dev/null

#list all folders except DEBIAN
find | grep -v "./DEBIAN" > ../md5

#get md5 and digsig sums to DEBIAN/
while read line
do
 if [ -f "$line" ]; then
  #cut "./" from beginning
  line=`echo "$line" | cut -c 3-`

  #get md5
  md5sum "$line" >> DEBIAN/md5sums

  #get sha1 for digital signatures
  echo S 15 com.nokia.maemo H 40 `sha1sum "$line" | cut -c -40` R `expr length "$line"` $line >> DEBIAN/digsigsums
 fi
done < "../md5"

#remove temp file list
rm -f ../md5

#package control.tar.gz and data.tar.gz
tar -cvzf ../control.tar.gz -C DEBIAN/ . >/dev/null
tar -cvzf ../data.tar.gz . --exclude=DEBIAN >/dev/null
echo 2.0>../debian-binary

#step outside package folder
cd ..

#create debian archive "package_version.deb"
ar -rcv $packagename"_"$versionnumber.deb debian-binary control.tar.gz data.tar.gz >/dev/null

#remove packaged files
rm -f debian-binary control.tar.gz data.tar.gz 2>/dev/null
I take a look there inside the tar and it seems to be compiled with QT Creator. What happens if i open that folder with QT Creator and modify the name and insert there my theme folder and the compile it? possible?
Sorry if i'm saying silly things here but im trying to learn something
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:17.