feat: reactor output dir

This commit is contained in:
rankun 2019-09-26 09:22:32 +08:00
commit d922352b9d
3 changed files with 30 additions and 17 deletions

View file

@ -65,33 +65,46 @@ win32 {
message("x64") message("x64")
# 输出目录 # 输出目录
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../output/win-x64/debug DESTDIR = $$PWD/../output/win/x64/debug
} else { } else {
DESTDIR = $$PWD/../output/win-x64/release DESTDIR = $$PWD/../output/win/x64/release
} }
# 依赖模块 # 依赖模块
LIBS += \ LIBS += \
-L$$PWD/../third_party/ffmpeg/win64/lib -lavformat \ -L$$PWD/../third_party/ffmpeg/lib/x64 -lavformat \
-L$$PWD/../third_party/ffmpeg/win64/lib -lavcodec \ -L$$PWD/../third_party/ffmpeg/lib/x64 -lavcodec \
-L$$PWD/../third_party/ffmpeg/win64/lib -lavutil \ -L$$PWD/../third_party/ffmpeg/lib/x64 -lavutil \
-L$$PWD/../third_party/ffmpeg/win64/lib -lswscale -L$$PWD/../third_party/ffmpeg/lib/x64 -lswscale
WIN_FFMPEG_SRC = $$PWD/../third_party/ffmpeg/bin/x64/*.dll
} else { } else {
message("x86") message("x86")
# 输出目录 # 输出目录
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../output/win/debug DESTDIR = $$PWD/../output/win/x86/debug
} else { } else {
DESTDIR = $$PWD/../output/win/release DESTDIR = $$PWD/../output/win/x86/release
} }
# 依赖模块 # 依赖模块
LIBS += \ LIBS += \
-L$$PWD/../third_party/ffmpeg/lib -lavformat \ -L$$PWD/../third_party/ffmpeg/lib/x86 -lavformat \
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \ -L$$PWD/../third_party/ffmpeg/lib/x86 -lavcodec \
-L$$PWD/../third_party/ffmpeg/lib -lavutil \ -L$$PWD/../third_party/ffmpeg/lib/x86 -lavutil \
-L$$PWD/../third_party/ffmpeg/lib -lswscale -L$$PWD/../third_party/ffmpeg/lib/x86 -lswscale
WIN_FFMPEG_SRC = $$PWD/../third_party/ffmpeg/bin/x86/*.dll
} }
# 复制依赖库
WIN_DST = $$DESTDIR
WIN_FFMPEG_SRC ~= s,/,\\,g
WIN_DST ~= s,/,\\,g
QMAKE_POST_LINK += $$quote($$QMAKE_COPY $$WIN_FFMPEG_SRC $$WIN_DST$$escape_expand(\n\t))
# windows rc file # windows rc file
RC_FILE = $$PWD/res/QtScrcpy.rc RC_FILE = $$PWD/res/QtScrcpy.rc
} }

View file

@ -31,9 +31,9 @@ int main(int argc, char *argv[])
#endif #endif
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/win/adb.exe"); qputenv("QTSCRCPY_ADB_PATH", "../../../../third_party/adb/win/adb.exe");
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server.jar"); qputenv("QTSCRCPY_SERVER_PATH", "../../../../third_party/scrcpy-server.jar");
qputenv("QTSCRCPY_KEYMAP_PATH", "../../../keymap"); qputenv("QTSCRCPY_KEYMAP_PATH", "../../../../keymap");
#endif #endif
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX

View file

@ -24,11 +24,11 @@ set keymap_path=%script_path%keymap
if /i %cpu_mode% == x86 ( if /i %cpu_mode% == x86 (
set publish_path=%script_path%QtScrcpy-win32\ set publish_path=%script_path%QtScrcpy-win32\
set release_path=%script_path%output\win\release set release_path=%script_path%output\win\x86\release
set qt_msvc_path=%qt_msvc_path%msvc2017\bin set qt_msvc_path=%qt_msvc_path%msvc2017\bin
) else ( ) else (
set publish_path=%script_path%QtScrcpy-win64\ set publish_path=%script_path%QtScrcpy-win64\
set release_path=%script_path%output\win-x64\release set release_path=%script_path%output\win\x64\release
set qt_msvc_path=%qt_msvc_path%msvc2017_64\bin set qt_msvc_path=%qt_msvc_path%msvc2017_64\bin
) )
set PATH=%qt_msvc_path%;%PATH% set PATH=%qt_msvc_path%;%PATH%