Skip to content

Commit

Permalink
Change the name of the VsCode app to IDX Code
Browse files Browse the repository at this point in the history
Change the name of the VsCode app to IDX Code.

* **Update application name**
  - Change `nameShort` and `nameLong` to "IDX Code" in `product.json`.
  - Change `name` to "IDX Code" in `.devcontainer/devcontainer.json`.
  - Change `Name` and `StartupWMClass` to "IDX Code" in `resources/linux/code.desktop`.

* **Disable telemetry**
  - Add `disableTelemetry` property and set it to `true` in `product.json`.
  - Change the default value of `TELEMETRY_SETTING_ID` to `TelemetryConfiguration.OFF` in `src/vs/platform/telemetry/common/telemetryService.ts`.

* **Add installation guide**
  - Add `INSTALL.md` file detailing the build and package process for the IDX Code application.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/HomeDev68/IDX-Code?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
HomeDev68 committed Oct 23, 2024
1 parent 89d6652 commit be9b97a
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Code - OSS",
"name": "IDX Code",
"build": {
"dockerfile": "Dockerfile"
},
Expand Down
64 changes: 64 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Installation Guide for IDX Code

This guide provides step-by-step instructions to build and package the IDX Code application.

## Prerequisites

Ensure you have the following installed on your system:
- Node.js
- npm

You can download and install them from [Node.js](https://nodejs.org/).

## Steps to Build and Package IDX Code

1. **Clone the Repository**

Clone the repository and navigate to the project directory.

```sh
git clone https://github.com/HomeDev68/IDX-Code.git
cd IDX-Code
```

2. **Install Dependencies**

Install the required dependencies by running:

```sh
npm install
```

3. **Compile the Source Code**

Compile the source code by running:

```sh
npm run compile
```

4. **Build the Electron Application**

To build the Electron application, run:

```sh
npm run electron
```

5. **Package the Application**

To package the application, run:

```sh
npm run package
```

## Disabling Telemetry by Default

To disable telemetry by default, ensure the following changes are made:

1. In the `src/vs/platform/telemetry/common/telemetryService.ts` file, update the default value of the `TELEMETRY_SETTING_ID` configuration to `TelemetryConfiguration.OFF`.

2. In the `product.json` file, add or update the `disableTelemetry` property to `true`.

By following these steps, you will be able to build and package the IDX Code application with telemetry disabled by default.
9 changes: 5 additions & 4 deletions product.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"nameShort": "Code - OSS",
"nameLong": "Code - OSS",
"applicationName": "code-oss",
"nameShort": "IDX Code",
"nameLong": "IDX Code",
"applicationName": "idx-code",
"dataFolderName": ".vscode-oss",
"win32MutexName": "vscodeoss",
"licenseName": "MIT",
Expand Down Expand Up @@ -80,5 +80,6 @@
"publisherDisplayName": "Microsoft"
}
}
]
],
"disableTelemetry": true
}
4 changes: 2 additions & 2 deletions resources/linux/code.desktop
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Desktop Entry]
Name=@@NAME_LONG@@
Name=IDX Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=@@EXEC@@ %F
Icon=@@ICON@@
Type=Application
StartupNotify=false
StartupWMClass=@@NAME_SHORT@@
StartupWMClass=IDX Code
Categories=TextEditor;Development;IDE;
MimeType=application/x-@@NAME@@-workspace;
Actions=new-empty-window;
Expand Down
8 changes: 4 additions & 4 deletions resources/linux/debian/control.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: @@NAME@@
Package: idx-code
Version: @@VERSION@@
Section: devel
Depends: @@DEPENDS@@
Expand All @@ -8,9 +8,9 @@ Architecture: @@ARCHITECTURE@@
Maintainer: Microsoft Corporation <[email protected]>
Homepage: https://code.visualstudio.com/
Installed-Size: @@INSTALLEDSIZE@@
Provides: visual-studio-@@NAME@@
Conflicts: visual-studio-@@NAME@@
Replaces: visual-studio-@@NAME@@
Provides: visual-studio-idx-code
Conflicts: visual-studio-idx-code
Replaces: visual-studio-idx-code
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.
Expand Down
16 changes: 8 additions & 8 deletions resources/linux/debian/postinst.template
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# Licensed under the MIT License. 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@@
rm -f /usr/bin/idx-code
ln -s /usr/share/idx-code/bin/idx-code /usr/bin/idx-code

# 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
update-alternatives --install /usr/bin/editor editor /usr/bin/idx-code 0

# Install the desktop entry
if hash update-desktop-database 2>/dev/null; then
Expand All @@ -22,9 +22,9 @@ if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime
fi

if [ "@@NAME@@" != "code-oss" ]; then
if [ "idx-code" != "code-oss" ]; then
# Remove the legacy bin command if this is the stable build
if [ "@@NAME@@" = "code" ]; then
if [ "idx-code" = "code" ]; then
rm -f /usr/local/bin/code
fi

Expand All @@ -39,7 +39,7 @@ if [ "@@NAME@@" != "code-oss" ]; then
RET=true
if [ -e '/usr/share/debconf/confmodule' ]; then
. /usr/share/debconf/confmodule
db_get @@NAME@@/add-microsoft-repo || true
db_get idx-code/add-microsoft-repo || true
fi

# Determine whether to install the repository source list
Expand Down Expand Up @@ -69,10 +69,10 @@ if [ "@@NAME@@" != "code-oss" ]; then

if [ "$WRITE_SOURCE" -eq "1" ] && [ -e '/usr/share/debconf/confmodule' ]; then
# Ask the user whether to actually write the source list
db_input high @@NAME@@/add-microsoft-repo || true
db_input high idx-code/add-microsoft-repo || true
db_go || true

db_get @@NAME@@/add-microsoft-repo
db_get idx-code/add-microsoft-repo
if [ "$RET" = false ]; then
WRITE_SOURCE=0
fi
Expand Down
4 changes: 2 additions & 2 deletions resources/linux/debian/postrm.template
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

rm -f /usr/bin/@@NAME@@
rm -f /usr/bin/idx-code

# Uninstall the desktop entry
if hash update-desktop-database 2>/dev/null; then
Expand All @@ -18,7 +18,7 @@ fi
RET=true
if [ -e '/usr/share/debconf/confmodule' ]; then
. /usr/share/debconf/confmodule
db_get @@NAME@@/add-microsoft-repo || true
db_get idx-code/add-microsoft-repo || true
fi
if [ "$RET" = "true" ]; then
eval $(apt-config shell APT_SOURCE_PARTS Dir::Etc::sourceparts/d)
Expand Down
2 changes: 1 addition & 1 deletion resources/linux/rpm/code.spec.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Name: @@NAME@@
Name: idx-code
Version: @@VERSION@@
Release: @@RELEASE@@.el8
Summary: Code editing. Redefined.
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/telemetry/common/telemetryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
localize('telemetry.telemetryLevel.off', "Disables all product telemetry.")
],
'markdownDescription': getTelemetryLevelSettingDescription(),
'default': TelemetryConfiguration.ON,
'default': TelemetryConfiguration.OFF,
'restricted': true,
'scope': ConfigurationScope.APPLICATION,
'tags': ['usesOnlineServices', 'telemetry']
Expand Down

0 comments on commit be9b97a

Please sign in to comment.