Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyHookin committed Apr 26, 2021
1 parent fdc32ed commit f47f004
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 18 deletions.
60 changes: 60 additions & 0 deletions .build/default.Manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.1.0.0"
type="win32"
name="edge-TTS-record.exe"/>
<description>edge-TTS-record</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<!--
可任选以下配置之一指定一个进程权限:
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
requireAdministrator 为管理员权限,
highestAvailable 为可以获取到的最高权限,
asInvoker 为默认值,即调用进程当前权限,一般不需要显式指定,指定后会禁用虚拟化。
虚拟化指Vista以后系统禁止写 Program File目录,启用虚拟化则重定向到%localappdata%\VirtualStore目录,
而注册表 HKEY_LOCAL_MACHINE\Software 则重定向到HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\Software
-->
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
2 changes: 2 additions & 0 deletions .build/default.init.aardio
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//发布前触发
import ide;
6 changes: 6 additions & 0 deletions .build/default.main.aardio
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//此触发器在生成EXE以后执行
import ide;
import fsys;

//获取生成的EXE文件路径
var publishFile = ide.getPublishPath();
1 change: 1 addition & 0 deletions .build/mp.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
801102483
Binary file added bin/RecordAudio.dll
Binary file not shown.
18 changes: 15 additions & 3 deletions default.aproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="edge-TTS-record" libEmbed="true" icon="..." ui="win" output="edge-TTS-record.exe" CompanyName="单位名称" FileDescription="edge-TTS-record" LegalCopyright="Copyright (C) 作者 2021" ProductName="edge-TTS-record" InternalName="edge-TTS-record" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/dist/" dstrip="false">
<project ver="10" name="edge-TTS-record" libEmbed="true" icon="E:\data\20200218100823254_easyicon_net_64.ico" ui="win" output="edge-TTS-record.exe" CompanyName="单位名称" FileDescription="edge-TTS-record" LegalCopyright="Copyright (C) 作者 2021" ProductName="edge-TTS-record" InternalName="edge-TTS-record" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true"/>
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="favicon.ico" path="res\favicon.ico" comment="res\favicon.ico"/>
<file name="index.html" path="res\index.html" comment="res\index.html"/>
<folder name="css" path="res\css" comment="res\css" local="false" embed="false" ignored="false">
<file name="chunk-vendors.30cd8522.css" path="res\css\chunk-vendors.30cd8522.css" comment="res\css\chunk-vendors.30cd8522.css"/>
</folder>
<folder name="js" path="res\js" comment="res\js">
<file name="app.5d183bbe.js" path="res\js\app.5d183bbe.js" comment="res\js\app.5d183bbe.js"/>
<file name="app.5d183bbe.js.map" path="res\js\app.5d183bbe.js.map" comment="res\js\app.5d183bbe.js.map"/>
<file name="chunk-vendors.37ca2be4.js" path="res\js\chunk-vendors.37ca2be4.js" comment="res\js\chunk-vendors.37ca2be4.js"/>
<file name="chunk-vendors.37ca2be4.js.map" path="res\js\chunk-vendors.37ca2be4.js.map" comment="res\js\chunk-vendors.37ca2be4.js.map"/>
</folder>
</folder>
<folder name="窗体文件" path="dlg" comment="目录" embed="true" local="false" ignored="false"/>
</project>
Binary file added dist/edge-TTS-record.exe
Binary file not shown.
28 changes: 20 additions & 8 deletions main.aardio
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
//Edge 语音合成

// 使用Edge浏览器
import chrome.edge;
var theApp = chrome.edge.app();
import console;

// 调用C#程序集
import dotNet;
var appDomain = dotNet.clr().createAppDomain();

// 加载程序集(内嵌/bin/RecordAudio.dll并内存加载)
var RecordAudioLibrary = appDomain.loadFile($"/bin/RecordAudio.dll");
var Record = RecordAudioLibrary.new("RecordAudio.Record");

//import console;
// 打开文件夹对话框
import fsys.dlg.dir;
theApp.external = {
startRecord = function(v){
console.log("startRecord")
startRecord = function(fileDir,maxTime){
//console.log("startRecord");
Record.startRecord(fileDir,maxTime);
}
stopRecord = function(v){
console.log("stopRecord")
//console.log("stopRecord");
Record.stopRecord();
}
getFileDir = function(v){
if(v=="./"){
Expand All @@ -29,14 +40,15 @@ theApp.httpHandler["\res\index.html"] = function(response,request){

theApp.indexReady(
function(){
//mainForm.show(false)
//theApp.setPos(,,620,680)
//mainForm.show()
}
)




//正式的启动chrome进程
theApp.start("http://localhost:8080/")
theApp.start("\res\index.html")

win.loopMessage();
Binary file modified res/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion res/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>tts-record-html</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"><link href="css/chunk-vendors.30cd8522.css" rel="preload" as="style"><link href="js/app.5d183bbe.js" rel="preload" as="script"><link href="js/chunk-vendors.37ca2be4.js" rel="preload" as="script"><link href="css/chunk-vendors.30cd8522.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tts-record-html doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.37ca2be4.js"></script><script src="js/app.5d183bbe.js"></script></body></html>
<!DOCTYPE html><html lang="zh-cn" style="overflow-y: auto;"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>tts-record-html</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"><link href="css/chunk-vendors.30cd8522.css" rel="preload" as="style"><link href="js/app.c0d949ef.js" rel="preload" as="script"><link href="js/chunk-vendors.cdd7361f.js" rel="preload" as="script"><link href="css/chunk-vendors.30cd8522.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tts-record-html doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.cdd7361f.js"></script><script src="js/app.c0d949ef.js"></script></body></html>
2 changes: 0 additions & 2 deletions res/js/app.5d183bbe.js

This file was deleted.

1 change: 0 additions & 1 deletion res/js/app.5d183bbe.js.map

This file was deleted.

Loading

0 comments on commit f47f004

Please sign in to comment.