diff --git a/agents/MeshAgentOSXPackager.zip b/agents/MeshAgentOSXPackager.zip index b6c29dfd..04121d9d 100644 Binary files a/agents/MeshAgentOSXPackager.zip and b/agents/MeshAgentOSXPackager.zip differ diff --git a/agents/meshagent_osx-x86-64 b/agents/meshagent_osx-x86-64 index 0659568c..766198f5 100644 Binary files a/agents/meshagent_osx-x86-64 and b/agents/meshagent_osx-x86-64 differ diff --git a/package.json b/package.json index c1474cf7..702f9a5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.2-x", + "version": "0.2.3-a", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default.handlebars b/views/default.handlebars index 0a8a2863..5a8536f5 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1995,6 +1995,7 @@ desk.m.showmouse = true; desk.m.onKvmData = function (data) { console.log('KVM Data received in multi-desktop mode, this is not supported.'); }; // KVM Data Channel not supported in multi-desktop right now. //desk.m.onScreenSizeChange = deskAdjust; + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust desk.Start(nodeid, 16994, '*', '*', 0); desk.contype = 2; multiDesktop[nodeid] = desk; @@ -2009,6 +2010,7 @@ desk.m.FrameRateTimer = multidesktopsettings.framerate; //desk.m.onDisplayinfo = deskDisplayInfo; //desk.m.onScreenSizeChange = deskAdjust; + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust desk.Start(nodeid); desk.contype = 1; multiDesktop[nodeid] = desk; @@ -3967,6 +3969,26 @@ } } + function mdeskAdjust(mod, sw, sh, cv) { + if (!mod || !sw || !sh || !cv) return; + + // Check if we are in single desktop mode + if (cv.id == "Desk") { deskAdjust(); return; } + + // Figure out and adjust the size to fill the width of the div + var vsize = [{ x: 180, y: 101 }, { x: 302, y: 169 }, { x: 454, y: 255 }][Q('sizeselect').selectedIndex]; + var realw = vsize.x + 2, tw = Q('xdevices').clientWidth - 30, xw = Math.floor(tw / realw); + xw = realw + Math.floor((tw - (xw * realw)) / xw); + vsize.y = vsize.y * (xw / vsize.x); + vsize.x = xw; + var mh = vsize.y, mw = vsize.x; + if (mod.State != 0) { mh = vsize.y; mw = (sw / sh) * vsize.y; } + QS(cv.id)['max-height'] = mh + 'px'; + QS(cv.id)['max-width'] = mw + 'px'; + QS(cv.id)['margin-top'] = '0'; + QS(cv.id)['margin-bottom'] = '0'; + } + // Remote desktop special key combos for Windows function deskSendKeys() { if (xxdialogMode || desktop == null || desktop.State != 3) return; diff --git a/webserver.js b/webserver.js index 3da47dbe..1297bf38 100644 --- a/webserver.js +++ b/webserver.js @@ -1682,7 +1682,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { // Skip all folder entries zipfile.readEntry(); } else { - if (entry.fileName == 'Mesh Agent.mpkg/Contents/distribution.dist') { + if (entry.fileName == 'Meshcentral_MeshAgent.mpkg/Contents/distribution.dist') { // This is a special file entry, we need to fix it. zipfile.openReadStream(entry, function (err, readStream) { readStream.on("data", function (data) { if (readStream.xxdata) { readStream.xxdata += data; } else { readStream.xxdata = data; } }); @@ -1704,8 +1704,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } }); zipfile.on("end", function () { - archive.file(argentInfo.path, { name: "Mesh Agent.mpkg/Contents/Packages/meshagent.pkg/Contents/MeshAgent" }); - archive.append(meshsettings, { name: "Mesh Agent.mpkg/Contents/Packages/meshagent.pkg/Contents/MeshAgent.msh" }); + archive.file(argentInfo.path, { name: "Meshcentral_MeshAgent.mpkg/Contents/Packages/meshagentosx64.pkg/Contents/meshagent_osx64.bin" }); + archive.append(meshsettings, { name: "Meshcentral_MeshAgent.mpkg/Contents/Packages/meshagentosx64.pkg/Contents/meshagent_osx64.msh" }); archive.finalize(); }); });