Skip to content

Latest commit

 

History

History
149 lines (123 loc) · 5.99 KB

File metadata and controls

149 lines (123 loc) · 5.99 KB

代码架构

graph LR
subgraph 当前根目录
root
end
subgraph 插件图标聚合目录
softcenter
end
root[.] --> arch
root --> softcenter
root --> src
subgraph 各架构插件目录
arch --> acme
arch --> aria2
arch --> ...
end
subgraph 插件源代码
src --> acme_src[acme]
src --> tailscale_src[tailscale]
src --> ....
tailscale_src --> bin_arch
subgraph 插件各架构主程序
bin_arch
end
tailscale_src --> tailscale
tailscale --> bin
subgraph 插件主程序
bin
end
tailscale --> res
subgraph 插件图标等文件
res
end
tailscale --> scripts
subgraph 插件脚本
scripts
end
tailscale --> webs
subgraph 插件网页
webs
end
end
Loading

多语言支持

web页面支持: 添加如下

<script type="text/javascript" src="/js/i18n.js"></script>

init()处添加

sc_load_lang("插件名");

然后在需要翻译处添加属性sclang

多皮肤支持

web页面支持: 添加如下

<link rel="stylesheet" type="text/css" href="/res/softcenter.css">

init()处添加

set_skin();

</script>处添加

function set_skin(){
	var SKN = '<% nvram_get("sc_skin"); %>';
	if(SKN){
		$("#scapp").attr("skin", SKN);
	}
}
处添加
<body onload="init();" id="scapp" skin="ASUSWRT">

自定义css举例,skin可用值ASUSWRT/ROG/TUF/SWRT/TS

#scapp[skin=TS] [bgcolor="#4D595D"]{
	background: rgba(0, 0, 0, 0.3);
}
#scapp[skin=SWRT] a { 
	color: #0284c7 !important; 
	text-decoration: none !important; 
}
#scapp[skin=SWRT] a:hover { 
	color: #0369a1 !important; 
	text-decoration: underline !important; 
}
#scapp[skin=SWRT] [bgcolor="#4D595D"]{
	background: rgba(225, 225, 225, 0.3);
}
#scapp[skin=SWRT] .content_status {
	background: #fefefe !important;
	box-shadow: 3px 3px 10px #006ce1;
}
#scapp[skin=SWRT] .popup_bar_bg_ks {
	background: transparent !important;
}
#scapp[skin=SWRT] #log_content {
	color: #006ce1 !important;
	font-size: 12px;
}

开发须知:

如果你是开发者,想要开发新的插件,并用离线包的方式进行传播,请了解以下内容:

  1. 在程序方面:务必使用静态链接,每个架构的软件中心都对应不同内核版本和不同libc版本的固件,无法保证动态链接后的程序能正常运行,工具链等
  2. 多语言支持为可选项

软件中心各架构列表:

软件中心架构 mips arm arm64 armng mipsle
CPU架构 mips armv7 aarch64 armv7 mipsle
linux内核 3.10/4.9 2.6/4.x 4.x/5.x 3.x/4.x/5.x 3.10/4.x/5.x
CPU grx500 bcm4708/9 [bcm49xx ][ipq][mt798x] [bcm67xx][ipq] mtk7621
FPU soft no hard hard soft
固件版本 SWRT 5.1.2+ SWRT 5.1.2+ SWRT 5.1.2+ SWRT 5.1.2+ SWRT 5.1.2+
软件中心api 1.5 1.5 1.5 1.5 1.5
代表机型-1 BLUECAVE RT-AC68U RT-AC86U TUF-AX3000 RT-AC85P
代表机型-2 K3C K3 GT-AC2900 RT-AX58U RT-AX53U
代表机型-3 RAX40 SBRAC1900P R8000P RT-AX89X R6800
代表机型-4 DIR2680 RT-AC5300 RAX80 RT-ACRH17 RM-AC2100