Instantly share code, notes, and snippets.

Embed
What would you like to do?
build Vivaldi browser
@echo off
:: copy Vivaldi\Application\{version}\resources\vivaldi into %targetdir%\resources
set sourcedir=%~dp0vivaldi-source
set targetdir=%sourcedir%\out\Release
set threads=2
set "GYP_DEFINES=component=shared_library fastbuild=0"
cd %sourcedir%
if not exist third_party\_winsparkle_lib\Release\WinSparkle.dll (
echo unpack include + Release + x64 into %~dp0third_party\_winsparkle_lib\
exit /b
)
call git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
set path=%sourcedir%\depot_tools;%path%
call gclient --version
mkdir testdata
echo // Vivaldi Standalone > testdata\stp.viv
echo config("sparkle_config") { > %sourcedir%\third_party\BUILD.gn
echo visibility = [ ":*" ] >> %sourcedir%\third_party\BUILD.gn
echo include_dirs = [ "//vivaldi/third_party/_winsparkle_lib/include" ] >> %sourcedir%\third_party\BUILD.gn
echo if (current_cpu == "x64") { >> %sourcedir%\third_party\BUILD.gn
echo lib_dirs = [ "//vivaldi/third_party/_winsparkle_lib/x64/Release" ] >> %sourcedir%\third_party\BUILD.gn
echo } else { >> %sourcedir%\third_party\BUILD.gn
echo lib_dirs = [ "//vivaldi/third_party/_winsparkle_lib/Release" ] >> %sourcedir%\third_party\BUILD.gn
echo } >> %sourcedir%\third_party\BUILD.gn
echo libs = [ "WinSparkle.lib" ] >> %sourcedir%\third_party\BUILD.gn
echo } >> %sourcedir%\third_party\BUILD.gn
echo copy("copy_sparkle_dll") { >> %sourcedir%\third_party\BUILD.gn
echo visibility = [ ":*" ] >> %sourcedir%\third_party\BUILD.gn
echo if (current_cpu == "x64") { >> %sourcedir%\third_party\BUILD.gn
echo sources = [ "//vivaldi/third_party/_winsparkle_lib/x64/Release/WinSparkle.dll" ] >> %sourcedir%\third_party\BUILD.gn
echo } else { >> %sourcedir%\third_party\BUILD.gn
echo sources = [ "//vivaldi/third_party/_winsparkle_lib/Release/WinSparkle.dll" ] >> %sourcedir%\third_party\BUILD.gn
echo } >> %sourcedir%\third_party\BUILD.gn
echo outputs = [ "$root_out_dir/{{source_file_part}}" ] >> %sourcedir%\third_party\BUILD.gn
echo } >> %sourcedir%\third_party\BUILD.gn
echo group("sparkle") { >> %sourcedir%\third_party\BUILD.gn
echo public_deps = [ >> %sourcedir%\third_party\BUILD.gn
echo ":copy_sparkle_dll", >> %sourcedir%\third_party\BUILD.gn
echo ] >> %sourcedir%\third_party\BUILD.gn
echo public_configs = [ ":sparkle_config" ] >> %sourcedir%\third_party\BUILD.gn
echo } >> %sourcedir%\third_party\BUILD.gn
::::??? echo.> %sourcedir%\third_party\deps_updates.gni
call python.bat scripts/runhooks.py
ninja -j %threads% -C %targetdir% vivaldi
@Menci

This comment has been minimized.

Show comment
Hide comment
@Menci

Menci Sep 9, 2016

How much disk space will it cost?

Menci commented Sep 9, 2016

How much disk space will it cost?

@justdanpo

This comment has been minimized.

Show comment
Hide comment
@justdanpo

justdanpo Feb 23, 2017

@Menci
Sorry, I've missed your comment.
Vivaldi 1.7 folder after compilation takes ~32GB

Owner

justdanpo commented Feb 23, 2017

@Menci
Sorry, I've missed your comment.
Vivaldi 1.7 folder after compilation takes ~32GB

@gnanasekar-somanathan

This comment has been minimized.

Show comment
Hide comment
@gnanasekar-somanathan

gnanasekar-somanathan Mar 3, 2017

how to unpack include + Release + x64 into %~dp0third_party_winsparkle_lib
from where i can unpack this?

gnanasekar-somanathan commented Mar 3, 2017

how to unpack include + Release + x64 into %~dp0third_party_winsparkle_lib
from where i can unpack this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment