Merge
authorunc0rr
Tue, 12 Mar 2013 23:45:26 +0400
changeset 8724 20df35007528
parent 8696 3479e99abed7 (current diff)
parent 8723 b08cc68a26a3 (diff)
child 8725 5529b353d025
Merge
share/hedgewars/Data/Locale/hedgewars_it.ts
--- a/CMakeLists.txt	Tue Mar 12 23:43:31 2013 +0400
+++ b/CMakeLists.txt	Tue Mar 12 23:45:26 2013 +0400
@@ -248,39 +248,41 @@
     endif()
 endif()
 
-list(APPEND pascal_flags ${fpflags_parsed}        # user flags
-                 "-vm4079,4080,4081"              # fpc output format
-                 "-B"                             # compile all units
-                 "-FE${PROJECT_BINARY_DIR}/bin"   # fpc output directory
-                 "-Fl${PROJECT_BINARY_DIR}/bin"   # fpc linking directory (win/unix)
-                 "-k-L${PROJECT_BINARY_DIR}/bin"  # ld linking directory (unix/osx)
-                 "-Cs2000000"                     # stack size
-                 "-vewnq"                         # fpc output verbosity
-                 "-dDEBUGFILE"                    # macro for engine output
+list(APPEND pascal_flags ${fpflags_parsed}            # user flags
+                 "-B"                                 # compile all units
+                 "-vm4079,4080,4081"                  # fpc verbosity output format
+                 "-FE${PROJECT_BINARY_DIR}/bin"       # fpc binaries output directory
+                 "-FU${PROJECT_BINARY_DIR}/hedgewars" # fpc units output directory
+                 "-Fl${PROJECT_BINARY_DIR}/bin"       # fpc linking directory (win/unix)
+                 "-Fi${PROJECT_BINARY_DIR}/hedgewars" # fpc .inc path (for out of source builds)
+                 "-k-L${PROJECT_BINARY_DIR}/bin"      # ld linking directory (unix/osx)
+                 "-Cs2000000"                         # stack size
+                 "-vewnq"                             # fpc output verbosity
+                 "-dDEBUGFILE"                        # macro for engine output
                  )
-list(APPEND haskell_flags ${ghflags_parsed}       # user flags
-                 "-O2"                            # optimise for faster code
+list(APPEND haskell_flags ${ghflags_parsed} # user flags
+                 "-O2"                      # optimise for faster code
                  )
 
 
 #get BUILD_TYPE and enable/disable optimisation
 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
-    list(APPEND pascal_flags "-O-"                # disable all optimisations
-                             "-g"                 # enable debug symbols
-                             "-gl"                # add line info to bt
-                             "-gv"                # allow valgrind
+    list(APPEND pascal_flags "-O-" # disable all optimisations
+                             "-g"  # enable debug symbols
+                             "-gl" # add line info to bt
+                             "-gv" # allow valgrind
                              )
-    list(APPEND haskell_flags "-Wall"             # all warnings
-                              "-debug"            # debug mode
-                              "-dcore-lint"       # internal sanity check
+    list(APPEND haskell_flags "-Wall"       # all warnings
+                              "-debug"      # debug mode
+                              "-dcore-lint" # internal sanity check
                               )
 else()
-    list(APPEND pascal_flags "-Os"                # optimise for size
-                             "-Xs"                # strip binary
-                             "-Si"                # turn on inlining
+    list(APPEND pascal_flags "-Os" # optimise for size
+                             "-Xs" # strip binary
+                             "-Si" # turn on inlining
                              )
-    list(APPEND haskell_flags "-w"                # no warnings
+    list(APPEND haskell_flags "-w" # no warnings
                               )
 endif()
 
@@ -361,95 +363,5 @@
 endif()
 
 
-
-# CPack variables
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a free turn-based strategy")
-set(CPACK_PACKAGE_VENDOR "Hedgewars Project")
-set(CPACK_PACKAGE_FILE_NAME "hedgewars-${HEDGEWARS_VERSION}")
-set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${HEDGEWARS_VERSION}")
-set(CPACK_SOURCE_GENERATOR "TBZ2")
-set(CPACK_PACKAGE_EXECUTABLES "hedgewars" "hedgewars")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${HEDGEWARS_VERSION}")
-
-if(WIN32 AND NOT UNIX)
-    set(CPACK_NSIS_DISPLAY_NAME "Hedgewars")
-    set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/")
-    set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/")
-    set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com")
-    set(CPACK_NSIS_MODIFY_PATH OFF)
-    set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${target_binary_install_dir}")
-    set(CPACK_GENERATOR "ZIP;NSIS")
-    set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars")
-else(WIN32 AND NOT UNIX)
-    set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine")
-endif(WIN32 AND NOT UNIX)
+include(${CMAKE_MODULE_PATH}/CPackConfig.cmake)
 
-set(CPACK_SOURCE_IGNORE_FILES
-    #temporary files
-    "~"
-    ".swp"
-    #version control
-    "\\\\.hg"
-    #output binary/library
-    "\\\\.exe$"
-    "\\\\.a$"
-    "\\\\.so$"
-    "\\\\.dylib$"
-    "\\\\.dll$"
-    "\\\\.ppu$"
-    "\\\\.o$"
-    "\\\\.cxx$"
-    #graphics
-    "\\\\.xcf$"
-    "\\\\.svg$"
-    "\\\\.svgz$"
-    "\\\\.psd$"
-    "\\\\.sifz$"
-    #misc
-    "\\\\.core$"
-    "\\\\.sh$"
-    "\\\\.orig$"
-    "\\\\.layout$"
-    "\\\\.db$"
-    "\\\\.dof$"
-    #archives
-    "\\\\.zip$"
-    "\\\\.gz$"
-    "\\\\.bz2$"
-    "\\\\.tmp$"
-    #cmake-configured files
-    "hwconsts\\\\.cpp$"
-    "config\\\\.inc$"
-    "hwengine\\\\.desktop$"
-    "Info\\\\.plist$"
-    #other cmake generated files
-    "Makefile"
-    "Doxyfile"
-    "CMakeFiles"
-    "[dD]ebug$"
-    "[rR]elease$"
-    "CPack"
-    "cmake_install\\\\.cmake$"
-    "CMakeCache\\\\.txt$"
-#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor"
-#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype"
-#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/frontlib"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/promotional_art"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/cmdlineClient"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/bin/checkstack*"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/doc"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/templates"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/tmp"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/utils"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Maps/test"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/install_manifest.txt"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt"
-    "^${CMAKE_CURRENT_SOURCE_DIR}/hedgewars\\\\."
-)
-
-include(CPack)
-
--- a/QTfrontend/HWApplication.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/HWApplication.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -20,28 +20,79 @@
 #include <QFileOpenEvent>
 
 #include "hwform.h"
+#include "MessageDialog.h"
+
+#if !defined(Q_WS_WIN)
+#include "signal.h"
+#endif
+
+#if !defined(Q_WS_WIN)
+void terminateFrontend(int signal)
+{
+    Q_UNUSED(signal);
+    QCoreApplication::exit(0);
+}
+#endif
 
 HWApplication::HWApplication(int &argc,  char **argv):
     QApplication(argc, argv)
 {
+#if !defined(Q_WS_WIN)
+    signal(SIGINT, &terminateFrontend);
+#endif
+#if 0
+    qDebug("%s called with", argv[0]);
+    for (int i = 1; i < argc; i++)
+        qDebug("%d: %s", i, argv[i]);
+#endif
+    // on Windows, sending an event right away leads to a segfault
+    // so we use urlString to save the data and send the event just before the app.exec()
+    urlString = NULL;
+    if (argc > 1) {
+        urlString = new QString(argv[1]);
+        if (urlString->contains("//", Qt::CaseInsensitive) == false) {
+            delete urlString;
+            urlString = NULL;
+        }
+    }
+}
 
+void HWApplication::fakeEvent()
+{
+    QUrl parsedUrl(*urlString);
+    delete urlString;
+    urlString = NULL;
+    QFileOpenEvent *openEvent = new QFileOpenEvent(parsedUrl);
+    QCoreApplication::sendEvent(QCoreApplication::instance(), openEvent);
 }
 
 bool HWApplication::event(QEvent *event)
 {
     QFileOpenEvent *openEvent;
+    QString scheme, path, address;
 
-    switch (event->type())
-    {
-        case QEvent::FileOpen:
-            openEvent = (QFileOpenEvent *)event;
-            if (form) form->PlayDemoQuick(openEvent->file());
+    if (event->type() == QEvent::FileOpen) {
+        openEvent = (QFileOpenEvent *)event;
+        scheme = openEvent->url().scheme();
+        path = openEvent->url().path();
+        address = openEvent->url().host();
+
+        QFile file(path);
+        if (scheme == "file" && file.exists()) {
+            form->PlayDemoQuick(path);
             return true;
-            break;
-        default:
-            return QApplication::event(event);
-            break;
+        } else if (scheme == "hwplay") {
+            int port = openEvent->url().port(NETGAME_DEFAULT_PORT);
+            form->NetConnectQuick(address, (quint16) port);
+            return true;
+        } else {
+            const QString errmsg = tr("Scheme '%1' not supported").arg(scheme);
+            MessageDialog::ShowErrorMessage(errmsg, form);
+            return false;
+        }
     }
+
+    return QApplication::event(event);
 }
 
 
--- a/QTfrontend/HWApplication.h	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/HWApplication.h	Tue Mar 12 23:45:26 2013 +0400
@@ -41,6 +41,8 @@
         ~HWApplication() {};
 
         HWForm *form;
+        QString *urlString;
+        void fakeEvent();
     protected:
         bool event(QEvent *);
 };
--- a/QTfrontend/hwform.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/hwform.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -994,15 +994,21 @@
 
 void HWForm::PlayDemoQuick(const QString & demofilename)
 {
-    if (game && game->gameState == gsStarted) return;
-    GoBack(); //needed to cleanly disconnect from netgame
     GoToPage(ID_PAGE_MAIN);
+    //GoBack() <- don't or you'll close the socket
     CreateGame(0, 0, 0);
     game->PlayDemo(demofilename, false);
 }
 
+void HWForm::NetConnectQuick(const QString & host, quint16 port)
+{
+    GoToPage(ID_PAGE_MAIN);
+    NetConnectServer(host, port);
+}
+
 void HWForm::NetConnectServer(const QString & host, quint16 port)
 {
+    qDebug("connecting to %s:%d", qPrintable(host), port);
     _NetConnect(host, port, ui.pageOptions->editNetNick->text().trimmed());
 }
 
@@ -1098,10 +1104,14 @@
     if (!ok || newNick.isEmpty())
     {
         //ForcedDisconnect(tr("No nickname supplied."));
-    bool retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied."));
-    GoBack();
+        bool retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied."));
+        GoBack();
         if (retry) {
-            NetConnectOfficialServer();
+            if (hwnet->m_private_game) {
+                QStringList list = hwnet->getHost().split(":");
+                NetConnectServer(list.at(0), list.at(1).toShort());
+            } else
+                NetConnectOfficialServer();
         }
         return;
     }
@@ -1184,11 +1194,11 @@
 {
     Q_UNUSED(nick);
 
-    if(hwnet)
-    {
+    if (hwnet) {
+        // destroy old connection
         hwnet->Disconnect();
         delete hwnet;
-        hwnet=0;
+        hwnet = NULL;
     }
 
     hwnet = new HWNewNet();
@@ -1332,8 +1342,22 @@
     connect(ui.pageNetGame->pGameCFG, SIGNAL(paramChanged(const QString &, const QStringList &)), hwnet, SLOT(onParamChanged(const QString &, const QStringList &)));
     connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig()));
 
-//nick and pass stuff
+    //nick and pass stuff
+    QString nickname = config->value("net/nick", "").toString();
+
+    hwnet->m_private_game = !(hostName == "netserver.hedgewars.org" && port == NETGAME_DEFAULT_PORT);
+    if (hwnet->m_private_game == false)
+        if (AskForNickAndPwd() != 0)
+            return;
 
+    ui.pageRoomsList->setUser(nickname);
+    ui.pageNetGame->setUser(nickname);
+
+    hwnet->Connect(hostName, port, nickname);
+}
+
+int HWForm::AskForNickAndPwd(void)
+{
     //remove temppasswordhash just in case
     config->clearTempHash();
 
@@ -1364,7 +1388,7 @@
             if (pwDialog->exec() != QDialog::Accepted) {
                 delete pwDialog;
                 GoBack();
-                return;
+                return -1;
             }
 
             //set nick and pass from the dialog
@@ -1377,9 +1401,13 @@
                 GoBack();
                 delete pwDialog;
                 if (retry) {
-                    NetConnectOfficialServer();
-                }
-                return;
+                    if (hwnet->m_private_game) {
+                        QStringList list = hwnet->getHost().split(":");
+                        NetConnectServer(list.at(0), list.at(1).toShort());
+                    } else
+                        NetConnectOfficialServer();
+                    }
+                return -1;
             }
 
             if (!password.isEmpty()) {
@@ -1416,15 +1444,9 @@
             nickname = config->value("net/nick", "").toString();
         }
     }
-
-    ui.pageRoomsList->setUser(nickname);
-    ui.pageNetGame->setUser(nickname);
-
-    hwnet->Connect(hostName, port, nickname);
+    return 0;
 }
 
-
-
 void HWForm::NetConnect()
 {
     HWHostPortDialog * hpd = new HWHostPortDialog(this);
@@ -1492,7 +1514,11 @@
     if (reason == "Reconnected too fast") { //TODO: this is a hack, which should be remade
         bool retry = RetryDialog(tr("Hedgewars - Connection error"), tr("You reconnected too fast.\nPlease wait a few seconds and try again."));
         if (retry) {
-            NetConnectOfficialServer();
+            if (hwnet->m_private_game) {
+                QStringList list = hwnet->getHost().split(":");
+                NetConnectServer(list.at(0), list.at(1).toShort());
+            } else
+                NetConnectOfficialServer();
         }
         else {
             while (ui.Pages->currentIndex() != ID_PAGE_NET
@@ -1505,8 +1531,7 @@
     }
     if (pnetserver)
         return; // we have server - let it care of all things
-    if (hwnet)
-    {
+    if (hwnet) {
         QString errorStr = QMessageBox::tr("Connection to server is lost") + (reason.isEmpty()?"":("\n\n" + HWNewNet::tr("Quit reason: ") + '"' + reason +'"'));
         MessageDialog::ShowErrorMessage(errorStr, this);
     }
@@ -1891,6 +1916,8 @@
     QString arguments = getDemoArguments();
 #ifdef _WIN32
     QSettings registry_hkcr("HKEY_CLASSES_ROOT", QSettings::NativeFormat);
+
+    // file extension(s)
     registry_hkcr.setValue(".hwd/Default", "Hedgewars.Demo");
     registry_hkcr.setValue(".hws/Default", "Hedgewars.Save");
     registry_hkcr.setValue("Hedgewars.Demo/Default", tr("Hedgewars Demo File", "File Types"));
@@ -1899,6 +1926,12 @@
     registry_hkcr.setValue("Hedgewars.Save/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwsfile.ico\",0");
     registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" " + arguments + " %1");
     registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" " + arguments + " %1");
+
+    // custom url scheme(s)
+    registry_hkcr.setValue("hwplay/Default", "\"URL:Hedgewars ServerAccess Protocol\"");
+    registry_hkcr.setValue("hwplay/URL Protocol", "");
+    registry_hkcr.setValue("hwplay/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hedgewars.exe\",0");
+    registry_hkcr.setValue("hwplay/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hedgewars.exe\"  %1");
 #elif defined __APPLE__
     // only useful when other apps have taken precedence over our file extensions and you want to reset it
     system("defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerContentTag</key><string>hwd</string><key>LSHandlerContentTagClass</key><string>public.filename-extension</string><key>LSHandlerRoleAll</key><string>org.hedgewars.desktop</string></dict>'");
--- a/QTfrontend/hwform.h	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/hwform.h	Tue Mar 12 23:45:26 2013 +0400
@@ -62,12 +62,14 @@
         Ui_HWForm ui;
         static GameUIConfig * config;
         void updateXfire();
-        void PlayDemoQuick(const QString & demofilename);
         void exit();
         void setButtonDescription(QString desc);
         void backDescription();
         void GoToVideos();
 
+        void NetConnectQuick(const QString & host, quint16 port);
+        void PlayDemoQuick(const QString & demofilename);
+
     private slots:
         void GoToSaves();
         void GoToDemos();
@@ -143,6 +145,7 @@
 
     private:
         void _NetConnect(const QString & hostName, quint16 port, QString nick);
+        int  AskForNickAndPwd(void);
         void UpdateTeamsLists();
         void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
         void closeEvent(QCloseEvent *event);
--- a/QTfrontend/main.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/main.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -42,9 +42,6 @@
 #elif defined __APPLE__
 #include "CocoaInitializer.h"
 #endif
-#ifndef _WIN32
-#include <signal.h>
-#endif
 
 // Program resources
 #ifdef __APPLE__
@@ -94,14 +91,7 @@
     else
         season = SEASON_NONE;
 }
-#ifndef _WIN32
-void terminateFrontend(int signal)
-{
-    Q_UNUSED(signal);
 
-    QCoreApplication::exit(0);
-}
-#endif
 
 bool checkForDir(const QString & dir)
 {
@@ -147,10 +137,6 @@
     cocoaInit = new CocoaInitializer(); // Creates the autoreleasepool preventing cocoa object leaks on OS X.
 #endif
 
-#ifndef _WIN32
-    signal(SIGINT, &terminateFrontend);
-#endif
-
     HWApplication app(argc, argv);
 
     QLabel *splash = NULL;
@@ -352,5 +338,7 @@
     app.form->show();
     if(splash)
         splash->close();
+    if (app.urlString)
+        app.fakeEvent();
     return app.exec();
 }
--- a/QTfrontend/net/newnetclient.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -311,7 +311,7 @@
         QStringList tmp = lst;
         tmp.removeFirst();
         m_roomsListModel->setRoomsList(tmp);
-        if (m_nick_registered == false)
+        if (m_private_game == false && m_nick_registered == false)
         {
             emit NickNotRegistered(mynick);
         }
--- a/QTfrontend/net/newnetclient.h	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/net/newnetclient.h	Tue Mar 12 23:45:26 2013 +0400
@@ -61,6 +61,7 @@
         QAbstractItemModel * lobbyPlayersModel();
         QAbstractItemModel * roomPlayersModel();
         bool allPlayersReady();
+        bool m_private_game;
 
     private:
         bool isChief;
--- a/QTfrontend/ui/page/pagemain.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/ui/page/pagemain.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -120,6 +120,8 @@
 void PageMain::connectSignals()
 {
     connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
+    connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
+    connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
     // TODO: add signal-forwarding required by (currently missing) encapsulation
 }
 
--- a/QTfrontend/ui/widget/feedbackdialog.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -30,6 +30,7 @@
 #include <QProcess>
 #include <QMessageBox>
 #include <QCheckBox>
+#include <QByteArray>
 
 #include <string>
 
@@ -194,7 +195,7 @@
     QString screen_size = "Size of the screen(s): " +
         QString::number(screen->width()) + "x" + QString::number(screen->height()) + "\n";
     QString number_of_screens = "Number of screens: " + QString::number(screen->screenCount()) + "\n";
-    std::string processor_name = "Processor: ";
+    QString processor_name = "Processor: ";
 
     // platform specific code
 #ifdef Q_WS_MACX
@@ -245,6 +246,7 @@
         case QSysInfo::WV_XP: os_version += "Windows XP\n"; break;
         case QSysInfo::WV_VISTA: os_version += "Windows Vista\n"; break;
         case QSysInfo::WV_WINDOWS7: os_version += "Windows 7\n"; break;
+        //case QSysInfo::WV_WINDOWS8: os_version += "Windows 8\n"; break; //QT 5+
         default: os_version += "Windows (Unknown version)\n"; break;
     }
     kernel_line += "Windows kernel\n";
@@ -282,26 +284,27 @@
     asm volatile
       ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3])
        : "a" (i), "c" (0));
-    processor_name += std::string((const char *)&registers[0], 4);
-    processor_name += std::string((const char *)&registers[1], 4);
-    processor_name += std::string((const char *)&registers[2], 4);
-    processor_name += std::string((const char *)&registers[3], 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[0]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[1]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[2]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[3]), 4);
     i = 0x80000003;
     asm volatile
       ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3])
        : "a" (i), "c" (0));
-    processor_name += std::string((const char *)&registers[0], 4);
-    processor_name += std::string((const char *)&registers[1], 4);
-    processor_name += std::string((const char *)&registers[2], 4);
-    processor_name += std::string((const char *)&registers[3], 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[0]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[1]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[2]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[3]), 4);
     i = 0x80000004;
     asm volatile
       ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3])
        : "a" (i), "c" (0));
-    processor_name += std::string((const char *)&registers[0], 4);
-    processor_name += std::string((const char *)&registers[1], 4);
-    processor_name += std::string((const char *)&registers[2], 4);
-    processor_name += std::string((const char *)&registers[3], 3);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[0]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[1]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[2]), 4);
+    processor_name += QByteArray(reinterpret_cast<char*>(&registers[3]), 4);
+    processor_name += "\n";
 #else
     processor_name += "Unknown";
 #endif
@@ -324,9 +327,7 @@
         + total_ram
         + screen_size
         + number_of_screens
-#ifndef QT_NO_STL
-        + QString::fromStdString(processor_name + "\n")
-#endif
+        + processor_name
         + number_of_cores
         + compiler_version
         + compiler_bits
--- a/QTfrontend/ui/widget/mapContainer.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -216,7 +216,7 @@
     mazeStyles = new QListWidget();
     new QListWidgetItem(tr("Small tunnels"), mazeStyles);
     new QListWidgetItem(tr("Medium tunnels"), mazeStyles);
-    new QListWidgetItem(tr("Largetunnels"), mazeStyles);
+    new QListWidgetItem(tr("Large tunnels"), mazeStyles);
     new QListWidgetItem(tr("Small islands"), mazeStyles);
     new QListWidgetItem(tr("Medium islands"), mazeStyles);
     new QListWidgetItem(tr("Large islands"), mazeStyles);
--- a/QTfrontend/util/FileEngine.cpp	Tue Mar 12 23:43:31 2013 +0400
+++ b/QTfrontend/util/FileEngine.cpp	Tue Mar 12 23:45:26 2013 +0400
@@ -327,12 +327,12 @@
 
 void FileEngineHandler::mount(const QString &path)
 {
-    PHYSFS_mount(path.toUtf8().constData(), NULL, 1);
+    PHYSFS_mount(path.toUtf8().constData(), NULL, 0);
 }
 
 void FileEngineHandler::mount(const QString & path, const QString & mountPoint)
 {
-    PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 1);
+    PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 0);
 }
 
 void FileEngineHandler::setWriteDir(const QString &path)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/CPackConfig.cmake	Tue Mar 12 23:45:26 2013 +0400
@@ -0,0 +1,99 @@
+
+# revision information in cpack-generated names
+if(CMAKE_BUILD_TYPE MATCHES DEBUG)
+    set(full_suffix "${HEDGEWARS_VERSION}-r${HEDGEWARS_REVISION}")
+else()
+    set(full_suffix "${HEDGEWARS_VERSION}")
+endif()
+
+# CPack variables
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a free turn-based strategy game")
+set(CPACK_PACKAGE_VENDOR "Hedgewars Project")
+set(CPACK_PACKAGE_FILE_NAME "Hedgewars-${full_suffix}")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${full_suffix}")
+set(CPACK_SOURCE_GENERATOR "TBZ2")
+set(CPACK_PACKAGE_EXECUTABLES "hedgewars" "Hedgewars")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${full_suffix}")
+set(CPACK_STRIP_FILES true)
+
+if(WIN32 AND NOT UNIX)
+    set(CPACK_NSIS_DISPLAY_NAME "Hedgewars")
+    set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/")
+    set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/")
+    set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com")
+    set(CPACK_NSIS_MODIFY_PATH OFF)
+    set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${target_binary_install_dir}")
+    set(CPACK_NSIS_MUI_FINISHPAGE_RUN "hedgewars${CMAKE_EXECUTABLE_SUFFIX}")
+    set(CPACK_GENERATOR "ZIP;NSIS")
+    set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars")
+endif(WIN32 AND NOT UNIX)
+
+set(CPACK_SOURCE_IGNORE_FILES
+    #temporary files
+    "~"
+    ".swp"
+    #version control
+    "\\\\.hg"
+    #output binary/library
+    "\\\\.exe$"
+    "\\\\.a$"
+    "\\\\.so$"
+    "\\\\.dylib$"
+    "\\\\.dll$"
+    "\\\\.ppu$"
+    "\\\\.o$"
+    "\\\\.cxx$"
+    #graphics
+    "\\\\.xcf$"
+    "\\\\.svg$"
+    "\\\\.svgz$"
+    "\\\\.psd$"
+    "\\\\.sifz$"
+    #misc
+    "\\\\.core$"
+    "\\\\.sh$"
+    "\\\\.orig$"
+    "\\\\.layout$"
+    "\\\\.db$"
+    "\\\\.dof$"
+    #archives
+    "\\\\.zip$"
+    "\\\\.gz$"
+    "\\\\.bz2$"
+    "\\\\.tmp$"
+    #cmake-configured files
+    "hwconsts\\\\.cpp$"
+    "config\\\\.inc$"
+    "hwengine\\\\.desktop$"
+    "Info\\\\.plist$"
+    #other cmake generated files
+    "Makefile"
+    "Doxyfile"
+    "CMakeFiles"
+    "[dD]ebug$"
+    "[rR]elease$"
+    "CPack"
+    "cmake_install\\\\.cmake$"
+    "CMakeCache\\\\.txt$"
+#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor"
+#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype"
+#    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/frontlib"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/promotional_art"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/cmdlineClient"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/bin/checkstack*"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/doc"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/templates"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/tmp"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/utils"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Maps/test"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/install_manifest.txt"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt"
+    "^${CMAKE_CURRENT_SOURCE_DIR}/hedgewars\\\\."
+)
+
+include(CPack)
+
--- a/hedgewars/CMakeLists.txt	Tue Mar 12 23:43:31 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Tue Mar 12 23:45:26 2013 +0400
@@ -17,15 +17,15 @@
 endif()
 
 
-configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
 
 #SOURCE AND PROGRAMS SECTION
 if(${BUILD_ENGINE_LIBRARY})
     set(engine_output_name "${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
-    set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas)
+    set(hwengine_project hwLibrary.pas)
 else()
     set(engine_output_name "hwengine${CMAKE_EXECUTABLE_SUFFIX}")
-    set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas)
+    set(hwengine_project hwengine.pas)
 endif()
 
 if (APPLE)
@@ -167,7 +167,8 @@
 
 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
 if(PNG_FOUND)
-    list(APPEND pascal_flags "-dPNG_SCREENSHOTS")
+    list(REMOVE_AT PNG_INCLUDE_DIR 1) #removing the zlib include path
+    list(APPEND pascal_flags "-dPNG_SCREENSHOTS -Fl${PNG_INCLUDE_DIR}")
 endif()
 
 
@@ -179,7 +180,7 @@
     else()
         set(SAFE_BUILD_TOOL ${CMAKE_BUILD_TOOL})
     endif()
-    add_custom_target(ENGINECLEAN COMMAND ${SAFE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
+    add_custom_target(ENGINECLEAN COMMAND ${SAFE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
 endif()
 
 
@@ -209,8 +210,8 @@
     add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}"
         COMMAND "${FREEPASCAL_EXECUTABLE}"
         ARGS ${fpc_flags} -o${engine_output_name}
-        MAIN_DEPENDENCY ${hwengine_project}
         DEPENDS ${engine_sources}
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         )
 else()
     #these are the dependencies for building a universal binary on Mac OS X
@@ -219,8 +220,8 @@
         add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}"
             COMMAND "${FREEPASCAL_EXECUTABLE}"
             ARGS ${fpc_flags} -ohwengine.${build_arch} -P${build_arch}
-            MAIN_DEPENDENCY ${hwengine_project}
             DEPENDS ${engine_sources}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             )
         add_custom_target(hwengine.${build_arch} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}")
         add_custom_command(TARGET hwengine.${build_arch} POST_BUILD
--- a/hedgewars/PNGh.pas	Tue Mar 12 23:43:31 2013 +0400
+++ b/hedgewars/PNGh.pas	Tue Mar 12 23:45:26 2013 +0400
@@ -23,11 +23,6 @@
 
 uses png;
 
-{$IFDEF FPC}
-    {$PACKRECORDS C}
-{$ELSE}
-    {$DEFINE cdecl attribute(cdecl)}
-{$ENDIF}
 
 {$IFDEF DARWIN}
     {$linklib png}
--- a/hedgewars/uPhysFSLayer.pas	Tue Mar 12 23:43:31 2013 +0400
+++ b/hedgewars/uPhysFSLayer.pas	Tue Mar 12 23:45:26 2013 +0400
@@ -143,9 +143,9 @@
     i:= PHYSFS_init(Str2PChar(cPhysfsId));
     AddFileLog('[PhysFS] init: ' + inttostr(i));
 
-    i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, true);
+    i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, false);
     AddFileLog('[PhysFS] mount ' + PathPrefix + ': ' + inttostr(i));
-    i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/Data'), nil, true);
+    i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/Data'), nil, false);
     AddFileLog('[PhysFS] mount ' + UserPathPrefix + '/Data: ' + inttostr(i));
 
     hedgewarsMountPackages;
--- a/hedgewars/uStats.pas	Tue Mar 12 23:43:31 2013 +0400
+++ b/hedgewars/uStats.pas	Tue Mar 12 23:45:26 2013 +0400
@@ -40,6 +40,7 @@
 
 var DamageClan  : Longword = 0;
     DamageTotal : Longword = 0;
+    DamageTurn  : Longword = 0;
     KillsClan   : LongWord = 0;
     Kills       : LongWord = 0;
     KillsTotal  : LongWord = 0;
@@ -82,7 +83,8 @@
         inc(KillsClan);
     end;
 
-inc(DamageTotal, Damage)
+inc(DamageTotal, Damage);
+inc(DamageTurn, Damage)
 end;
 
 procedure Skipped;
@@ -112,7 +114,7 @@
         end
 
     else if DamageClan <> 0 then
-        if DamageTotal > DamageClan then
+        if DamageTurn > DamageClan then
             if random(2) = 0 then
                 AddVoice(sndNutter, CurrentTeam^.voicepack)
             else
@@ -170,6 +172,7 @@
 Kills:= 0;
 KillsClan:= 0;
 DamageClan:= 0;
+DamageTurn:= 0;
 AmmoUsedCount:= 0;
 AmmoDamagingUsed:= false;
 isTurnSkipped:= false
--- a/hedgewars/uVideoRec.pas	Tue Mar 12 23:43:31 2013 +0400
+++ b/hedgewars/uVideoRec.pas	Tue Mar 12 23:45:26 2013 +0400
@@ -31,6 +31,7 @@
     {$linklib avcodec}
     {$linklib avformat}
     {$linklib avutil}
+    {$linklib avwrapper}
 {$ENDIF}
 
 interface
--- a/misc/libphyslayer/hwpacksmounter.c	Tue Mar 12 23:43:31 2013 +0400
+++ b/misc/libphyslayer/hwpacksmounter.c	Tue Mar 12 23:45:26 2013 +0400
@@ -24,7 +24,7 @@
                     strcat(fullPath, "/");
                     strcat(fullPath, fileName);
 
-                    PHYSFS_mount(fullPath, NULL, 1);
+                    PHYSFS_mount(fullPath, NULL, 0);
 
                     free(fullPath);
                 }
--- a/project_files/hedgewars.pro	Tue Mar 12 23:43:31 2013 +0400
+++ b/project_files/hedgewars.pro	Tue Mar 12 23:45:26 2013 +0400
@@ -10,8 +10,8 @@
 INCLUDEPATH += ../QTfrontend/net
 INCLUDEPATH += ../QTfrontend/util
 INCLUDEPATH += ../QTfrontend/util/platform
-INCLUDEPATH += ../misc/physfs/src
-INCLUDEPATH += ../misc/physfs/extras
+INCLUDEPATH += ../misc/libphysfs
+INCLUDEPATH += ../misc/libphyslayer
 
 DESTDIR = ../bin
 
--- a/share/Info.plist.in	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/Info.plist.in	Tue Mar 12 23:45:26 2013 +0400
@@ -25,7 +25,7 @@
     <key>NSHumanReadableCopyright</key>
     <string>Copyright © 2004-2012, Hedgewars Project</string>
     <key>NSAppleScriptEnabled</key>
-    <false/>
+    <true/>
     <key>LSRequiresNativeExecution</key>
     <true/>
     <key>LSMinimumSystemVersionByArchitecture</key>
@@ -156,5 +156,21 @@
             <string>Viewer</string>
         </dict>
     </array>
+    <key>CFBundleURLTypes</key>
+    <array>
+        <dict>
+            <key>CFBundleURLName</key>
+            <string>Hedgewars URIs</string>
+            <key>CFBundleURLSchemes</key>
+            <array>
+            <!--
+                <string>hwd</string>
+                <string>hws</string>
+                <string>hwdlc</string>
+            -->
+                <string>hwplay</string>
+            </array>
+        </dict>
+    </array>
 </dict>
 </plist>
--- a/share/hedgewars/Data/Locale/hedgewars_ar.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -414,10 +414,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -461,6 +457,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_bg.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_cs.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -419,10 +419,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -466,6 +462,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_da.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_da.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -417,10 +417,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -464,6 +460,10 @@
         <source>All files</source>
         <translation type="unfinished">Alle filer</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -417,10 +417,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -464,6 +460,10 @@
         <source>All files</source>
         <translation type="unfinished">Alle Dateien</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_el.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_el.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -415,10 +415,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -462,6 +458,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_en.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_es.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_es.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -417,10 +417,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -464,6 +460,10 @@
         <source>All files</source>
         <translation type="unfinished">Todos los ficheros</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fi.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fr.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_gl.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_hu.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -407,10 +407,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -454,6 +450,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_it.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -427,10 +427,6 @@
         <translation>Modifica disegno mappa</translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation>Gallerie grandi</translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation>Isole piccole</translation>
     </message>
@@ -474,6 +470,10 @@
         <source>All files</source>
         <translation>Tutti i file</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ja.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -407,10 +407,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -454,6 +450,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ko.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -407,10 +407,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -454,6 +450,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_lt.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -500,7 +500,7 @@
     </message>
     <message>
         <location filename="../../../../QTfrontend/ui/widget/mapContainer.cpp" line="219"/>
-        <source>Largetunnels</source>
+        <source>Large tunnels</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
--- a/share/hedgewars/Data/Locale/hedgewars_ms.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -488,7 +488,7 @@
     </message>
     <message>
         <location filename="../../../../QTfrontend/ui/widget/mapContainer.cpp" line="219"/>
-        <source>Largetunnels</source>
+        <source>Large tunnels</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
--- a/share/hedgewars/Data/Locale/hedgewars_nl.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -413,10 +413,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,6 +456,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pl.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -424,10 +424,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -471,6 +467,10 @@
         <source>All files</source>
         <translation type="unfinished">Wszystkie pliki</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -414,10 +414,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -461,6 +457,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -418,10 +418,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -465,6 +461,10 @@
         <source>All files</source>
         <translation type="unfinished">Todos os ficheiros</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ro.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -419,10 +419,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -466,6 +462,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ru.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -424,10 +424,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -471,6 +467,10 @@
         <source>All files</source>
         <translation type="unfinished">Все файлы</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sk.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -423,10 +423,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -470,6 +466,10 @@
         <source>All files</source>
         <translation type="unfinished">Všetky súbory</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sv.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -417,10 +417,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -464,6 +460,10 @@
         <source>All files</source>
         <translation type="unfinished">Alla filer</translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -407,10 +407,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -454,6 +450,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_uk.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -423,10 +423,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -470,6 +466,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -503,7 +503,7 @@
     </message>
     <message>
         <location filename="../../../../QTfrontend/ui/widget/mapContainer.cpp" line="219"/>
-        <source>Largetunnels</source>
+        <source>Large tunnels</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts	Tue Mar 12 23:45:26 2013 +0400
@@ -407,10 +407,6 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Largetunnels</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Small islands</source>
         <translation type="unfinished"></translation>
     </message>
@@ -454,6 +450,10 @@
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Large tunnels</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>HWNetServersModel</name>
--- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Tue Mar 12 23:43:31 2013 +0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Tue Mar 12 23:45:26 2013 +0400
@@ -82,8 +82,8 @@
 -- derp, script follows
 -------------------------------
 
-loadfile(GetDataPath() .. "Scripts/Locale.lua")()
-loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Tracker.lua")
 
 local airWeapons = 	{amAirAttack, amMineStrike, amNapalm, amDrillStrike --[[,amPiano]]}
 
--- a/tools/CreateMacBundle.cmake.in	Tue Mar 12 23:43:31 2013 +0400
+++ b/tools/CreateMacBundle.cmake.in	Tue Mar 12 23:45:26 2013 +0400
@@ -7,9 +7,9 @@
 
 if(NOT ${NOVIDEOREC})
     # but macdeployqt will not work for 'hwengine'; luckily the dylibs were already updated before
-    execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVCODEC} @executable_path/../Frameworks/libavcodec.dylib ${engine_full_path})
-    execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVFORMAT} @executable_path/../Frameworks/libavformat.dylib ${engine_full_path})
-    execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVUTIL} @executable_path/../Frameworks/libavutil.dylib ${engine_full_path})
+    execute_process(COMMAND install_name_tool -change ${LIBAVCODEC_LIBRARY} @executable_path/../Frameworks/libavcodec.dylib ${engine_full_path})
+    execute_process(COMMAND install_name_tool -change ${LIBAVFORMAT_LIBRARY} @executable_path/../Frameworks/libavformat.dylib ${engine_full_path})
+    execute_process(COMMAND install_name_tool -change ${LIBAVUTIL_LIBRARY} @executable_path/../Frameworks/libavutil.dylib ${engine_full_path})
 endif()
 
 if(NOT ${NOPNG})