-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_win_dummy.bat
More file actions
67 lines (41 loc) · 1.5 KB
/
build_win_dummy.bat
File metadata and controls
67 lines (41 loc) · 1.5 KB
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
@echo off
setlocal enabledelayedexpansion
:: put cmd args into string and add spaces around them
set "ARGS= %* "
:: argument check - replaces the flag (with spaces around) with an empty string and than compares the original and the repalced one
::if not "%ARGS%" == "%ARGS: --flag =%" echo "the flag is set"
REM Dependencies
if not "%ARGS%" == "%ARGS: --dependencies =%" (
:: TODO: install Visual Studio Native Build Tools
echo installing dependencies not supported yet
)
REM Prepare
:: build directory
set BUILD=HUI-win-%PROCESSOR_ARCHITECTURE%-dummy
mkdir %BUILD% 2>nul
cd %BUILD%
:: TODO: lowercase architecture or/and standardise architecture strings
REM Build
:: launch vc cmdline
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
:: build
cl /LD /EHsc /D"and=&" /Fe:libHUI.dll ..\hui_webview__dummy.cc
:: create definiton file (dumpbin output edited to be "EXPORTS \n HUI_<list of all methods> \n ...") - its easier to have the file prepared and just copy it
::dumpbin.exe /EXPORTS HUI.dll > HUI.def
::notepad HUI.def
copy ..\cef_HUI.def .\libHUI.def
:: TODO: rename the file as its not cef specific
:: generate *.lib
lib /def:libHUI.def /machine:x64 /out:libHUI.lib
REM Deploy
if not "%ARGS%" == "%ARGS: --deploy =%" (
echo deploying not needed here
)
REM Tests
if not "%ARGS%" == "%ARGS: --tests =%" (
:: build tests
cl /EHsc /Fe:test_webview_js_api.exe ../tests/test_webview_js_api.cc /I.. /link /LIBPATH:. libHUI.lib
)
REM Notes
cd ..
endlocal