Skip to content

Commit

Permalink
Corrigido processo de compilação em ambiente Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhaotix committed Sep 27, 2012
1 parent 07b2707 commit 88d03b7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
46 changes: 25 additions & 21 deletions main/main.pro
Expand Up @@ -10,32 +10,36 @@ OBJECTS_DIR = obj
DESTDIR = ../build

unix {
QMAKE_POST_LINK+= "cp -r ../schemas/ $$DESTDIR; \
cp -r ../conf/ $$DESTDIR; \
cp -r ../lang/ $$DESTDIR; \
cp -r ../samples $$DESTDIR; \
cp -r ../*.md $$DESTDIR; \
cp -r ../LICENSE $$DESTDIR"
QMAKE_POST_LINK+= "cp -r ../schemas/ $$DESTDIR; \
cp -r ../conf/ $$DESTDIR; \
cp -r ../lang/ $$DESTDIR; \
cp -r ../samples $$DESTDIR; \
cp -r ../*.md $$DESTDIR; \
cp -r ../LICENSE $$DESTDIR; \
cp -r ../start-pgmodeler.sh $$DESTDIR"

QMAKE_DISTCLEAN+= "-r $$DESTDIR/*"
}

windows {
DEST=..\\build
QMAKE_POST_LINK+="xcopy ..\\schemas $$DEST\\schemas /S /I /Y /Q &" \
"xcopy ..\\conf $$DEST\\conf /S /I /Y /Q &" \
"xcopy ..\\lang $$DEST\\lang /S /I /Y /Q &" \
"xcopy ..\\samples $$DEST\\samples /S /I /Y /Q &" \
"copy ..\\*.md $$DEST /Y &" \
"copy ..\\LICENSE $$DEST /Y"
DEST=..\\build
QMAKE_POST_LINK+="xcopy ..\\schemas $$DEST\\schemas /S /I /Y /Q & \
xcopy ..\\conf $$DEST\\conf /S /I /Y /Q & \
xcopy ..\\lang $$DEST\\lang /S /I /Y /Q & \
xcopy ..\\samples $$DEST\\samples /S /I /Y /Q & \
copy ..\\*.md $$DEST /Y & \
copy ..\\LICENSE $$DEST /Y & \
copy ..\\start-pgmodeler.bat $$DEST /Y "

QMAKE_DISTCLEAN+= " $$DEST\\* /S /Q & \
rmdir $$DEST\\schemas /S /Q & \
rmdir $$DEST\\conf /S /Q & \
rmdir $$DEST\\lang /S /Q & \
rmdir $$DEST\\samples /S /Q & \
rmdir $$DEST\\plugins /S /Q & \
rmdir $$DEST\\lib /S /Q"
}

QMAKE_DISTCLEAN+= "-r $$DESTDIR/schemas \
$$DESTDIR/samples \
$$DESTDIR/conf \
$$DESTDIR/lang \
$$DESTDIR/lib \
$$DESTDIR/plugins \
$$DESTDIR/*.md \
$$DESTDIR/LICENSE"

LIBS = $$DESTDIR/lib/$$LIBUTIL \
$$DESTDIR/lib/$$LIBPARSERS \
Expand Down
20 changes: 15 additions & 5 deletions plugins/dummyplugin/dummyplugin.pro
Expand Up @@ -13,7 +13,7 @@ CONFIG += plugin qt warn_on uitools uic4
QT = core gui qt3support
TEMPLATE = lib
TARGET = dummyplugin
TRANSLATIONS += $$PWD/lang/dummyplugin.en_US.ts
TRANSLATIONS += $$PWD/lang/$$TARGET.en_US.ts

CODECFORTR = UTF8

Expand All @@ -29,7 +29,7 @@ DEPENDPATH = ". res src ui moc obj"
MOC_DIR = moc
OBJECTS_DIR = obj
UI_DIR = src
DESTDIR = ../../build/plugins/dummyplugin
DESTDIR = ../../build/plugins/$$TARGET

LIBS = $$PGMODELER_LIB_DIR/$$LIBUTIL \
$$PGMODELER_LIB_DIR/$$LIBPARSERS \
Expand All @@ -38,10 +38,20 @@ LIBS = $$PGMODELER_LIB_DIR/$$LIBUTIL \
$$PGMODELER_LIB_DIR/$$LIBPGMODELER \
$$PGMODELER_LIB_DIR/$$LIBPGMODELERUI

QMAKE_DISTCLEAN+= "-r $$MOC_DIR $$OBJECTS_DIR"
unix {
QMAKE_POST_LINK+= "cp res/$$TARGET.png $$DESTDIR;\
cp -r lang/ $$DESTDIR;"
QMAKE_DISTCLEAN+= "-r $$MOC_DIR $$OBJECTS_DIR"
}

windows {
DEST=..\\..\\build\\plugins\\$$TARGET
QMAKE_POST_LINK+= "copy res\\$$TARGET.png $$DEST /Y &\
xcopy lang $$DEST\\lang /S /I /Y /Q"
QMAKE_DISTCLEAN+= "$$MOC_DIR /S /Q & \
$$OBJECTS_DIR /S /Q"
}

QMAKE_POST_LINK+= "cp res/dummyplugin.png $$DESTDIR;\
cp -r lang/ $$DESTDIR;"

HEADERS += src/dummyplugin.h
SOURCES += src/dummyplugin.cpp
Expand Down

0 comments on commit 88d03b7

Please sign in to comment.