mirror of
https://github.com/4ian/GDevelop.git
synced 2026-10-12 02:01:17 +00:00
+24
-12
@@ -94,13 +94,15 @@ blocks:
|
||||
GDJS_KEY="GDJS-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring caches..."
|
||||
cache restore "${NEWIDE_KEY}"
|
||||
cache restore "${GDJS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
fi
|
||||
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
- cd newIDE/app
|
||||
- npm run postinstall
|
||||
- npm run flow
|
||||
@@ -120,15 +122,17 @@ blocks:
|
||||
GDJS_TESTS_KEY="GDJS-tests-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/tests/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring caches..."
|
||||
cache restore "${NEWIDE_KEY}"
|
||||
cache restore "${GDJS_KEY}"
|
||||
cache restore "${GDJS_TESTS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
(cd GDJS/tests && npm i)
|
||||
fi
|
||||
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
(cd GDJS/tests && npm i)
|
||||
- cd GDJS
|
||||
- npm run check-types
|
||||
- npm run generate-doc
|
||||
@@ -151,13 +155,15 @@ blocks:
|
||||
GDJS_KEY="GDJS-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring caches..."
|
||||
cache restore "${NEWIDE_KEY}"
|
||||
cache restore "${GDJS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
fi
|
||||
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
- cd newIDE/app
|
||||
- npm run postinstall
|
||||
- npm run check-format
|
||||
@@ -174,11 +180,13 @@ blocks:
|
||||
GDJS_KEY="GDJS-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring cache..."
|
||||
cache restore "${GDJS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
fi
|
||||
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
- cd GDJS
|
||||
- npm run check-format
|
||||
|
||||
@@ -200,13 +208,15 @@ blocks:
|
||||
GDJS_KEY="GDJS-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring caches..."
|
||||
cache restore "${NEWIDE_KEY}"
|
||||
cache restore "${GDJS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
fi
|
||||
|
||||
(cd newIDE/app && npm i)
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
- cd newIDE/app
|
||||
- npm run postinstall
|
||||
- npm run analyze-test-coverage
|
||||
@@ -224,13 +234,15 @@ blocks:
|
||||
GDJS_TESTS_KEY="GDJS-tests-node_modules-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/tests/package-lock.json)"
|
||||
|
||||
if can_use_cache; then
|
||||
echo "Restoring caches..."
|
||||
cache restore "${GDJS_KEY}"
|
||||
cache restore "${GDJS_TESTS_KEY}"
|
||||
else
|
||||
echo "Fork PR: skipping cache restore"
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
(cd GDJS/tests && npm i)
|
||||
fi
|
||||
|
||||
(cd GDJS && git checkout package-lock.json && npm i)
|
||||
(cd GDJS/tests && npm i)
|
||||
- cd GDJS
|
||||
- npm run build
|
||||
- sudo apt-get install -y libegl1 libgl1-mesa-dri libgbm1 xvfb
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js b/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
|
||||
--- a/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
|
||||
+++ b/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
|
||||
@@ -49,7 +49,20 @@
|
||||
};
|
||||
ExecCommandAction.prototype.run = function (accessor, editor) {
|
||||
editor.focus();
|
||||
- document.execCommand(this.browserCommand);
|
||||
+ var result = document.execCommand(this.browserCommand);
|
||||
+ // Fallback for Electron where document.execCommand('paste') fails
|
||||
+ // in newer Chromium versions. Use Electron's clipboard API instead.
|
||||
+ // See https://github.com/microsoft/monaco-editor/issues/4855
|
||||
+ if (!result && this.browserCommand === 'paste') {
|
||||
+ try {
|
||||
+ var text = window.require('electron').clipboard.readText();
|
||||
+ if (text) {
|
||||
+ editor.trigger('keyboard', 'type', { text: text });
|
||||
+ }
|
||||
+ } catch (e) {
|
||||
+ // Not in Electron environment, ignore
|
||||
+ }
|
||||
+ }
|
||||
};
|
||||
return ExecCommandAction;
|
||||
}(EditorAction));
|
||||
@@ -46,32 +46,6 @@ const {
|
||||
} = require('./LocalGDJSDevelopmentWatcher');
|
||||
const { setupWatcher, disableWatcher } = require('./LocalFilesystemWatcher');
|
||||
|
||||
const isMac = process.platform === 'darwin';
|
||||
|
||||
/**
|
||||
* Ensures paste operations work in all web content (notably Monaco editor)
|
||||
* by intercepting Cmd/Ctrl+V before Electron's menu accelerators consume the
|
||||
* event, and explicitly calling webContents.paste().
|
||||
* See https://github.com/microsoft/monaco-editor/issues/4855
|
||||
*
|
||||
* This may be fixed in future monaco-editor versions, starting from 0.56.0 when it's released.
|
||||
*/
|
||||
const setupPasteHandler = window => {
|
||||
window.webContents.on('before-input-event', (event, input) => {
|
||||
const isCmdOrCtrl = isMac ? input.meta === true : input.control === true;
|
||||
const hasShift = input.shift === true;
|
||||
const hasAlt = input.alt === true;
|
||||
const isV = input.code === 'KeyV' || input.key === 'v';
|
||||
const shouldPaste =
|
||||
input.type === 'keyDown' && isCmdOrCtrl && !hasShift && !hasAlt && isV;
|
||||
|
||||
if (shouldPaste) {
|
||||
window.webContents.paste();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Initialize `@electron/remote` module
|
||||
require('@electron/remote/main').initialize();
|
||||
|
||||
@@ -234,9 +208,6 @@ function createNewWindow(windowArgs = args) {
|
||||
// Enable `@electron/remote` module for renderer process
|
||||
require('@electron/remote/main').enable(newWindow.webContents);
|
||||
|
||||
// Ensure paste works in web content (e.g., Monaco editor).
|
||||
setupPasteHandler(newWindow);
|
||||
|
||||
// Log process ID to verify separate renderer processes
|
||||
newWindow.webContents.once('did-finish-load', () => {
|
||||
newWindow.webContents
|
||||
@@ -615,19 +586,25 @@ app.on('ready', function() {
|
||||
// app quits.
|
||||
log.info('Starting check for updates (with auto-download if any)');
|
||||
autoUpdater.autoDownload = true;
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
autoUpdater.checkForUpdatesAndNotify().catch(err => {
|
||||
log.error('Error checking for updates:', err);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('updates-check', event => {
|
||||
log.info('Starting check for updates (without auto-download)');
|
||||
autoUpdater.autoDownload = false;
|
||||
autoUpdater.checkForUpdates();
|
||||
autoUpdater.checkForUpdates().catch(err => {
|
||||
log.error('Error checking for updates:', err);
|
||||
});
|
||||
});
|
||||
|
||||
function sendUpdateStatus(status) {
|
||||
log.info(status);
|
||||
mainWindows.forEach(window => {
|
||||
window.webContents.send('update-status', status);
|
||||
if (!window.isDestroyed()) {
|
||||
window.webContents.send('update-status', status);
|
||||
}
|
||||
});
|
||||
}
|
||||
autoUpdater.on('checking-for-update', () => {
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gdevelop",
|
||||
"version": "5.6.253",
|
||||
"version": "5.6.254",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gdevelop",
|
||||
"version": "5.6.253",
|
||||
"version": "5.6.254",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.1.2",
|
||||
|
||||
Reference in New Issue
Block a user