mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode merge-base (#22780)
* Revert "Revert "Merge from vscode merge-base (#22769)" (#22779)"
This reverts commit 47a1745180.
* Fix notebook download task
* Remove done call from extensions-ci
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
|
||||
# when run in remote terminal, use the remote cli
|
||||
if [ -n "$VSCODE_IPC_HOOK_CLI" ]; then
|
||||
REMOTE_CLI="$(which -a '@@APPNAME@@' | grep /remote-cli/)"
|
||||
if [ -n "$REMOTE_CLI" ]; then
|
||||
"$REMOTE_CLI" "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
function app_realpath() {
|
||||
SOURCE=$1
|
||||
while [ -h "$SOURCE" ]; do
|
||||
|
||||
@@ -3,9 +3,18 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
|
||||
# when run in remote terminal, use the remote cli
|
||||
if [ -n "$VSCODE_IPC_HOOK_CLI" ]; then
|
||||
REMOTE_CLI="$(which -a '@@APPNAME@@' | grep /remote-cli/)"
|
||||
if [ -n "$REMOTE_CLI" ]; then
|
||||
"$REMOTE_CLI" "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
# test that VSCode wasn't installed inside WSL
|
||||
if grep -qi Microsoft /proc/version && [ -z "$DONT_PROMPT_WSL_INSTALL" ]; then
|
||||
echo "To use @@PRODNAME@@ with the Windows Subsystem for Linux, please install @@PRODNAME@@ in Windows and uninstall the Linux version in WSL. You can then use the \`@@NAME@@\` command in a WSL terminal just as you would in a normal command prompt." 1>&2
|
||||
echo "To use @@PRODNAME@@ with the Windows Subsystem for Linux, please install @@PRODNAME@@ in Windows and uninstall the Linux version in WSL. You can then use the \`@@APPNAME@@\` command in a WSL terminal just as you would in a normal command prompt." 1>&2
|
||||
printf "Do you want to continue anyway? [y/N] " 1>&2
|
||||
read -r YN
|
||||
YN=$(printf '%s' "$YN" | tr '[:upper:]' '[:lower:]')
|
||||
@@ -44,11 +53,11 @@ else
|
||||
VSCODE_PATH="$(dirname "$(readlink -f "$0")")/.."
|
||||
else
|
||||
# else use the standard install location
|
||||
VSCODE_PATH="/usr/share/@@NAME@@"
|
||||
VSCODE_PATH="/usr/share/@@APPNAME@@"
|
||||
fi
|
||||
fi
|
||||
|
||||
ELECTRON="$VSCODE_PATH/@@NAME@@"
|
||||
ELECTRON="$VSCODE_PATH/@@APPNAME@@"
|
||||
CLI="$VSCODE_PATH/resources/app/out/cli.js"
|
||||
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --ms-enable-electron-run-as-node "$@"
|
||||
exit $?
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
Package: @@NAME@@
|
||||
Version: @@VERSION@@
|
||||
Section: devel
|
||||
Depends: libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1, libgbm1
|
||||
Depends: @@DEPENDS@@
|
||||
Recommends: @@RECOMMENDS@@
|
||||
Priority: optional
|
||||
Architecture: @@ARCHITECTURE@@
|
||||
Maintainer: Microsoft Corporation
|
||||
|
||||
@@ -11,6 +11,8 @@ Icon: @@NAME@@.xpm
|
||||
Requires: @@DEPENDENCIES@@
|
||||
AutoReq: 0
|
||||
|
||||
%global __provides_exclude_from ^%{_datadir}/@@NAME@@/.*\\.so.*$
|
||||
|
||||
%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.
|
||||
|
||||
@@ -19,6 +21,7 @@ Visual Studio Code is a new choice of tool that combines the simplicity of a cod
|
||||
%define _build_id_links none
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
mkdir -p %{buildroot}/usr/share/@@NAME@@
|
||||
mkdir -p %{buildroot}/usr/share/applications
|
||||
mkdir -p %{buildroot}/usr/share/pixmaps
|
||||
@@ -32,6 +35,7 @@ cp -r usr/share/mime/packages/@@NAME@@-workspace.xml %{buildroot}/usr/share/mime
|
||||
cp -r usr/share/pixmaps/@@ICON@@.png %{buildroot}/usr/share/pixmaps
|
||||
cp usr/share/bash-completion/completions/@@NAME@@ %{buildroot}/usr/share/bash-completion/completions/@@NAME@@
|
||||
cp usr/share/zsh/site-functions/_@@NAME@@ %{buildroot}/usr/share/zsh/site-functions/_@@NAME@@
|
||||
ln -s ../share/@@NAME@@/bin/@@NAME@@ %{buildroot}/usr/bin/@@NAME@@
|
||||
|
||||
%post
|
||||
# Remove the legacy bin command if this is the stable build
|
||||
@@ -39,9 +43,6 @@ if [ "@@NAME@@" = "code" ]; then
|
||||
rm -f /usr/local/bin/code
|
||||
fi
|
||||
|
||||
# Symlink bin command to /usr/bin
|
||||
ln -sf /usr/share/@@NAME@@/bin/@@NAME@@ %{_bindir}/@@NAME@@
|
||||
|
||||
# Register yum repository
|
||||
# TODO: #229: Enable once the yum repository is signed
|
||||
#if [ "@@NAME@@" != "code-oss" ]; then
|
||||
@@ -56,10 +57,6 @@ ln -sf /usr/share/@@NAME@@/bin/@@NAME@@ %{_bindir}/@@NAME@@
|
||||
update-mime-database /usr/share/mime &> /dev/null || :
|
||||
|
||||
%postun
|
||||
if [ $1 = 0 ]; then
|
||||
rm -f /usr/bin/@@NAME@@
|
||||
fi
|
||||
|
||||
# Update mimetype database for removed workspace mimetype
|
||||
update-mime-database /usr/share/mime &> /dev/null || :
|
||||
|
||||
@@ -67,6 +64,7 @@ update-mime-database /usr/share/mime &> /dev/null || :
|
||||
%defattr(-,root,root)
|
||||
%attr(4755, root, root) /usr/share/@@NAME@@/chrome-sandbox
|
||||
|
||||
/usr/bin/@@NAME@@
|
||||
/usr/share/@@NAME@@/
|
||||
/usr/share/applications/@@NAME@@.desktop
|
||||
/usr/share/applications/@@NAME@@-url-handler.desktop
|
||||
|
||||
@@ -58,11 +58,9 @@ apps:
|
||||
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --no-sandbox
|
||||
common-id: @@NAME@@.desktop
|
||||
environment:
|
||||
DISABLE_WAYLAND: 1
|
||||
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|
||||
|
||||
url-handler:
|
||||
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url --no-sandbox
|
||||
environment:
|
||||
DISABLE_WAYLAND: 1
|
||||
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<policyDefinitions revision="1.1" schemaVersion="1.0">
|
||||
<policyNamespaces>
|
||||
<target prefix="CodeOSS" namespace="Microsoft.Policies.CodeOSS" />
|
||||
</policyNamespaces>
|
||||
<resources minRequiredRevision="1.0" />
|
||||
<supportedOn>
|
||||
<definitions>
|
||||
<definition name="SUPPORTED_1_67" displayName="$(string.SUPPORTED_1_67)" />
|
||||
</definitions>
|
||||
</supportedOn>
|
||||
<categories>
|
||||
<category displayName="$(string.Application)" name="Application" />
|
||||
<category displayName="$(string.Update_group)" name="Update">
|
||||
<parentCategory ref="Application" />
|
||||
</category>
|
||||
</categories>
|
||||
<policies>
|
||||
<policy name="UpdateMode" class="Both" displayName="$(string.UpdateMode)" explainText="$(string.UpdateMode_Explain)" key="Software\Policies\Microsoft\CodeOSS" presentation="$(presentation.UpdateMode)">
|
||||
<parentCategory ref="Update" />
|
||||
<supportedOn ref="SUPPORTED_1_67" />
|
||||
<elements>
|
||||
<enum id="UpdateMode" valueName="UpdateMode">
|
||||
<item displayName="$(string.UpdateMode_None)">
|
||||
<value>
|
||||
<string>none</string>
|
||||
</value>
|
||||
</item>
|
||||
<item displayName="$(string.UpdateMode_Manual)">
|
||||
<value>
|
||||
<string>manual</string>
|
||||
</value>
|
||||
</item>
|
||||
<item displayName="$(string.UpdateMode_Start)">
|
||||
<value>
|
||||
<string>start</string>
|
||||
</value>
|
||||
</item>
|
||||
<item displayName="$(string.UpdateMode_Default)">
|
||||
<value>
|
||||
<string>default</string>
|
||||
</value>
|
||||
</item>
|
||||
</enum>
|
||||
</elements>
|
||||
</policy>
|
||||
</policies>
|
||||
</policyDefinitions>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<policyDefinitionResources revision="1.0" schemaVersion="1.0">
|
||||
<displayName />
|
||||
<description />
|
||||
<resources>
|
||||
<stringTable>
|
||||
<string id="SUPPORTED_1_67">Code - OSS 1.67 or later</string>
|
||||
<string id="Application">Code - OSS</string>
|
||||
<string id="Update_group">Update</string>
|
||||
<string id="UpdateMode">Update Mode</string>
|
||||
<string id="UpdateMode_Explain">Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service.</string>
|
||||
<string id="UpdateMode_None">Disable updates.</string>
|
||||
<string id="UpdateMode_Manual">Disable automatic background update checks. Updates will be available if you manually check for updates.</string>
|
||||
<string id="UpdateMode_Start">Check for updates only on startup. Disable automatic background update checks.</string>
|
||||
<string id="UpdateMode_Default">Enable automatic update checks. Code will check for updates automatically and periodically.</string>
|
||||
</stringTable>
|
||||
<presentationTable>
|
||||
<presentation id="UpdateMode">
|
||||
<dropdownList refId="UpdateMode" />
|
||||
</presentation>
|
||||
</presentationTable>
|
||||
</resources>
|
||||
</policyDefinitionResources>
|
||||
Reference in New Issue
Block a user