Add cross compilation support

This commit is contained in:
Grégory Soutadé 2011-01-25 20:24:12 +01:00
parent 63ccfc7f97
commit 642c241be2
3 changed files with 84 additions and 82 deletions

View File

@ -1,12 +1,12 @@
CXXFLAGS=`wx-config --cxxflags` -Wall -Isrc -ggdb CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
CXXFLAGS+=-I./lib/freechart/include CXXFLAGS+=-I./lib/freechart/include
LDFLAGS=`wx-config --libs` LDFLAGS+=`wx-config --libs`
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8 LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8 LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
CXX=g++ CXX=$(PREFIX)g++
SOURCES=$(wildcard src/model/*.cpp) SOURCES=$(wildcard src/model/*.cpp)
SOURCES+=$(wildcard src/view/*.cpp) SOURCES+=$(wildcard src/view/*.cpp)
@ -34,5 +34,8 @@ check:
kc: $(OBJS) kc: $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
generate_locals: generate_locales:
./generate_locales.sh ./tools/generate_locales.sh
package:
./tools/package.sh

View File

@ -8,26 +8,25 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-02 19:11+0100\n" "POT-Creation-Date: 2011-01-25 14:06+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: src/view/StatsPanel.cpp:327 src/view/PreferencesPanel.cpp:775 #: src/view/PreferencesPanel.cpp:775 src/view/StatsPanel.cpp:328
msgid " - " msgid " - "
msgstr "" msgstr ""
#: src/view/UsersDialog.cpp:118 src/view/PreferencesPanel.cpp:456 #: src/view/PreferencesPanel.cpp:456 src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:476 src/view/PreferencesPanel.cpp:677 #: src/view/PreferencesPanel.cpp:677 src/view/PreferencesPanel.cpp:696
#: src/view/PreferencesPanel.cpp:696 src/view/PreferencesPanel.cpp:733 #: src/view/PreferencesPanel.cpp:733 src/view/UsersDialog.cpp:118
msgid " already exists" msgid " already exists"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:226 #: src/view/SearchPanel.cpp:227
msgid " entries found" msgid " entries found"
msgstr "" msgstr ""
@ -47,7 +46,7 @@ msgstr ""
msgid "!! Warning !! If there was a bug, the old database will be suppressed !" msgid "!! Warning !! If there was a bug, the old database will be suppressed !"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:228 #: src/view/SearchPanel.cpp:229
msgid "1 entry found" msgid "1 entry found"
msgstr "" msgstr ""
@ -75,24 +74,24 @@ msgstr ""
msgid "Account number" msgid "Account number"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:292 src/view/PreferencesPanel.cpp:59 #: src/view/PreferencesPanel.cpp:59 src/view/StatsPanel.cpp:293
msgid "Accounts" msgid "Accounts"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:87 #: src/view/SearchPanel.cpp:86
msgid "Amount from" msgid "Amount from"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:88 #: src/view/SearchPanel.cpp:87
msgid "Amount to" msgid "Amount to"
msgstr "" msgstr ""
#: src/view/PreferencesPanel.cpp:408 src/view/PreferencesPanel.cpp:782 #: src/view/AccountPanel.cpp:737 src/view/PreferencesPanel.cpp:408
#: src/view/AccountPanel.cpp:737 #: src/view/PreferencesPanel.cpp:782
msgid "Are you sure want to delete " msgid "Are you sure want to delete "
msgstr "" msgstr ""
#: src/view/PreferencesPanel.cpp:657 src/view/grid/GridAccount.cpp:814 #: src/view/PreferencesPanel.cpp:657 src/view/grid/GridAccount.cpp:825
msgid "Are you sure want to delete : \n" msgid "Are you sure want to delete : \n"
msgstr "" msgstr ""
@ -108,16 +107,16 @@ msgstr ""
msgid "Blocked" msgid "Blocked"
msgstr "" msgstr ""
#: src/view/UsersDialog.cpp:51 src/view/GenerateDialog.cpp:60 #: src/view/GenerateDialog.cpp:60 src/view/PasswordDialog.cpp:56
#: src/view/PasswordDialog.cpp:56 #: src/view/UsersDialog.cpp:51
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: src/view/grid/GridAccount.cpp:1245 src/view/grid/GridAccount.cpp:1252 #: src/view/grid/GridAccount.cpp:1256 src/view/grid/GridAccount.cpp:1263
msgid "Cannot group these operations" msgid "Cannot group these operations"
msgstr "" msgstr ""
#: src/view/grid/GridAccount.cpp:1371 src/view/grid/GridAccount.cpp:1377 #: src/view/grid/GridAccount.cpp:1382 src/view/grid/GridAccount.cpp:1388
msgid "Cannot ungroup these operations" msgid "Cannot ungroup these operations"
msgstr "" msgstr ""
@ -125,7 +124,7 @@ msgstr ""
msgid "Categories" msgid "Categories"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:89 src/view/grid/GridAccount.cpp:64 #: src/view/SearchPanel.cpp:88 src/view/grid/GridAccount.cpp:64
msgid "Category" msgid "Category"
msgstr "" msgstr ""
@ -161,7 +160,7 @@ msgstr ""
msgid "Confirm password " msgid "Confirm password "
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:130 src/view/AccountPanel.cpp:116 #: src/view/AccountPanel.cpp:116 src/view/StatsPanel.cpp:132
msgid "Cost repartition" msgid "Cost repartition"
msgstr "" msgstr ""
@ -201,8 +200,8 @@ msgstr ""
msgid "Default" msgid "Default"
msgstr "" msgstr ""
#: src/view/PreferencesPanel.cpp:188 src/view/PreferencesPanel.cpp:270 #: src/view/AccountPanel.cpp:596 src/view/PreferencesPanel.cpp:188
#: src/view/AccountPanel.cpp:596 #: src/view/PreferencesPanel.cpp:270
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
@ -210,25 +209,25 @@ msgstr ""
msgid "Descending" msgid "Descending"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:86 src/view/grid/GridAccount.cpp:64 #: src/view/SearchPanel.cpp:85 src/view/grid/GridAccount.cpp:64
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: src/model/Database.cpp:38 src/model/Database.cpp:55
#: src/model/Database.cpp:95 src/model/Database.cpp:102
#: src/model/Database.cpp:120 src/model/Database.cpp:147
#: src/model/Database.cpp:155 src/model/Database.cpp:176
#: src/view/AccountPanel.cpp:733 src/view/PasswordDialog.cpp:72
#: src/view/PasswordDialog.cpp:78 src/view/PreferencesPanel.cpp:404
#: src/view/PreferencesPanel.cpp:456 src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:677 src/view/PreferencesPanel.cpp:696
#: src/view/PreferencesPanel.cpp:727 src/view/PreferencesPanel.cpp:733
#: src/view/SearchPanel.cpp:142 src/view/SearchPanel.cpp:152
#: src/view/SearchPanel.cpp:166 src/view/SearchPanel.cpp:177
#: src/view/UsersDialog.cpp:88 src/view/UsersDialog.cpp:118 #: src/view/UsersDialog.cpp:88 src/view/UsersDialog.cpp:118
#: src/view/SearchPanel.cpp:141 src/view/SearchPanel.cpp:151 #: src/view/grid/GridAccount.cpp:1256 src/view/grid/GridAccount.cpp:1263
#: src/view/SearchPanel.cpp:165 src/view/SearchPanel.cpp:176 #: src/view/grid/GridAccount.cpp:1382 src/view/grid/GridAccount.cpp:1388
#: src/view/PreferencesPanel.cpp:404 src/view/PreferencesPanel.cpp:456 #: src/view/grid/wxGridCellFormulaEditor.cpp:69
#: src/view/PreferencesPanel.cpp:476 src/view/PreferencesPanel.cpp:677
#: src/view/PreferencesPanel.cpp:696 src/view/PreferencesPanel.cpp:727
#: src/view/PreferencesPanel.cpp:733 src/view/PasswordDialog.cpp:72
#: src/view/PasswordDialog.cpp:78 src/view/AccountPanel.cpp:733
#: src/view/grid/GridAccount.cpp:1245 src/view/grid/GridAccount.cpp:1252
#: src/view/grid/GridAccount.cpp:1371 src/view/grid/GridAccount.cpp:1377
#: src/view/grid/wxGridCellFormulaEditor.cpp:69 src/model/Database.cpp:38
#: src/model/Database.cpp:55 src/model/Database.cpp:95
#: src/model/Database.cpp:102 src/model/Database.cpp:120
#: src/model/Database.cpp:147 src/model/Database.cpp:155
#: src/model/Database.cpp:176
msgid "Error" msgid "Error"
msgstr "" msgstr ""
@ -240,8 +239,8 @@ msgstr ""
msgid "Final value" msgid "Final value"
msgstr "" msgstr ""
#: src/controller/KissCount.cpp:359 src/model/Database.cpp:331
#: src/view/SearchPanel.cpp:76 src/view/grid/GridAccount.cpp:323 #: src/view/SearchPanel.cpp:76 src/view/grid/GridAccount.cpp:323
#: src/model/Database.cpp:331 src/controller/KissCount.cpp:359
msgid "Fix" msgid "Fix"
msgstr "" msgstr ""
@ -253,7 +252,7 @@ msgstr ""
msgid "Foreground color" msgid "Foreground color"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:62 #: src/view/StatsPanel.cpp:64
msgid "From" msgid "From"
msgstr "" msgstr ""
@ -261,7 +260,7 @@ msgstr ""
msgid "From " msgid "From "
msgstr "" msgstr ""
#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:593 #: src/view/AccountPanel.cpp:593 src/view/GenerateDialog.cpp:31
msgid "Generate month" msgid "Generate month"
msgstr "" msgstr ""
@ -281,19 +280,19 @@ msgstr ""
msgid "Initial value" msgid "Initial value"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:151 #: src/view/SearchPanel.cpp:152
msgid "Invalid amount from" msgid "Invalid amount from"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:176 #: src/view/SearchPanel.cpp:177
msgid "Invalid amount range" msgid "Invalid amount range"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:165 #: src/view/SearchPanel.cpp:166
msgid "Invalid amount to" msgid "Invalid amount to"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:141 #: src/view/SearchPanel.cpp:142
msgid "Invalid date range" msgid "Invalid date range"
msgstr "" msgstr ""
@ -313,7 +312,7 @@ msgstr ""
msgid "Invalid password" msgid "Invalid password"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:346 #: src/view/StatsPanel.cpp:347
msgid "Invalide date range" msgid "Invalide date range"
msgstr "" msgstr ""
@ -329,8 +328,8 @@ msgstr ""
msgid "Kill me" msgid "Kill me"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:346 src/view/PreferencesPanel.cpp:767 #: src/view/PreferencesPanel.cpp:767 src/view/PreferencesPanel.cpp:770
#: src/view/PreferencesPanel.cpp:770 #: src/view/StatsPanel.cpp:347
msgid "KissCount" msgid "KissCount"
msgstr "" msgstr ""
@ -369,7 +368,7 @@ msgid ""
"\n" "\n"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:231 #: src/view/SearchPanel.cpp:232
msgid "No entry found" msgid "No entry found"
msgstr "" msgstr ""
@ -385,8 +384,8 @@ msgstr ""
msgid "Number" msgid "Number"
msgstr "" msgstr ""
#: src/view/UsersDialog.cpp:50 src/view/GenerateDialog.cpp:59 #: src/view/GenerateDialog.cpp:59 src/view/PasswordDialog.cpp:55
#: src/view/PasswordDialog.cpp:55 #: src/view/UsersDialog.cpp:50
msgid "OK" msgid "OK"
msgstr "" msgstr ""
@ -402,7 +401,7 @@ msgstr ""
msgid "Operation order" msgid "Operation order"
msgstr "" msgstr ""
#: src/view/ButtonPanel.cpp:69 #: src/view/ButtonPanel.cpp:69 src/view/SearchPanel.cpp:89
msgid "Operations" msgid "Operations"
msgstr "" msgstr ""
@ -433,8 +432,8 @@ msgstr ""
msgid "Please retype new password" msgid "Please retype new password"
msgstr "" msgstr ""
#: src/view/PreferencesPanel.cpp:741 src/view/PreferencesPanel.cpp:775 #: src/view/ButtonPanel.cpp:72 src/view/PreferencesPanel.cpp:741
#: src/view/ButtonPanel.cpp:72 #: src/view/PreferencesPanel.cpp:775
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
@ -454,12 +453,12 @@ msgstr ""
msgid "Remains" msgid "Remains"
msgstr "" msgstr ""
#: src/view/SearchPanel.cpp:84 src/view/SearchPanel.cpp:242 #: src/view/ButtonPanel.cpp:71 src/view/SearchPanel.cpp:83
#: src/view/ButtonPanel.cpp:71 #: src/view/SearchPanel.cpp:243
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:122 src/view/AccountPanel.cpp:90 #: src/view/AccountPanel.cpp:90 src/view/StatsPanel.cpp:124
msgid "Serie 1" msgid "Serie 1"
msgstr "" msgstr ""
@ -467,11 +466,11 @@ msgstr ""
msgid "Shared with" msgid "Shared with"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:327 src/view/ButtonPanel.cpp:70 #: src/view/ButtonPanel.cpp:70 src/view/StatsPanel.cpp:328
msgid "Statistics" msgid "Statistics"
msgstr "" msgstr ""
#: src/view/StatsPanel.cpp:69 #: src/view/StatsPanel.cpp:71
msgid "To" msgid "To"
msgstr "" msgstr ""
@ -512,8 +511,8 @@ msgstr ""
msgid "User" msgid "User"
msgstr "" msgstr ""
#: src/view/UsersDialog.cpp:38 src/view/UsersDialog.cpp:118 #: src/view/PreferencesPanel.cpp:733 src/view/UsersDialog.cpp:38
#: src/view/PreferencesPanel.cpp:733 #: src/view/UsersDialog.cpp:118
msgid "User " msgid "User "
msgstr "" msgstr ""
@ -521,58 +520,58 @@ msgstr ""
msgid "Users" msgid "Users"
msgstr "" msgstr ""
#: src/view/grid/GridAccount.cpp:1022 #: src/view/grid/GridAccount.cpp:1033
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: src/view/grid/GridAccount.cpp:1022 #: src/view/grid/GridAccount.cpp:1033
msgid "You made a debit on a blocked account" msgid "You made a debit on a blocked account"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:110 #: src/view/wxUI.cpp:97
msgid "april" msgid "april"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:114 #: src/view/wxUI.cpp:101
msgid "august" msgid "august"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:118 #: src/view/wxUI.cpp:105
msgid "december" msgid "december"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:108 #: src/view/wxUI.cpp:95
msgid "february" msgid "february"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:107 #: src/view/wxUI.cpp:94
msgid "january" msgid "january"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:113 #: src/view/wxUI.cpp:100
msgid "july" msgid "july"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:112 #: src/view/wxUI.cpp:99
msgid "june" msgid "june"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:109 #: src/view/wxUI.cpp:96
msgid "march" msgid "march"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:111 #: src/view/wxUI.cpp:98
msgid "may" msgid "may"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:117 #: src/view/wxUI.cpp:104
msgid "november" msgid "november"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:116 #: src/view/wxUI.cpp:103
msgid "october" msgid "october"
msgstr "" msgstr ""
#: src/view/wxUI.cpp:115 #: src/view/wxUI.cpp:102
msgid "september" msgid "september"
msgstr "" msgstr ""

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
DATE=`date +%d.%m.%Y` DATE=`date +%d.%m.%Y`
ARCH=`uname -m` ARCH=`${PREFIX}gcc -dumpmachine | cut -d- -f1`
VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2` VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2`
DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}" DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}"
FILE="$DIR.tar.bz2" FILE="$DIR.tar.bz2"
@ -15,7 +15,7 @@ make || (echo "Compilation failed" ; exit 1)
mkdir -p "$DIR"/lib mkdir -p "$DIR"/lib
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib
cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR" cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR"
find "$DIR" -type f -executable -exec strip \{\} \; find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \;
tar -jcf "$FILE" "$DIR" tar -jcf "$FILE" "$DIR"
rm -rf "$DIR" rm -rf "$DIR"
echo "Packaged !" echo "Packaged into $FILE !"