[urget] Need to build .exe for testing

Hi to all,

I like to explain my problem to build the .exe for windows embedded CE.Now i'm facing problem is i cannot build it always says that

please , set QTDIR enviroment variable to qt root directory path

and following this please help to build the app


http://docs.rhomobile.com/en/4.1.0/guide/nativesdksetup#setup-for-windows-desktop



I have Installed following things

 

1)Windows 7 64 bit

2)MotorolaRhoMobileSuite4.1.1

3) Build.yml

sdkversion: "4.1.0"

name: "barcodescanner"

version: "1.0"

vendor: "rhomobile"

build: "debug"

applog: "rholog.txt"

iphone:

  configuration: "Release"

  sdk: "iphonesimulator7.0"

  provisionprofile:

  codesignidentity: "iPhone Developer"

  entitlements:

  BundleIdentifier: "com.rhomobile.barcodescanner"

  BundleURLScheme: "barcodescanner"

wp8:

  productid: "fe47ba00-156e-0132-d4cc-0260a0061001"

android:

  manifest_template: "AndroidManifest.erb"

  version: "2.3.3"

wm:

extensions:

  - barcode-moto

app_type: "rhoelements"

capabilities:

  - motorola

env:

  paths:

    nsis: "C:/Program Files (x86)/NSIS/makensis.exe"

win32:

  msvc: 2012

4)PATH :


PATH=C:\Perl\site\bin;C:\Perl\bin;C:\ProgramData\Oracle\Java\javapath;C:\Motorol

aRhoMobileSuite4.1.1\redis-2.4.0;C:\MotorolaRhoMobileSuite4.1.1\ruby\bin;C:\Moto

rolaRhoMobileSuite4.1.1\devkit\bin;C:\MotorolaRhoMobileSuite4.1.1\devkit\mingw\b

in;C:\MotorolaRhoMobileSuite4.1.1\make-3.81\bin;C:\oraclexe\app\oracle\product\1

0.2.0\server\bin;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online

Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online

Services;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syst

em32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\

Common Files\Lenovo;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;

C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth

Software\syswow64;C:\Program Files (x86)\Hewlett-Packard\HP SimplePass Identity

Protection\x64;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Heroku\bi

n;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\WinMerge;c:\Program File

s (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Serv

er\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\xampp\

php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Program Files (

x86)\QuickTime\QTSystem\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\bi

nn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Qt\Qt5-rhoxp\bin;C:

\Qt\Qt5-ssl\bin;C:\instantclient_11_2\oci.dll;C:\xampp\php;C:\Windows;C:\Windows

\System32;C:\Python27;C:\ProgramData\ComposerSetup\bin;;C:\Users\user\AppData\Lo

cal\.meteor;C:\Users\user\AppData\Roaming\npm;C:\Perl\bin;C:\MotorolaRhoMobileSu

ite4.1.1\ruby\bin;C:\Python;

 

 

5)Qmqke.conf

 

#

# qmake configuration for win32-msvc2012

#

# Written for Microsoft Visual C++ 2012

#

 

MAKEFILE_GENERATOR      = MSBUILD

QMAKE_PLATFORM          = win32

CONFIG                 += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe

DEFINES                += UNICODE WIN32

QMAKE_COMPILER_DEFINES += _MSC_VER=1700 _WIN32

contains(QMAKE_TARGET.arch, x86_64) {

    DEFINES += WIN64

    QMAKE_COMPILER_DEFINES += _WIN64

}

 

QMAKE_COMPILER          = msvc

 

QMAKE_CC                = cl

QMAKE_LEX               = flex

QMAKE_LEXFLAGS          =

QMAKE_YACC              = byacc

QMAKE_YACCFLAGS         = -d

QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t -D_USING_V110_SDK71_

QMAKE_CFLAGS_WARN_ON    = -W3

QMAKE_CFLAGS_WARN_OFF   = -W0

QMAKE_CFLAGS_RELEASE    = -O2 -MD

QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi

QMAKE_CFLAGS_DEBUG      = -Zi -MDd

QMAKE_CFLAGS_YACC       =

QMAKE_CFLAGS_LTCG       = -GL

QMAKE_CFLAGS_MP         = -MP

QMAKE_CFLAGS_SSE2       = -arch:SSE2

QMAKE_CFLAGS_SSE3       = -arch:SSE2

QMAKE_CFLAGS_SSSE3      = -arch:SSE2

QMAKE_CFLAGS_SSE4_1     = -arch:SSE2

QMAKE_CFLAGS_SSE4_2     = -arch:SSE2

QMAKE_CFLAGS_AVX        = -arch:AVX

QMAKE_CFLAGS_AVX2       = -arch:AVX

 

QMAKE_CXX               = $$QMAKE_CC

QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS

QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189

QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF

QMAKE_CXXFLAGS_RELEASE  = $$QMAKE_CFLAGS_RELEASE

QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO

QMAKE_CXXFLAGS_DEBUG    = $$QMAKE_CFLAGS_DEBUG

QMAKE_CXXFLAGS_YACC     = $$QMAKE_CFLAGS_YACC

QMAKE_CXXFLAGS_LTCG     = $$QMAKE_CFLAGS_LTCG

QMAKE_CXXFLAGS_MP       = $$QMAKE_CFLAGS_MP

QMAKE_CXXFLAGS_STL_ON   = -EHsc

QMAKE_CXXFLAGS_STL_OFF  =

QMAKE_CXXFLAGS_RTTI_ON  = -GR

QMAKE_CXXFLAGS_RTTI_OFF =

QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc

QMAKE_CXXFLAGS_EXCEPTIONS_OFF =

 

QMAKE_INCDIR            =

 

QMAKE_RUN_CC            = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src

QMAKE_RUN_CC_IMP        = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

QMAKE_RUN_CC_IMP_BATCH  = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<

QMAKE_RUN_CXX           = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src

QMAKE_RUN_CXX_IMP       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<

QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<

 

QMAKE_LINK              = link

QMAKE_LFLAGS            = /NOLOGO /DYNAMICBASE /NXCOMPAT

QMAKE_LFLAGS_RELEASE    = /INCREMENTAL:NO

QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF

QMAKE_LFLAGS_DEBUG      = /DEBUG

QMAKE_LFLAGS_CONSOLE    = /SUBSYSTEM:CONSOLE,5.01

QMAKE_LFLAGS_WINDOWS    = /SUBSYSTEM:WINDOWS,5.01

QMAKE_LFLAGS_EXE        = \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"

QMAKE_LFLAGS_DLL        = /DLL

QMAKE_LFLAGS_LTCG       = /LTCG

QMAKE_EXTENSION_STATICLIB = lib

 

QMAKE_LIBS_CORE         = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib

QMAKE_LIBS_GUI          = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib

QMAKE_LIBS_NETWORK      = ws2_32.lib

QMAKE_LIBS_OPENGL       = glu32.lib opengl32.lib gdi32.lib user32.lib

QMAKE_LIBS_OPENGL_ES2   = libEGL.lib libGLESv2.lib gdi32.lib user32.lib

QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib

QMAKE_LIBS_COMPAT       = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib

 

QMAKE_LIBS_QT_ENTRY     = -lqtmain

 

QMAKE_IDL               = midl

QMAKE_LIB               = lib /NOLOGO

QMAKE_RC                = rc

 

include(../common/shell-win32.conf)

 

VCPROJ_EXTENSION        = .vcxproj

VCSOLUTION_EXTENSION    = .sln

VCPROJ_KEYWORD          = Qt4VSv1.0

load(qt_config)

 

 

6)Makefile.win32

 

 

 

!IF "$(QMAKESPEC)" == "win32-msvc" || "$(QMAKESPEC)" == "win32-msvc.net" || "$(QMAKESPEC)" == "win32-msvc2002" || "$(QMAKESPEC)" == "win32-msvc2003" || "$(QMAKESPEC)" == "win32-msvc2005" || "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013" || "$(QMAKESPEC)" == "win32-icc"

 

!if "$(SOURCE_PATH)" == ""

SOURCE_PATH = ..

!endif

!if "$(BUILD_PATH)" == ""

BUILD_PATH = ..

!endif

 

QMKSRC = $(SOURCE_PATH)\qmake

 

#

# specific stuff for NMake and ICC

#

!if "$(QMAKESPEC)" == "win32-icc"

CXX        = icl

LINKER  = link

CFLAGS      = /Zc:forScope

!else

CXX         = cl

LINKER  = link

!endif

 

#

# specific stuff for VS2005

#

!if "$(QMAKESPEC)" == "win32-msvc2005"

CFLAGS_EXTRA      = /Zc:wchar_t-

!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013"

CFLAGS_EXTRA      = /MP

!endif

 

CFLAGS_BARE = -c -Fo./ \

              -W3 -nologo -O1 \

              $(CFLAGS_EXTRA) \

              -I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac -I$(QMKSRC)\generators\integrity \

              -I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \

              -I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \

              -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC)  \

              -I$(SOURCE_PATH)\tools\shared \

              -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG \

              -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \

              -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \

              -DUNICODE -D_USING_V110_SDK71_

CFLAGS   = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) $(EXTRA_CPPFLAGS)

 

CXXFLAGS_BARE = $(CFLAGS_BARE)

CXXFLAGS = $(CFLAGS)

 

LFLAGS        =

LIBS        = ole32.lib advapi32.lib

LINKQMAKE   = $(LINKER) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)

ADDCLEAN    = vc60.pdb vc70.pdb qmake.pdb qmake.ilk

 

!ELSE

!ERROR Unsupported compiler for this Makefile

!ENDIF

 

#qmake code

OBJS        = project.obj main.obj ioutils.obj proitems.obj \

              qmakeglobals.obj qmakeparser.obj qmakeevaluator.obj qmakebuiltins.obj \

              makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \

              option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \

              makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \

              msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \

              msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj \

              gbuild.obj cesdkhandler.obj

 

#qt code

QTOBJS= \

    qbitarray.obj \

    qbuffer.obj \

    qcryptographichash.obj \

    qfilesystementry.obj \

    qfilesystemengine.obj \

    qfilesystemengine_win.obj \

    qfilesystemiterator_win.obj \

    qfsfileengine.obj \

    qfsfileengine_iterator.obj \

    qarraydata.obj \

    qbytearray.obj \

    qvsnprintf.obj \

    qbytearraymatcher.obj \

    qdatetime.obj \

    qdir.obj \

    qdiriterator.obj \

    qfiledevice.obj \

    qfile.obj \

    qtemporaryfile.obj \

    qabstractfileengine.obj \

    qfsfileengine_win.obj \

    qsystemlibrary.obj \

    qfileinfo.obj \

    qglobal.obj \

    qhash.obj \

    qiodevice.obj \

    qlist.obj \

    qlinkedlist.obj \

    qlocale.obj \

    qlocale_tools.obj \

    qlocale_win.obj \

    qmalloc.obj \

    qmap.obj \

    qregexp.obj \

    qtextcodec.obj \

    qutfcodec.obj \

    qstring.obj \

    qstringlist.obj \

    qstringbuilder.obj \

    qsystemerror.obj \

    qtextstream.obj \

    qdatastream.obj \

    quuid.obj \

    qvector.obj \

    qsettings.obj \

    qlibraryinfo.obj \

    qvariant.obj \

    qsettings_win.obj \

    qmetatype.obj \

    qxmlstream.obj \

    qxmlutils.obj \

    qnumeric.obj \

    qlogging.obj

 

first all: qmake.exe

 

qmake.exe: $(OBJS) $(QTOBJS)

    $(LINKQMAKE) qmake_pch.obj

    -copy qmake.exe $(BUILD_PATH)\bin\qmake.exe

 

clean::

    -del $(QTOBJS)

    -del $(OBJS)

    -del qmake_pch.obj

    -del qmake_pch.pch

    -del qsystemlibrary.obj

    -del vc60.pdb

    -del vc70.pdb

    -del qmake.pdb

    -del qmake.ilk

    -del qmake.tds

 

distclean:: clean

    -del qmake

 

.c.obj:

    $(CXX) $(CFLAGS) $<

 

.cpp.obj:

    $(CXX) $(CXXFLAGS) $<

 

.cc.obj:

    $(CXX) $(CXXFLAGS) $<

 

.cxx.obj:

    $(CXX) $(CXXFLAGS) $<

 

$(OBJS): qmake_pch.obj

 

$(QTOBJS): qmake_pch.obj

 

qmake_pch.obj:

    $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP $(QMKSRC)\qmake_pch.h

 

{$(SOURCE_PATH)\qmake\library}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake\generators\integrity}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake\generators\unix}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake\generators\win32}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake\generators}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\qmake}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\3rdparty\md5}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\codecs}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\global}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\io}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\kernel}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj::

    $(CXX) $(CXXFLAGS) $<

 

7)Build.bat

 

 

call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat" x86

set CL=/MP /D_USING_V110_SDK71_ %CL%

set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%

set PATH=%PATH%;C:\Qt\icu\bin;C:\Qt\Qt5-src\gnuwin32\bin

set INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%

set INCLUDE=%INCLUDE%;C:\Qt\icu\include

set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%

set LIB=%LIB%;C:\Qt\icu\lib

mkdir qtbase\include\QtZlib

copy C:\Qt\Qt5-src\qtbase\include\QtZlib\*.h qtbase\include\QtZlib

mkdir qtbase\src\3rdparty\zlib

copy C:\Qt\Qt5-src\qtbase\src\3rdparty\zlib\*.h qtbase\src\3rdparty\zlib

call ..\Qt5-src\configure.bat -opensource -confirm-license ^

-prefix C:/Qt/Qt5-ssl -debug-and-release -platform win32-msvc2012 -mp ^

-icu -shared -c++11 -make libs -nomake tests -nomake examples -angle ^

-qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -openssl-linked ^

-I C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/extensions/openssl.so/ext/win32/include ^

-L C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/extensions/openssl.so/ext/win32/lib

nmake

nmake install

nmake clean

copy C:\Qt\icu\bin\icudt52.dll C:\Qt\Qt5-ssl\bin\

copy C:\Qt\icu\bin\icuin52.dll C:\Qt\Qt5-ssl\bin\

copy C:\Qt\icu\bin\icuuc52.dll C:\Qt\Qt5-ssl\bin\

copy "%VS110COMNTOOLS%..\..\VC\bin\D3Dcompiler_46.dll" C:\Qt\Qt5-ssl\bin\

 

Error:

 

 

(See full trace by running task with --trace)

 

C:\Users\user\workspace\barcodescanner>rake device:winxpe:production

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:93: warning: alr

eady initialized constant OPT_TABLE

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1268: warning: a

lready initialized constant S_IF_DOOR

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1496: warning: a

lready initialized constant DIRECTORY_TERM

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1500: warning: a

lready initialized constant SYSCASE

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1619: warning: a

lready initialized constant LOW_METHODS

C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1625: warning: a

lready initialized constant METHODS

1.9.3

$app_config['extensions'] : ["coreapi", "json", "barcode-moto"]

$app_config['capabilities'] : ["motorola", "winxpe"]

$current_platform : win32

$sdk [win32]

 

Please, set QTDIR environment variable to Qt root directory path