mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-11 04:59:07 +01:00
* chore: bump electron@43.4.1 * linux: align desktop name and StartupWMClass Give DEB and RPM installs a package owned reverse DNS desktop name so runtime wayland portal identity resolves to an installed desktop file. Keep snap and archive runtime identities aligned with their distribution specific desktop file behavior. Set StartupWMClass to the same identity used by the runtime. * linux: respect native window controls layout Reserve both left and right WCO safe areas so custom title bar content does not overlap controls when the desktop environment places them on either side. * dialogs: preserve native locations Electron 43 defaults native dialogs without a defaultPath to the Downloads directory instead of allowing the platform to retain its last location. Resolve existing file or folder history before invoking native open and save dialogs, while preserving an explicit caller-provided URI. * protocol: migrate from deprecated handlers Replace deprecated registerFileProtocol, registerBufferProtocol, registerHttpProtocol, and interceptFileProtocol APIs with protocol.handle(). * test: migrate unit test protocol handler * chore: remove obsolete WebSQL preferences Electron 43 removes WebSQL and its enableWebSQL web preference. * fix: wco position for windows * protocol: avoid exposing managed resource errors * test: preserve file URLs in protocol handler * test: adopt worker parent identifiers in CDP golden Electron 43 target lifecycle payloads include parentId and parentFrameId for worker targets. * build: support V8 headers with GCC 12 * test: use platform native dialog paths * build: install custom electron headers * build: bootstrap electron headers in compile job * build: bootstrap Electron headers for Alpine and web * chore: bump electron@43.5.1 * chore: revert system fontconfig init workaround * temp: bump distro * chore: bump electron@43.6.0 * test: skip Dev Container agent host smoke test for exploration The exploration update channel serves an outdated agent host server that does not include the bundled Copilot CLI, causing the smoke test to time out. * chore: bump distro
93 lines
3.6 KiB
Plaintext
93 lines
3.6 KiB
Plaintext
Name: @@NAME@@
|
|
Version: @@VERSION@@
|
|
Release: @@RELEASE@@.el8
|
|
Summary: Code editing. Redefined.
|
|
Group: Development/Tools
|
|
Vendor: Microsoft Corporation
|
|
Packager: Visual Studio Code Team <vscode-linux@microsoft.com>
|
|
License: @@LICENSE@@
|
|
URL: https://code.visualstudio.com/
|
|
Icon: @@NAME@@.xpm
|
|
Requires: @@DEPENDENCIES@@
|
|
Recommends: @@RECOMMENDS@@
|
|
AutoReq: 0
|
|
|
|
%global __provides_exclude_from ^%{_datadir}/%{name}/.*\\.so.*$
|
|
# Disable elf stripping, refer https://github.com/microsoft/vscode/issues/223455#issuecomment-2610001754
|
|
%global __brp_strip %{nil}
|
|
%global __brp_strip_comment_note %{nil}
|
|
|
|
%description
|
|
Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ.
|
|
|
|
# Don't generate build_id links to prevent conflicts when installing multiple
|
|
# versions of VS Code alongside each other (e.g. `code` and `code-insiders`)
|
|
%define _build_id_links none
|
|
%define __strip @@STRIP@@
|
|
|
|
%install
|
|
# Destination directories
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
mkdir -p %{buildroot}%{_datadir}/appdata
|
|
mkdir -p %{buildroot}%{_datadir}/mime/packages
|
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
|
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
|
|
# Application
|
|
cp -r usr/share/%{name}/* %{buildroot}%{_datadir}/%{name}
|
|
ln -s %{_datadir}/%{name}/bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
# Support files
|
|
cp -r usr/share/applications/@@DESKTOP_NAME@@.desktop %{buildroot}%{_datadir}/applications
|
|
cp -r usr/share/applications/@@DESKTOP_NAME@@.UrlHandler.desktop %{buildroot}%{_datadir}/applications
|
|
cp -r usr/share/appdata/@@DESKTOP_NAME@@.appdata.xml %{buildroot}%{_datadir}/appdata
|
|
cp -r usr/share/mime/packages/%{name}-workspace.xml %{buildroot}%{_datadir}/mime/packages/%{name}-workspace.xml
|
|
cp -r usr/share/pixmaps/@@ICON@@.png %{buildroot}%{_datadir}/pixmaps
|
|
# Shell completions
|
|
cp usr/share/bash-completion/completions/%{name} %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
|
cp usr/share/zsh/site-functions/_%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
|
|
|
|
%post
|
|
# Remove the legacy bin command if this is the stable build
|
|
if [ "%{name}" = "code" ]; then
|
|
rm -f /usr/local/bin/code
|
|
fi
|
|
|
|
# Register yum repository
|
|
# TODO: #229: Enable once the yum repository is signed
|
|
#if [ "@@NAME@@" != "code-oss" ]; then
|
|
# if [ -d "/etc/yum.repos.d" ]; then
|
|
# REPO_FILE=/etc/yum.repos.d/@@NAME@@.repo
|
|
# rm -f $REPO_FILE
|
|
# echo -e "[@@NAME@@]\nname=@@NAME_LONG@@\nbaseurl=@@UPDATEURL@@/api/rpm/@@QUALITY@@/@@ARCHITECTURE@@/rpm" > $REPO_FILE
|
|
# fi
|
|
#fi
|
|
|
|
# Install the desktop entry
|
|
update-desktop-database &> /dev/null || :
|
|
|
|
# Update mimetype database to pickup workspace mimetype
|
|
update-mime-database %{_datadir}/mime &> /dev/null || :
|
|
|
|
%postun
|
|
# Uninstall the desktop entry
|
|
update-desktop-database &> /dev/null || :
|
|
|
|
# Update mimetype database for removed workspace mimetype
|
|
update-mime-database %{_datadir}/mime &> /dev/null || :
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%attr(4755, root, root) %{_datadir}/%{name}/chrome-sandbox
|
|
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/%{name}/
|
|
%{_datadir}/applications/@@DESKTOP_NAME@@.desktop
|
|
%{_datadir}/applications/@@DESKTOP_NAME@@.UrlHandler.desktop
|
|
%{_datadir}/appdata/@@DESKTOP_NAME@@.appdata.xml
|
|
%{_datadir}/mime/packages/%{name}-workspace.xml
|
|
%{_datadir}/pixmaps/@@ICON@@.png
|
|
%{_datadir}/bash-completion/completions/%{name}
|
|
%{_datadir}/zsh/site-functions/_%{name}
|