<html>
<head>
<title>Electron</title>
<style>
body {
color: #555;
font-family: 'Open Sans',Helvetica,Arial,sans-serif;
padding: 30px;
}
h2 {
color: #2b6cc2;
font-family: "Crimson Text",Georgia,serif;
font-weight: 400;
line-height: 1.1;
letter-spacing: -0.015em;
}
a {
color: #2b6cc2;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
pre, code {
font-family: "Menlo","Lucida Console",monospace;
border: 1px solid #ddd;
background-color: #f8f8f8;
border-radius: 3px;
}
pre {
white-space: pre-wrap;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
}
#holder {
border: 4px dashed #ccc;
margin: 0 auto;
height: 300px;
color: #ccc;
font-size: 40px;
line-height: 300px;
text-align: center;
-webkit-user-select: none;
}
#holder.hover {
border: 4px dashed #999;
color: #eee;
}
</style>
</head>
<body>
<script>
const electron = require('electron');
const remote = electron.remote;
const shell = electron.shell;
var execPath = remote.process.execPath;
var command = execPath + ' path-to-your-app';
document.onclick = function(e) {
e.preventDefault();
if (e.target.tagName == 'A')
shell.openExternal(e.target.href);
return false;
};
document.ondragover = document.ondrop = function(e) {
e.preventDefault();
return false;
};
</script>
<h2>
<script>
document.write(`Welcome to Electron (v${process.versions.electron})`)
</script>
</h2>
<p>
To run your app with Electron, execute the following command under your
Console (or Terminal):
</p>
<script>document.write('<pre>' + command + '</pre>')</script>
<p>
The <code>path-to-your-app</code> should be the path to your own Electron
app, you can read the
<script>
document.write(
`<a href='https://github.com/atom/electron/blob/v${process.versions.electron}/docs/tutorial/quick-start.md'>quick start</a>`
);
</script>
guide in Electron's
<script>
document.write(
`<a href='https://github.com/atom/electron/tree/v${process.versions.electron}/docs#readme'>docs</a>`
);
</script>
on how to write one.
</p>
<p>
Or you can just drag your app here to run it:
</p>
<div id="holder">
Drag your app here to run it
</div>
<script>
var holder = document.getElementById('holder');
holder.ondragover = function () {
this.className = 'hover';
return false;
};
holder.ondragleave = holder.ondragend = function () {
this.className = '';
return false;
};
holder.ondrop = function (e) {
this.className = '';
e.preventDefault();
var file = e.dataTransfer.files[0];
require('child_process').execFile(execPath, [file.path], {
detached: true, stdio: 'ignore'
}).unref();
return false;
};
</script>
</body>
</html>

码上成功欧耶
- 粉丝: 0
- 资源: 1
最新资源
- project.hex
- Maxwell电机电磁仿真与绕线式感应电机设计:串电阻启动技术及仿真研究,Maxwell电机电磁仿真与绕线式感应电机设计:串电阻启动技术及仿真研究,maxwell电机电磁仿真 绕线式感应电机设计,串电
- 滑雪场学具租赁-JAVA-基于Spring boot的滑雪场学具租赁管理系统(毕业论文)
- DeepSeek使用技巧大全
- ssm553智慧社区电子商务系统+vue
- https://upload.csdn.net/creation/uploadResources?spm=1011.2124.3001.5646
- AI文字识别扫描 AI Eye Scanner and OCR v4.0
- 浅谈强化学习与策略梯度(Policy Gradient)实现
- 校园互助平台-WeChat-基于微信小程序的校园互助平台设计与实现(毕业论文)
- 基于随机短纤维(线型)与圆形骨料的不干涉细观模型:可调参半径长度、纤维三维化及代码高可改性研究,随机短纤维与圆形骨料细观模型:可调节半径、长度与不干涉的纤维-骨料系统,支持3D圆柱模型及良好代码可改性
- 《STM32-P103嵌入式开发实战指南》
- 一个简单的布局设计各回各家
- https://upload.csdn.net/creation/uploadResources?spm=1011.2124.3001.5646
- s-function builder的PLL的应用在两级式光伏并网逆变系统
- Fluent激光焊接熔池模拟教程:含UDF,涵盖前处理、网格划分与后处理结果分析,Fluent激光焊接熔池模拟全程指南:含UDF教程,从建模到结果处理,fluent激光焊接熔池模拟,含udf,有完整的
- YIKEPHOTOSSetup_1023383_n.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


