Oh, thx for info. I will check the link. :) -----Original Message----- From: "Simon Lees"<[email protected]> To: "Enlightenment developer list"<[email protected]>; Cc: Sent: 2016-02-15 (월) 06:45:24 Subject: Re: [E-devel] [EGIT] [games/etypers] master 03/03: support freedeskop launcher Hi Hermet, (And most other efl developers)
On 02/13/2016 03:32 PM, Hermet Park wrote: > hermet pushed a commit to branch master. > > http://git.enlightenment.org/games/etypers.git/commit/?id=6690567e8b3ee3c63e4baefc68e38d57a85ba10e > > commit 6690567e8b3ee3c63e4baefc68e38d57a85ba10e > Author: Hermet Park <[email protected]> > Date: Sat Feb 13 14:00:59 2016 +0900 > > support freedeskop launcher > --- > configure.ac 3 +++ > data/Makefile.am 2 +- > data/desktop/Makefile.am 6 ++++++ > data/desktop/etypers.desktop 9 +++++++++ > data/icon/Makefile.am 6 ++++++ > data/icon/etypers.png Bin 0 -> 8326 bytes > data/images/Makefile.am 6 ++++++ > data/images/etypers.png Bin 0 -> 2408 bytes > src/bin/etypers.c 17 ++++++++++++++--- > 9 files changed, 45 insertions(+), 4 deletions(-) > > diff --git a/configure.ac b/configure.ac > index f0ec93a..356fed2 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -99,6 +99,9 @@ data/Makefile > data/theme/Makefile > data/theme/images/Makefile > data/words/Makefile > +data/desktop/Makefile > +data/icon/Makefile > +data/images/Makefile > ]) > > AC_OUTPUT > diff --git a/data/Makefile.am b/data/Makefile.am > index 47ea2f3..4711693 100644 > --- a/data/Makefile.am > +++ b/data/Makefile.am > @@ -1,3 +1,3 @@ > MAINTAINERCLEANFILES = Makefile.in > > -SUBDIRS = theme words > +SUBDIRS = theme words icon desktop images > diff --git a/data/desktop/Makefile.am b/data/desktop/Makefile.am > new file mode 100644 > index 0000000..368944e > --- /dev/null > +++ b/data/desktop/Makefile.am > @@ -0,0 +1,6 @@ > +MAINTAINERCLEANFILES = Makefile.in > +filesdir = $(datadir)/applications > +files_DATA = \ > +etypers.desktop > + > +EXTRA_DIST = $(files_DATA) > diff --git a/data/desktop/etypers.desktop b/data/desktop/etypers.desktop > new file mode 100644 > index 0000000..10397e0 > --- /dev/null > +++ b/data/desktop/etypers.desktop > @@ -0,0 +1,9 @@ > +[Desktop Entry] > +Encoding=UTF-8 > +Type=Application > +Name=Etypers > +Comment=EFL Typing Game > +Icon=etypers > +Exec=etypers > +Terminal=false > +Categories=Game;Education; > diff --git a/data/icon/Makefile.am b/data/icon/Makefile.am > new file mode 100644 > index 0000000..4bfaa74 > --- /dev/null > +++ b/data/icon/Makefile.am > @@ -0,0 +1,6 @@ > +MAINTAINERCLEANFILES = Makefile.in > +filesdir = $(datadir)/icons > +files_DATA = \ > +etypers.png > + <Packagers Hat> Technically etypers.png should be stored in /usr/share/pixmap contrary to popular belief and the implementation in most efl based apps, /usr/share/icons is reserved for complete fdo icon themes. If you wanted to ship multiple sized icons you can add them to /usr/share/icons/hicolor/ZZxZZ/apps/ where ZZ is the size of the icon it is fine to also do that when shipping 1 icon. You can find more info if interested at https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-0.12.html#directory_layout someday i'll write patches for all the other efl based apps but i'm not good friends with autotools </ Packagers Hat> Cheers Simon, who only really cares because openSUSE's packaging tools enforce the rules. > +EXTRA_DIST = $(files_DATA) > diff --git a/data/icon/etypers.png b/data/icon/etypers.png > new file mode 100644 > index 0000000..b9dde50 > Binary files /dev/null and b/data/icon/etypers.png differ > diff --git a/data/images/Makefile.am b/data/images/Makefile.am > new file mode 100644 > index 0000000..2b00efb > --- /dev/null > +++ b/data/images/Makefile.am > @@ -0,0 +1,6 @@ > +MAINTAINERCLEANFILES = Makefile.in > + > +filesdir = $(datadir)/$(PACKAGE)/images > +files_DATA = etypers.png > + > +EXTRA_DIST = $(files_DATA) > diff --git a/data/images/etypers.png b/data/images/etypers.png > new file mode 100644 > index 0000000..651cd89 > Binary files /dev/null and b/data/images/etypers.png differ > diff --git a/src/bin/etypers.c b/src/bin/etypers.c > index 66d77da..bad7531 100644 > --- a/src/bin/etypers.c > +++ b/src/bin/etypers.c > @@ -92,6 +92,7 @@ double DROP_DIST_WEIGHT = 25; > static void reset_defense_wall(AppData *appdata); > static void enemy_kill(AppData *appdata, Enemy *enemy); > static void combo(AppData *appdata, Enemy *enemy, int combo); > +int main(int argc, char **argv); > > static double > level_handicap_forenemy_add(double level) > @@ -619,13 +620,22 @@ table_create(AppData *appdata) > static void > base_gui_create(AppData *appdata) > { > + char buf[PATH_MAX]; > + > //Create a window > Evas_Object *win = elm_win_add(NULL, "EFL Typers", ELM_WIN_DIALOG_BASIC); > - elm_win_title_set(win, "EFL Typers v1.0"); > + elm_win_title_set(win, "EFL Typers"); > elm_win_autodel_set(win, EINA_TRUE); > elm_win_focus_highlight_enabled_set(win, EINA_FALSE); > evas_object_smart_callback_add(win, "delete,request", > win_delete_request_cb, > appdata); > + > + //Window Icon > + Evas_Object *icon = evas_object_image_add(evas_object_evas_get(win)); > + snprintf(buf, sizeof(buf), "%s/images/etypers.png", > elm_app_data_dir_get()); > + evas_object_image_file_set(icon, buf, NULL); > + elm_win_icon_object_set(win, icon); > + > //Fix the window size > Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(win)); > evas_object_size_hint_min_set(rect, DEFAULT_WIN_W, DEFAULT_WIN_H); > @@ -634,8 +644,7 @@ base_gui_create(AppData *appdata) > //Layout > Evas_Object *ly = elm_layout_add(win); > > - char buf[PATH_MAX]; > - snprintf(buf, sizeof(buf), "%s/theme/etypers.edj", PACKAGE_DATA_DIR); > + snprintf(buf, sizeof(buf), "%s/theme/etypers.edj", > elm_app_data_dir_get()); > > elm_layout_file_set(ly, buf, "gui"); > evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); > @@ -1022,9 +1031,11 @@ app_init(AppData *appdata) > static void > elm_steup(void) > { > + elm_need_efreet(); > elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); > elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); > elm_app_compile_bin_dir_set(PACKAGE_DATA_DIR); > + elm_app_info_set(main, "etypers", "images/etypers.png"); > } > > EAPI_MAIN > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
