SQL Operations Studio Public Preview 1 (0.23) release source code

This commit is contained in:
Karl Burtram
2017-11-09 14:30:27 -08:00
parent b88ecb8d93
commit 3cdac41339
8829 changed files with 759707 additions and 286 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Source EULA. See License.txt in the project root for license information.
# If root, ensure that --user-data-dir is specified
if [ "$(id -u)" = "0" ]; then
for i in $@
do
if [[ $i == --user-data-dir=* ]]; then
DATA_DIR_SET=1
fi
done
if [ -z $DATA_DIR_SET ]; then
echo "It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument." 1>&2
exit 1
fi
fi
if [ ! -L $0 ]; then
# if path is not a symlink, find relatively
VSCODE_PATH="$(dirname $0)/.."
else
if which readlink >/dev/null; then
# if readlink exists, follow the symlink and find relatively
VSCODE_PATH="$(dirname $(readlink -f $0))/.."
else
# else use the standard install location
VSCODE_PATH="/usr/share/@@NAME@@"
fi
fi
ELECTRON="$VSCODE_PATH/@@NAME@@"
CLI="$VSCODE_PATH/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>@@NAME@@.desktop</id>
<metadata_license>@@LICENSE@@</metadata_license>
<project_license>@@LICENSE@@</project_license>
<name>@@NAME_LONG@@</name>
<url type="homepage">https://code.visualstudio.com</url>
<summary>Visual Studio Code. Code editing. Redefined.</summary>
<description>
<p>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.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://code.visualstudio.com/home/home-screenshot-linux-lg.png</image>
<caption>Editing TypeScript and searching for extensions</caption>
</screenshot>
</screenshots>
</component>

View File

@@ -0,0 +1,27 @@
[Desktop Entry]
Name=@@NAME_LONG@@
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/@@NAME@@/@@NAME@@ --unity-launch %F
Icon=@@NAME@@
Type=Application
StartupNotify=true
StartupWMClass=@@NAME_SHORT@@
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-window;
Keywords=vscode;
[Desktop Action new-window]
Name=New Window
Name[de]=Neues Fenster
Name[es]=Nueva ventana
Name[fr]=Nouvelle fenêtre
Name[it]=Nuova finestra
Name[ja]=新規ウインドウ
Name[ko]=새 창
Name[ru]=Новое окно
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/share/@@NAME@@/@@NAME@@ --new-window %F
Icon=@@NAME@@

BIN
resources/linux/code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,14 @@
Package: @@NAME@@
Version: @@VERSION@@
Section: devel
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0
Priority: optional
Architecture: @@ARCHITECTURE@@
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
Homepage: https://code.visualstudio.com/
Installed-Size: @@INSTALLEDSIZE@@
Provides: visual-studio-@@NAME@@
Conflicts: visual-studio-@@NAME@@
Replaces: visual-studio-@@NAME@@
Description: Code editing. Redefined.
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.

View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Source EULA. See License.txt in the project root for license information.
# Symlink bin command to /usr/bin
rm -f /usr/bin/@@NAME@@
ln -s /usr/share/@@NAME@@/bin/@@NAME@@ /usr/bin/@@NAME@@
# Register code in the alternatives system
# Priority of 0 should never make code the default editor in auto mode as most
# developers would prefer a terminal editor as the default.
update-alternatives --install /usr/bin/editor editor /usr/bin/@@NAME@@ 0
# Install the desktop entry
if hash desktop-file-install 2>/dev/null; then
desktop-file-install /usr/share/applications/@@NAME@@.desktop
fi
if [ "@@NAME@@" != "code-oss" ]; then
# Remove the legacy bin command if this is the stable build
if [ "@@NAME@@" = "code" ]; then
rm -f /usr/local/bin/code
fi
# Register apt repository
get_apt_config_value() {
echo $(apt-config dump | grep "$1 " | sed -e "s/$1 \"//" -e "s/\";$//")
}
APT_DIR=$(get_apt_config_value Dir)
APT_ETC=$APT_DIR$(get_apt_config_value Dir::Etc)
APT_SOURCE_PARTS=$APT_ETC/$(get_apt_config_value Dir::Etc::sourceparts)
CODE_SOURCE_PART=$APT_SOURCE_PARTS/vscode.list
APT_TRUSTED_PARTS=$APT_ETC/$(get_apt_config_value Dir::Etc::trustedparts)
CODE_TRUSTED_PART=$APT_TRUSTED_PARTS/microsoft.gpg
# Sourced from https://packages.microsoft.com/keys/microsoft.asc
if [ ! -f $CODE_TRUSTED_PART ]; then
echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (GNU/Linux)
mQENBFYxWIwBCADAKoZhZlJxGNGWzqV+1OG1xiQeoowKhssGAKvd+buXCGISZJwT
LXZqIcIiLP7pqdcZWtE9bSc7yBY2MalDp9Liu0KekywQ6VVX1T72NPf5Ev6x6DLV
7aVWsCzUAF+eb7DC9fPuFLEdxmOEYoPjzrQ7cCnSV4JQxAqhU4T6OjbvRazGl3ag
OeizPXmRljMtUUttHQZnRhtlzkmwIrUivbfFPD+fEoHJ1+uIdfOzZX8/oKHKLe2j
H632kvsNzJFlROVvGLYAk2WRcLu+RjjggixhwiB+Mu/A8Tf4V6b+YppS44q8EvVr
M+QvY7LNSOffSO6Slsy9oisGTdfE39nC7pVRABEBAAG0N01pY3Jvc29mdCAoUmVs
ZWFzZSBzaWduaW5nKSA8Z3Bnc2VjdXJpdHlAbWljcm9zb2Z0LmNvbT6JATUEEwEC
AB8FAlYxWIwCGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEOs+lK2+EinPGpsH
/32vKy29Hg51H9dfFJMx0/a/F+5vKeCeVqimvyTM04C+XENNuSbYZ3eRPHGHFLqe
MNGxsfb7C7ZxEeW7J/vSzRgHxm7ZvESisUYRFq2sgkJ+HFERNrqfci45bdhmrUsy
7SWw9ybxdFOkuQoyKD3tBmiGfONQMlBaOMWdAsic965rvJsd5zYaZZFI1UwTkFXV
KJt3bp3Ngn1vEYXwijGTa+FXz6GLHueJwF0I7ug34DgUkAFvAs8Hacr2DRYxL5RJ
XdNgj4Jd2/g6T9InmWT0hASljur+dJnzNiNCkbn9KbX7J/qK1IbR8y560yRmFsU+
NdCFTW7wY0Fb1fWJ+/KTsC4=
=J6gs
-----END PGP PUBLIC KEY BLOCK-----
" | gpg --dearmor > microsoft.gpg
mv microsoft.gpg $CODE_TRUSTED_PART
fi
# Install repository source list
WRITE_SOURCE=0
if [ ! -f $CODE_SOURCE_PART ]; then
# Write source list if it does not exist
WRITE_SOURCE=1
elif grep -q "# disabled on upgrade to" /etc/apt/sources.list.d/vscode.list; then
# Write source list if it was disabled by OS upgrade
WRITE_SOURCE=1
fi
if [ "$WRITE_SOURCE" -eq "1" ]; then
echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > $CODE_SOURCE_PART
fi
fi

View File

@@ -0,0 +1,6 @@
#!/bin/bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Source EULA. See License.txt in the project root for license information.
rm -f /usr/bin/@@NAME@@

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Source EULA. See License.txt in the project root for license information.
# Deregister code from the alternatives system
update-alternatives --remove editor /usr/bin/@@NAME@@

View File

@@ -0,0 +1,54 @@
Name: @@NAME@@
Version: @@VERSION@@
Release: @@RELEASE@@.el7
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@@
AutoReq: 0
%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.
%install
mkdir -p %{buildroot}/usr/share/@@NAME@@
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/pixmaps
cp -r usr/share/@@NAME@@/* %{buildroot}/usr/share/@@NAME@@
cp -r usr/share/applications/@@NAME@@.desktop %{buildroot}/usr/share/applications
cp -r usr/share/pixmaps/@@NAME@@.png %{buildroot}/usr/share/pixmaps
%post
# Remove the legacy bin command if this is the stable build
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
# 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
%postun
if [ $1 = 0 ]; then
rm -f /usr/bin/@@NAME@@
fi
%files
%defattr(-,root,root)
/usr/share/@@NAME@@/
/usr/share/applications/@@NAME@@.desktop
/usr/share/pixmaps/@@NAME@@.png

1040
resources/linux/rpm/code.xpm Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,147 @@
{
"x86_64": [
"libpthread.so.0()(64bit)",
"libpthread.so.0(GLIBC_2.2.5)(64bit)",
"libpthread.so.0(GLIBC_2.3.2)(64bit)",
"libpthread.so.0(GLIBC_2.3.3)(64bit)",
"libgtk-x11-2.0.so.0()(64bit)",
"libgdk-x11-2.0.so.0()(64bit)",
"libatk-1.0.so.0()(64bit)",
"libgio-2.0.so.0()(64bit)",
"libpangocairo-1.0.so.0()(64bit)",
"libgdk_pixbuf-2.0.so.0()(64bit)",
"libcairo.so.2()(64bit)",
"libpango-1.0.so.0()(64bit)",
"libfreetype.so.6()(64bit)",
"libfontconfig.so.1()(64bit)",
"libgobject-2.0.so.0()(64bit)",
"libdbus-1.so.3()(64bit)",
"libXi.so.6()(64bit)",
"libXcursor.so.1()(64bit)",
"libXdamage.so.1()(64bit)",
"libXrandr.so.2()(64bit)",
"libXcomposite.so.1()(64bit)",
"libXext.so.6()(64bit)",
"libXfixes.so.3()(64bit)",
"libXrender.so.1()(64bit)",
"libX11.so.6()(64bit)",
"libXss.so.1()(64bit)",
"libXtst.so.6()(64bit)",
"libgconf-2.so.4()(64bit)",
"libgmodule-2.0.so.0()(64bit)",
"librt.so.1()(64bit)",
"libglib-2.0.so.0()(64bit)",
"libnss3.so()(64bit)",
"libnssutil3.so()(64bit)",
"libsmime3.so()(64bit)",
"libnspr4.so()(64bit)",
"libasound.so.2()(64bit)",
"libcups.so.2()(64bit)",
"libdl.so.2()(64bit)",
"libexpat.so.1()(64bit)",
"libstdc++.so.6()(64bit)",
"libstdc++.so.6(GLIBCXX_3.4)(64bit)",
"libstdc++.so.6(GLIBCXX_3.4.10)(64bit)",
"libstdc++.so.6(GLIBCXX_3.4.11)(64bit)",
"libstdc++.so.6(GLIBCXX_3.4.14)(64bit)",
"libstdc++.so.6(GLIBCXX_3.4.15)(64bit)",
"libstdc++.so.6(GLIBCXX_3.4.9)(64bit)",
"libm.so.6()(64bit)",
"libm.so.6(GLIBC_2.2.5)(64bit)",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)(64bit)",
"libgcc_s.so.1(GCC_4.0.0)(64bit)",
"libc.so.6()(64bit)",
"libc.so.6(GLIBC_2.11)(64bit)",
"libc.so.6(GLIBC_2.2.5)(64bit)",
"libc.so.6(GLIBC_2.3)(64bit)",
"libc.so.6(GLIBC_2.3.2)(64bit)",
"libc.so.6(GLIBC_2.3.4)(64bit)",
"libc.so.6(GLIBC_2.4)(64bit)",
"libc.so.6(GLIBC_2.6)(64bit)",
"libc.so.6(GLIBC_2.7)(64bit)",
"libc.so.6(GLIBC_2.9)(64bit)",
"libxcb.so.1()(64bit)",
"libxkbfile.so.1()(64bit)",
"libsecret-1.so.0()(64bit)"
],
"i386": [
"ld-linux.so.2",
"ld-linux.so.2(GLIBC_2.1)",
"libX11-xcb.so.1",
"libX11.so.6",
"libXcomposite.so.1",
"libXcursor.so.1",
"libXdamage.so.1",
"libXext.so.6",
"libXfixes.so.3",
"libXi.so.6",
"libXrandr.so.2",
"libXrender.so.1",
"libXss.so.1",
"libXtst.so.6",
"libasound.so.2",
"libatk-1.0.so.0",
"libc.so.6",
"libc.so.6(GLIBC_2.0)",
"libc.so.6(GLIBC_2.1)",
"libc.so.6(GLIBC_2.1.3)",
"libc.so.6(GLIBC_2.11)",
"libc.so.6(GLIBC_2.2)",
"libc.so.6(GLIBC_2.2.3)",
"libc.so.6(GLIBC_2.3)",
"libc.so.6(GLIBC_2.3.2)",
"libc.so.6(GLIBC_2.3.4)",
"libc.so.6(GLIBC_2.4)",
"libc.so.6(GLIBC_2.6)",
"libc.so.6(GLIBC_2.7)",
"libcairo.so.2",
"libcups.so.2",
"libdbus-1.so.3",
"libdl.so.2",
"libdl.so.2(GLIBC_2.0)",
"libdl.so.2(GLIBC_2.1)",
"libexpat.so.1",
"libfontconfig.so.1",
"libfreetype.so.6",
"libgcc_s.so.1",
"libgcc_s.so.1(GCC_4.0.0)",
"libgcc_s.so.1(GLIBC_2.0)",
"libgconf-2.so.4",
"libgdk-x11-2.0.so.0",
"libgdk_pixbuf-2.0.so.0",
"libgio-2.0.so.0",
"libglib-2.0.so.0",
"libgmodule-2.0.so.0",
"libgobject-2.0.so.0",
"libgtk-x11-2.0.so.0",
"libm.so.6",
"libm.so.6(GLIBC_2.0)",
"libm.so.6(GLIBC_2.1)",
"libnspr4.so",
"libnss3.so",
"libnssutil3.so",
"libpango-1.0.so.0",
"libpangocairo-1.0.so.0",
"libpthread.so.0",
"libpthread.so.0(GLIBC_2.0)",
"libpthread.so.0(GLIBC_2.1)",
"libpthread.so.0(GLIBC_2.2)",
"libpthread.so.0(GLIBC_2.2.3)",
"libpthread.so.0(GLIBC_2.3.2)",
"libpthread.so.0(GLIBC_2.3.3)",
"librt.so.1",
"librt.so.1(GLIBC_2.2)",
"libsmime3.so",
"libstdc++.so.6",
"libstdc++.so.6(GLIBCXX_3.4)",
"libstdc++.so.6(GLIBCXX_3.4.10)",
"libstdc++.so.6(GLIBCXX_3.4.11)",
"libstdc++.so.6(GLIBCXX_3.4.14)",
"libstdc++.so.6(GLIBCXX_3.4.15)",
"libstdc++.so.6(GLIBCXX_3.4.9)",
"libxcb.so.1",
"libxkbfile.so.1",
"libsecret-1.so.0"
]
}