# HG changeset patch # User smxx # Date 1266437005 0 # Node ID 0533562bc3a470e2a4232378a8398b0c5d251722 # Parent 67815ee123d7f6dff2f91481a52c28ee5be572f4 Engine: * Use included Lua source files to compile a local copy to be used (Koda) Frontend: * Changed the way Xfire code is excluded outside Win32 * Updated slovak translation by jose1711__ diff -r 67815ee123d7 -r 0533562bc3a4 CMakeLists.txt --- a/CMakeLists.txt Wed Feb 17 19:50:22 2010 +0000 +++ b/CMakeLists.txt Wed Feb 17 20:03:25 2010 +0000 @@ -49,21 +49,18 @@ STRING(REGEX REPLACE "([0-9][0-9].[0-9]+).[0-9]" "\\1" current_macosx_version ${MACOSX_VERSION_TMP}) if(NOT minimum_macosx) - #if nothing is set, we build only for the current system + #if nothing is set, we deploy only for the current system set(minimum_macosx ${current_macosx_version}) endif() + if(current_macosx_version MATCHES "10.6") + set(CMAKE_OSX_ARCHITECTURES "x86_64") + endif() + #create universal binaries only when it's time to bundle the application, also build server IF(BUNDLE) set(WITH_SERVER false) - if(current_macosx_version MATCHES "10.6") - if(minimum_macosx MATCHES "10.6") - #prevent building ppc for 10.6 - set(CMAKE_OSX_ARCHITECTURES "x86_64;i386") - else() - set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") - endif() - else() + if(minimum_macosx NOT MATCHES "10.6") set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400") endif() ENDIF() @@ -76,7 +73,10 @@ set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${minimum_macosx}.sdk/") endif() - set(pascal_compiler_flags_cmn "-k${CMAKE_BINARY_DIR}/bin/libSDLmain.a" "-k-macosx_version_min" "-k${minimum_macosx}" "-XR${CMAKE_OSX_SYSROOT}" ${pascal_compiler_flags_cmn}) + #1.set deployment target; 2.link with libsdlmain.a; 3.link with liblua.a (which requires readline) + set(pascal_compiler_flags_cmn "-k-macosx_version_min" "-k${minimum_macosx}" "-XR${CMAKE_OSX_SYSROOT}" ${pascal_compiler_flags_cmn}) + set(pascal_compiler_flags_cmn "-k${CMAKE_BINARY_DIR}/bin/libSDLmain.a" ${pascal_compiler_flags_cmn}) + set(pascal_compiler_flags_cmn "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_compiler_flags_cmn}) else(APPLE) set(target_dir "bin") endif(APPLE) diff -r 67815ee123d7 -r 0533562bc3a4 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Wed Feb 17 19:50:22 2010 +0000 +++ b/QTfrontend/hwform.cpp Wed Feb 17 20:03:25 2010 +0000 @@ -72,7 +72,9 @@ HWForm::HWForm(QWidget *parent) : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0) { +#ifdef USE_XFIRE xfire_init(); +#endif gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat); frontendEffects = gameSettings->value("video/frontendeffects", true).toBool(); @@ -207,15 +209,9 @@ GoBack(); } +#ifdef USE_XFIRE void HWForm::updateXfire(void) { -// xfire_setvalue(XFIRE_ROOM, "None"); -// xfire_setvalue(XFIRE_GAMEMODE, "Multiplayer"); -// xfire_setvalue(XFIRE_NICKNAME, ui.pageOptions->editNetNick->text().toAscii()); -// if(!host.compare("netserver.hedgewars.org")) -// xfire_setvalue(XFIRE_SERVER, "Official server"); -// else -// xfire_setvalue(XFIRE_SERVER, "Custom or local LAN server"); if(hwnet) { xfire_setvalue(XFIRE_SERVER, !hwnet->getHost().compare("netserver.hedgewars.org:46631") ? "Official server" : hwnet->getHost().toAscii()); @@ -253,6 +249,7 @@ } xfire_update(); } +#endif void HWForm::onFrontendFullscreen(bool value) { @@ -408,7 +405,9 @@ void HWForm::OnPageShown(quint8 id, quint8 lastid) { +#ifdef USE_XFIRE updateXfire(); +#endif if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) { QStringList tmNames = config->GetTeamsList(); TeamSelWidget* curTeamSelWidget; @@ -941,7 +940,9 @@ void HWForm::closeEvent(QCloseEvent *event) { +#ifdef USE_XFIRE xfire_free(); +#endif config->SaveOptions(); event->accept(); } diff -r 67815ee123d7 -r 0533562bc3a4 QTfrontend/xfire.h --- a/QTfrontend/xfire.h Wed Feb 17 19:50:22 2010 +0000 +++ b/QTfrontend/xfire.h Wed Feb 17 20:03:25 2010 +0000 @@ -24,6 +24,7 @@ #define USE_XFIRE #endif +#ifdef USE_XFIRE enum XFIRE_KEYS { XFIRE_STATUS = 0, @@ -33,16 +34,10 @@ XFIRE_KEY_COUNT, }; -#ifdef USE_XFIRE void xfire_init(void); void xfire_free(void); void xfire_setvalue(const XFIRE_KEYS status, const char *value); void xfire_update(void); -#else -#define xfire_init() /*xfire_init()*/ -#define xfire_free() /*xfire_free()*/ -#define xfire_setvalue(a, b) /*xfire_setvalue(a, b)*/ -#define xfire_update() /*xfire_update()*/ #endif #endif // XFIRE_H diff -r 67815ee123d7 -r 0533562bc3a4 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Wed Feb 17 19:50:22 2010 +0000 +++ b/hedgewars/CMakeLists.txt Wed Feb 17 20:03:25 2010 +0000 @@ -148,14 +148,11 @@ include_directories(${SDL_INCLUDE_DIR}) add_library (SDLmain STATIC SDLMain.m) -# set_target_properties(SDLmain PROPERTIES COMPILE_FLAGS "-mmacosx-version-min=${minimum_macosx} --sysroot=${CMAKE_OSX_SYSROOT} ") - #let's tell freepacal where to find libraries - set(pascal_compiler_flags "-k${CMAKE_BINARY_DIR}/misc/liblua/liblua.a" "-k-lreadline" ${pascal_compiler_flags}) #these are the dependencies for building a universal binary on Mac OS X foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build}) - set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list}) + set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}") add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" COMMAND "${pascal_compiler}" ARGS ${pascal_compiler_flags} -ohwengine.${build_arch} -P${build_arch} diff -r 67815ee123d7 -r 0533562bc3a4 hedgewars/LuaPas.pas --- a/hedgewars/LuaPas.pas Wed Feb 17 19:50:22 2010 +0000 +++ b/hedgewars/LuaPas.pas Wed Feb 17 20:03:25 2010 +0000 @@ -24,10 +24,10 @@ {$IFDEF DARWIN} LuaLibName = 'lua'; {$ELSE} - LuaLibName = 'lua5.1.so'; + LuaLibName = 'lua.so'; {$ENDIF} {$ELSE} - LuaLibName = 'lua5.1.dll'; + LuaLibName = 'lua.dll'; {$ENDIF} diff -r 67815ee123d7 -r 0533562bc3a4 misc/liblua/CMakeLists.txt --- a/misc/liblua/CMakeLists.txt Wed Feb 17 19:50:22 2010 +0000 +++ b/misc/liblua/CMakeLists.txt Wed Feb 17 20:03:25 2010 +0000 @@ -1,8 +1,24 @@ +file(GLOB lua_src *.c *.h) +set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) + IF(APPLE) - file(GLOB lua_src *.c *.h) set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") - set (build_type STATIC) + set(build_type STATIC) add_definitions(-DLUA_USE_LINUX) - add_library (lua ${build_type} ${lua_src}) ENDIF(APPLE) + +IF(WIN32) + set(build_type SHARED) + add_definitions(-DLUA_BUILD_AS_DLL) +ENDIF(WIN32) + +add_library (lua ${build_type} ${lua_src}) + +if(WIN32) + SET_TARGET_PROPERTIES(lua PROPERTIES PREFIX "") + install(TARGETS lua DESTINATION ${target_dir}) +endif(WIN32) + + + diff -r 67815ee123d7 -r 0533562bc3a4 project_files/hedgewars.pro --- a/project_files/hedgewars.pro Wed Feb 17 19:50:22 2010 +0000 +++ b/project_files/hedgewars.pro Wed Feb 17 20:03:25 2010 +0000 @@ -55,7 +55,10 @@ ../QTfrontend/teamselect.cpp ../QTfrontend/teamselhelper.cpp \ ../QTfrontend/togglebutton.cpp ../QTfrontend/ui_hwform.cpp \ ../QTfrontend/vertScrollArea.cpp ../QTfrontend/weaponItem.cpp \ - ../QTfrontend/xfire.cpp + +win32 { +SOURCES += ../QTfrontend/xfire.cpp +} TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_bg.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_de.ts diff -r 67815ee123d7 -r 0533562bc3a4 share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Wed Feb 17 19:50:22 2010 +0000 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Wed Feb 17 20:03:25 2010 +0000 @@ -12,14 +12,14 @@ FreqSpinBox Never - + Nikdy Every %1 turn - - - - + + Každý ťah + Každé %1 ťahy + Každých %1 ťahov @@ -169,23 +169,26 @@ registered on Hedgewars.org Please provide your password or pick another nickname: - + Vaša prezývka %1 je +zaregistrovaná na Hedgewars.org +Prosím, zadajte heslo alebo +si vyberte inú prezývku: %1 *** %2 has joined the room - + %1 *** %2 prišiel do miestnosti %1 *** %2 has joined - + %1 *** %2 sa pridal %1 *** %2 has left (%3) - + %1 *** %2 odišiel (%3) %1 *** %2 has left - + %1 *** %2 odišiel @@ -207,7 +210,7 @@ Clear Accounts Cache - + Vymazať vyrovnávaciu pamäť účtov @@ -236,18 +239,18 @@ <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - - - + + <p>Najlepším zabijákom je <b>%1</b> s <b>jedným</b> zabitím počas ťahu.</p> + <p>Najlepším zabijákom je <b>%1</b> s <b>%2</b> zabitiami počas ťahu.</p> + <p>Najlepším zabijákom je <b>%1</b> s <b>%2</b> zabitiami počas ťahu.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - - - + + <p>Celkovo bol v tomto kole zabitý <b>jeden</b> ježko.</p> + <p>Celkovo boli v tomto kole zabití <b>%1</b> ježkovia.</p> + <p>Celkovo boli v tomto kole zabití <b>%1</b> ježkovia.</p> @@ -376,52 +379,54 @@ Room Name: - + Názov miestnosti: This game is in lobby. You may join and start playing once the game starts. - + Táto hra je v lobby. +Môžete sa pridať a začať hru akonáhle hra skončí. This game is in progress. You may join and spectate now but you'll have to wait for the game to end to start playing. - + Táto hra práve prebieha. +Môžete sa pridať a sledovať hru, ale ak chcete hrať budete musieť počkať na koniec hry. %1 is the host. He may adjust settings and start the game. - + %1 je hostiteľom. Može meniť nastavenia a spúšťať hru. Random Map - + Náhodná mapa Games may be played on precreated or randomized maps. - + Hry môžu byť hrané na predvytvorených alebo náhodných mapách. The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - + Schéma hry určuje všeobecné voľby ako napríklad Dĺžka kola, Režim rýchlej smrti alebo Vampírizmus. The Weapon Scheme defines available weapons and their ammunition count. - + Schémy hry určuje dostupné zbrane a množstvo výzbroje. There are %1 clients connected to this room. - - - - + + K tejto miestnosti je pripojený jeden klient. + K tejto miestnosti sú pripojení %1 klienti. + K tejto miestnosti je pripojených %1 klientov. There are %1 teams participating in this room. - - - - + + V tejto miestnosti je jeden hrajúci team. + V tejto miestnosti sú %1 hrajúce teamy. + V tejto miestnosti je %1 hrajúcich teamov. @@ -497,11 +502,11 @@ Order of play is random instead of in room order. - + Poradie hrania je náhodné miesto poradia hráčov v miestnosti. Play with a King. If he dies, your side dies. - + Hra s Kráľom. Ak zomrie, vaša strana prehráva. @@ -566,14 +571,14 @@ Follow - + Nasledovať QCheckBox Check for updates at startup - + Kontrolovať aktualizácie pri štarte Fullscreen @@ -605,11 +610,11 @@ Frontend effects (requires restart) - + Efekty frontendu (vyžaduje reštart) Reduced quality - + Znížená kvalita @@ -846,11 +851,11 @@ Nickname - + Prezývka Please enter your nickname - + Prosím, zadajte vašu prezývku @@ -920,42 +925,42 @@ QTableWidget Room Name - + Názov miestnosti C - + C T - + T Owner - + Majiteľ Map - Mapa + Mapa Rules - + Pravidlá Weapons - + Zbrane SelWeaponWidget Weapon set - + Sada zbraní Probabilities - + Pravdepodobnosti @@ -1021,11 +1026,11 @@ Random Order - + Náhodné poradie King - + Kráľ @@ -1170,384 +1175,384 @@ zoom in - + priblíženie zoom out - + oddialenie reset zoom - + reštartovať priblíženie long jump - + dlhý skok high jump - + vysoký skok binds (categories) Basic controls - + Základné ovládanie Weapon controls - + Ovládanie zbraní Camera and cursor controls - + Ovládanie kurzora a kamery Other - Iné + Iné binds (descriptions) Move your hogs and aim: - + Presun ježka a mierenie: Traverse gaps and obstacles by jumping: - + Prekoná priepasti a prekážky skokom: Fire your selected weapon or trigger an utility item: - + Vypáli vami zvolenú zbraň alebo zapne nástroj: Pick a weapon or a target location under the cursor: - + Položí zbraň alebo vyberie cieľ v mieste pod kurzorom: Switch your currently active hog (if possible): - + Prepne vášho momentálne vybraného ježka (ak je to možné): Pick a weapon or utility item: - + Zodvihne zbraň alebo nástroj: Set the timer on bombs and timed weapons: - + Nastaví časovač na bombách a iných zbraniach s časovou rozbuškou: Move the camera to the active hog: - + Presunie kameru na aktívneho ježka: Move the cursor or camera without using the mouse: - + Presunie kurzor alebo kameru bez použitia myši: Modify the camera's zoom level: - + Zmeniť stupeň priblíženia kamery: Talk to your team or all participants: - + Umožní vám rozhovor s vašim teamom alebo všetkými účastníkmi hry: Pause, continue or leave your game: - + Pauza, pokračovanie alebo opustenie hry: Modify the game's volume while playing: - + Zmena hlasitosti v hre počas hrania: Toggle fullscreen mode: - + Prepne celoobrazovkový režim: Take a screenshot: - + Urobí snímok obrazovky: Toggle labels above hedgehogs: - + Prepnúť nápisy nad ježkami: binds (keys) Axis - + Os (Up) - + (Hore) (Down) - + (Dole) Hat - + Klobúk (Left) - + (Vľavo) (Right) - + (Vpravo) Button - + Tlačidlo Keyboard - + Klávesnica Mouse: Left button - + Myš: Ľavé tlačidlo Mouse: Middle button - + Myš: Prostredné tlačidlo Mouse: Right button - + Myš: Pravé tlačidlo Mouse: Wheel up - + Myš: Kolečko smerom nahor Mouse: Wheel down - + Myš: Kolečko smerom nadol Backspace - + Backspace Tab - + Tabulátor Clear - + Clear Return - + Enter Pause - + Pause Escape - + Escape Space - + Medzera Delete - Vymazať + Delete Numpad 0 - + Numpad 0 Numpad 1 - + Numpad 1 Numpad 2 - + Numpad 2 Numpad 3 - + Numpad 3 Numpad 4 - + Numpad 4 Numpad 5 - + Numpad 5 Numpad 6 - + Numpad 6 Numpad 7 - + Numpad 7 Numpad 8 - + Numpad 8 Numpad 9 - + Numpad 9 Numpad . - + Numpad . Numpad / - + Numpad / Numpad * - + Numpad * Numpad - - + Numpad - Numpad + - + Numpad + Enter - + Enter Equals - + Rovná sa Up - + Hore Down - + Dole Right - + Vpravo Left - + Vľavo Insert - + Insert Home - + Home End - + End Page up - + Page up Page down - + Page down Num lock - + Num lock Caps lock - + Caps lock Scroll lock - + Scroll lock Right shift - + Pravý shift Left shift - + Ľavý shift Right ctrl - + Pravý ctrl Left ctrl - + Ľavý ctrl Right alt - + Pravý alt Left alt - + Ľavý alt Right meta - + Pravý meta Left meta - + Ľavý meta A button - + Tlačidlo A B button - + Tlačidlo B X button - + Tlačidlo X Y button - + Tlačidlo Y LB button - + Tlačidlo LB RB button - + Tlačidlo RB Back button - + Tlačidlo Back Start button - + Tlačidlo Start Left stick - + Joystick doľava Right stick - + Joystick doprava Left stick (Right) @@ -1567,11 +1572,11 @@ Left trigger - + Ľavý prepínač Right trigger - + Pravý prepínač Right stick (Down) @@ -1591,7 +1596,7 @@ DPad - + DPad