move several strings, including app name, NBS port, and url prefix, into generated

.xml file so Dbg and regular variants can co-exist better
This commit is contained in:
Eric House 2015-08-01 22:39:00 -07:00
parent 8aef67dba4
commit 0425df7a5e
6 changed files with 83 additions and 68 deletions

View file

@ -1,4 +1,5 @@
git_string.xml
strings.xml
styles.xml
common_rsrc.xml
gen_strings.xml
app_name.xml

View file

@ -85,31 +85,30 @@ public final class R {
public static final int add_self_button=0x7f0a0073;
public static final int advertise_new_room_check=0x7f0a0037;
public static final int blessed_label=0x7f0a0057;
public static final int board_menu_chat=0x7f0a00a1;
public static final int board_menu_dict=0x7f0a009d;
public static final int board_menu_chat=0x7f0a00a0;
public static final int board_menu_dict=0x7f0a009c;
public static final int board_menu_done=0x7f0a0087;
public static final int board_menu_file_about=0x7f0a0095;
public static final int board_menu_file_prefs=0x7f0a0094;
public static final int board_menu_flip=0x7f0a009f;
public static final int board_menu_flip=0x7f0a009e;
public static final int board_menu_game_counts=0x7f0a008d;
public static final int board_menu_game_history=0x7f0a008f;
public static final int board_menu_game_left=0x7f0a008e;
public static final int board_menu_game_netstats=0x7f0a0096;
public static final int board_menu_game_netstats=0x7f0a0095;
public static final int board_menu_game_resend=0x7f0a0091;
public static final int board_menu_game_resign=0x7f0a0090;
public static final int board_menu_hint_next=0x7f0a009b;
public static final int board_menu_hint_prev=0x7f0a009a;
public static final int board_menu_invite=0x7f0a0097;
public static final int board_menu_juggle=0x7f0a009e;
public static final int board_menu_hint_next=0x7f0a009a;
public static final int board_menu_hint_prev=0x7f0a0099;
public static final int board_menu_invite=0x7f0a0096;
public static final int board_menu_juggle=0x7f0a009d;
public static final int board_menu_rematch=0x7f0a0086;
public static final int board_menu_toggle=0x7f0a00a2;
public static final int board_menu_toggle=0x7f0a00a1;
public static final int board_menu_trade=0x7f0a0088;
public static final int board_menu_trade_cancel=0x7f0a0089;
public static final int board_menu_trade_commit=0x7f0a008a;
public static final int board_menu_tray=0x7f0a008c;
public static final int board_menu_undo_current=0x7f0a009c;
public static final int board_menu_undo_current=0x7f0a009b;
public static final int board_menu_undo_last=0x7f0a008b;
public static final int board_menu_zoom=0x7f0a00a0;
public static final int board_menu_zoom=0x7f0a009f;
public static final int board_root=0x7f0a0002;
public static final int board_view=0x7f0a0003;
public static final int boardsize_spinner=0x7f0a0043;
@ -125,7 +124,7 @@ public final class R {
public static final int chat_button=0x7f0a0081;
public static final int chat_edit=0x7f0a0010;
public static final int chat_history=0x7f0a000f;
public static final int chat_menu_clear=0x7f0a00a3;
public static final int chat_menu_clear=0x7f0a00a2;
public static final int checkbox=0x7f0a0051;
public static final int color_display_sample=0x7f0a0012;
public static final int color_edit_sample=0x7f0a0013;
@ -140,11 +139,11 @@ public final class R {
public static final int dict_label=0x7f0a0069;
public static final int dict_spinner=0x7f0a002d;
public static final int dictlist_button=0x7f0a0080;
public static final int dicts_delete=0x7f0a00a6;
public static final int dicts_deselect_all=0x7f0a00a5;
public static final int dicts_download=0x7f0a00a4;
public static final int dicts_move=0x7f0a00a7;
public static final int dicts_select=0x7f0a00a8;
public static final int dicts_delete=0x7f0a00a5;
public static final int dicts_deselect_all=0x7f0a00a4;
public static final int dicts_download=0x7f0a00a3;
public static final int dicts_move=0x7f0a00a6;
public static final int dicts_select=0x7f0a00a7;
public static final int divider=0x7f0a0024;
public static final int download_button=0x7f0a0075;
public static final int dwnld_message=0x7f0a004f;
@ -163,35 +162,35 @@ public final class R {
public static final int game_locked_check=0x7f0a0028;
public static final int game_name=0x7f0a0046;
public static final int gamel_menu_checkmoves=0x7f0a0093;
public static final int games_game_config=0x7f0a00b4;
public static final int games_game_copy=0x7f0a00b9;
public static final int games_game_delete=0x7f0a00b3;
public static final int games_game_move=0x7f0a00b5;
public static final int games_game_new_from=0x7f0a00b7;
public static final int games_game_rename=0x7f0a00b8;
public static final int games_game_reset=0x7f0a00b6;
public static final int games_group_default=0x7f0a00bd;
public static final int games_group_delete=0x7f0a00bc;
public static final int games_group_movedown=0x7f0a00bb;
public static final int games_group_moveup=0x7f0a00ba;
public static final int games_group_rename=0x7f0a00be;
public static final int games_menu_about=0x7f0a00b0;
public static final int games_menu_checkmoves=0x7f0a00b2;
public static final int games_menu_checkupdates=0x7f0a00bf;
public static final int games_menu_dicts=0x7f0a00ae;
public static final int games_menu_email=0x7f0a00af;
public static final int games_menu_loaddb=0x7f0a00c1;
public static final int games_menu_newgame_net=0x7f0a00aa;
public static final int games_menu_newgame_solo=0x7f0a00a9;
public static final int games_menu_newgroup=0x7f0a00ab;
public static final int games_menu_prefs=0x7f0a00ac;
public static final int games_menu_rateme=0x7f0a00ad;
public static final int games_menu_resend=0x7f0a00b1;
public static final int games_menu_storedb=0x7f0a00c0;
public static final int games_game_config=0x7f0a00b3;
public static final int games_game_copy=0x7f0a00b8;
public static final int games_game_delete=0x7f0a00b2;
public static final int games_game_move=0x7f0a00b4;
public static final int games_game_new_from=0x7f0a00b6;
public static final int games_game_rename=0x7f0a00b7;
public static final int games_game_reset=0x7f0a00b5;
public static final int games_group_default=0x7f0a00bc;
public static final int games_group_delete=0x7f0a00bb;
public static final int games_group_movedown=0x7f0a00ba;
public static final int games_group_moveup=0x7f0a00b9;
public static final int games_group_rename=0x7f0a00bd;
public static final int games_menu_about=0x7f0a00af;
public static final int games_menu_checkmoves=0x7f0a00b1;
public static final int games_menu_checkupdates=0x7f0a00be;
public static final int games_menu_dicts=0x7f0a00ad;
public static final int games_menu_email=0x7f0a00ae;
public static final int games_menu_loaddb=0x7f0a00c0;
public static final int games_menu_newgame_net=0x7f0a00a9;
public static final int games_menu_newgame_solo=0x7f0a00a8;
public static final int games_menu_newgroup=0x7f0a00aa;
public static final int games_menu_prefs=0x7f0a00ab;
public static final int games_menu_rateme=0x7f0a00ac;
public static final int games_menu_resend=0x7f0a00b0;
public static final int games_menu_storedb=0x7f0a00bf;
public static final int games_menu_study=0x7f0a0092;
public static final int group_done=0x7f0a0085;
public static final int group_exchange=0x7f0a0098;
public static final int group_hint=0x7f0a0099;
public static final int group_exchange=0x7f0a0097;
public static final int group_hint=0x7f0a0098;
public static final int hideable=0x7f0a004b;
public static final int hints_allowed=0x7f0a003c;
public static final int invite_desc=0x7f0a0009;
@ -203,10 +202,10 @@ public final class R {
public static final int label=0x7f0a0025;
public static final int lang_separator=0x7f0a002b;
public static final int lang_spinner=0x7f0a002c;
public static final int loc_item_check=0x7f0a00c3;
public static final int loc_item_clear=0x7f0a00c2;
public static final int loc_item_copy_bless=0x7f0a00c5;
public static final int loc_item_copy_eng=0x7f0a00c4;
public static final int loc_item_check=0x7f0a00c2;
public static final int loc_item_clear=0x7f0a00c1;
public static final int loc_item_copy_bless=0x7f0a00c4;
public static final int loc_item_copy_eng=0x7f0a00c3;
public static final int loc_search_button=0x7f0a005e;
public static final int loc_search_field=0x7f0a005d;
public static final int local_label=0x7f0a0059;
@ -254,11 +253,11 @@ public final class R {
public static final int send_button=0x7f0a0011;
public static final int show_remote=0x7f0a001e;
public static final int shuffle_button=0x7f0a007e;
public static final int slmenu_clear_sel=0x7f0a00ca;
public static final int slmenu_copy_sel=0x7f0a00c9;
public static final int slmenu_deselect_all=0x7f0a00c8;
public static final int slmenu_lookup_sel=0x7f0a00c6;
public static final int slmenu_select_all=0x7f0a00c7;
public static final int slmenu_clear_sel=0x7f0a00c9;
public static final int slmenu_copy_sel=0x7f0a00c8;
public static final int slmenu_deselect_all=0x7f0a00c7;
public static final int slmenu_lookup_sel=0x7f0a00c5;
public static final int slmenu_select_all=0x7f0a00c6;
public static final int smart_robot=0x7f0a0040;
public static final int state=0x7f0a004d;
public static final int summary=0x7f0a0060;
@ -1026,7 +1025,7 @@ public final class R {
new game
*/
public static final int default_robodict=0x7f050123;
public static final int default_update_url=0x7f05007f;
public static final int default_update_url=0x7f05007e;
public static final int delete_dicts=0x7f0502a2;
public static final int devid_title=0x7f0502e5;
/**
@ -1050,7 +1049,7 @@ public final class R {
public static final int dict_on_server=0x7f0502a8;
/** string name="invite_mime">text/plain</string
*/
public static final int dict_url=0x7f05007e;
public static final int dict_url=0x7f05007d;
/**
############################################################
# :Menus:
@ -1264,7 +1263,7 @@ public final class R {
*/
public static final int get_sms_number=0x7f050207;
public static final int getinfo=0x7f0502a1;
public static final int git_rev=0x7f050081;
public static final int git_rev=0x7f05007f;
public static final int git_rev_title=0x7f0502e4;
public static final int got_langdict_summary=0x7f0502fe;
public static final int got_langdict_title=0x7f0502fd;
@ -1387,7 +1386,7 @@ public final class R {
/** Appended to message above if local device has NFC available
*/
public static final int invite_if_nfc=0x7f0500e3;
public static final int invite_mime=0x7f05007d;
public static final int invite_mime=0x7f05007c;
public static final int invite_multi_summary=0x7f0502c4;
public static final int invite_multi_title=0x7f0502c3;
/** Most users create games with only two players, which is the
@ -1400,7 +1399,7 @@ public final class R {
/**
*/
public static final int invite_notice_title=0x7f0501ed;
public static final int invite_prefix=0x7f05007c;
public static final int invite_prefix=0x7f050081;
public static final int invite_progress_fmt=0x7f0501e8;
/**
*/

View file

@ -1 +1 @@
/git_string.xml
/gen_strings.xml

View file

@ -2,6 +2,4 @@
<resources>
<string name="app_version">4.4 beta 97</string>
<!-- The name of the app. Not localized! -->
<string name="app_name">Crosswords</string>
</resources>

View file

@ -139,15 +139,12 @@
<string name="default_host">eehouse.org</string>
<string name="xwords_nfc_mime">application/org.eehouse.android.xw4</string>
<string name="invite_host">eehouse.org</string>
<string name="invite_prefix">/and/</string>
<string name="invite_mime">application/x-xwordsinvite</string>
<!--string name="invite_mime">text/plain</string-->
<string name="dict_url">http://eehouse.org/and_wordlists</string>
<string name="default_update_url">http://eehouse.org/xw4/info.py</string>
<string name="nbs_port">3344</string>
<!--string name="dict_url">http://10.0.2.2/~eehouse/and_dicts</string-->
<string-array name="board_sizes">

View file

@ -22,6 +22,23 @@ cd ../
GITVERSION=$(../scripts/gitversion.sh)
case $VARIANT in
xw4)
APPNAME=Crosswords
SMSPORT=3344
INVITE_PREFIX=/and/
;;
xw4dbg)
APPNAME=CrossDbg
SMSPORT=3345
INVITE_PREFIX=/anddbg/
;;
*)
usage
;;
esac
# Need to verify that R.java is unmodified; otherwise we can't set
# this constant!!! Shouldn't be a problem with release builds,
# though.
@ -31,12 +48,15 @@ fi
# TODO: deal with case where there's no hash available -- exported
# code maybe? Better: gitversion.sh does that.
cat <<EOF > ${BUILD_DIR}/res/values/git_string.xml
cat <<EOF > ${BUILD_DIR}/res/values/gen_strings.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- auto-generated; do not edit -->
<!-- auto-generated (by $(basename $0)); do not edit -->
<resources>
<string name="app_name">$APPNAME</string>
<string name="git_rev">$GITVERSION</string>
<string name="nbs_port">$SMSPORT</string>
<string name="invite_prefix">$INVITE_PREFIX</string>
</resources>
EOF