From c05220038d50f26cb5da03b13b82372297f99c83 Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 17:09:25 -0400
Subject: Fix portability problems in bin/createpackage.pl.

* Use File::Spec functions to manipulate path components.
* Keep $targetplatform lower case for case sensitive systems.

Signed-off-by: axis <qt-info@nokia.com>
---
 bin/createpackage.pl | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 4597b04..3480702 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -145,10 +145,8 @@ my $signed_sis_name = $pkgoutputbasename.".sis";
 # Store some utility variables
 my $scriptpath = dirname(__FILE__);
 my $certtext = $certificate;
-my $certpath = $scriptpath;
-$certpath =~ s-^(.*[^\\])$-$1\\-o;      # ensure path ends with a backslash
-$certpath = $certpath."../";            # certificates are one step up in hierarcy
-$certpath =~ s-/-\\-go;	                # for those working with UNIX shells
+# certificates are one step up in hierarchy
+my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir());
 
 # Check some pre-conditions and print error messages if needed
 unless (length($templatepkg) && length($platform) && length($target)) {
@@ -172,14 +170,14 @@ if (length($certificate)) {
 } else {
     #If no certificate is given, check default options
     $certtext = "RnD";
-    $certificate = $certpath."rd.cer";
-    $key = $certpath."rd-key.pem";
+    $certificate = File::Spec->catfile($certpath, "rd.cer");
+    $key = File::Spec->catfile($certpath, "rd-key.pem");
 
     stat($certificate);
     unless( -e _ ) {
         $certtext = "Self Signed";
-        $certificate = $certpath."selfsigned.cer";
-        $key = $certpath."selfsigned.key";
+        $certificate = File::Spec->catfile($certpath, "selfsigned.cer");
+        $key = File::Spec->catfile($certpath, "selfsigned.key");
     }
 }
 
-- 
cgit v0.12


From 131d2387436d05aec95bdddeb571930b2a55cf73 Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Thu, 17 Sep 2009 16:38:31 -0400
Subject: mkspecs: fix warning when calling qmake

Signed-off-by: axis <qt-info@nokia.com>
---
 mkspecs/common/symbian/symbian.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 38e955a..fe698fb 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -104,7 +104,7 @@ QMAKE_STRIP		= strip
 QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
 
 load(qt_config)
-load(platform_paths)
+load(symbian/platform_paths)
 
 MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
 MMP_RULES += PAGED
-- 
cgit v0.12


From 8c61bb163a13b1e2b78df0060103546a31c16ed6 Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 20:05:13 -0400
Subject: Make all Symbian #includes lower case.

Signed-off-by: axis <qt-info@nokia.com>
---
 src/gui/kernel/qapplication_s60.cpp | 2 +-
 src/gui/kernel/qdnd_s60.cpp         | 2 +-
 src/gui/kernel/qsound_s60.cpp       | 2 +-
 src/gui/styles/qs60style_s60.cpp    | 4 ++--
 src/gui/text/qfontdatabase_s60.cpp  | 2 +-
 src/gui/text/qfontengine_s60.cpp    | 4 ++--
 src/gui/text/qfontengine_s60_p.h    | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 27e8602..cdc028b 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -62,7 +62,7 @@
 #include "private/qsoftkeymanager_p.h"
 
 #include "apgwgnam.h" // For CApaWindowGroupName
-#include <MdaAudioTonePlayer.h>     // For CMdaAudioToneUtility
+#include <mdaaudiotoneplayer.h>     // For CMdaAudioToneUtility
 
 #if defined(Q_WS_S60)
 # if !defined(QT_NO_IM)
diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp
index 3d6ecd2..24ae7ce 100644
--- a/src/gui/kernel/qdnd_s60.cpp
+++ b/src/gui/kernel/qdnd_s60.cpp
@@ -52,7 +52,7 @@
 #include "qdnd_p.h"
 #include "qt_s60_p.h"
 
-#include <COECNTRL.H>
+#include <coecntrl.h>
 // pointer cursor
 #include <w32std.h>
 #include <gdi.h>
diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp
index 352580e..ee5227a 100644
--- a/src/gui/kernel/qsound_s60.cpp
+++ b/src/gui/kernel/qsound_s60.cpp
@@ -51,7 +51,7 @@
 #include <private/qcore_symbian_p.h>
 
 #include <e32std.h>
-#include <MdaAudioSamplePlayer.h>
+#include <mdaaudiosampleplayer.h>
 
 QT_BEGIN_NAMESPACE
 
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 131d8bc..4fa009c 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -58,8 +58,8 @@
 #include <aknsskininstance.h>
 #include <aknsbasicbackgroundcontrolcontext.h>
 #include <avkon.mbg>
-#include <AknFontAccess.h>
-#include <AknLayoutFont.h>
+#include <aknfontaccess.h>
+#include <aknlayoutfont.h>
 #include <aknutils.h>
 
 #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN)
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 1a6bb11..b51d828 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -50,7 +50,7 @@
 #include "qendian.h"
 #include <private/qcore_symbian_p.h>
 #if defined(QT_NO_FREETYPE)
-#include <OPENFONT.H>
+#include <openfont.h>
 #endif
 
 QT_BEGIN_NAMESPACE
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 88ae8f6..69ac7a1 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -49,8 +49,8 @@
 
 #include <e32base.h>
 #include <e32std.h>
-#include <EIKENV.H>
-#include <GDI.H>
+#include <eikenv.h>
+#include <gdi.h>
 
 QT_BEGIN_NAMESPACE
 
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 44f8122..746f929 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -56,7 +56,7 @@
 #include "qconfig.h"
 #include "qfontengine_p.h"
 #include "qsize.h"
-#include <OPENFONT.H>
+#include <openfont.h>
 
 class CFbsBitmap;
 class CFbsBitmapDevice;
-- 
cgit v0.12


From d0be442d96f780465eff0be3afbf543e5d3e82ab Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 19:14:20 -0400
Subject: Add createpackage.bat equivalent for Unix systems.

Signed-off-by: axis <qt-info@nokia.com>
---
 bin/createpackage.sh | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100755 bin/createpackage.sh

diff --git a/bin/createpackage.sh b/bin/createpackage.sh
new file mode 100755
index 0000000..fdd4eeb
--- /dev/null
+++ b/bin/createpackage.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+scriptpath=`dirname $0`
+perl $scriptpath/createpackage.pl "$@"
-- 
cgit v0.12


From 1609689ad1b9672fd4598aa30a7429b9d37bc3ca Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 20:29:51 -0400
Subject: Linux support for platform specific commands in .pro files.

Signed-off-by: axis <qt-info@nokia.com>
---
 projects.pro            | 15 +++++++++++++--
 src/s60main/s60main.pro |  5 +++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/projects.pro b/projects.pro
index 2a6a956..10cff2a 100644
--- a/projects.pro
+++ b/projects.pro
@@ -107,7 +107,8 @@ win32 {
 }
 symbian {
   confclean.depends += distclean
-  confclean.commands += \
+  win32 {
+    confclean.commands += \
             (cd src\tools\moc && $(MAKE) distclean) $$escape_expand(\n\t) \
             (cd src\tools\rcc && $(MAKE) distclean) $$escape_expand(\n\t) \
             (cd src\tools\uic && $(MAKE) distclean) $$escape_expand(\n\t) \
@@ -116,7 +117,17 @@ symbian {
             -$(DEL_FILE) mkspecs\qconfig.pri $$escape_expand(\n\t) \
             -$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \
             (cd qmake && $(MAKE) distclean)
-            
+  } else {
+    confclean.commands += \
+            (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\n\t) \
+            (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\n\t) \
+            (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\n\t) \
+            -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\n\t) \
+            -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\n\t) \
+            -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\n\t) \
+            -$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \
+            (cd qmake && $(MAKE) distclean)
+  }
 }
 QMAKE_EXTRA_TARGETS += confclean
 qmakeclean.commands += (cd qmake && $(MAKE) clean)
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index cc3c547..d6b5ac8 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -40,8 +40,13 @@ symbian-abld: {
     # abld build commands generated resources after the static library is built, and
     # we have dependency to resource from static lib -> resources need to be generated
     # explicitly before library
+win32: {
     rsgFix2.commands = "-$(DEL_FILE) $(EPOCROOT)Epoc32\Data\z\resource\apps\s60main.rsc >NUL 2>&1"
     rsgFix.commands = "-$(ABLD) resource $(PLATFORM) $(CFG) 2>NUL"
+} else {
+    rsgFix2.commands = "-$(DEL_FILE) $(EPOCROOT)epoc32/data/z/resource/apps/s60main.rsc >/dev/null 2>&1"
+    rsgFix.commands = "-$(ABLD) resource $(PLATFORM) $(CFG) 2>/dev/null"
+}
     QMAKE_EXTRA_TARGETS += rsgFix rsgFix2
     PRE_TARGETDEPS += rsgFix rsgFix2
 }
-- 
cgit v0.12


From 415c9a230a957f17c759468c5333266968f74b96 Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 20:03:55 -0400
Subject: Add Linux host support to Symbian mkspecs.

Signed-off-by: axis <qt-info@nokia.com>
---
 mkspecs/common/symbian/symbian.conf           | 12 +++++++++---
 mkspecs/features/symbian/application_icon.prf |  6 +++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index fe698fb..0bd15fc 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -73,7 +73,7 @@ QMAKE_LIBS_COMPAT       =
 QMAKE_LIBS_QT_ENTRY     = -llibcrt0.lib
 QMAKE_LIBS_S60          = -lavkon
 
-!isEmpty(QMAKE_SH) {
+win32:!isEmpty(QMAKE_SH) | unix {
     QMAKE_COPY           = cp
     QMAKE_COPY_DIR       = cp -r
     QMAKE_MOVE           = mv
@@ -91,9 +91,15 @@ QMAKE_LIBS_S60          = -lavkon
     QMAKE_CHK_DIR_EXISTS = if not exist
 }
 
+win32 {
 QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
 QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
 QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+} else {
+QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+}
 
 QMAKE_IDL		= midl
 QMAKE_LIB		= ar -ru
@@ -130,10 +136,10 @@ default_deployment.pkg_prerules = \
 
 DEPLOYMENT += default_deployment
 
-exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v5.0.sis) {
+exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
     S60_VERSION = 5.0
 } else {
-    exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v3.2.sis) {
+    exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
         S60_VERSION = 3.2
     } else {
         S60_VERSION = 3.1
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index b0c1bb1..a8c3acc 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -19,7 +19,7 @@ contains( CONFIG, no_icon ) {
         # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
         symbian-abld {        
             #Makefile: requires paths with backslash    
-            ICON = $$replace( ICON, /, \\)
+            win32:ICON = $$replace(ICON, /, \\)
 
             # Extra compiler rules for mifconv
             mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif
@@ -34,7 +34,7 @@ contains( CONFIG, no_icon ) {
         } 
         # Rules to use generated MIF file from symbian resources
         RSS_RULES.number_of_icons = $$size(ICON)
-        RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif
+        RSS_RULES.icon_file = APP_RESOURCE_DIR/$${TARGET.UID3}.mif
+        win32:RSS_RULES.icon_file = $$replace(RSS_RULES.icon_file, /, \\)
     }
 }
-
-- 
cgit v0.12


From 0d6b62e1a31f564b0ad68e3060fb3910d9025791 Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Tue, 17 Nov 2009 10:28:19 +0100
Subject: Fixed indentation.

---
 mkspecs/common/symbian/symbian.conf | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 0bd15fc..a9f458c 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -92,13 +92,13 @@ win32:!isEmpty(QMAKE_SH) | unix {
 }
 
 win32 {
-QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
-QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
-QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+    QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+    QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+    QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
 } else {
-QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
-QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
-QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+    QMAKE_MOC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+    QMAKE_UIC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+    QMAKE_IDC		= $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
 }
 
 QMAKE_IDL		= midl
-- 
cgit v0.12


From 2d8d855de79a38e16b9229f3ef9400661e8e3259 Mon Sep 17 00:00:00 2001
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
Date: Sun, 6 Sep 2009 20:39:04 -0400
Subject: qmake: add Linux host support to Symbian generator

Signed-off-by: axis <qt-info@nokia.com>
---
 qmake/generators/makefile.cpp                      | 10 ++++--
 .../symbian/initprojectdeploy_symbian.cpp          | 10 +++---
 qmake/generators/symbian/symmake.cpp               | 14 +++++---
 qmake/generators/symbian/symmake_abld.cpp          | 42 +++++++++++++++-------
 4 files changed, 53 insertions(+), 23 deletions(-)

diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 388e64f..f9340f9 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -65,6 +65,12 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#ifdef Q_OS_WIN32
+#define NO_STDERR "2> NUL"
+#else
+#define NO_STDERR "2>/dev/null"
+#endif
+
 QT_BEGIN_NAMESPACE
 
 // Well, Windows doesn't have this, so here's the macro
@@ -1796,7 +1802,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
             if(tmp_clean.indexOf("${QMAKE_") == -1) {
                 t << "\n\t" << "-$(DEL_FILE) " << tmp_clean;
                 if (isForSymbian())
-                    t << " 2> NUL"; // Eliminate unnecessary warnings
+                    t << " " << NO_STDERR; // Eliminate unnecessary warnings
                 wrote_clean = true;
             }
             if(!wrote_clean_cmds || !wrote_clean) {
@@ -1826,7 +1832,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
                 }
                 if(!cleans.isEmpty())
                     if (isForSymbian())
-                        t << valGlue(cleans, "\n\t" + del_statement, " 2> NUL\n\t" + del_statement, " 2> NUL");
+                        t << valGlue(cleans, "\n\t" + del_statement, " " NO_STDERR "\n\t" + del_statement, " " NO_STDERR);
                     else
                         t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
                 if(!wrote_clean_cmds) {
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index f27d1ba..676cea5 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -176,12 +176,12 @@ static void createPluginStub(const QFileInfo& info,
                              QStringList& generatedDirs,
                              QStringList& generatedFiles)
 {
-    QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR "\\"));
+    QDir().mkpath(PLUGIN_STUB_DIR);
     if (!generatedDirs.contains(PLUGIN_STUB_DIR))
         generatedDirs << PLUGIN_STUB_DIR;
     // Plugin stubs must have different name from the actual plugins, because
     // the toolchain for creating ROM images cannot handle non-binary .dll files properly.
-    QFile stubFile(QLatin1String(PLUGIN_STUB_DIR "\\") + info.completeBaseName() + "." SUFFIX_QTPLUGIN);
+    QFile stubFile(QDir(PLUGIN_STUB_DIR).filePath(info.completeBaseName() + "." SUFFIX_QTPLUGIN));
     if (stubFile.open(QIODevice::WriteOnly)) {
         if (!generatedFiles.contains(stubFile.fileName()))
             generatedFiles << stubFile.fileName();
@@ -330,12 +330,12 @@ void initProjectDeploySymbian(QMakeProject* project,
                     if (isBinary(info)) {
                         if (deployBinaries) {
                             // Executables and libraries are deployed to \sys\bin
-                            QFileInfo releasePath(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\");
+                            QFileInfo releasePath(epocRoot() + QDir::toNativeSeparators("epoc32/release/" + platform + "/" + build + "/"));
                             if(devicePathHasDriveLetter) {
-                                deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true),
+                                deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true),
                                                                Option::fixPathToLocalOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
                             } else {
-                                deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true),
+                                deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true),
                                                                Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
                             }
                         }
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index dd1dd5f..208da59 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -50,11 +50,17 @@
 #include <stdlib.h>
 #include <qdebug.h>
 
+#ifdef Q_OS_WIN
+#define SCRIPT_EXT ".bat"
+#else
+#define SCRIPT_EXT ".sh"
+#endif
+
 #define RESOURCE_DIRECTORY_MMP "/resource/apps"
 #define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
 #define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
 #define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def"
-#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonU.def"
+#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
 #define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1)
 
 #define BLD_INF_RULES_BASE "BLD_INF_RULES."
@@ -395,7 +401,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
     for (int i = 0; i < depList.size(); ++i)  {
         t << QString("\"%1\"    - \"%2\"")
              .arg(QString(depList.at(i).from).replace('\\','/'))
-             .arg(depList.at(i).to) << endl;
+             .arg(QString(depList.at(i).to).replace('/','\\')) << endl;
     }
     t << endl;
 
@@ -1634,7 +1640,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
         t << "\t-@ if EXIST \"" << QDir::toNativeSeparators(item) << "\" ";
         t << cmd << " " << cmdOptions << " \"" << QDir::toNativeSeparators(item) << "\"" << endl;
 #else
-        t << "\t-if test -f " << QDir::toNativeSeparators(item) << "; then ";
+        t << "\t-if test -e " << QDir::toNativeSeparators(item) << "; then ";
         t << cmd << " " << cmdOptions << " " << QDir::toNativeSeparators(item) << "; fi" << endl;
 #endif
     }
@@ -1667,7 +1673,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
 
     t << OK_SIS_TARGET ":" << endl;
 
-    QString pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
+    QString pkgcommand = QString("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
                                  "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
                           .arg(fixedTarget)
                           .arg("pkg");
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 4d1673b..b06db2f 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -195,16 +195,21 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
     t << "DEL_FILE          = " << var("QMAKE_DEL_FILE") << endl;
     t << "DEL_DIR           = " << var("QMAKE_DEL_DIR") << endl;
     t << "MOVE              = " << var("QMAKE_MOVE") << endl;
+#ifdef Q_OS_WIN32
     t << "XCOPY             = xcopy /d /f /h /r /y /i" << endl;
     t << "ABLD              = ABLD.BAT" << endl;
+#else
+    t << "XCOPY             = cp -u -v" << endl;
+    t << "ABLD              = abld" << endl;
+#endif
     t << "DEBUG_PLATFORMS   = " << debugPlatforms.join(" ") << endl;
     t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl;
     t << "MAKE              = make" << endl;
     t << endl;
     t << "ifeq (WINS,$(findstring WINS, $(PLATFORM)))" << endl;
-    t << "ZDIR=$(EPOCROOT)epoc32\\release\\$(PLATFORM)\\$(CFG)\\Z" << endl;
+    t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/release/$(PLATFORM)/$(CFG)/z") << endl;
     t << "else" << endl;
-    t << "ZDIR=$(EPOCROOT)epoc32\\data\\z" << endl;
+    t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/data/z") << endl;
     t << "endif" << endl;
     t << endl;
     t << "DEFINES" << '\t' << " = "
@@ -304,8 +309,13 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
                 if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
                     QString fixedValue(QDir::toNativeSeparators(values.at(i)));
                     dirsToClean << fixedValue;
+#ifdef Q_OS_WIN32
                     t << "\t-@ if NOT EXIST \""  << fixedValue << "\" mkdir \""
                       << fixedValue << "\"" << endl;
+#else
+                    t << "\t-@ if test ! -d \""  << fixedValue << "\"; then mkdir \""
+                      << fixedValue << "\"" << "; fi" <<endl;
+#endif
                 }
             }
         }
@@ -314,7 +324,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
         // Note: EXTENSION_CLEAN will get called many times when doing reallyclean
         //       This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
         t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
+#ifdef Q_OS_WIN32
         generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", "");
+#else
+        generateCleanCommands(t, dirsToClean, "rm", " -rf ", "", "");
+#endif
         t << endl;
 
         t << PRE_TARGETDEPS_TARGET ":"
@@ -375,7 +389,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
     // Create execution target
     if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
         t << "run:" << endl;
+#ifdef Q_OS_WIN32
         t << "\t-call " << epocRoot() << "epoc32\\release\\winscw\\udeb\\" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+#else
+        t << "\t-wine " << epocRoot() << "epoc32/release/winscw/udeb/" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+#endif
     }
 }
 
@@ -423,16 +441,16 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
 void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
 {
     t << STORE_BUILD_TARGET ":" << endl;
-    t << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl;
-    t << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo #  Name        : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo #  Part of     : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo #  Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo #                make sis target. >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo #  Version     :  >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo # >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME <<  endl;
-    t << "\t@echo. >> " MAKE_CACHE_NAME <<  endl;
+    t << "\t@echo \\# ============================================================================== > " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\# This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\#  Name        : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\#  Part of     : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\#  Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\#                make sis target. >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\#  Version     :  >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\# >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo \\# ============================================================================== >> " MAKE_CACHE_NAME <<  endl;
+    t << "\t@echo >> " MAKE_CACHE_NAME <<  endl;
     t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl;
     t << endl;
 
-- 
cgit v0.12


From 78474a65e4f61e9d1ae8116d5b690cf78729aa71 Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Tue, 17 Nov 2009 10:39:08 +0100
Subject: Improving parts of commit 2d8d855d.

It breaks Symbian on Windows, so instead use an approach that works
on all platforms.
---
 qmake/generators/symbian/symmake_abld.cpp | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index b06db2f..8e6c4fa 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -440,21 +440,31 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
 
 void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
 {
+#ifdef Q_OS_WIN
+#define HASH "#"
+#define EMPTYECHO "."
+#else
+#define HASH "\\#"
+#define EMPTYECHO
+#endif
+
     t << STORE_BUILD_TARGET ":" << endl;
-    t << "\t@echo \\# ============================================================================== > " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\# This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\#  Name        : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\#  Part of     : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\#  Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\#                make sis target. >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\#  Version     :  >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\# >> " MAKE_CACHE_NAME << endl;
-    t << "\t@echo \\# ============================================================================== >> " MAKE_CACHE_NAME <<  endl;
-    t << "\t@echo >> " MAKE_CACHE_NAME <<  endl;
+    t << "\t@echo " HASH " ============================================================================== > " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH " This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH "  Name        : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH "  Part of     : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH "  Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH "                make sis target. >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH "  Version     :  >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH " >> " MAKE_CACHE_NAME << endl;
+    t << "\t@echo " HASH " ============================================================================== >> " MAKE_CACHE_NAME <<  endl;
+    t << "\t@echo" EMPTYECHO " >> " MAKE_CACHE_NAME <<  endl;
     t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl;
     t << endl;
 
     generatedFiles << MAKE_CACHE_NAME;
+#undef HASH
+#undef EMPTYECHO
 }
 
 void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension)
-- 
cgit v0.12