maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Wierd Crash (https://talk.maemo.org/showthread.php?t=46200)

Figa 2010-03-03 18:47

Re: Wierd Crash
 
Thank you. It is my src.pro file vut still doesnt work.
Code:

TARGET = fsudoku
TEMPLATE = app
SOURCES += main.cpp \
    window.cpp \
    sudoku.cpp
HEADERS += window.h \
    perm.h \
    sudoku.hpp
PREFIX = ../debian/fsudoku/usr
unix {
    BINDIR = $$PREFIX/bin
    DATADIR = $$PREFIX/share
    DEFINES += DATADIR=\"$$DATADIR\" \
        PKGDATADIR=\"$$PKGDATADIR\"
   
    # MAKE INSTALL
    INSTALLS += target \
        desktop \
        icon64 \
        appfiles
    target.path = $$BINDIR
    desktop.path = $$DATADIR/applications/hildon
    desktop.files += fsudoku.desktop
    icon64.path = $$DATADIR/icons/hicolor/64x64/apps
    icon64.files += fsudoku.png

    appfiles.extra = mkdir -m 0777 ../debian/fsudoku/home/user/.fsudoku;
    appfiles.path = ../debian/fsudoku/home/user/.fsudoku
    appfiles.files += save.txt \
    candidates.txt\
resources.rcc

    appfiles.extra = chown -R user.users    ../debian/fsudoku/home/user/.fsudoku;
    appfiles.extra = chown user.users    ../debian/fsudoku/home/user/.fsudoku/save.txt;
    appfiles.extra = chown user.users    ../debian/fsudoku/home/user/.fsudoku/load.txt;
}


Rob1n 2010-03-03 19:24

Re: Wierd Crash
 
You can't just go sticking in extra appfiles.extra lines, you can only have one. In addition, it's run before the installation, so you can't chown the files as they don't exist at that point.

Figa 2010-03-03 19:32

Re: Wierd Crash
 
Ok how it have to look?

Rob1n 2010-03-03 19:58

Re: Wierd Crash
 
Quote:

Originally Posted by Figa (Post 554546)
Ok how it have to look?

At a guess:
Code:

TARGET = fsudoku
TEMPLATE = app
SOURCES += main.cpp \
    window.cpp \
    sudoku.cpp
HEADERS += window.h \
    perm.h \
    sudoku.hpp
PREFIX = ../debian/fsudoku/usr
unix {
    BINDIR = $$PREFIX/bin
    DATADIR = $$PREFIX/share
    DEFINES += DATADIR=\"$$DATADIR\" \
        PKGDATADIR=\"$$PKGDATADIR\"
   
    # MAKE INSTALL
    INSTALLS += target \
        desktop \
        icon64 \
        appfiles
    target.path = $$BINDIR
    desktop.path = $$DATADIR/applications/hildon
    desktop.files += fsudoku.desktop
    icon64.path = $$DATADIR/icons/hicolor/64x64/apps
    icon64.files += fsudoku.png

    appfiles.extra = chown user.users save.txt load.txt candidates.txt resources.rcc; mkdir -m 0777 ../debian/fsudoku/home/user/.fsudoku; chown user.users ./debian/fsudoku/home/user/.fsudoku
    appfiles.path = ../debian/fsudoku/home/user/.fsudoku
    appfiles.files += save.txt \
    candidates.txt\
resources.rcc
}

I've changed the permissions on the files I can see belonging to the appfiles set, but there's obviously some elsewhere (as you were changing the load.txt file which isn't mentioned elsewhere in this piece of code) so you'll need to add any missing ones.

Figa 2010-03-03 21:03

Re: Wierd Crash
 
Thank you. While building I get error cannot create dir file exist. I am really confused. May I ask you for jabbber or icq? IMHO better place for talking.

Rob1n 2010-03-03 21:14

Re: Wierd Crash
 
Quote:

Originally Posted by Figa (Post 554658)
Thank you. While building I get error cannot create dir file exist. I am really confused. May I ask you for jabbber or icq? IMHO better place for talking.

Add a "-p" to the mkdir command there - that'll stop it complaining about existing directories. You'd better also double check the paths - looks like the mkdir has "../debian" whereas the chown has "./debian".

And I don't have either icq or jabber at the moment. In addition, I'm pretty much guessing here as I've never actually written any Qt applications.

Figa 2010-03-03 22:08

Re: Wierd Crash
 
I repair this patch before, but still doesnt work. :( Thank you for your time.

Rob1n 2010-03-04 09:21

Re: Wierd Crash
 
Quote:

Originally Posted by Figa (Post 554748)
I repair this patch before, but still doesnt work. :( Thank you for your time.

I'm stuck as far as the Qt side of things go then, I'm afarid :( You could go back to trying to get it working via the postinstall script - looking at your earlier message on that, you don't want the "sudo gainroot" as the script should be running as root anyway.

Figa 2010-03-14 09:21

Re: Wierd Crash
 
Thank you. My question is simple. What I have to be in debian/rules file for import postinst script to .deb? I have in my postinst script this line:
chown -R user.users /home/user/.app
and it doesnt work. Can you help me?


All times are GMT. The time now is 15:27.

vBulletin® Version 3.8.8