-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.cmd
106 lines (83 loc) · 3.38 KB
/
install.cmd
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
@echo off
set installation_dir="dependencies"
set plist_dir="libplist"
set usbmuxd_dir="libusbmuxd"
set imobiledevice_dir="libimobiledevice"
set vcpkg_dir="vcpkg"
set bin_dir="bin"
set lib_dir="lib"
set err_path_not_exist="path does not exist"
set include_dir="include"
set win32_rel_dir="Win32\Release"
if not exist %installation_dir% (
if exist %vcpkg_dir% (
REM Must go inside vcpkg to compile
copy x86-windows.cmake vcpkg\triplets\
cd vcpkg
vcpkg integrate install
echo 'Installing vcpkg packages'
if not exist "buildtrees\openssl\" (
vcpkg install openssl
)
if not exist "buildtrees\dirent\" (
vcpkg install dirent
)
if not exist "buildtrees\getopt\" (
vcpkg install getopt
)
cd ..
)
echo 'Cloning libplist, libusbmuxd and libimobiledevice'
if not exist %plist_dir% (
git clone -b msvc-qustodio --single-branch https://github.com/didix21/libplist.git --depth 1
)
if not exist %usbmuxd_dir% (
git clone -b msvc-qustodio --single-branch https://github.com/didix21/libusbmuxd.git --depth 1
)
if not exist %imobiledevice_dir% (
git clone -b msvc-qustodio https://github.com/didix21/libimobiledevice.git --depth 1
)
echo **************************************
echo 'Compiling libplist Solution'
msbuild /m libplist\libplist.sln /p:Configuration=Release /p:Platform=Win32 /t:Rebuild
echo **************************************
echo 'Compiling libusbmuxd Solution'
msbuild /m libusbmuxd\libusbmuxd.sln /p:Configuration=Release /p:Platform=Win32 /t:Rebuild
echo **************************************
echo 'Compiling libimobiledevice Solution'
echo 'Compiling ibimobiledevice project'
echo 'Compiling idevice_id project'
msbuild /m libimobiledevice\libimobiledevice.sln /p:Configuration=Release /p:Platform=Win32 /t:idevice_id:Rebuild
echo 'Compiling ideviceinfo project'
msbuild /m libimobiledevice\libimobiledevice.sln /p:Configuration=Release /p:Platform=Win32 /t:ideviceinfo:Rebuild
echo 'Compiling idevicebackup2 project'
msbuild /m libimobiledevice\libimobiledevice.sln /p:Configuration=Release /p:Platform=Win32 /t:idevicebackup2:Rebuild
echo 'Compiling idevicepair project'
msbuild /m libimobiledevice\libimobiledevice.sln /p:Configuration=Release /p:Platform=Win32 /t:idevicepair:Rebuild
echo Creating %installation_dir% path
md %installation_dir%
if exist %installation_dir% (
if exist %vcpkg_dir% (
move %vcpkg_dir%\installed\x86-windows %installation_dir%
) else (
echo ERROR %vcpkg_dir% %err_path_not_exist%
exit
)
for %%i in (
%plist_dir%
%usbmuxd_dir%
%imobiledevice_dir%
) do (
md %installation_dir%\%%i\%bin_dir%
md %installation_dir%\%%i\%lib_dir%
move %%i\%include_dir% %installation_dir%\%%i\%include_dir%
move %%i\%win32_rel_dir%\*.lib %installation_dir%\%%i\%lib_dir%
move %%i\%win32_rel_dir%\*.dll %installation_dir%\%%i\%bin_dir%
)
) else (
echo ERROR %installation_dir% %err_path_not_exist%
exit
)
echo Deleting vcpkg, libplist, libusbmuxd and libimobiledevice
rmdir /Q /S vcpkg libplist libusbmuxd libimobiledevice
)