maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   [Announce] apkenv (N900, N950, N9) (https://talk.maemo.org/showthread.php?t=87496)

gm90_blackmamba 2012-10-28 18:27

Re: [Announce] apkenv (N900, N950, N9)
 
Quote:

Originally Posted by PIDk (Post 1286342)
For everyone who interested.
New version of script to launch .apk's with config auto save/load feature. I got rid of unnecessary file operations - now config remains in /home/user/.apkenv untill different .apk is loaded. All operations with config files are made before loading .apk. Also added mechanism to search for .apk's in specific folder (apk_dir variable). As in previous version, apkenv directory is stored in apkenv_dir.
Code:

#!/bin/sh

apkenv_dir="/opt/apkenv"
apkenvwrp_dir="/home/user/.apkenvwrp"
apk_dir="/home/user/MyDocs/apk"

process_backup() {
        if [ -f $apkenvwrp_dir/current_apk.save ]; then
                save_name=$(cat "$apkenvwrp_dir/current_apk.save")
               
                if [ $1 != $save_name ]; then
                        cp -rf /home/user/.apkenv/. $apkenvwrp_dir/$save_name/
                        rm -rf /home/user/.apkenv/*
                       
                        if [ -d $apkenvwrp_dir/$1 ]; then
                                cp -rf $apkenvwrp_dir/$1/. /home/user/.apkenv/
                        fi
                       
                        echo $1 > $apkenvwrp_dir/current_apk.save
                fi
        else
                mkdir -p $apkenvwrp_dir
                echo $1 > $apkenvwrp_dir/current_apk.save
        fi
}

if [ ! $1 ]; then
        echo "Usage: apkenvwrp.sh application.apk"
        echo "Do not run under root!"
        exit 0
fi

if [ $(whoami) != "user" ]; then
        echo "User rights required!"
        exit 0
fi

if [ -f $1 ]; then
        apk_path=$(readlink -f "$1")
else
        if [ -f $apk_dir/$1 ]; then
                apk_path=$apk_dir/$1
        else
                echo "File '"$1"' doesn't exist!"
                exit 0
        fi
fi

backup_name=$(basename "$1" ".apk")

process_backup $backup_name

cd $apkenv_dir

./apkenv $apk_path

exit 0


hi PIDk this script doesn't work for me..it say
Code:

line 57: syntax error: unexpected end of file (exčecting "then")
p.s. i use it on my n900

KiRiK 2012-10-28 18:27

Re: [Announce] apkenv (N900, N950, N9)
 
Quote:

Originally Posted by imo (Post 1286782)
Can some one do this where we can uninstall/delete a game from with in the apkenv-qml application ? I have installed a game twice with 2 different .jpg files.So if i want to get rid of them ,i have already seen the solution here on the thread but couldnt get rid of them even after purging the whole apkenv.It still shows in the apkenv manu . thanks in advance .

You have to install apkenv-qml and remove apk by long press on the appropriate icon.

KiRiK 2012-10-28 19:24

Re: [Announce] apkenv (N900, N950, N9)
 
I have uploaded a new version of apkenv-qml: https://github.com/QKit/apkenv-qml/downloads
Version 0.2.* functional:
- selecting the path to the executable apkenv file
- data storage for each application in its own folder (do not run more than one at the same time)
- creation of icons to launch applications
- removal of applications by long pressing the icon in the program window (data is removed too)

sinusverzus 2012-10-28 19:49

Re: [Announce] apkenv (N900, N950, N9)
 
KIRIK
File was not found. :confused:

KiRiK 2012-10-28 19:49

Re: [Announce] apkenv (N900, N950, N9)
 
Some kind of bug at github.
I have reuploaded harmattan build.

PIDk 2012-10-28 19:54

Re: [Announce] apkenv (N900, N950, N9)
 
Quote:

Originally Posted by gm90_blackmamba (Post 1286785)
hi PIDk this script doesn't work for me..it say
Code:

line 57: syntax error: unexpected end of file (exčecting "then")
p.s. i use it on my n900

In script all if clauses are conform to syntax if-then-else-fi. You can see it by yourself.

My only guess is that you didn't copy it properly. I have N9 and the script is working perfectly fine for me. And I don't think that there is difference between N900's and N9's shells. Also, you may check line termination (they must be terminated with LF).

Schturman 2012-10-28 20:51

Re: [Announce] apkenv (N900, N950, N9)
 
PIDk, your new script work perfectly on n9 like one before. I added new one to the next version of N9QT, thank you!

KiRiK 2012-10-29 00:24

Re: [Announce] apkenv (N900, N950, N9)
 
I had an idea of an intelligent extract icon and application name from apk-files.
But the name and the path are stored in resources.arsc - resource file in apk-file.
I looked through code that compiles this with aapt .. I looked at the implementation of the parser in apktool .. and I understood that I didn't want to realize that.
So if anyone knows of ready solutions for Qt/C++ or want to help - you are welcome.

coderus 2012-10-29 08:10

Re: [Announce] apkenv (N900, N950, N9)
 
You wasting too many time to make ULTRA UNLIMITED GRAND APK LAUNCHER for 5 games. I think.

warypopp 2012-10-29 09:00

Re: [Announce] apkenv (N900, N950, N9)
 
I have tried to get it with Tweak 7, the games not to run, unfortunately. I do not know what I did wrong. The games from the list I have also tried and renamed. Unfortunately without success.:confused:


All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8