Skip to content

Commit

Permalink
aab 安装辅助工具
Browse files Browse the repository at this point in the history
  • Loading branch information
fireantzhang committed Jul 22, 2020
0 parents commit ac84272
Show file tree
Hide file tree
Showing 381 changed files with 29,088 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
node_modules

# Build folder and files #
##########################
builds/

# Development folders and files #
#################################
.tmp/
dist/
plugins-dist/
release/
assets/
installed-plugins/
node_modules/
*.compiled.*

# Folder config file #
######################
Desktop.ini

# Folder notes #
################
_ignore/

# Log files & folders #
#######################
*.log
npm-debug.log*
.npm

# Eslint #
.eslintrc.js

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.rar
*.tar
*.zip

# Windows & Mac file caches #
#############################
.DS_Store
Thumbs.db
ehthumbs.db

# Windows shortcuts #
#####################
*.lnk

.vscode/
116 changes: 116 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# AabInstallHelp

### 用途:

该项目主要是一个简单的安卓平台的 `aab` 安装包辅助安装软件,软件内置了 `bundletool` 工具和 `adb` 程序包,可以直接简单的选择一个目标安装包,即可自动完成安装流程,主要为了方便非研发人员安装 `aab` 格式的安装包。

大致的安装示意情况如下:

![image](image/aab_install_soft.gif)



项目是使用 [Electron](https://www.electronjs.org/) 进行开发(特点是:使用 js,html 和 css 构建跨平台的桌面应用),目前该工具支持输出 mac 和 window 平台的安装包。

### 构建流程
1. 确认本地有 node 和 npm 环境,如果没有需要先配置:[配置方式](https://nodejs.org/en/download/)

```
~ » node -v
v13.4.0
~ » npm -v
6.14.4
```

2. 如果本地已有 node 和 npm 环境,代码 clone 到本地之后,进入到项目根目录,执行以下命令即可运行

```
// 1、初始化项目
~ » npm install
// 2、mac 平台运行方式
~ » npm run start
// 3、window 平台运行方式
~ » npm run start_win
// 初次构建,两个命令也可以一起运行,比如 mac
~ » npm install && npm run start
```

### 打包方式(会在根目录的 `release` 文件夹下)
1. mac 平台
```
npm run elebuild_mac
```

2. window 平台
```
npm run elebuild_win
```

### 自定义操作说明

由于为了简单方便,直接把签名文件和签名信息内置在了软件中,所以签名文件和信息都是公开的,会出现安装的 应用签名并非你自己公司业务的应用。



所以如果需要符合自身公司的业务,可以直接修改源码,然后再打包符合自己公司业务的工具软件,然后给到相关的测试同事使用,主要的代码逻辑在 `main.js` 这个文件中:

```
// aab 文件信息类
class AabInfo {
constructor(pkg_v, vname_v, vcode_v) {
this.pkg = pkg_v;
this.vname = vname_v;
this.vcode = vcode_v;
}
getAppVersionInfo() {
return `${this.vname}.${this.vcode}`;
}
/**
* 获取签名文件名,放在 assets 目录下
*/
getKeystoreName() {
// 可以针对不同应用使用不同的签名文件
if (this.pkg == 'com.fireantzhang.aabdemo') {
return 'release.jks';
}
return 'release.jks'
}
/**
* 获取签名配置信息
*/
getKeystoreConfig() {
if (this.pkg == 'com.fireantzhang.aabdemo') {
return new KeystoreConfig('fireantzhang', 'fireantzhang', 'fireantzhang');
}
return new KeystoreConfig('fireantzhang', 'fireantzhang', 'fireantzhang');
}
/**
* 获取启动的 activity,TODO:调整成直接从清单文件中读取,不过逻辑有点复杂,暂时未实现
*/
getAutoStartActivity() {
if (this.pkg == 'com.fireantzhang.aabdemo') {
return 'com.fireantzhang.aabdemo/com.fireantzhang.aabdemo.MainActivity';
}
return null;
}
}
// 签名节本信息类
class KeystoreConfig {
constructor(ks_pass_v, alias_v, key_pass_v) {
this.ks_pass = ks_pass_v;
this.alias = alias_v;
this.key_pass = key_pass_v;
}
}
```

Binary file added assets_common/bundletool-all-0.13.4.jar
Binary file not shown.
Binary file added assets_common/release.jks
Binary file not shown.
Binary file added bin_mac/adb
Binary file not shown.
69 changes: 69 additions & 0 deletions bin_mac/java/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Copyright � 1993, 2015, Oracle and/or its affiliates.
All rights reserved.

This software and related documentation are provided under a
license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws.
Except as expressly permitted in your license agreement or
allowed by law, you may not use, copy, reproduce, translate,
broadcast, modify, license, transmit, distribute, exhibit,
perform, publish, or display any part, in any form, or by
any means. Reverse engineering, disassembly, or
decompilation of this software, unless required by law for
interoperability, is prohibited.

The information contained herein is subject to change
without notice and is not warranted to be error-free. If you
find any errors, please report them to us in writing.

If this is software or related documentation that is
delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is
applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any
operating system, integrated software, any programs
installed on the hardware, and/or documentation, delivered
to U.S. Government end users are "commercial computer
software" pursuant to the applicable Federal Acquisition
Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system,
integrated software, any programs installed on the hardware,
and/or documentation, shall be subject to license terms and
license restrictions applicable to the programs. No other
rights are granted to the U.S. Government.

This software or hardware is developed for general use in a
variety of information management applications. It is not
developed or intended for use in any inherently dangerous
applications, including applications that may create a risk
of personal injury. If you use this software or hardware in
dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and
other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous
applications.

Oracle and Java are registered trademarks of Oracle and/or
its affiliates. Other names may be trademarks of their
respective owners.

Intel and Intel Xeon are trademarks or registered trademarks
of Intel Corporation. All SPARC trademarks are used under
license and are trademarks or registered trademarks of SPARC
International, Inc. AMD, Opteron, the AMD logo, and the AMD
Opteron logo are trademarks or registered trademarks of
Advanced Micro Devices. UNIX is a registered trademark of
The Open Group.

This software or hardware and documentation may provide
access to or information on content, products, and services
from third parties. Oracle Corporation and its affiliates
are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content,
products, and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or
damages incurred due to your access to or use of third-party
content, products, or services.
1 change: 1 addition & 0 deletions bin_mac/java/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to http://java.com/license
1 change: 1 addition & 0 deletions bin_mac/java/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to http://java.com/licensereadme
Loading

0 comments on commit ac84272

Please sign in to comment.