Compare commits

...

12 Commits

Author SHA1 Message Date
Baptiste Augrain
b175fd43eb fix: fail build when a patch can't be applied (#797) 2021-08-14 22:59:32 +02:00
Baptiste Augrain
b1970e82af do not start crashReporter when appCenter isn't configured (#787) 2021-08-06 01:49:57 +02:00
Baptiste Augrain
23160ad483 Disable cors (#774) 2021-08-03 18:51:40 +02:00
swinder0161
51ee66e019 Add support to build insider latest build: $ INSIDER=1 ./build/build_mac.sh (#784) 2021-08-03 14:43:49 +02:00
descodess
2abbfed911 fix typo in README.md (#785) 2021-08-03 14:42:23 +02:00
Baptiste Augrain
8187c7fd7f add a loop to apply patches (#779) 2021-07-29 12:31:54 +02:00
Baptiste Augrain
53b071366b Fix AppImage's dependency (#775)
* move dependency installation into workflow

* dependency install not needed
2021-07-26 01:15:55 +02:00
Baptiste Augrain
98372f9d1e Fixing python in AppImage (#773)
- overwrite AppRun to remove the env variables `PYTHONHOME` and `PYTHONPATH`
- update building script to it can be build manually in docker
2021-07-23 10:01:38 +02:00
Baptiste Augrain
30313a518b Update doc (#772)
* add missing dependencies for linux
* update node version
2021-07-23 09:48:52 +02:00
Michael Kirsch
2ecbd09c2b update icon paths (#440) 2021-07-22 16:43:39 -07:00
swinder0161
66551077f8 Add support to use GNU sed installed in mac osx (#770)
* Add support to use GNU sed installed in mac osx

* Move common functions to utils.sh

Co-authored-by: Swinder Pal Singh Juneja <swinder.juneja@oneplus.com>
2021-07-21 22:49:00 +02:00
Liwen Guo
e1b4583cf9 Use applicationName for update cache path (#765) 2021-07-16 16:37:07 -07:00
12 changed files with 102 additions and 30 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View 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
View 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];

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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

View File

@@ -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"

16
utils.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#All common functions can be added to this file
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
}