Cannot create the exe for the app publishing
-
I've create a little app that I must publish for my clients.
It's very simple, and I've developed it on Windows.
It runs proprely on both debug and release, but when I go to the Build menu and click on "Publish project 'xyz' "...
the dialog give me an error "Publishing is currently not possible for project " and I've no wizards on combobox.
The exe will be very thin and static linking it is enough.
How can I resolve these problem?
I've tried to follow "this ":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.htmlguide, but I've failed :\ -
How did you fail? What went wrong?
-
Like the guide says, from cmd, I moved to Qt path:
@C:\Qt\5.1.0\src\qtbase@and than I've lunched
@ "configure -static -release"@and the result is the same as I type configure -help. I cannot understand why... my app doesn't require any sql drivers or other option on configure option... what is the problem?
[quote author="sierdzio" date="1377588042"]How did you fail? What went wrong?[/quote] -
I bet you've missed Perl dependency. Since cmd.exe on Windows is a huge piece of crap, it cuts the beginning of configure's output out of your history, because the output is so long.
Extend cmd.exe's history, or hit ctrl+c just after running configure to capture the exact error message. Or pipe the output to a file, of course.
-
I've redirected the output to a file and it is:
@Unable to detect the platform from environment. Use -platform command lineargument or set the QMAKESPEC environment variable and run configure again
See the README file for a list of supported operating systems and compilers.
Usage: configure [options]Installation options:
These are optional, but you may specify install directories.
-prefix <dir> ...... This will install everything relative to <dir> (default $QT_INSTALL_PREFIX) -hostprefix [dir] .. Tools and libraries needed when developing applications are installed in [dir]. If [dir] is not given, the current build directory will be used. (default PREFIX)
You may use these to separate different parts of the install:
-bindir <dir> ...... User executables will be installed to <dir> (default PREFIX/bin) -libdir <dir> ...... Libraries will be installed to <dir> (default PREFIX/lib) -headerdir <dir> ... Headers will be installed to <dir> (default PREFIX/include) -archdatadir <dir> . Architecture-dependent data used by Qt will be installed to <dir> (default PREFIX) -libexecdir <dir> .. Program executables will be installed to <dir> (default ARCHDATADIR/bin) -plugindir <dir> ... Plugins will be installed to <dir> (default ARCHDATADIR/plugins) -importdir <dir> ... Imports for QML1 will be installed to <dir> (default ARCHDATADIR/imports) -qmldir <dir> ...... Imports for QML2 will be installed to <dir> (default ARCHDATADIR/qml) -datadir <dir> ..... Data used by Qt programs will be installed to <dir> (default PREFIX) -docdir <dir> ...... Documentation will be installed to <dir> (default DATADIR/doc) -translationdir <dir> Translations of Qt programs will be installed to <dir> (default DATADIR/translations) -examplesdir <dir> . Examples will be installed to <dir> (default PREFIX/examples) -testsdir <dir> .... Tests will be installed to <dir> (default PREFIX/tests) -hostbindir <dir> .. Host executables will be installed to <dir> (default HOSTPREFIX/bin) -hostlibdir <dir> .. Host libraries will be installed to <dir> (default HOSTPREFIX/lib) -hostdatadir <dir> . Data used by qmake will be installed to <dir> (default HOSTPREFIX)
@
So how can i indicate that the platform is windows?
[quote author="sierdzio" date="1377595089"]I bet you've missed Perl dependency. Since cmd.exe on Windows is a huge piece of crap, it cuts the beginning of configure's output out of your history, because the output is so long.
Extend cmd.exe's history, or hit ctrl+c just after running configure to capture the exact error message. Or pipe the output to a file, of course.[/quote]
-
Depends on what compiler are you using. Go to <qt source dir>/mkspecs and look for all win32-* entries. When you find the one for your compiler, use this switch to add it to configuration:
@
configure -static -release -platform win32-yourCompilerNameHere
@Also, please be careful when using static linking, you are likely to be violating LGPL license.
-
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.This is the Qt for Windows Open Source Edition.
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1.Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.Do you accept the terms of the license?
Creating qmake...
execute: File or path is not found <mingw32>
execute: File or path is not found <mingw32>
Cleaning qmake failed, return code -1
[quote author="sierdzio" date="1377595577"]Depends on what compiler are you using. Go to <qt source dir>/mkspecs and look for all win32-* entries. When you find the one for your compiler, use this switch to add it to configuration:
@
configure -static -release -platform win32-yourCompilerNameHere
@Also, please be careful when using static linking, you are likely to be violating LGPL license.[/quote]
-
Something is wrong with your compiler. Maybe it's not in $PATH? Or the exe is renamed to something different from default. You can modify the mkspec or fix the toolchain.
-
mmm...sincerely I don't understand how can I solve the problem...
may I check on system variable that there is one for the compiler?
how can I modify mkspec? -
mkspecs are just simple text files (written in Makefile syntax).
The compiler toolchain can be broken in many ways, it's hard to state anything specific, especially on Windows where everything is so weird.
Check PATH environment variable (in System->Advanced or by printing it in terminal), run yourCompiler --version to see if that works, etc. Or switch to MSVC which is easier to set up.