summaryrefslogtreecommitdiffstats
path: root/scripts/010_qtbase
blob: 920dcf851f72553011172446119303b0b14c481e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#--------------------------------------------------------------------------------------------------
# Standard modularization template
# --------------------------------
#
# The script will start execution from <QTDIR>.
#
# Available variables:
#     $qtdir    = <QTDIR> or where you started the modularize script from
#     $basepath = path for the modularize script, and basepath for the modularization repo
#     $OStype   = <n> where <n> is one of 0 = Windows, 1 = Unix, 2 = Mac
#
# To execute a command:
#     run("git mv foo bar")        # runs command, reports error possition and dies
#     runNotDie("git mv foo bar")  # runs command, reports error possition, returns error code
#                                    and continues. Use ($? >> 8) to get the real exit code.
#     ensureDir("qtbase")        # Ensures that qtbase exists and is a directory. Will create
#                                    it if it does not exist.
#--------------------------------------------------------------------------------------------------

ensureDir("qtbase/src/tools");
run("git mv src/tools/bootstrap qtbase/src/tools/bootstrap");
run("git mv src/tools/moc qtbase/src/tools/moc");
run("git mv src/tools/uic qtbase/src/tools/uic");
run("git mv src/tools/idc qtbase/src/tools/idc");
run("git mv src/tools/rcc qtbase/src/tools/rcc");
run("git mv src/tools/tools.pro qtbase/src/tools/tools.pro");
run("git mv src/corelib qtbase/src/corelib");
run("git mv src/gui qtbase/src/gui");
run("git mv src/network qtbase/src/network");
run("git mv src/opengl qtbase/src/opengl");
run("git mv src/openvg qtbase/src/openvg");
run("git mv src/sql qtbase/src/sql");
run("git mv src/xml qtbase/src/xml");
run("git mv src/dbus qtbase/src/dbus");
run("git mv tools/designer/src/uitools qtbase/src");
ensureDir("qtbase/tools");
run("git mv tools/designer/src/lib/uilib qtbase/tools/uilib");

ensureDir("qtbase/src/plugins/imageformats");
# all but we want to exclue iconengines, imageformats
my @pluginsDirs = findFiles("src/plugins", "^[abcdgkmpqs].*", 0);
foreach (@pluginsDirs) {
    # Will be handled by declarative.
    next if (/^qmltooling$/);
    run("git mv src/plugins/$_ qtbase/src/plugins");
}
run("git mv src/plugins/inputmethods qtbase/src/plugins/inputmethods");
# all but we want to exclue svg
my @imageformatsDirs = findFiles("src/plugins/imageformats", "^[gijmt].*", 0);
foreach (@imageformatsDirs) {
    run("git mv src/plugins/imageformats/$_ qtbase/src/plugins/imageformats");
}

run("git mv src/s60installs qtbase/src/s60installs");
run("git mv src/s60main qtbase/src/s60main");
run("git mv src/winmain qtbase/src/winmain");
run("git mv src/testlib qtbase/src/testlib");
ensureDir("qtbase/src/3rdparty");
# all but we want to exclue webkit, javascriptcore, phonon, clucene
my @thirdpartyDirs = findFiles("src/3rdparty", "^[defhlmMRsxz].*", 0);
foreach (@thirdpartyDirs) {
    run("git mv src/3rdparty/$_ qtbase/src/3rdparty");
}
run("git mv src/3rdparty/wintab qtbase/src/3rdparty/wintab");
run("git mv src/3rdparty/patches qtbase/src/3rdparty/patches");
run("git mv src/3rdparty/pixman qtbase/src/3rdparty/pixman");
run("git mv src/3rdparty/powervr qtbase/src/3rdparty/powervr");
run("git mv src/3rdparty/ce-compat qtbase/src/3rdparty/ce-compat");
run("git mv src/3rdparty/ptmalloc qtbase/src/3rdparty/ptmalloc");
run("git mv src/3rdparty/.gitattributes qtbase/src/3rdparty/");

run("git mv src/qbase.pri qtbase/src");
run("git mv src/qt_install.pri qtbase/src");
run("git mv src/qt_targets.pri qtbase/src");
run("git mv src/src.pro qtbase/src");

run("git mv configure* qtbase");
run("git mv header* qtbase");
run("git mv INSTALL* qtbase");
run("git mv LGPL_* qtbase");
run("git mv LICENSE* qtbase");
run("git mv projects.pro qtbase/qtbase.pro");
run("git mv config.tests* qtbase");
run("git mv config.profiles* qtbase");
run("git mv bin* qtbase");
run("git mv dist* qtbase");
run("git mv lib* qtbase");
run("git mv mkspecs* qtbase");
run("git mv qmake* qtbase");

ensureDir("qtbase/tools/shared");
run("git mv tools/shared/windows qtbase/tools/shared/windows");
run("git mv tools/shared/symbian qtbase/tools/shared/symbian");
run("git mv tools/configure qtbase/tools/configure");

run("git rm -rfq templates");

return 1;