-
Notifications
You must be signed in to change notification settings - Fork 1
/
kodi_custom_build_instruction.txt
407 lines (342 loc) · 15.9 KB
/
kodi_custom_build_instruction.txt
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
"""
Kodi-17 : Krypton custom build instruction
Follow steps provided at
http://kodi.wiki/view/Compiling
or
https://github.com/xbmc/xbmc/tree/master/docs
<XBMC_SRC> = E:\xbmc-Krypton\ (can be different depending on system)
Learn somewhat NSIS (to customize installer) from below links
QuickStart : http://nsis.sourceforge.net/Simple_tutorials
Detailed : http://nsis.sourceforge.net/Docs/
"""
Logo changes to be made @
@ : <XBMC_SRC>\media
for Windows :
@ : <XBMC_SRC>\tools\windows\packaging\media
for linux :
@ : <XBMC_SRC>\tools\Linux\packaging\media
for android :
@ : <XBMC_SRC>\tools\android\packaging\media
To change build name
@ : <XBMC_SRC>\version.txt
To change skin -------- for kodi 17 (xbmc.gui version should not be greater than 5.12.0 specified in addon.xml of skin folder)
@ : <XBMC_SRC>\project\cmake\CMakeLists.txt
ADD CORE_SOURCE_DIR
list(APPEND SKINS "${CORE_SOURCE_DIR}/addons/skin.mimic\;${CORE_SOURCE_DIR}")
@ : <XBMC_SRC>\system\settings\settings.xml
CHANGE SKIN NAME
i.e. change <default>skin.mimic</default>
<default>Your skin name</default>
@ : <XBMC_SRC>\system\addon-manifest.xml
ADD adon entries
i.e. add entry of skin <addon>skin.mimic</addon>
<addon>Your skin name</addon>
for skin.mimic need to resolve few more package to download and add it to in manifest:
<addon>script.module.pil</addon>
<addon>script.skinshortcuts</addon>
<addon>script.toolbox</addon>
<addon>script.module.simplejson</addon>
<addon>resource.images.studios.white</addon>
<addon>script.module.unidecode</addon>
<addon>script.skin.helper.service</addon>
<addon>script.module.requests</addon>
also make sure addon exists in <XBMC_SRC>\kodi-build\addons and <XBMC_SRC>\addons
@ : <XBMC_SRC>\Makefile.in
CHANGE SKIN_DIRS
ESTUARY_MEDIA=addons/skin.mimic/media
SKIN_DIRS=$(ESTUARY_MEDIA)
COMMENT block - skin textures
i.e.
# skin textures
ifeq (@USE_TEXTUREPACKER@,1)
skins: @TEXTUREPACKER@
$(MAKE) -C $(ESTUARY_MEDIA)
$(MAKE) -C $(ESTOUCHY_MEDIA)
else
skins:
endif
*********** Specific changes for Ceyes ****************
C:\XBMC-Krypton\xbmc\xbmc\interfaces\json-rpc\AddonsOperations.cpp
*******************************************************
*********** Specific changes for WizeTV (installer NSIS) ****************
@ : <XBMC_SRC>\system\addon-manifest.xml
ADD adon entries
<addon>plugin.program.test</addon>
To copy files in appdata\Roaming : place this code in
file :
before : Helpre function
; *************************************************************
; Custom Function by __gahan__ to replace substring
!define StrRep "!insertmacro StrRep"
!macro StrRep output string old new
Push `${string}`
Push `${old}`
Push `${new}`
!ifdef __UNINSTALL__
Call un.StrRep
!else
Call StrRep
!endif
Pop ${output}
!macroend
!macro Func_StrRep un
Function ${un}StrRep
Exch $R2 ;new
Exch 1
Exch $R1 ;old
Exch 2
Exch $R0 ;string
Push $R3
Push $R4
Push $R5
Push $R6
Push $R7
Push $R8
Push $R9
StrCpy $R3 0
StrLen $R4 $R1
StrLen $R6 $R0
StrLen $R9 $R2
loop:
StrCpy $R5 $R0 $R4 $R3
StrCmp $R5 $R1 found
StrCmp $R3 $R6 done
IntOp $R3 $R3 + 1 ;move offset by 1 to check the next character
Goto loop
found:
StrCpy $R5 $R0 $R3
IntOp $R8 $R3 + $R4
StrCpy $R7 $R0 "" $R8
StrCpy $R0 $R5$R2$R7
StrLen $R6 $R0
IntOp $R3 $R3 + $R9 ;move offset by length of the replacement string
Goto loop
done:
Pop $R9
Pop $R8
Pop $R7
Pop $R6
Pop $R5
Pop $R4
Pop $R3
Push $R0
Push $R1
Pop $R0
Pop $R1
Pop $R0
Pop $R2
Exch $R1
FunctionEnd
!macroend
!insertmacro Func_StrRep ""
!insertmacro Func_StrRep "un."
; *************************************************************
after : ;Store installation folder in Section SecAPP
;-----Copy files to Appdata\Roaming\WizeTV\addons by __gahan__
${StrRep} $0 $LOCALAPPDATA "Local" "Roaming"
CopyFiles /SILENT "$PROGRAMFILES\WizeTV\addons\skin.mimic\*" "$0\WizeTV\addons\skin.mimic"
;-----
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
ANDROID BUILD
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
"""
Helpful instruction to refer from:
https://github.com/xbmc/xbmc/blob/Krypton/docs/README.android
or
http://forum.kodi.tv/showthread.php?tid=306050
"""
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
******************** My Steps ********************
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step : 1
---------
follow first 3 steps till SDK and NDK setup
these the configuration steps are same as mentioned in https://github.com/xbmc/xbmc/blob/Krypton/docs/README.android
in my step location are as follow
android-sdk & android-ndk @ : /opt/
androideabi @ : /opt/
Path setup
export KODI_HOME = /$HOME/kodi-android
export PREFIX = ${KODI_HOME}/xbmc-depends
export NDK_HOME = /opt/android-ndk-r12b
export SDK_HOME = /opt/android-sdk-linux
Step : 2
----------------------
Set up the Android tool chain
----------------------
$ cd /opt/android-ndk-r12b
$ cd build/tools
$ ./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=/opt/android-ndk-r12b/arm-linux-androideabi-4.9-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi-4.9
Step : 3
----------------------
Creat debug key to sign for the APK
----------------------
$ keytool -genkey -keystore ~/.android/debug.keystore -v -alias \
androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass \
android -storepass android -keyalg RSA -keysize 2048 -validity 10000
Step : 4
----------------------
Get the source code — this gets me Kodi version 17 RC1
VERSION_MAJOR 17 / VERSION_MINOR 2 / VERSION_TAG RC1
VERSION_CODE 170901 / ADDON_API 17.1.901
----------------------
$ cd $HOME
$ git clone -b Krypton git://github.com/xbmc/xbmc.git kodi-android
$ cd kodi-android
Step:5
----------------------
Building dependencies
----------------------
$ cd $HOME/kodi-android/tools/depends
$ ./bootstrap
$ ./configure --with-tarballs=$HOME/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r12b --with-toolchain=/opt/android-ndk-r12b/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=$HOME/xbmc-depends
-- this next two steps would take a while. I did not follow the advice to use make -j
$ make
|||||||||||| Now this stage you may get many kind of errors:
|if| leaving directory :|try| possible reason delete package and `$ make` again and make sure internet connection is stable
|if| C compiler cannot make executables (gcc working.. no) :|try| reconfigure from "Step : 2" wisely
|Never use sudo|
$ make -C target/binary-addons
$ make -C target/xbmc
from <SRC> run below commands:
$ make
$ make apk
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE : ALWAYS REMOVE THESE FOLDERS IF ANY CHANGE MADE IN ADDONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quixom@quixom:~/kodi-android$ rm -rf tools/android/packaging/assets/*
quixom@quixom:~/kodi-android$ rm -rf /home/quixom/xbmc-depends/arm-linux-androideabi-android-21/share/wizetv/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
****************************************************************************************************************************
How to build Kodi Krypton for Android with no compiler errors.
This is based on xbmc/docs/README.android. I just filled in
the blanks that README.android had. The APK was tested on
Amazon FireTV.
After many hours of trying to compile Kodi for Android, I thought I could
share my steps to help prevent headaches. This is a step by step guide.
This will work with both Windows 7, and OSX (because we are using Virtual box.)
There are less things to go wrong when you start with a fresh install of the
operating system.
-----------------------------------------------
Starting Environment:
Ubuntu 16.04 LTS 64 bit(running on Windows 7 Virtual Box 5.1.14)
javac 1.8.0_121
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
-----------------------------------------------
** Here are the steps:
----------------------
1) Install VirtualBox, then make a Linux Virtual Machine
----------------------
VirtualBox on Windows 7 host. A 30GB expandable disk for Linux is plenty.
Ubuntu 16.04 LTS 64 bit(running on Windows 7 Virtual Box)
----------------------
2) Prepare the Ubuntu installation:
----------------------
$ sudo apt-get update
$ sudo apt-get install default-jdk
$ sudo apt-get install build-essential default-jdk git curl autoconf \
unzip zip zlib1g-dev gawk gperf cmake
$ sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
$ sudo apt-get install libcurl4-openssl-dev
----------------------
3) Get Android SDK & NDK
----------------------
a) SDK tools
$ mkdir $HOME/android-sdk-linux
get the sdk tools from the link below:
https://dl.google.com/android/repository...-linux.zip
uncompress tools_r25.2.3-linux.zip to: /$HOME/android-sdk-linux/
$ cd /$HOME/android-sdk-linux/tools
$ ./android update sdk -u -t platform,platform-tool
$ ./android update sdk --all -u -t build-tools-20.0.0
b) NDK
get the NDK from the link below
https://dl.google.com/android/repository...x86_64.zip
uncompress android-ndk-r12b-linux-x86_64.zip to /$HOME/
so you'll have: /$HOME/android-ndk-r12b
----------------------
4) Set up the Android tool chain
----------------------
$ cd /$HOME/android-ndk-r12b
$ cd build/tools
$ ./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=/${HOME}/arm-linux-androideabi-4.9-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi-4.9
----------------------
5) Creat debug key to sign for the APK
----------------------
$ keytool -genkey -keystore ~/.android/debug.keystore -v -alias \
androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass \
android -storepass android -keyalg RSA -keysize 2048 -validity 10000
----------------------
6) Get the source code — this gets me Kodi version 17 RC1
VERSION_MAJOR 17 / VERSION_MINOR 1 / VERSION_TAG RC1
VERSION_CODE 170901 / ADDON_API 17.0.901
----------------------
$ cd $HOME
$ git clone -b Krypton git://github.com/xbmc/xbmc.git kodi-krypton
$ cd kodi-krypton
----------------------
8) Building dependencies
----------------------
$ cd $HOME/kodi-krypton/tools/depends
$ ./bootstrap
$ ./configure --with-tarballs=/$HOME/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/$HOME/android-sdk-linux --with-ndk=/$HOME/android-ndk-r12b --with-toolchain=/$HOME/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=/$HOME/xbmc-depends
-- this next two steps would take a while. I did not follow the advice to use make -j
$ make
$ make -C target/binary-addons
----------------------
9) Building Kodi.Finally!!!! The instructions in the readme.Android are not updated.
The two lines with * are completely different than the README file.
----------------------
$ cd $HOME/kodi-krypton
* $ make -C tools/depends/target/cmakebuildsys
* $ cd /kodi-krypton/build
$ make
$ make apk
you’ll get your apk in $HOME/kodi-krypton
****************************************************************************************************************************
----------------------------------------------------------------------------------------------------------------------------
-----------------------
Additional help manual
-----------------------
I'm having similar problems. Below is my setup for the toolchain, my build process and config.log and the tail end of my log file but can provide the entire log file if interested.
--my build
#!/bin/bash
export KODI_HOME=/home/spart/xbmc-master
export PREFIX=${KODI_HOME}/xbmc-depends
export NDK_HOME=/home/spart/Android/android-ndk-r12
export SDK_HOME=/home/spart/Android/Sdk/
cd ${KODI_HOME}/tools/depends
#git clean -xfd
#git reset --hard
#git pull --rebase
make distclean
./bootstrap
echo "done bootstraping about to configure"
./configure --with-toolchain=${NDK_HOME}/toolchains/arm-linux-androideabi-4.9/android-21 --with-ndk=${NDK_HOME} --with-sdk-path=${SDK_HOME} --prefix=${PREFIX} --host=arm-linux-androideabi --with-sdk=android-24 --enable-neon
echo "done configuring about to make"
export PATH=/usr/bin/:$PATH
make
echo "done make"
#make -C tools/depends/target/xbmc
#echo "done make -C tools/depends/target/xbmc about to make apk"
#make apk
#echo "done make apk"
--creating my toolchain
./make-standalone-toolchain.sh --ndk-dir=../../ \
--install-dir=/home/spart/Android/android-ndk-r12/toolchains/arm-linux-androideabi-4.9/android-24 --platform=android-24 \
--toolchain=arm-linux-androideabi-4.9
---config.log from xbmc-master
http://pastebin.com/EFPTFDmd
--tail end of the output from the console is
http://pastebin.com/azrE4ivK
--tail end of the log file created when I redirect output to a log file(couldn't past the entire log file since it exceeded the max size).
http://pastebin.com/jmzJzBH5
----------------------------------------------------------------------------------------------------------------------------