7 Commits
1.0.0 ... 1.0.1

10 changed files with 167 additions and 107 deletions

View File

@@ -12,6 +12,7 @@
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="HttpUrlsUsage" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

98
README-zh-CN.md Normal file
View File

@@ -0,0 +1,98 @@
# YukiHookAPI Project Builder
![Blank](https://img.shields.io/badge/license-AGPL3.0-blue)
![Blank](https://img.shields.io/badge/version-v1.0.1-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiHookAPI)
<br/><br/>
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png" width = "100" height = "100"/>
<br/>
<br/>
帮助你快速创建一个使用 YukiHookAPI 打造的 Xposed 项目模板。
<br/>
[English](https://github.com/fankes/YukiHookAPI-ProjectBuilder/blob/master/README.md) | 简体中文
## 这是什么
- 这是一个使用 [YukiHookAPI](https://github.com/fankes/YukiHookAPI) 作为核心的 Xposed 模块自动构建工具
- 实现自动化搜索依赖快速搭建一个包含 Xposed 模块环境的 Android 项目模板
## 如何使用
- 本项目使用 **Electron** 开发,快速实现多平台本地化应用程序的构建和运行
你可以直接从 [Release](https://github.com/fankes/YukiHookAPI-ProjectBuilder/releases) 下载适合于你平台的应用程序。
**以下是手动部署与编译步骤**
首先你需要安装 [node.js](https://nodejs.org/zh-cn/)
IDE 工具建议使用 **IntelliJ IDEA****WebStorm**
不建议使用 **Visual Studio Code** 对代码进行格式化,可能会造成一些错误。
- 执行如下命令安装 Electron
```
npm install --save-dev electron
```
- 执行如下命令安装 yarn
```
npm install yarn
```
- 进入项目目录,执行如下命令安装依赖
```
npm install --save-dev @electron-forge/cli
```
```
npx electron-forge import
```
- 使用如下命令进行调试
```
npm run start
```
- 使用如下命令进行编译 & 打包
**Linux/macOS**
```
npm run make
```
**Windows**
```
npm run package
```
## 许可证
- [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
```
Copyright (C) 2019-2022 HighCapable
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
```
版权所有 © 2019-2022 HighCapable

View File

@@ -1,7 +1,7 @@
# YukiHookAPI Project Builder
![Blank](https://img.shields.io/badge/license-AGPL3.0-blue)
![Blank](https://img.shields.io/badge/version-v1.0.0-green)
![Blank](https://img.shields.io/badge/version-v1.0.1-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiHookAPI)
<br/><br/>
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png" width = "100" height = "100"/>
@@ -10,23 +10,20 @@
A Xposed Project Builder by YukiHookAPI.
<br/>
English | [简体中文](https://github.com/fankes/YukiHookAPI-ProjectBuilder/blob/master/README-zh-CN.md)
## What's this
- This is an automatic building tool for Xposed modules using [YukiHookAPI](https://github.com/fankes/YukiHookAPI) as the core
- Implementing automated search relies on quickly building an Android project template that includes an Xposed module environment
**这是什么**
- 这是一个使用 [YukiHookAPI](https://github.com/fankes/YukiHookAPI) 作为核心的 Xposed 模块自动构建工具
- 实现自动化搜索依赖快速搭建一个包含 Xposed 模块环境的 Android 项目模板
- Implementing automated search relies on quickly building an Android project template that includes a Xposed module environment
## How to use
- This project is developed using **Electron** to quickly build and run multi-platform localized applications
You can download the application for your platform directly from [Release](https://github.com/fankes/YukiHookAPI-ProjectBuilder/releases).
You can download the application for your platform directly
from [Release](https://github.com/fankes/YukiHookAPI-ProjectBuilder/releases).
**The following are the manual deployment and compilation steps**
@@ -78,62 +75,6 @@ npm run make
npm run package
```
**如何使用**
- 本项目使用 **Electron** 开发,快速实现多平台本地化应用程序的构建和运行
你可以直接从 [Release](https://github.com/fankes/YukiHookAPI-ProjectBuilder/releases) 下载适合于你平台的应用程序。
**以下是手动部署与编译步骤**
首先你需要安装 [node.js](https://nodejs.org/zh-cn/)
IDE 工具建议使用 **IntelliJ IDEA****WebStorm**
不建议使用 **Visual Studio Code** 对代码进行格式化,可能会造成一些错误。
- 执行如下命令安装 Electron
```
npm install --save-dev electron
```
- 执行如下命令安装 yarn
```
npm install yarn
```
- 进入项目目录,执行如下命令安装依赖
```
npm install --save-dev @electron-forge/cli
```
```
npx electron-forge import
```
- 使用如下命令进行调试
```
npm run start
```
- 使用如下命令进行编译 & 打包
**Linux/macOS**
```
npm run make
```
**Windows**
```
npm run package
```
## License
- [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
@@ -155,4 +96,4 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
```
版权所有 © 2019-2022 HighCapable
Copyright © 2019-2022 HighCapable

View File

@@ -1,7 +1,7 @@
{
"name": "yukihookapi-projectbuilder",
"productName": "YukiHookAPI Project Builder",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Xposed Project Builder by YukiHookAPI",
"main": "src/app.js",
"scripts": {

Binary file not shown.

View File

@@ -72,19 +72,18 @@
<div class="mdui-textfield mdui-textfield-floating-label mdui-col-xs-6">
<i class="mdui-icon material-icons">details</i>
<label class="mdui-textfield-label i18n">{{appMinApiVersion}}</label>
<input class="mdui-textfield-input" id="app_min_api_text" required type="number" value="27"/>
<input class="mdui-textfield-input" id="app_min_api_text" required type="number" value="0"/>
</div>
<div class="mdui-textfield mdui-textfield-floating-label mdui-col-xs-6">
<i class="mdui-icon material-icons">change_history</i>
<label class="mdui-textfield-label i18n">{{appTargetApiVersion}}</label>
<input class="mdui-textfield-input" id="app_target_api_text" required type="number"
value="32"/>
<input class="mdui-textfield-input" id="app_target_api_text" required type="number" value="0"/>
</div>
</div>
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">extension</i>
<label class="mdui-textfield-label i18n">{{xposedMinApiVersion}} (Xposed Min API Version)</label>
<input class="mdui-textfield-input" id="xposed_min_api_text" required type="number" value="93"/>
<input class="mdui-textfield-input" id="xposed_min_api_text" required type="number" value="0"/>
</div>
<div class="mdui-textfield">
<i class="mdui-icon material-icons">settings_input_hdmi</i>
@@ -142,22 +141,22 @@
</div>
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">local_offer</i>
<label class="mdui-textfield-label i18n">{{debugTagName}}</label>
<input class="mdui-textfield-input" id="debug_tag_name_text"/>
<label class="mdui-textfield-label i18n">{{debugLogTagName}}</label>
<input class="mdui-textfield-input" id="debug_log_tag_name_text"/>
</div>
<div class="mdui-textfield">
<i class="mdui-icon material-icons">bug_report</i>
<label class="mdui-textfield-label i18n">{{enableDebugMode}}</label>
<select class="mdui-select" id="enable_debug_select">
<i class="mdui-icon material-icons">pageview</i>
<label class="mdui-textfield-label i18n">{{enableDebugLog}}</label>
<select class="mdui-select" id="enable_debug_log_select">
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
<option class="i18n" value="1">{{yesOfConfigure}}</option>
<option class="i18n" value="2">{{noOfConfigure}}</option>
</select>
</div>
<div class="mdui-textfield">
<i class="mdui-icon material-icons">pageview</i>
<label class="mdui-textfield-label i18n">{{enablePrintLogcat}}</label>
<select class="mdui-select" id="enable_print_logcat_select">
<i class="mdui-icon material-icons">bug_report</i>
<label class="mdui-textfield-label i18n">{{enableDebugMode}}</label>
<select class="mdui-select" id="enable_debug_select">
<option class="i18n" value="0">{{notConfigureDefYes}}</option>
<option class="i18n" value="1">{{yesOfConfigure}}</option>
<option class="i18n" value="2">{{noOfConfigure}}</option>

View File

@@ -57,9 +57,9 @@ const projectConfigs = {
packageName: '',
appName: '',
moduleDescription: '',
appMinApi: 0,
appTargetApi: 0,
xposedMinApi: 0,
appMinApi: 27,
appTargetApi: 33,
xposedMinApi: 93,
moduleCompoment: 0,
targetXposedPlatform: 0,
newXSharePrefs: 0,
@@ -67,10 +67,10 @@ const projectConfigs = {
},
yukiHookApiConfig: {
entryClassName: '',
debugTagName: '',
debugLogTagName: '',
supportResourcesHook: 0,
enableDebug: 0,
enablePrintLogcat: 0,
enableDebugLog: 0,
enableYPrefsCache: 0,
enableResourcesCache: 0,
enableModuleStatus: 0,
@@ -301,13 +301,13 @@ const configForm = {
appTargetApiText: () => $('#app_target_api_text').val(),
xposedMinApiText: () => $('#xposed_min_api_text').val(),
entryClassNameText: () => $('#entry_class_name_text').val(),
debugTagNameText: () => $('#debug_tag_name_text').val(),
debugLogTagNameText: () => $('#debug_log_tag_name_text').val(),
compomentSelect: () => valUtils.integerOf($('#compoment_select option:selected').val()),
targetXposedPlatformSelect: () => valUtils.integerOf($('#target_xposed_platform_select option:selected').val()),
newXSharePrefsSelect: () => valUtils.integerOf($('#new_xshare_prefs_select option:selected').val()),
supportResourcesHookSelect: () => valUtils.integerOf($('#support_resources_hook_select option:selected').val()),
enableDebugSelect: () => valUtils.integerOf($('#enable_debug_select option:selected').val()),
enablePrintLogcatSelect: () => valUtils.integerOf($('#enable_print_logcat_select option:selected').val()),
enableDebugLogSelect: () => valUtils.integerOf($('#enable_debug_log_select option:selected').val()),
enableYPrefsCacheSelect: () => valUtils.integerOf($('#enable_yprefs_cache_select option:selected').val()),
enableResourcesCacheSelect: () => valUtils.integerOf($('#enable_resources_cache_select option:selected').val()),
enableModuleStatusSelect: () => valUtils.integerOf($('#enable_module_status_select option:selected').val()),
@@ -343,10 +343,10 @@ const build = {
projectConfigs.basicConfig.newXSharePrefs = configForm.newXSharePrefsSelect();
projectConfigs.basicConfig.moduleScopes = moduleScope.moduleScopesData();
projectConfigs.yukiHookApiConfig.entryClassName = configForm.entryClassNameText();
projectConfigs.yukiHookApiConfig.debugTagName = configForm.debugTagNameText();
projectConfigs.yukiHookApiConfig.debugLogTagName = configForm.debugLogTagNameText();
projectConfigs.yukiHookApiConfig.supportResourcesHook = configForm.supportResourcesHookSelect();
projectConfigs.yukiHookApiConfig.enableDebug = configForm.enableDebugSelect();
projectConfigs.yukiHookApiConfig.enablePrintLogcat = configForm.enablePrintLogcatSelect();
projectConfigs.yukiHookApiConfig.enableDebugLog = configForm.enableDebugLogSelect();
projectConfigs.yukiHookApiConfig.enableYPrefsCache = configForm.enableYPrefsCacheSelect();
projectConfigs.yukiHookApiConfig.enableResourcesCache = configForm.enableResourcesCacheSelect();
projectConfigs.yukiHookApiConfig.enableModuleStatus = configForm.enableModuleStatusSelect();
@@ -615,13 +615,13 @@ const configTemplate = {
$('#app_target_api_text').val(data.basicConfig.appTargetApi);
$('#xposed_min_api_text').val(data.basicConfig.xposedMinApi);
$('#entry_class_name_text').val(data.yukiHookApiConfig.entryClassName);
$('#debug_tag_name_text').val(data.yukiHookApiConfig.debugTagName);
$('#debug_log_tag_name_text').val(data.yukiHookApiConfig.debugLogTagName);
$('#compoment_select').val(data.basicConfig.moduleCompoment);
$('#target_xposed_platform_select').val(data.basicConfig.targetXposedPlatform);
$('#new_xshare_prefs_select').val(data.basicConfig.newXSharePrefs);
$('#support_resources_hook_select').val(data.yukiHookApiConfig.supportResourcesHook);
$('#enable_debug_select').val(data.yukiHookApiConfig.enableDebug);
$('#enable_print_logcat_select').val(data.yukiHookApiConfig.enablePrintLogcat);
$('#enable_debug_log_select').val(data.yukiHookApiConfig.enableDebugLog);
$('#enable_yprefs_cache_select').val(data.yukiHookApiConfig.enableYPrefsCache);
$('#enable_resources_cache_select').val(data.yukiHookApiConfig.enableResourcesCache);
$('#enable_module_status_select').val(data.yukiHookApiConfig.enableModuleStatus);
@@ -683,6 +683,11 @@ const page = {
$(element).attr('placeholder', innerHtml.replace(/\{\{(.*)}}/, i18nText));
else element.innerHTML = innerHtml.replace(/\{\{(.*)}}/, i18nText);
});
/** 初始化必要数据 */
$('#app_min_api_text').val(projectConfigs.basicConfig.appMinApi);
$('#app_target_api_text').val(projectConfigs.basicConfig.appTargetApi);
$('#xposed_min_api_text').val(projectConfigs.basicConfig.xposedMinApi);
/** 显示页面 */
$('#root_div').show();
page.checkForUpdates(false);
},

View File

@@ -121,9 +121,9 @@ const locale = {
"addApps": "Add apps",
"entryClassName": "Entry class name (When blank use the default value)",
"addResourcesHookSupport": "Add Resources Hook support",
"debugTagName": "Debug TAG name (Default is YukiHookAPI)",
"debugLogTagName": "Debug log TAG name (Default is YukiHookAPI)",
"enableDebugMode": "Enable debug mode",
"enablePrintLogcat": "Enable debug log output",
"enableDebugLog": "Enable debug log output",
"enableYukiHookModulePrefsCache": "Enable YukiHookModulePrefs key-value caching",
"enableModuleResourcesCache": "Enable module Resources caching",
"enableModuleStatus": "Enable module activation status listening",
@@ -256,14 +256,14 @@ const locale = {
"addApps": "添加应用",
"entryClassName": "入口类名 (不填使用默认值生成)",
"addResourcesHookSupport": "添加 Resources Hook 支持",
"debugTagName": "Debug TAG 名称 (不填默认为 YukiHookAPI)",
"debugLogTagName": "调试日志 TAG 名称 (不填默认为 YukiHookAPI)",
"enableDebugMode": "启用 Debug 模式",
"enablePrintLogcat": "启用调试日志输出功能",
"enableDebugLog": "启用调试日志输出功能",
"enableYukiHookModulePrefsCache": "启用 YukiHookModulePrefs 键值缓存功能",
"enableModuleResourcesCache": "启用模块 Resources 缓存功能",
"enableModuleStatus": "启用模块激活状态监听功能",
"enableYukiHookDataChannel": "启用 YukiHookDataChannel 功能",
"enableMemberCache": "启用已查的反射类、方法、变量缓存功能",
"enableMemberCache": "启用已查的反射类、方法、变量缓存功能",
"selectScopeAppsOrEnterOnceTip": "请从下面的列表中选择你需要添加到作用域中的应用",
"customize": "自定义",
"systemFramework": "系统框架",
@@ -391,9 +391,9 @@ const locale = {
"addApps": "アプリを追加",
"entryClassName": "エントリクラス名(デフォルトを使用するには空)",
"addResourcesHookSupport": "リソースフックのサポートを追加",
"debugTagName": "デバッグタグ名デフォルトはYukiHookAPI",
"debugLogTagName": "デバッググロタグ名デフォルトはYukiHookAPI",
"enableDebugMode": "デバッグモードを有効にする",
"enablePrintLogcat": "デバッグログ出力を有効にする",
"enableDebugLog": "デバッグログ出力を有効にする",
"enableYukiHookModulePrefsCache": "YukiHookModulePrefsのKey-Valueキャッシングを有効にする",
"enableModuleResourcesCache": "モジュールリソースのキャッシュを有効にする",
"enableModuleStatus": "モジュールのアクティブ化ステータスの監視を有効にする",

View File

@@ -150,13 +150,13 @@ const transaction = {
type: 'implementation',
groupId: 'androidx.core',
artifactId: 'core-ktx',
version: '1.8.0'
version: '1.9.0'
},
appcompat: {
type: 'implementation',
groupId: 'androidx.appcompat',
artifactId: 'appcompat',
version: '1.4.2'
version: '1.5.1'
},
material: {
type: 'implementation',
@@ -210,9 +210,11 @@ const transaction = {
supportResourcesHook: (isEnabled) => 'isUsingResourcesHook = ' + (isEnabled ? 'true' : 'false')
},
configs: {
debugTagName: (name) => 'debugTag = "' + name + '"',
debugLog: {
tagName: (name) => 'tag = "' + name + '"',
enable: (isEnabled) => 'isEnable = ' + (isEnabled ? 'true' : 'false')
},
enableDebug: (isEnabled) => 'isDebug = ' + (isEnabled ? 'true' : 'false'),
enablePrintLogcat: (isEnabled) => 'isAllowPrintingLogs = ' + (isEnabled ? 'true' : 'false'),
enableYPrefsCache: (isEnabled) => 'isEnableModulePrefsCache = ' + (isEnabled ? 'true' : 'false'),
enableResourcesCache: (isEnabled) => 'isEnableModuleAppResourcesCache = ' + (isEnabled ? 'true' : 'false'),
enableModuleStatus: (isEnabled) => 'isEnableHookModuleStatus = ' + (isEnabled ? 'true' : 'false'),
@@ -331,15 +333,23 @@ const transaction = {
hookEntryAnnotationCode.trim().substring(0, hookEntryAnnotationCode.trim().lastIndexOf(',')) :
hookEntryAnnotationCode.trim()) + ')';
let hookEntryConfigsCode = '';
if (configs.yukiHookApiConfig.debugTagName !== '')
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.debugTagName(configs.yukiHookApiConfig.debugTagName));
if (configs.yukiHookApiConfig.debugLogTagName !== '' || configs.yukiHookApiConfig.enableDebugLog !== 0) {
hookEntryConfigsCode += 'debugLog {\n';
hookEntryConfigsCode += codeFiles.space(12);
if (configs.yukiHookApiConfig.debugLogTagName !== '') {
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.debugLog.tagName(configs.yukiHookApiConfig.debugLogTagName));
if (configs.yukiHookApiConfig.enableDebugLog !== 0) hookEntryConfigsCode += codeFiles.space(4);
}
if (configs.yukiHookApiConfig.enableDebugLog !== 0)
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.debugLog.enable(configs.yukiHookApiConfig.enableDebugLog === 1));
hookEntryConfigsCode += '}\n';
hookEntryConfigsCode += codeFiles.space(8);
}
if (configs.yukiHookApiConfig.enableDebug !== 0)
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.enableDebug(configs.yukiHookApiConfig.enableDebug === 1));
if (configs.yukiHookApiConfig.enablePrintLogcat !== 0)
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.enablePrintLogcat(configs.yukiHookApiConfig.enablePrintLogcat === 1));
if (configs.yukiHookApiConfig.enableYPrefsCache !== 0)
hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode,
codeFiles['HookEntry.kt'].configs.enableYPrefsCache(configs.yukiHookApiConfig.enableYPrefsCache === 1));