-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuild_frameworks.ps1
122 lines (99 loc) · 3.32 KB
/
build_frameworks.ps1
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
$firstdir = pwd
$scriptsdir = $PSScriptRoot
$version = "5.30.0"
$sversion = "5.30"
if ($args.length -lt 3) {
"Usage: .\build_frameworks.ps1 </path/to/qt> <Debug|Release> <Extra CMake flags (just use `"`" if you don't want any)"
exit
}
$qtdir = $args[0]
$buildtype = $args[1]
$cmakeargs = $args[2..($args.length - 1)]
"Building KF5 with in $buildtype mode with cmake arguments $cmakeargs and qt in $qtdir"
# set path
$env:Path = "$qtdir/bin;$env:Path"
if ($buildtype -eq "Debug") {
$kf5dir = "$scriptsdir/../third_party/kf5-debug"
} else {
$kf5dir = "$scriptsdir/../third_party/kf5-release"
}
mkdir $kf5dir -Force
mkdir $kf5dir/build -Force
$webclient = New-Object System.Net.WebClient
function build_framework
{
$framework = $args[0]
cd $kf5dir/build
$foldername = "$framework-$version"
$url = "http://download.kde.org/stable/frameworks/$sversion/$foldername.zip"
if (!(Test-Path "$foldername.zip")) {
"Downloading $framework"
$webclient.DownloadFile("$url", "$pwd/$foldername.zip")
}
if (!(Test-Path -Path $foldername)) {
"Extracting $framework"
Expand-Archive "$foldername.zip" .
}
mkdir $foldername/build -Force
cd $foldername/build
$gtdir = "$scriptsdir/../third_party/gettext-win64"
$zlibdir = "$scriptsdir/../third_party/zlib-win64"
$fbdir = "$scriptsdir/../third_party/flexbison-win32"
cmake .. -G"Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=$buildtype -DCMAKE_INSTALL_PREFIX="$kf5dir" -DCMAKE_PREFIX_PATH="$kf5dir;$qtdir" `
-DGETTEXT_MSGMERGE_EXECUTABLE="$gtdir/bin/msgmerge.exe" -DGETTEXT_MSGFMT_EXECUTABLE="$gtdir/bin/msgfmt.exe" `
-DLibIntl_INCLUDE_DIRS="$gtdir/include" -DLibIntl_LIBRARIES="$gtdir/lib/libintl.lib" -DZLIB_LIBRARY="$zlibdir/lib/zlibstatic.lib" `
-DZLIB_INCLUDE_DIR="$zlibdir/include" -DFLEX_EXECUTABLE="$fbdir/bin/flex.exe" -DBISON_EXECUTABLE="$fbdir/bin/bison.exe" -DBASH_EXE=BASH_EXE-NOTFOUND `
"$cmakeargs"
if($LastExitCode) {
#exit
}
cmake --build . --target install --config $buildtype
if($LastExitCode) {
exit
}
}
build_framework extra-cmake-modules
build_framework kconfig
build_framework ki18n
build_framework kguiaddons
build_framework kitemviews
build_framework sonnet
build_framework kwidgetsaddons
build_framework kcompletion
build_framework kdbusaddons
build_framework karchive
build_framework kcoreaddons
build_framework kjobwidgets
build_framework kwindowsystem
build_framework kcrash
build_framework kservice
build_framework kcodecs
build_framework kauth
build_framework kconfigwidgets
build_framework kiconthemes
build_framework ktextwidgets
build_framework kglobalaccel
build_framework kxmlgui
build_framework kbookmarks
build_framework solid
#build_framework kwallet
build_framework kio
build_framework kparts
#build_framework kitemmodels
#build_framework threadweaver
build_framework attica
#build_framework knewstuff
build_framework syntax-highlighting
build_framework ktexteditor
#build_framework kpackage
#build_framework kdeclarative
#build_framework kcmutils
#build_framework knotifications
#build_framework knotifyconfig
#build_framework libkomparediff2
#build_framework kdoctools
build_framework breeze-icons -DBINARY_ICONS_RESOURCE=1
#build_framework kpty
#build_framework kinit
#build_framework konsole
cd $firstdir