Skip to content

Commit

Permalink
更换图标
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-zhou committed Sep 3, 2014
1 parent febf1ca commit 0612293
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
24 changes: 16 additions & 8 deletions init
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LAUNCHER_CONFIG_DIR="$APPS_CONFIG_DIR/launcher/conf.d"
LAUNCHER_CONFIG_FILE="$LAUNCHER_CONFIG_DIR/$PROGRAM_NAME.conf"

ICON="./res/icon.png"
PRESSED_ICON="./res/icon.png"
PRESSED_ICON="./res/icon_pressed.png"

PID_FILE="$CURWDIR/$PROGRAM_NAME.pid"
PKILL_BIN="/usr/bin/pkill"
Expand All @@ -25,23 +25,29 @@ usage() {
}

start() {
$CUSTOM_BIN "$CUSTOM_CONFIG_FILE" &
[ "$!""XXX" != "XXX" ] && echo "$!" > $PID_FILE
echo "start function no implemented"
# $CUSTOM_BIN "$CUSTOM_CONFIG_FILE" &
# [ "$!""XXX" != "XXX" ] && echo "$!" > $PID_FILE
}

run() {
$CUSTOM_BIN "$CUSTOM_CONFIG_FILE"&
}

stop() {
if [ -f $PID_FILE ]; then
kill `cat "$PID_FILE"`
$REMOVE $PID_FILE
fi
echo "stop function not implemented"
# if [ -f $PID_FILE ]; then
# kill `cat "$PID_FILE"`
# $REMOVE $PID_FILE
# fi
}

config() {
echo "{" > "$PROGRAM_NAME.conf"
echo "\"name\" : \"$TITLE\"," >> "$PROGRAM_NAME.conf"
echo "\"icon\" : \"$CURWDIR/$ICON\"," >> "$PROGRAM_NAME.conf"
echo "\"iconPressed\" : \"$CURWDIR/$PRESSED_ICON\"," >> "$PROGRAM_NAME.conf"
echo "\"exec\" : \"$CURWDIR/init start\"," >> "$PROGRAM_NAME.conf"
echo "\"exec\" : \"$CURWDIR/init run\"," >> "$PROGRAM_NAME.conf"
echo "\"msgNum\" : 4" >> "$PROGRAM_NAME.conf"
echo "}" >> "$PROGRAM_NAME.conf"

Expand Down Expand Up @@ -76,6 +82,8 @@ case "$1" in
start;;
"stop" )
stop;;
"run" )
run;;
"restart" )
start
stop;;
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"author" : "魔豆开发团队-阿耀",
"author_mail" : "[email protected]",
"homepage" : "www.modouwifi.com",
"version" : "0.1",
"version" : "0.1.3",
"release_date" : "2014.08.13",
"icon" : "./res/icon.png",
"location" : "external",
"location" : "internal",
"description" : "运行插件后,点击开始即可开启远程协助",
"instruction" : "",
"os_version" : "0.6.17"
Expand Down
Binary file modified res/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/icon_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0612293

Please sign in to comment.