Skip to content

Commit

Permalink
update build guide
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWang committed Mar 6, 2013
1 parent 0efa2d5 commit 719ed25
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
8 changes: 4 additions & 4 deletions QtAV.pro
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ cache(BUILD_DIR, set, BUILD_DIR)
cache(SOURCE_ROOT, set, SOURCE_ROOT)
cache(mkspecs_cached, set, mkspecs_build)

qtCompileTest(avutil)|error("FFmpeg avutil is required, but not available")
qtCompileTest(avcodec)|error("FFmpeg avcodec is required, but not available")
qtCompileTest(avformat)|error("FFmpeg avformat is required, but not available")
qtCompileTest(swscale)|error("FFmpeg swscale is required, but not available")
qtCompileTest(avutil)|error("FFmpeg avutil is required, but compiler can not find it")
qtCompileTest(avcodec)|error("FFmpeg avcodec is required, but compiler can not find it")
qtCompileTest(avformat)|error("FFmpeg avformat is required, but compiler can not find it")
qtCompileTest(swscale)|error("FFmpeg swscale is required, but compiler can not find it")
qtCompileTest(portaudio)|warning("PortAudio is not available. No audio output in QtAV")
qtCompileTest(direct2d)
qtCompileTest(gdiplus)
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,20 @@ For most platforms, just
qmake
make

It's recommend not to build in source dir.

cd your_build_dir
qmake QtAV_source_dir/QtAV.pro
make

qmake will run check the required libraries at the first time, so you must make sure those libraries can be found by compiler.
Then qmake will create a cache file _.qmake.cache_ in your build dir. Cache file stores the check results, for example, whether portaudio is available. If you want to recheck, delete _.qmake.cache_ and run qmake again

>>If the above command failed to build it, try
>> `cd your_build_dir`
>> `qmake QtAV_dir/QtAV.pro -r BUILD_DIR=your_build_dir`
>> `qmake QtAV_source_dir/QtAV.pro -r BUILD_DIR=your_build_dir`
>> `make`
Expand Down
1 change: 0 additions & 1 deletion configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ defineTest(cache) {
srcval ~= s,/,\/,g
srcval ~= s,\+,\\+,g #for sed regexp. '+' in qmake is '\+' ?
system("sed -i -r '/.*$${dstvar}.*$${srcval}.*/d' $$_QMAKE_CACHE_QT4_ >/dev/null")
message("sed -i -r '/.*$${dstvar}.*$${srcval}.*/d' $$_QMAKE_CACHE_QT4_ >/dev/null")
}
write_file($$_QMAKE_CACHE_QT4_, varstr, append)
}
Expand Down
10 changes: 3 additions & 7 deletions doc/CompileWithMSVC.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ I don't put any vs project file in QtAV, because it's easy to create by qmake.

Open cmd

qmake -r BUILD_DIR=%CD%\out -tp vc QtAV.pro
qmake -r -tp vc QtAV.pro

If you are in sh environment

qmake -r BUILD_DIR=$PWD/out -tp vc QtAV.pro

Then the sln and vcxproj(vcproj) files will be created. Open QtAV.sln in your Visual Studio, Compile it.
Then the sln and vcxproj(vcproj) files will be created. Open QtAV.sln in your Visual Studio, Compile it. You may have to set INCLUDE and LIB dir in Visual Studio to ensure that compiler can find FFmepg and portaudio development files.

Another solution is using Qt vs plugin. It will help you to load qmake projects.

Expand All @@ -35,4 +31,4 @@ The environment is small but has the almost complete functionality. At least it

# ISSUES

If you want to build a debug version, you may get some link errors. It's not your problem, my qmake projects have some little problem. Just fix it manually yourself.
If you want to build a debug version, you may get some link errors. It's not your problem, my qmake projects have some little problem. Just fix it manually yourself.

0 comments on commit 719ed25

Please sign in to comment.