Merge pull request #14868 from electron/fix-win-dump-syms
chore: fix windows dump syms
This commit is contained in:
commit
531a4c5b8c
6 changed files with 52 additions and 23 deletions
|
@ -179,6 +179,21 @@ step-nodejs-headers-build: &step-nodejs-headers-build
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default third_party/electron_node:headers
|
ninja -C out/Default third_party/electron_node:headers
|
||||||
|
|
||||||
|
step-electron-publish: &step-electron-publish
|
||||||
|
run:
|
||||||
|
name: Publish Electron Dist
|
||||||
|
command: |
|
||||||
|
cd src/electron
|
||||||
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||||
|
if [ "$UPLOAD_TO_S3" != "1" ]; then
|
||||||
|
echo 'Uploading Electron release distribution to github releases'
|
||||||
|
script/upload.py
|
||||||
|
else
|
||||||
|
echo 'Uploading Electron release distribution to s3'
|
||||||
|
script/upload.py --upload_to_s3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
step-persist-data-for-tests: &step-persist-data-for-tests
|
step-persist-data-for-tests: &step-persist-data-for-tests
|
||||||
persist_to_workspace:
|
persist_to_workspace:
|
||||||
root: .
|
root: .
|
||||||
|
@ -411,6 +426,9 @@ steps-electron-build-for-publish: &steps-electron-build-for-publish
|
||||||
# Node.js headers
|
# Node.js headers
|
||||||
- *step-nodejs-headers-build
|
- *step-nodejs-headers-build
|
||||||
|
|
||||||
|
# Publish
|
||||||
|
- *step-electron-publish
|
||||||
|
|
||||||
|
|
||||||
steps-native-mksnapshot-build: &steps-native-mksnapshot-build
|
steps-native-mksnapshot-build: &steps-native-mksnapshot-build
|
||||||
steps:
|
steps:
|
||||||
|
|
11
appveyor.yml
11
appveyor.yml
|
@ -31,6 +31,7 @@ build_script:
|
||||||
- ninja -C out/Default electron:electron_dist_zip
|
- ninja -C out/Default electron:electron_dist_zip
|
||||||
- ninja -C out/Default electron:electron_mksnapshot_zip
|
- ninja -C out/Default electron:electron_mksnapshot_zip
|
||||||
- ninja -C out/Default electron:electron_chromedriver_zip
|
- ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
- ninja -C out/Default third_party/electron_node:headers
|
||||||
- appveyor PushArtifact out/Default/dist.zip
|
- appveyor PushArtifact out/Default/dist.zip
|
||||||
- appveyor PushArtifact out/Default/chromedriver.zip
|
- appveyor PushArtifact out/Default/chromedriver.zip
|
||||||
|
|
||||||
|
@ -38,15 +39,17 @@ build_script:
|
||||||
- ps: >-
|
- ps: >-
|
||||||
if ($env:GN_CONFIG -eq 'release') {
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
ninja -C out/Default third_party/breakpad:dump_syms
|
ninja -C out/Default third_party/breakpad:dump_syms
|
||||||
python electron\script\dump-symbols.py -d %cd%/out/Default/electron.breakpad.syms
|
}
|
||||||
|
- if "%GN_CONFIG%"=="release" ( python electron\script\dump-symbols.py -d %cd%\out\Default\electron.breakpad.syms -v)
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
python electron\script\zip-symbols.py
|
python electron\script\zip-symbols.py
|
||||||
appveyor PushArtifact out/Default/electron.breakpad.syms
|
appveyor PushArtifact out/Default/symbols.zip
|
||||||
}
|
}
|
||||||
test_script:
|
test_script:
|
||||||
- if "%GN_CONFIG%"=="testing" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg )
|
- if "%GN_CONFIG%"=="testing" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg )
|
||||||
- ps: >-
|
- ps: >-
|
||||||
if ($env:GN_CONFIG -eq 'testing') {
|
if ($env:GN_CONFIG -eq 'testing') {
|
||||||
ninja -C out/Default third_party/electron_node:headers
|
|
||||||
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
||||||
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,4 +69,4 @@ deploy_script:
|
||||||
Write-Output "Uploading Electron release distribution to github releases"
|
Write-Output "Uploading Electron release distribution to github releases"
|
||||||
& python script\upload.py
|
& python script\upload.py
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lib.config import PLATFORM, enable_verbose_mode, is_verbose_mode
|
from lib.config import PLATFORM, enable_verbose_mode, is_verbose_mode
|
||||||
from lib.util import get_electron_branding, execute, rm_rf, get_out_dir
|
from lib.util import get_electron_branding, execute, rm_rf, get_out_dir, \
|
||||||
|
GN_SRC_DIR
|
||||||
|
|
||||||
ELECTRON_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
ELECTRON_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(ELECTRON_ROOT))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(ELECTRON_ROOT))
|
||||||
|
@ -30,12 +31,12 @@ def main():
|
||||||
helper_app = os.path.join(build_path, '{0}.app'.format(helper_name),
|
helper_app = os.path.join(build_path, '{0}.app'.format(helper_name),
|
||||||
'Contents', 'MacOS', product_name + " Helper")
|
'Contents', 'MacOS', product_name + " Helper")
|
||||||
binaries = [main_app, helper_app]
|
binaries = [main_app, helper_app]
|
||||||
for binary in binaries:
|
for binary in binaries:
|
||||||
generate_posix_symbols(binary, source_root, build_path,
|
generate_posix_symbols(binary, source_root, build_path,
|
||||||
args.destination)
|
args.destination)
|
||||||
else:
|
else:
|
||||||
binary = os.path.join(build_path, project_name)
|
binary = os.path.join(build_path, project_name)
|
||||||
generate_posix_symbols(binary, source_root, build_path,
|
generate_posix_symbols(binary, source_root, build_path,
|
||||||
args.destination)
|
args.destination)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -45,8 +46,16 @@ def main():
|
||||||
'--symbols-dir={0}'.format(args.destination),
|
'--symbols-dir={0}'.format(args.destination),
|
||||||
'--jobs=16',
|
'--jobs=16',
|
||||||
os.path.relpath(build_path),
|
os.path.relpath(build_path),
|
||||||
]
|
]
|
||||||
execute([sys.executable, generate_breakpad_symbols] + args)
|
if is_verbose_mode():
|
||||||
|
args += ['-v']
|
||||||
|
#Make sure msdia140.dll is in the path (needed for dump_syms.exe)
|
||||||
|
env = os.environ.copy()
|
||||||
|
msdia140_dll_path = os.path.join(GN_SRC_DIR, 'third_party', 'llvm-build',
|
||||||
|
'Release+Asserts', 'bin')
|
||||||
|
env['PATH'] = os.path.pathsep.join(
|
||||||
|
[env.get('PATH', '')] + [msdia140_dll_path])
|
||||||
|
execute([sys.executable, generate_breakpad_symbols] + args, env)
|
||||||
|
|
||||||
def get_names_from_branding():
|
def get_names_from_branding():
|
||||||
variables = get_electron_branding()
|
variables = get_electron_branding()
|
||||||
|
@ -62,9 +71,9 @@ def generate_posix_symbols(binary, source_root, build_dir, destination):
|
||||||
'--jobs=16',
|
'--jobs=16',
|
||||||
'--binary={0}'.format(binary),
|
'--binary={0}'.format(binary),
|
||||||
]
|
]
|
||||||
if is_verbose_mode():
|
if is_verbose_mode():
|
||||||
args += ['-v']
|
args += ['-v']
|
||||||
execute([sys.executable, generate_breakpad_symbols] + args)
|
execute([sys.executable, generate_breakpad_symbols] + args)
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description='Create breakpad symbols')
|
parser = argparse.ArgumentParser(description='Create breakpad symbols')
|
||||||
|
@ -83,7 +92,7 @@ def parse_args():
|
||||||
required=False)
|
required=False)
|
||||||
parser.add_argument('-v', '--verbose',
|
parser.add_argument('-v', '--verbose',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Prints the output of the subprocesses')
|
help='Prints the output of the subprocesses')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -10,16 +10,13 @@ from lib.util import get_electron_branding, execute, rm_rf, safe_mkdir, s3put, \
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
RELEASE_DIR = get_out_dir()
|
RELEASE_DIR = get_out_dir()
|
||||||
GEN_DIR = os.path.join(RELEASE_DIR, 'gen')
|
|
||||||
|
|
||||||
|
|
||||||
PROJECT_NAME = get_electron_branding()['project_name']
|
PROJECT_NAME = get_electron_branding()['project_name']
|
||||||
PRODUCT_NAME = get_electron_branding()['product_name']
|
PRODUCT_NAME = get_electron_branding()['product_name']
|
||||||
|
SYMBOLS_DIR = os.path.join(
|
||||||
if PLATFORM == 'win32':
|
RELEASE_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME)
|
||||||
SYMBOLS_DIR = os.path.join(GEN_DIR, 'symbols')
|
)
|
||||||
else:
|
|
||||||
SYMBOLS_DIR = os.path.join(GEN_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
|
||||||
|
|
||||||
PDB_LIST = [
|
PDB_LIST = [
|
||||||
os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME))
|
os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME))
|
||||||
|
|
|
@ -65,7 +65,7 @@ def main():
|
||||||
upload_electron(release, electron_zip, args)
|
upload_electron(release, electron_zip, args)
|
||||||
if get_target_arch() != 'mips64el':
|
if get_target_arch() != 'mips64el':
|
||||||
symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
|
symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
|
||||||
shutil.copy2(os.path.join(OUT_DIR, 'symobls.zip'), symbols_zip)
|
shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
|
||||||
upload_electron(release, symbols_zip, args)
|
upload_electron(release, symbols_zip, args)
|
||||||
if PLATFORM == 'darwin':
|
if PLATFORM == 'darwin':
|
||||||
api_path = os.path.join(OUT_DIR, 'electron-api.json')
|
api_path = os.path.join(OUT_DIR, 'electron-api.json')
|
||||||
|
@ -77,12 +77,15 @@ def main():
|
||||||
shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip)
|
shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip)
|
||||||
upload_electron(release, dsym_zip, args)
|
upload_electron(release, dsym_zip, args)
|
||||||
elif PLATFORM == 'win32':
|
elif PLATFORM == 'win32':
|
||||||
upload_electron(release, os.path.join(OUT_DIR, PDB_NAME), args)
|
pdb_zip = os.path.join(OUT_DIR, PDB_NAME)
|
||||||
|
shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip)
|
||||||
|
upload_electron(release, pdb_zip, args)
|
||||||
|
|
||||||
# Upload free version of ffmpeg.
|
# Upload free version of ffmpeg.
|
||||||
ffmpeg = get_zip_name('ffmpeg', ELECTRON_VERSION)
|
ffmpeg = get_zip_name('ffmpeg', ELECTRON_VERSION)
|
||||||
ffmpeg_zip = os.path.join(OUT_DIR, ffmpeg)
|
ffmpeg_zip = os.path.join(OUT_DIR, ffmpeg)
|
||||||
shutil.copy2(os.path.join(OUT_DIR, 'ffmpeg.zip'), ffmpeg_zip)
|
ffmpeg_build_path = os.path.join(GN_SRC_DIR, 'out', 'ffmpeg', 'ffmpeg.zip')
|
||||||
|
shutil.copy2(ffmpeg_build_path, ffmpeg_zip)
|
||||||
upload_electron(release, ffmpeg_zip, args)
|
upload_electron(release, ffmpeg_zip, args)
|
||||||
|
|
||||||
chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION)
|
chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION)
|
||||||
|
|
1
vsts.yml
1
vsts.yml
|
@ -56,7 +56,6 @@ jobs:
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default third_party/electron_node:headers
|
ninja -C out/Default third_party/electron_node:headers
|
||||||
displayName: Build Node.js headers for testing
|
displayName: Build Node.js headers for testing
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
|
Loading…
Reference in a new issue