编辑器
优化安装
This commit is contained in:
@@ -282,7 +282,6 @@ object ed_script:t_compile_config
|
||||
end
|
||||
object ck_s_rp:tcheckbtn
|
||||
caption="资源文件保留相对路径"
|
||||
enabled=false
|
||||
height=25
|
||||
left=253
|
||||
top=25
|
||||
|
||||
@@ -100,6 +100,7 @@ type t_compile_config=class(tdcreateform)
|
||||
else
|
||||
cb_type.ItemIndex := 0;
|
||||
end
|
||||
flibpath := r["libpath"];
|
||||
e_script.text := r["buildfile"];
|
||||
ed_output.text := r["output"];
|
||||
ed_out_f.text := r["exports"] ;
|
||||
@@ -125,6 +126,7 @@ type t_compile_config=class(tdcreateform)
|
||||
end
|
||||
r["buildfile"] := e_script.text;
|
||||
r["output"] := ed_output.text;
|
||||
r["libpath"] := flibpath;
|
||||
r["exports"] := ed_out_f.text;
|
||||
r["dependsdir"]:=ed_f_dirs.text;
|
||||
r["depends"]:=ed_include_f.text;
|
||||
@@ -154,6 +156,7 @@ type t_compile_config=class(tdcreateform)
|
||||
ck_gui.Checked := "";
|
||||
ed_ico.text := "";
|
||||
ck_s_rp.Checked := "";
|
||||
flibpath := "";
|
||||
end
|
||||
function bt_outputname_clk(o;e);virtual;
|
||||
begin
|
||||
@@ -446,4 +449,5 @@ type t_compile_config=class(tdcreateform)
|
||||
return r;
|
||||
end
|
||||
fcmd_shower;
|
||||
flibpath;
|
||||
end
|
||||
|
||||
@@ -36,14 +36,14 @@ begin
|
||||
//return sleep(5000); //停留5秒
|
||||
echo "\r\n press enter exit";
|
||||
sleep(5000);
|
||||
return readln();
|
||||
return ;
|
||||
end else
|
||||
if (i<=sysparamcount())and ("-uninstall" = sysparamstr(i) ) then //卸载右键打开
|
||||
begin
|
||||
UnInStallToMenu();
|
||||
echo "\r\n press enter exit";
|
||||
sleep(5000); //停留5秒
|
||||
return readln();
|
||||
return ;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -155,8 +155,25 @@ type TRunEditorForm = class(TEditorForm)
|
||||
end
|
||||
function InStallToMenu(); //注册
|
||||
begin
|
||||
k1 := new TRegKey(class(TRegKey).HKEY_CLASSES_ROOT);
|
||||
tek := k1.openKeyA("*\\shell\\tslediter");
|
||||
uses utslvclinstall;
|
||||
o := new t_tsl_window_reg();
|
||||
o.installforall := true;
|
||||
if o.has_reg_authority() then
|
||||
begin
|
||||
reg := 0;
|
||||
if o.install_info_set()=0 then echo "\r\nset install info ok!!";
|
||||
if o.install_backmenuopen()=0 then echo "\r\nset open menu ok!!";
|
||||
if o.install_backmenu()=0 then echo "\r\nset back menu ok!!";
|
||||
end else
|
||||
begin
|
||||
return echo "\r\nPlease run with administrator rights!!";
|
||||
end
|
||||
return ;
|
||||
|
||||
//k1 := new TRegKey(class(TRegKey).HKEY_CLASSES_ROOT);
|
||||
k := class(TRegKey).GetRegKeyMachine();
|
||||
k1 := k.openKeyA("SOFTWARE\\Classes");
|
||||
tek := k1.openKeyA("*\\shell\\tsleditor");
|
||||
if not ifobj(tek) then
|
||||
begin
|
||||
return echo "Please run with administrator rights!!";
|
||||
@@ -170,17 +187,42 @@ begin
|
||||
end else
|
||||
begin
|
||||
tc.SetValueStringA(nil,SysExecName()+ ' "%1"');
|
||||
bkcl := k1.openKeyA("Directory\\Background\\shell\\tslediter\\command");
|
||||
bkcl := k1.openKeyA("Directory\\Background\\shell\\tsleditor\\command");
|
||||
if bkcl then bkcl.SetValueStringA(nil,SysExecName());
|
||||
bkcl := k1.openKeyA("Directory\\Background\\shell\\tslediter");
|
||||
bkcl := k1.openKeyA("Directory\\Background\\shell\\tsleditor");
|
||||
bkcl.SetValueStringA(nil,"TSL Editor");
|
||||
if bkcl then bkcl.SetValueStringA("Icon",SysExecName());
|
||||
echo "register tslediter ok ~~";
|
||||
|
||||
|
||||
echo "register tsleditor ok ~~";
|
||||
end
|
||||
end
|
||||
function UnInStallToMenu(); //卸载
|
||||
begin
|
||||
k1 := new TRegKey(class(TRegKey).HKEY_CLASSES_ROOT);
|
||||
uses utslvclinstall;
|
||||
o := new t_tsl_window_reg();
|
||||
o.installforall := true;
|
||||
if o.has_reg_authority() then
|
||||
begin
|
||||
reg := o.get_uninstall_reg(1);
|
||||
if ifobj(reg) then
|
||||
begin
|
||||
reg := nil;
|
||||
if 0=o.uninstall_backmenu() then echo "\r\ndelete back menu ok ";
|
||||
if 0=o.uninstall_backmenuopen() then echo "\r\ndelete open menu ok ";
|
||||
if 0=o.install_info_remove() then echo "\r\ndelete install info ok ";
|
||||
end else
|
||||
begin
|
||||
return echo "\r\nnot installed!!";
|
||||
end
|
||||
end else
|
||||
begin
|
||||
return echo "\r\n try run with administrator rights!!";
|
||||
end
|
||||
return ;
|
||||
//k1 := new TRegKey(class(TRegKey).HKEY_CLASSES_ROOT);
|
||||
k := class(TRegKey).GetRegKeyMachine();
|
||||
k1 := k.openKeyA("SOFTWARE\\Classes");
|
||||
tc := k1.openKeyA("*\\shell");
|
||||
if not ifobj(tc) then
|
||||
begin
|
||||
@@ -188,26 +230,26 @@ begin
|
||||
return;
|
||||
end else
|
||||
begin
|
||||
if 0=tc.DeleteKeyA("tslediter\\command") then
|
||||
if 0=tc.DeleteKeyA("tsleditor\\command") then
|
||||
begin
|
||||
if 0=tc.DeleteKeyA("tslediter") then
|
||||
if 0=tc.DeleteKeyA("tsleditor") then
|
||||
begin
|
||||
bkcl := k1.openKeyA("Directory\\Background\\shell");
|
||||
if ifobj(bkcl) then
|
||||
begin
|
||||
if 0=bkcl.DeleteKeyA("tslediter\\command") then
|
||||
if 0=bkcl.DeleteKeyA("tsleditor\\command") then
|
||||
begin
|
||||
if 0=bkcl.DeleteKeyA("tslediter") then
|
||||
if 0=bkcl.DeleteKeyA("tsleditor") then
|
||||
begin
|
||||
end
|
||||
end
|
||||
end
|
||||
echo "unregister tslediter ok~~";
|
||||
echo "unregister tsleditor ok~~";
|
||||
return ;
|
||||
end
|
||||
end
|
||||
|
||||
echo "tslediter not installed~~";
|
||||
echo "tsleditor not installed~~";
|
||||
return ;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2232,7 +2232,6 @@ type TEditer=class(TCustomcontrol) //
|
||||
end
|
||||
end
|
||||
ds := getlibpathstr();
|
||||
|
||||
r["libpath"] := ds;
|
||||
if ot then r["output"] := ot;
|
||||
r["dependsdir"] := replacetext(ds,";",",");
|
||||
|
||||
Reference in New Issue
Block a user