From 96a73e29d9831e934a07b786bd5f4eed9ddd6d1b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 14 Nov 2024 13:13:36 +0100 Subject: [PATCH] Codium: Update to 1.95.2.24313 add workarround for crash when click on File in the menubar --- codium-1.95.2.24313-0.build.sh | 188 +++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100755 codium-1.95.2.24313-0.build.sh diff --git a/codium-1.95.2.24313-0.build.sh b/codium-1.95.2.24313-0.build.sh new file mode 100755 index 0000000..9bfdb5c --- /dev/null +++ b/codium-1.95.2.24313-0.build.sh @@ -0,0 +1,188 @@ +#! /bin/bash + +set -xe + +COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh +#TESTING=1 + +PKG=codium +VERSION=1.95.2.24313 +BUILD=0 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +set -xe +umask 022 + +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +cp $0 $BUILD_TMPDIR; ME="$BUILD_TMPDIR/$(basename $0)" + +exec $PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +true && { +# github actions node +# wget "https://nodejs.org/download/release/v18.15.0/node-v18.15.0-linux-x64.tar.gz" +# braucht spezielle node version und auch genau die Version + +SRCURL="https://beehive.molgen.mpg.de/1556e3191a2d6644645c4b751ff327a5/node-v20.14.0-linux-x64.tar.gz" +PKGARC=${SRCURL##*/} +PKGVER=${PKGARC%.*.*} +PKGVER=${PKGVER%-linux-x64} + +test -e ${PKGARC} || wget -nv ${SRCURL} +test -d ${PKGVER} || mkdir -p ${PKGVER} && tar -x --directory=${PKGVER} -f ${PKGARC} --strip-components=1 + +PATH=${BUILDDIR}/${PKGVER}/bin:$PATH +export PATH +cd $PKGVER +npm install yarn +ln -sv ${BUILDDIR}/${PKGVER}/node_modules/.bin/yarn ${BUILDDIR}/${PKGVER}/bin/yarn +cd $BUILDDIR +} + +test -d vscodium || git clone https://github.com/VSCodium/vscodium.git +cd vscodium && git checkout $VERSION +( # disable auteUpdate and release Notes + cd ${PREFIX}/build/vscodium + sed -ne '/^#Epatch:disableUpdate/ s/^#Epatch:\S* // p' $ME | patch -p1 --verbose +) + +( # change TitleBarStyle to prevent crashes by clicking on File + cd ${PREFIX}/build/vscodium + sed -ne '/^#Epatch:bugfixtitlbar/ s/^#Epatch:\S* // p' $ME | patch -p1 --verbose +) +./build/build.sh + +cp -avr VSCode-linux-x64/* $PREFIX +cd ${PREFIX}/bin && ln -s codium code + +exit + +# Patch Section do not trim Whitespaces + +#Epatch:disableUpdate diff --git a/update_settings.sh b/update_settings.sh +#Epatch:disableUpdate index 2b6ac1f..6d20430 100755 +#Epatch:disableUpdate --- a/update_settings.sh +#Epatch:disableUpdate +++ b/update_settings.sh +#Epatch:disableUpdate @@ -2,8 +2,14 @@ +#Epatch:disableUpdate +#Epatch:disableUpdate DEFAULT_TRUE="'default': true" +#Epatch:disableUpdate DEFAULT_FALSE="'default': false" +#Epatch:disableUpdate +DEFAULT_TRUE_R="default: true" +#Epatch:disableUpdate +DEFAULT_FALSE_R="default: false" +#Epatch:disableUpdate +DEFAULT_TRUE_U="default: 'default'" +#Epatch:disableUpdate +DEFAULT_FALSE_U="default: 'none'" +#Epatch:disableUpdate DEFAULT_ON="'default': TelemetryConfiguration.ON" +#Epatch:disableUpdate DEFAULT_OFF="'default': TelemetryConfiguration.OFF" +#Epatch:disableUpdate +SHOW_RELEASE_NOTES="'update.showReleaseNotes':" +#Epatch:disableUpdate +UPDATE_MODE="'update.mode':" +#Epatch:disableUpdate TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':" +#Epatch:disableUpdate TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON" +#Epatch:disableUpdate NLS=workbench.settings.enableNaturalLanguageSearch +#Epatch:disableUpdate @@ -29,7 +35,7 @@ update_setting () { +#Epatch:disableUpdate if [[ "${line}" == *"${SETTING}"* ]]; then +#Epatch:disableUpdate IN_SETTING=1 +#Epatch:disableUpdate fi +#Epatch:disableUpdate - if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then +#Epatch:disableUpdate + if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"* || "${line}" == *"${DEFAULT_TRUE_R}"* || "${line}" == *"${DEFAULT_TRUE_U}"*) && "${IN_SETTING}" == "1" ]]; then +#Epatch:disableUpdate FOUND=1 +#Epatch:disableUpdate break +#Epatch:disableUpdate fi +#Epatch:disableUpdate @@ -43,6 +49,10 @@ update_setting () { +#Epatch:disableUpdate # construct line-aware replacement string +#Epatch:disableUpdate if [[ "${line}" == *"${DEFAULT_TRUE}"* ]]; then +#Epatch:disableUpdate DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/" +#Epatch:disableUpdate + elif [[ "${line}" == *"${DEFAULT_TRUE_R}"* ]]; then +#Epatch:disableUpdate + DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE_R}/${DEFAULT_FALSE_R}/" +#Epatch:disableUpdate + elif [[ "${line}" == *"${DEFAULT_TRUE_U}"* ]]; then +#Epatch:disableUpdate + DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE_U}/${DEFAULT_FALSE_U}/" +#Epatch:disableUpdate else +#Epatch:disableUpdate DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/" +#Epatch:disableUpdate fi +#Epatch:disableUpdate @@ -53,3 +63,5 @@ update_setting () { +#Epatch:disableUpdate update_setting "${TELEMETRY_CRASH_REPORTER}" src/vs/workbench/electron-sandbox/desktop.contribution.ts +#Epatch:disableUpdate update_setting "${TELEMETRY_CONFIGURATION}" src/vs/platform/telemetry/common/telemetryService.ts +#Epatch:disableUpdate update_setting "${NLS}" src/vs/workbench/contrib/preferences/common/preferencesContribution.ts +#Epatch:disableUpdate +update_setting "${SHOW_RELEASE_NOTES}" src/vs/platform/update/common/update.config.contribution.ts +#Epatch:disableUpdate +update_setting "${UPDATE_MODE}" src/vs/platform/update/common/update.config.contribution.ts +#Epatch:bugfixtitlbar diff --git a/update_settings.sh b/update_settings.sh +#Epatch:bugfixtitlbar index 6d20430..3ea3670 100755 +#Epatch:bugfixtitlbar --- a/update_settings.sh +#Epatch:bugfixtitlbar +++ b/update_settings.sh +#Epatch:bugfixtitlbar @@ -8,11 +8,14 @@ DEFAULT_TRUE_U="default: 'default'" +#Epatch:bugfixtitlbar DEFAULT_FALSE_U="default: 'none'" +#Epatch:bugfixtitlbar DEFAULT_ON="'default': TelemetryConfiguration.ON" +#Epatch:bugfixtitlbar DEFAULT_OFF="'default': TelemetryConfiguration.OFF" +#Epatch:bugfixtitlbar +DEFAULT_WINDOWTITLEBAR="'default': isLinux ? 'native' : 'custom'" +#Epatch:bugfixtitlbar +CHANGED_WINDOWTITLEBAR="'default': 'custom'" +#Epatch:bugfixtitlbar SHOW_RELEASE_NOTES="'update.showReleaseNotes':" +#Epatch:bugfixtitlbar UPDATE_MODE="'update.mode':" +#Epatch:bugfixtitlbar TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':" +#Epatch:bugfixtitlbar TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON" +#Epatch:bugfixtitlbar NLS=workbench.settings.enableNaturalLanguageSearch +#Epatch:bugfixtitlbar +WINDOW_TITLEBARSTYLE="'window.titleBarStyle':" +#Epatch:bugfixtitlbar +#Epatch:bugfixtitlbar # include common functions +#Epatch:bugfixtitlbar . ../utils.sh +#Epatch:bugfixtitlbar @@ -35,7 +38,7 @@ update_setting () { +#Epatch:bugfixtitlbar if [[ "${line}" == *"${SETTING}"* ]]; then +#Epatch:bugfixtitlbar IN_SETTING=1 +#Epatch:bugfixtitlbar fi +#Epatch:bugfixtitlbar - if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"* || "${line}" == *"${DEFAULT_TRUE_R}"* || "${line}" == *"${DEFAULT_TRUE_U}"*) && "${IN_SETTING}" == "1" ]]; then +#Epatch:bugfixtitlbar + if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"* || "${line}" == *"${DEFAULT_TRUE_R}"* || "${line}" == *"${DEFAULT_TRUE_U}"* || ${line} == *"${DEFAULT_WINDOWTITLEBAR}"*) && "${IN_SETTING}" == "1" ]]; then +#Epatch:bugfixtitlbar FOUND=1 +#Epatch:bugfixtitlbar break +#Epatch:bugfixtitlbar fi +#Epatch:bugfixtitlbar @@ -53,6 +56,8 @@ update_setting () { +#Epatch:bugfixtitlbar DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE_R}/${DEFAULT_FALSE_R}/" +#Epatch:bugfixtitlbar elif [[ "${line}" == *"${DEFAULT_TRUE_U}"* ]]; then +#Epatch:bugfixtitlbar DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE_U}/${DEFAULT_FALSE_U}/" +#Epatch:bugfixtitlbar + elif [[ "${line}" == *"${DEFAULT_WINDOWTITLEBAR}"* ]]; then +#Epatch:bugfixtitlbar + DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_WINDOWTITLEBAR}/${CHANGED_WINDOWTITLEBAR}/" +#Epatch:bugfixtitlbar else +#Epatch:bugfixtitlbar DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/" +#Epatch:bugfixtitlbar fi +#Epatch:bugfixtitlbar @@ -65,3 +70,4 @@ update_setting "${TELEMETRY_CONFIGURATION}" src/vs/platform/telemetry/common/tel +#Epatch:bugfixtitlbar update_setting "${NLS}" src/vs/workbench/contrib/preferences/common/preferencesContribution.ts +#Epatch:bugfixtitlbar update_setting "${SHOW_RELEASE_NOTES}" src/vs/platform/update/common/update.config.contribution.ts +#Epatch:bugfixtitlbar update_setting "${UPDATE_MODE}" src/vs/platform/update/common/update.config.contribution.ts +#Epatch:bugfixtitlbar +update_setting "${WINDOW_TITLEBARSTYLE}" src/vs/workbench/electron-sandbox/desktop.contribution.ts +#Epatch:bugfixtitlbar diff --git a/update_settings.sh b/update_settings.sh +#Epatch:bugfixtitlbar index 3fb7f1d..f6abb91 100755 +#Epatch:bugfixtitlbar --- a/update_settings.sh +#Epatch:bugfixtitlbar +++ b/update_settings.sh +#Epatch:bugfixtitlbar @@ -20,6 +20,15 @@ WINDOW_TITLEBARSTYLE="'window.titleBarStyle':" +#Epatch:bugfixtitlbar # include common functions +#Epatch:bugfixtitlbar . ../utils.sh +#Epatch:bugfixtitlbar +#Epatch:bugfixtitlbar +replace () { +#Epatch:bugfixtitlbar + echo "${1}" +#Epatch:bugfixtitlbar + if is_gnu_sed; then +#Epatch:bugfixtitlbar + sed -i "${1}" "${2}" +#Epatch:bugfixtitlbar + else +#Epatch:bugfixtitlbar + sed -i '' -E "${1}" "${2}" +#Epatch:bugfixtitlbar + fi +#Epatch:bugfixtitlbar +} +#Epatch:bugfixtitlbar + +#Epatch:bugfixtitlbar update_setting () { +#Epatch:bugfixtitlbar local FILENAME SETTING LINE_NUM IN_SETTING FOUND DEFAULT_TRUE_TO_FALSE