author | jake |
Wed, 27 Oct 2010 12:06:29 +0300 | |
changeset 9 | 6967ff0a31f5 |
parent 4 | 63928ff6db8d |
permissions | -rw-r--r-- |
0 | 1 |
#include <QFile> |
2 |
#include <QDir> |
|
3 |
||
4 |
#include "publishercreator.h" |
|
5 |
||
6 |
PublisherCreator::PublisherCreator(MainWindow& aUi) : iUi( aUi ) |
|
7 |
{ |
|
8 |
copyFiles(); |
|
9 |
} |
|
10 |
||
11 |
void PublisherCreator::copyFiles() |
|
12 |
{ |
|
13 |
QDir dir; |
|
14 |
||
15 |
// Copy publisher interface as is |
|
16 |
dir.mkpath( iUi.widgetName() + "/publisherif/inc"); |
|
17 |
QFile::copy ( "data/publisherif/inc/hspublisher.h", |
|
18 |
iUi.widgetName() + "/publisherif/inc/hspublisher.h"); |
|
19 |
QFile::copy ( "data/publisherif/inc/hspublisherimpl.h", |
|
20 |
iUi.widgetName() + "/publisherif/inc/hspublisherimpl.h"); |
|
21 |
QFile::copy ( "data/publisherif/inc/hswidgetobserver.h", |
|
22 |
iUi.widgetName() + "/publisherif/inc/hswidgetobserver.h"); |
|
23 |
QFile::copy ( "data/publisherif/inc/transaction.h", |
|
24 |
iUi.widgetName() + "/publisherif/inc/transaction.h"); |
|
25 |
||
26 |
||
27 |
dir.mkpath( iUi.widgetName() + "/publisherif/src"); |
|
28 |
QFile::copy ( "data/publisherif/src/hspublisher.cpp", |
|
29 |
iUi.widgetName() + "/publisherif/src/hspublisher.cpp"); |
|
30 |
QFile::copy ( "data/publisherif/src/hspublisherimpl.cpp", |
|
31 |
iUi.widgetName() + "/publisherif/src/hspublisherimpl.cpp"); |
|
32 |
QFile::copy ( "data/publisherif/src/transaction.cpp", |
|
33 |
iUi.widgetName() + "/publisherif/src/transaction.cpp"); |
|
34 |
||
35 |
// Copy test publisher |
|
36 |
dir.mkpath( iUi.widgetName() + "/testpublisher/data"); |
|
37 |
QFile::copy ( "data/testpublisher/data/testpublisher.rls", |
|
38 |
iUi.widgetName() + "/testpublisher/data/testpublisher.rls"); |
|
39 |
QFile::copy ( "data/testpublisher/data/testpublisher.rss", |
|
40 |
iUi.widgetName() + "/testpublisher/data/testpublisher.rss"); |
|
41 |
QFile::copy ( "data/testpublisher/data/testpublisher_reg.rss", |
|
42 |
iUi.widgetName() + "/testpublisher/data/testpublisher_reg.rss"); |
|
43 |
||
44 |
dir.mkpath( iUi.widgetName() + "/testpublisher/gfx"); |
|
45 |
QFile::copy ( "data/testpublisher/gfx/qgn_menu_TestPublisher.svg", |
|
46 |
iUi.widgetName() + "/testpublisher/gfx/qgn_menu_TestPublisher.svg"); |
|
47 |
QFile::copy ( "data/testpublisher/gfx/f1.png", |
|
48 |
iUi.widgetName() + "/testpublisher/gfx/f1.png"); |
|
49 |
QFile::copy ( "data/testpublisher/gfx/cricket.png", |
|
50 |
iUi.widgetName() + "/testpublisher/gfx/cricket.png"); |
|
51 |
QFile::copy ( "data/testpublisher/gfx/tennis.png", |
|
52 |
iUi.widgetName() + "/testpublisher/gfx/tennis.png"); |
|
2
0c23d71853fe
added copying of two png images into publishercreator.cpp
jake
parents:
0
diff
changeset
|
53 |
QFile::copy ( "data/testpublisher/gfx/rss.png", |
0c23d71853fe
added copying of two png images into publishercreator.cpp
jake
parents:
0
diff
changeset
|
54 |
iUi.widgetName() + "/testpublisher/gfx/rss.png"); |
0c23d71853fe
added copying of two png images into publishercreator.cpp
jake
parents:
0
diff
changeset
|
55 |
QFile::copy ( "data/testpublisher/gfx/rss_small.png", |
0c23d71853fe
added copying of two png images into publishercreator.cpp
jake
parents:
0
diff
changeset
|
56 |
iUi.widgetName() + "/testpublisher/gfx/rss_small.png"); |
0 | 57 |
|
58 |
dir.mkpath( iUi.widgetName() + "/testpublisher/group"); |
|
59 |
QFile::copy ( "data/testpublisher/group/bld.inf", |
|
60 |
iUi.widgetName() + "/testpublisher/group/bld.inf"); |
|
61 |
QFile::copy ( "data/testpublisher/group/icons_scalable_dc.mk", |
|
62 |
iUi.widgetName() + "/testpublisher/group/icons_scalable_dc.mk"); |
|
63 |
QFile::copy ( "data/testpublisher/group/testpublisher.mmp", |
|
64 |
iUi.widgetName() + "/testpublisher/group/testpublisher.mmp"); |
|
65 |
||
66 |
dir.mkpath( iUi.widgetName() + "/testpublisher/inc"); |
|
67 |
QFile::copy ( "data/testpublisher/inc/testpublisher.hrh", |
|
68 |
iUi.widgetName() + "/testpublisher/inc/testpublisher.hrh"); |
|
69 |
QFile::copy ( "data/testpublisher/inc/testpublisher.pan", |
|
70 |
iUi.widgetName() + "/testpublisher/inc/testpublisher.pan"); |
|
71 |
QFile::copy ( "data/testpublisher/inc/testpublisherapplication.h", |
|
72 |
iUi.widgetName() + "/testpublisher/inc/testpublisherapplication.h"); |
|
73 |
QFile::copy ( "data/testpublisher/inc/testpublisherappui.h", |
|
74 |
iUi.widgetName() + "/testpublisher/inc/testpublisherappui.h"); |
|
75 |
QFile::copy ( "data/testpublisher/inc/testpublisherappview.h", |
|
76 |
iUi.widgetName() + "/testpublisher/inc/testpublisherappview.h"); |
|
77 |
QFile::copy ( "data/testpublisher/inc/testpublisherdocument.h", |
|
78 |
iUi.widgetName() + "/testpublisher/inc/testpublisherdocument.h"); |
|
79 |
||
80 |
dir.mkpath( iUi.widgetName() + "/testpublisher/sis"); |
|
81 |
QFile::copy ( "data/testpublisher/sis/backup_registration.xml", |
|
82 |
iUi.widgetName() + "/testpublisher/sis/backup_registration.xml"); |
|
4
63928ff6db8d
Added the setting file, which enables the automatic launch of the publisher. Fixed the issues with the .pkg files.
jake
parents:
2
diff
changeset
|
83 |
QFile::copy ( "data/testpublisher/sis/TestPublisher.pkg", |
63928ff6db8d
Added the setting file, which enables the automatic launch of the publisher. Fixed the issues with the .pkg files.
jake
parents:
2
diff
changeset
|
84 |
iUi.widgetName() + "/testpublisher/sis/TestPublisher.pkg"); |
0 | 85 |
|
86 |
dir.mkpath( iUi.widgetName() + "/testpublisher/src"); |
|
87 |
QFile::copy ( "data/testpublisher/src/testpublisher.cpp", |
|
88 |
iUi.widgetName() + "/testpublisher/src/testpublisher.cpp"); |
|
89 |
QFile::copy ( "data/testpublisher/src/testpublisherapplication.cpp", |
|
90 |
iUi.widgetName() + "/testpublisher/src/testpublisherapplication.cpp"); |
|
91 |
QFile::copy ( "data/testpublisher/src/testpublisherappui.cpp", |
|
92 |
iUi.widgetName() + "/testpublisher/src/testpublisherappui.cpp"); |
|
93 |
//QFile::copy ( "data/testpublisher/src/testpublisherappview.cpp", |
|
94 |
// iUi.widgetName() + "/testpublisher/src/testpublisherappview.cpp"); |
|
95 |
QFile::copy ( "data/testpublisher/src/testpublisherdocument.cpp", |
|
96 |
iUi.widgetName() + "/testpublisher/src/testpublisherdocument.cpp"); |
|
97 |
||
98 |
iUi.replaceData("data/testpublisher/src/testpublisherappview.cpp", |
|
99 |
iUi.widgetName() + "/testpublisher/src/testpublisherappview.cpp" ); |
|
100 |
||
4
63928ff6db8d
Added the setting file, which enables the automatic launch of the publisher. Fixed the issues with the .pkg files.
jake
parents:
2
diff
changeset
|
101 |
iUi.replaceData("data/testpublisher/data/testpublisher_0xe5555555_fs.xml", |
63928ff6db8d
Added the setting file, which enables the automatic launch of the publisher. Fixed the issues with the .pkg files.
jake
parents:
2
diff
changeset
|
102 |
iUi.widgetName() + "/testpublisher/data/testpublisher_0xe5555555_fs.xml"); |
63928ff6db8d
Added the setting file, which enables the automatic launch of the publisher. Fixed the issues with the .pkg files.
jake
parents:
2
diff
changeset
|
103 |
|
0 | 104 |
} |