mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-12 00:37:19 +10:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b175fd43eb | ||
|
|
b1970e82af | ||
|
|
23160ad483 | ||
|
|
51ee66e019 | ||
|
|
2abbfed911 | ||
|
|
8187c7fd7f | ||
|
|
53b071366b | ||
|
|
98372f9d1e | ||
|
|
30313a518b | ||
|
|
2ecbd09c2b | ||
|
|
66551077f8 | ||
|
|
e1b4583cf9 | ||
|
|
bbc6e8f4b7 | ||
|
|
ca52c1cfda |
@@ -68,7 +68,7 @@ scoop install vscodium
|
||||
VSCodium is available in the [Snap Store](https://snapcraft.io/) as [Codium](https://snapcraft.io/codium), published by the [Snapcrafters](https://github.com/snapcrafters/codium) community.
|
||||
If your GNU/Linux distribution has support for [snaps](https://snapcraft.io/docs/installing-snapd):
|
||||
```bash
|
||||
snap install codium
|
||||
snap install codium --classic
|
||||
```
|
||||
|
||||
#### <a id="install-with-package-manager"></a>Install with Package Manager (GNU/Linux)
|
||||
@@ -118,7 +118,7 @@ According to the VS Code Marketplace [Terms of Use](https://aka.ms/vsmarketplace
|
||||
Please note that some Visual Studio Code extensions have licenses that restrict their use to the official Visual Studio Code builds and therefore do not work with VSCodium. See [this note](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#proprietary-debugging-tools) on the Docs page for what's been found so far and possible workarounds.
|
||||
|
||||
### How are the VSCodium binaries built?
|
||||
If you would like to see the commands we run to build `vscode` into VSCodium binaries, have a look at the workflow files in `.github/workflow` for Windows, GNU/Linux and macOS. These build files call all the other scripts in the repo. If you find something that doesn't make sense, feel free to ask about it [on Gitter](https://gitter.im/VSCodium/Lobby).
|
||||
If you would like to see the commands we run to build `vscode` into VSCodium binaries, have a look at the workflow files in `.github/workflows` for Windows, GNU/Linux and macOS. These build files call all the other scripts in the repo. If you find something that doesn't make sense, feel free to ask about it [on Gitter](https://gitter.im/VSCodium/Lobby).
|
||||
|
||||
The builds are run every day, but exit early if there isn't a new release from Microsoft.
|
||||
|
||||
|
||||
@@ -30,3 +30,15 @@ script:
|
||||
- /usr/bin/convert vscodium.png -resize 48x48 usr/share/icons/hicolor/48x48/apps/vscodium.png
|
||||
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
||||
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
||||
- cat > AppRun <<\EOF
|
||||
- #!/bin/sh
|
||||
- HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
- export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
|
||||
- export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
||||
- export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
|
||||
- export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
|
||||
- export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
|
||||
- export QT_PLUGIN_PATH="${HERE}"/usr/lib/qt4/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib32/qt4/plugins/:"${HERE}"/usr/lib64/qt4/plugins/:"${HERE}"/usr/lib/qt5/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib32/qt5/plugins/:"${HERE}"/usr/lib64/qt5/plugins/:"${QT_PLUGIN_PATH}"
|
||||
- EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
|
||||
- exec ${EXEC} "$@"
|
||||
- EOF
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
cd ..
|
||||
|
||||
if [[ "$VSCODE_ARCH" == "x64" ]]; then
|
||||
# install a dep needed for this process
|
||||
sudo apt-get install desktop-file-utils
|
||||
|
||||
wget -c https://github.com/$(wget -q https://github.com/AppImage/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
|
||||
chmod +x ./pkg2appimage-*.AppImage
|
||||
|
||||
./pkg2appimage-*.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
||||
|
||||
|
||||
# add update's url
|
||||
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun
|
||||
|
||||
# remove check so build in docker can succeed
|
||||
sed -i 's/grep docker/# grep docker/' pkg2appimage.AppDir/usr/share/pkg2appimage/functions.sh
|
||||
|
||||
bash -ex pkg2appimage.AppDir/AppRun VSCodium-AppImage-Recipe.yml
|
||||
fi
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
## <a id="dependencies"></a>Dependencies
|
||||
|
||||
- node 12
|
||||
- node 14
|
||||
- yarn
|
||||
- jq
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
- libsecret-1-dev
|
||||
- fakeroot
|
||||
- rpm
|
||||
- rpmbuild
|
||||
- dpkg
|
||||
|
||||
### <a id="dependencies-macos"></a>MacOS
|
||||
|
||||
@@ -50,8 +52,8 @@ docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-b
|
||||
|
||||
When inside the container, you can use the following commands to build:
|
||||
```
|
||||
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs desktop-file-utils
|
||||
|
||||
npm install -g yarn
|
||||
|
||||
|
||||
17
get_repo.sh
17
get_repo.sh
@@ -1,12 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# figure out latest tag by calling MS update API
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
||||
if [ "$INSIDER" == "1" ]; then
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
|
||||
else
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
||||
fi
|
||||
export LATEST_MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
||||
export LATEST_MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
||||
echo "Got the latest MS tag: ${LATEST_MS_TAG}"
|
||||
echo "Got the latest MS tag: ${LATEST_MS_TAG} version: ${LATEST_MS_COMMIT}"
|
||||
|
||||
git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1
|
||||
if [ "$INSIDER" == "1" ]; then
|
||||
mkdir -p vscode; cd vscode
|
||||
git init ; git remote add origin https://github.com/Microsoft/vscode.git
|
||||
git fetch --depth 1 origin $LATEST_MS_COMMIT; git checkout FETCH_HEAD
|
||||
cd ..
|
||||
else
|
||||
git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1
|
||||
fi
|
||||
|
||||
# for GH actions
|
||||
if [[ $GITHUB_ENV ]]; then
|
||||
|
||||
13
patches/crash-reporter.patch
Normal file
13
patches/crash-reporter.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/main.js b/src/main.js
|
||||
index 19dde20..d9611f2 100644
|
||||
--- a/src/main.js
|
||||
+++ b/src/main.js
|
||||
@@ -409,6 +409,8 @@ function configureCrashReporter() {
|
||||
argv.splice(endOfArgsMarkerIndex, 0, '--crash-reporter-id', crashReporterId);
|
||||
}
|
||||
}
|
||||
+ } else {
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
13
patches/fix-cors.patch
Normal file
13
patches/fix-cors.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/main.js b/src/main.js
|
||||
index f91f7b7..0ec4b6f 100644
|
||||
--- a/src/main.js
|
||||
+++ b/src/main.js
|
||||
@@ -174,7 +174,7 @@ function configureCommandlineSwitchesSync(cliArgs) {
|
||||
// Read argv config
|
||||
const argvConfig = readArgvConfigSync();
|
||||
|
||||
- let browserCodeLoadingStrategy = typeof codeCachePath === 'string' ? 'bypassHeatCheck' : 'none';
|
||||
+ let browserCodeLoadingStrategy = undefined;
|
||||
|
||||
Object.keys(argvConfig).forEach(argvKey => {
|
||||
const argvValue = argvConfig[argvKey];
|
||||
@@ -7,7 +7,7 @@ index 93424ca..133657e 100644
|
||||
@memoize
|
||||
get cachePath(): Promise<string> {
|
||||
- const result = path.join(tmpdir(), `vscode-update-${this.productService.target}-${process.arch}`);
|
||||
+ const result = path.join(tmpdir(), `${this.productService.nameShort.toLowerCase()}-update-${this.productService.target}-${process.arch}`);
|
||||
+ const result = path.join(tmpdir(), `${this.productService.applicationName}-update-${this.productService.target}-${process.arch}`);
|
||||
return pfs.Promises.mkdir(result, { recursive: true }).then(() => result);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,21 @@ cd vscode || exit
|
||||
../update_settings.sh
|
||||
|
||||
# apply patches
|
||||
patch -u src/vs/platform/update/electron-main/updateService.win32.ts -i ../patches/update-cache-path.patch
|
||||
patch -u resources/linux/rpm/code.spec.template -i ../patches/fix-rpm-spec.patch
|
||||
git apply --ignore-whitespace ../patches/binary-name.patch
|
||||
git apply --ignore-whitespace ../patches/custom-gallery.patch
|
||||
for file in ../patches/*.patch; do
|
||||
if [ -f "$file" ]; then
|
||||
echo applying patch: $file;
|
||||
git apply --ignore-whitespace "$file"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch $file 1>&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for file in ../patches/user/*.patch; do
|
||||
if [ -f "$file" ]; then
|
||||
echo applying user patch: $file;
|
||||
if ! git apply --ignore-whitespace $file; then
|
||||
git apply --ignore-whitespace "$file"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch $file 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -3,8 +3,15 @@
|
||||
TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.data\.microsoft\.com)"
|
||||
REPLACEMENT="s/$TELEMETRY_URLS/0\.0\.0\.0/g"
|
||||
|
||||
#include common functions
|
||||
. ../utils.sh
|
||||
|
||||
if [[ "$OS_NAME" == "osx" ]]; then
|
||||
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i '' -E $REPLACEMENT
|
||||
if is_gnu_sed; then
|
||||
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT
|
||||
else
|
||||
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i '' -E $REPLACEMENT
|
||||
fi
|
||||
else
|
||||
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT
|
||||
fi
|
||||
|
||||
@@ -3,18 +3,8 @@ DEFAULT_FALSE="'default': false"
|
||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||
|
||||
is_gnu_sed () {
|
||||
sed --version >/dev/null 2>&1
|
||||
}
|
||||
|
||||
replace () {
|
||||
echo $1
|
||||
if is_gnu_sed; then
|
||||
sed -i -E "$1" $2
|
||||
else
|
||||
sed -i '' -E "$1" $2
|
||||
fi
|
||||
}
|
||||
#include common functions
|
||||
. ../utils.sh
|
||||
|
||||
update_setting () {
|
||||
local FILENAME="$2"
|
||||
|
||||
Reference in New Issue
Block a user