diff --git a/.build/default.Manifest.xml b/.build/default.Manifest.xml new file mode 100644 index 0000000..767f7a8 --- /dev/null +++ b/.build/default.Manifest.xml @@ -0,0 +1,60 @@ + + + + php.porttable.debug + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True/PM + + + \ No newline at end of file diff --git a/.build/default.init.aardio b/.build/default.init.aardio new file mode 100644 index 0000000..11c61af --- /dev/null +++ b/.build/default.init.aardio @@ -0,0 +1,2 @@ +//发布前触发 +import ide; \ No newline at end of file diff --git a/.build/default.main.aardio b/.build/default.main.aardio new file mode 100644 index 0000000..f2f1b0a --- /dev/null +++ b/.build/default.main.aardio @@ -0,0 +1,6 @@ +//此触发器在生成EXE以后执行 +import ide; +import fsys; + +//获取生成的EXE文件路径 +var publishFile = ide.getPublishPath(); \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e22129 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dist \ No newline at end of file diff --git a/default.aproj b/default.aproj new file mode 100644 index 0000000..4f1f6c3 --- /dev/null +++ b/default.aproj @@ -0,0 +1,6 @@ + + + + + + diff --git a/lib/config.aardio b/lib/config.aardio new file mode 100644 index 0000000..a1cbfc5 --- /dev/null +++ b/lib/config.aardio @@ -0,0 +1,20 @@ +//config 配置文件 +import fsys.config; +config = fsys.config("/config/"); +//config = fsys.config( io.appData("/软件作者/应用程序名/") ); + +//不需要序列化的配置名字前请添加下划线 +namespace config { + __appName = "应用程序名"; + __appVersion = "1.0.0.01"; + __appDescription = "这是一个测试程序"; + __website = "http://www.aardio.com/"; +} + +/**intellisense(config) +__appName = 应用程序名 +__appVersion = 应用程序内部版本号 +__appDescription = 程序说明 +__website = 官方网站 +? = 配置文件名,\n读写配置并序列化为一个表对象,\n表的成员值可以是支持序列化的普通变量,支持table对象\n配置文件在首次使用时自动加载,退出程序时自动保存\n!fsys_table. +end intellisense**/ \ No newline at end of file diff --git a/main.aardio b/main.aardio new file mode 100644 index 0000000..efb0ffe --- /dev/null +++ b/main.aardio @@ -0,0 +1,86 @@ +// @Author : popy32 +// @Contact : 74o5o27o8#qq.com +// @File : phpruncode.aardio +// @Comment : PHP代码调试助手 (≡^∇^≡) + +import win.ui; +/*DSG{{*/ +var winform = win.form(text='PHP代码调试助手 (\u2261^\u2207^\u2261)';right=759;bottom=469) +winform.add( +button={cls="button";text="运行代码";left=632;top=0;right=760;bottom=40;z=2}; +button2={cls="button";text="清空日志";left=632;top=40;right=760;bottom=80;z=4}; +edit={cls="edit";left=0;top=0;right=632;bottom=304;autohscroll=false;edge=1;font=LOGFONT(h=-16;name='Consolas');multiline=1;vscroll=1;z=1}; +edit2={cls="edit";left=0;top=304;right=760;bottom=472;edge=1;font=LOGFONT(h=-13);multiline=1;z=3} +) +/*}}*/ + +import php; +import console; + +winform.Logd = function(...){ + import debug; + import console; + import win.ui; + import time; + var args = {...}; + var tm = time.now(); + tm.format = "[%Y/%m/%d %H:%M:%S] "; + // + //var debugInfo = debug.queryinfo(2, "select source,function,upvars,name,currentline,activelines") ; + //winform.edit2.log(tostring(tm), "line: ", debugInfo[['currentline']], " ", ..string.join(args,' '),'\r\n'); + + winform.edit2.log(tostring(tm), ..string.join(args,' '),'\r\n'); + + // 滚动条随光标滚动 + winform.edit2.scrollCaret(); +} + +winform.button.oncommand = function(id,event){ + var code = winform.edit.text; + if(code and #code > 0) { + winform.code = code; + thread.invoke( + function(winform){ + import php; + import console; + import debug; + import win.ui; + import time; + + var code = winform.code; + //winform.edit2.text = code; + var ret; + php.begin(); + php.print = function( msg ) { + //winform.edit2.print("echo:", msg); + //winform.edit2.print(msg); + winform.Logd(msg) + } + + php.exec(code); + php.end(); + //winform.edit2.print(""); + }, winform + ) + } +} + +winform.button2.oncommand = function(id,event){ + // 清空日志 + winform.edit2.text = ""; +} + +winform.edit.text = /*** +class test{ + private $flag = "flag{this-is-flag}"; + public $a = "snail"; + static $b = "beta"; +} + +$test = new test; //建立一个test的对象; +$data = serialize($test); //将对象进行序列化; +echo $data; +***/ + +winform.show(); +win.loopMessage(); \ No newline at end of file