diff --git a/.winboll/bashMergeProjects-to-Projects_Keeper.sh b/.winboll/bashMergeProjects-to-Projects_Keeper.sh index 0f1bff7..06d54ee 100644 --- a/.winboll/bashMergeProjects-to-Projects_Keeper.sh +++ b/.winboll/bashMergeProjects-to-Projects_Keeper.sh @@ -1,5 +1,5 @@ #!/system/bin/sh -## 合并其他项目分支的模块源码到projects-keeper分支。 +## 合并其他项目分支的模块源码到projects_keeper分支。 # ====================== 0. 进入目标目录 ====================== TARGET_DIR="/sdcard/AppProjects/Projects_Keeper" @@ -36,7 +36,7 @@ fi # ====================== 3. Git 分支检查 ====================== CUR_BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) -TARGET_BRANCH="projects-keeper" +TARGET_BRANCH="projects_keeper" if [ "$CUR_BRANCH" != "$TARGET_BRANCH" ]; then echo "错误:当前不在 $TARGET_BRANCH 分支!" @@ -72,7 +72,6 @@ libaes libappbase libdebugtemp libgpsrelaysentinel -libwinboll local.properties-demo mymessagemanager positions @@ -82,13 +81,14 @@ winboll winboll.properties-demo ) -# ====================== 5. 获取当前目录真实文件列表 ====================== +# ====================== 5. 获取当前目录真实文件列表(兼容过滤 . ..) ====================== REAL_ITEMS=() +# 使用固定排序ls,自动过滤 . 和 ..,不会进入比对数组 while IFS= read -r line; do if [[ "$line" != "." && "$line" != ".." ]]; then REAL_ITEMS+=("$line") fi -done < <(ls -a) +done < <(LC_COLLATE=C ls -a1 --color=none) # ====================== 6. 差异比对函数 ====================== check_diff() { @@ -158,7 +158,7 @@ echo -e "## 对象列表结束 ## 合并 APP 项目 MERGE_APP_PROJECT_LIST=( -DemoAPP +WinBoLL ) echo -e "#@@@ 开始合并应用型模块源码 @@@# ## 目标合并对象列表:" @@ -166,14 +166,13 @@ echo -e "#@@@ 开始合并应用型模块源码 @@@# for item in "${MERGE_APP_PROJECT_LIST[@]}"; do echo "正在合并 $item 项目 ..." item_lower=$(echo "$item" | tr 'A-Z' 'a-z') -git checkout origin/$item_lower $item_lower + git checkout origin/$item_lower $item_lower git add . git commit -m "合并 $item 项目" done ## 合并 LIB 项目 MERGE_LIB_PROJECT_LIST=( -WinBoLL APPBase AES ) @@ -183,10 +182,10 @@ echo -e "#@@@ 开始合并类库型模块源码 @@@# for item in "${MERGE_LIB_PROJECT_LIST[@]}"; do echo "正在合并 $item 项目 ..." item_lower=$(echo "$item" | tr 'A-Z' 'a-z') -git checkout origin/$item_lower $item_lower lib$item_lower + git checkout origin/$item_lower $item_lower lib$item_lower git add . git commit -m "合并 $item 项目" done echo '正在推送 Projects_Keeper 项目' -git push \ No newline at end of file +git push diff --git a/.winboll/bashMergeProjects-to-Projects_Keeper_Tag.sh b/.winboll/bashMergeProjects-to-Projects_Keeper_Tag.sh index 6d30f3b..9e0e041 100644 --- a/.winboll/bashMergeProjects-to-Projects_Keeper_Tag.sh +++ b/.winboll/bashMergeProjects-to-Projects_Keeper_Tag.sh @@ -38,7 +38,7 @@ if [ "${NOW_BRANCH}" != "${TARGET_BRANCH}" ];then exit 1 fi -# 目录结构校验 +# 目录结构校验白名单(不含 . ..) MERGE_OBJECTS_LIST=( .git .gitignore @@ -65,7 +65,6 @@ libaes libappbase libdebugtemp libgpsrelaysentinel -libwinboll local.properties-demo mymessagemanager positions @@ -76,9 +75,13 @@ winboll.properties-demo ) REAL_ITEMS=() +# 标准排序ls输出,循环强制过滤 . 和 .. while IFS= read -r line; do - [[ $line != "." && $line != ".." ]] && REAL_ITEMS+=("$line") -done < <(ls -a) + # 跳过虚拟目录 . 和 .. + if [[ "$line" != "." && "$line" != ".." ]]; then + REAL_ITEMS+=("$line") + fi +done < <(LC_COLLATE=C ls -a1 --color=none) check_diff(){ local miss=() extra=() @@ -89,7 +92,17 @@ check_diff(){ [[ ! " ${MERGE_OBJECTS_LIST[@]} " =~ " ${i} " ]] && extra+=("$i") done if [[ ${#miss[@]} -gt 0 || ${#extra[@]} -gt 0 ]];then + echo "========================================" echo "本地目录结构不一致,终止运行" + if [[ ${#miss[@]} -gt 0 ]]; then + echo -e "\n缺失条目:" + for m in "${miss[@]}"; do echo " $m"; done + fi + if [[ ${#extra[@]} -gt 0 ]]; then + echo -e "\n多余条目:" + for e in "${extra[@]}"; do echo " $e"; done + fi + echo "========================================" exit 1 fi } @@ -98,7 +111,7 @@ check_diff echo -e "#@@@ 按时间获取最新标签合并模块源码 @@@#" # 应用型模块 -MERGE_APP_PROJECT_LIST=(DemoAPP) +MERGE_APP_PROJECT_LIST=(WinBoLL) echo -e "---------- 应用型模块 ----------" for name in "${MERGE_APP_PROJECT_LIST[@]}";do low_name=$(echo "$name" | tr 'A-Z' 'a-z') @@ -120,7 +133,7 @@ for name in "${MERGE_APP_PROJECT_LIST[@]}";do done # 类库模块 -MERGE_LIB_PROJECT_LIST=(WinBoLL APPBase AES) +MERGE_LIB_PROJECT_LIST=(APPBase AES) echo -e "---------- 类库模块 ----------" for name in "${MERGE_LIB_PROJECT_LIST[@]}";do low_name=$(echo "$name" | tr 'A-Z' 'a-z') diff --git a/winboll/README.md b/winboll/README.md new file mode 100644 index 0000000..afbaba5 --- /dev/null +++ b/winboll/README.md @@ -0,0 +1,37 @@ +# WinBoLL + +#### 介绍 +WinBoLL 网站浏览器。 + +#### 软件架构 +适配安卓应用 [AIDE Pro] 的 Gradle 编译结构。 +也适配安卓应用 [AndroidIDE] 的 Gradle 编译结构。 + + +#### Gradle 编译说明 +调试版编译命令 :gradle assembleBetaDebug +阶段版编译命令 :bash .winboll/bashPublishAPKAddTag.sh winboll + +#### 使用说明 +3. Termux应用配置: +- 已安装Termux(包名 com.termux ); +- 执行  echo "allow-external-apps = true" > ~/.termux/termux.properties + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 : ZhanGSKen(ZhanGSKen) +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) + +#### 参考文档 diff --git a/winboll/app_update_description.txt b/winboll/app_update_description.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/winboll/app_update_description.txt @@ -0,0 +1 @@ + diff --git a/winboll/build.gradle b/winboll/build.gradle new file mode 100644 index 0000000..1ab50c8 --- /dev/null +++ b/winboll/build.gradle @@ -0,0 +1,111 @@ +apply plugin: 'com.android.application' +apply from: '../.winboll/winboll_app_build.gradle' +apply from: '../.winboll/winboll_lint_build.gradle' + +def genVersionName(def versionName){ + // 检查编译标志位配置 + assert (winbollBuildProps['stageCount'] != null) + assert (winbollBuildProps['baseVersion'] != null) + // 保存基础版本号 + winbollBuildProps.setProperty("baseVersion", "${versionName}"); + //保存编译标志配置 + FileOutputStream fos = new FileOutputStream(winbollBuildPropsFile) + winbollBuildProps.store(fos, "${winbollBuildPropsDesc}"); + fos.close(); + + // 返回编译版本号 + return "${versionName}." + winbollBuildProps['stageCount'] +} + +android { + // 适配MIUI12 + compileSdkVersion 30 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + defaultConfig { + applicationId "cc.winboll.studio.winboll" + minSdkVersion 26 + // 适配MIUI12 + targetSdkVersion 30 + versionCode 1 + // versionName 更新后需要手动设置 + // .winboll/winbollBuildProps.properties 文件的 stageCount=0 + // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0" + versionName "15.21" + if(true) { + versionName = genVersionName("${versionName}") + } + } +} + +dependencies { + api 'com.google.code.gson:gson:2.10.1' + + // 下拉控件 + api 'com.baoyz.pullrefreshlayout:library:1.2.0' + + // SSH + api 'com.jcraft:jsch:0.1.55' + // Html 解析 + api 'org.jsoup:jsoup:1.13.1' + // 二维码类库 + api 'com.google.zxing:core:3.4.1' + api 'com.journeyapps:zxing-android-embedded:3.6.0' + // 应用介绍页类库 + api 'io.github.medyo:android-about-page:2.0.0' + // 网络连接类库 + api 'com.squareup.okhttp3:okhttp:4.4.1' + // FastJSON解析 + implementation 'com.alibaba:fastjson:1.2.76' + + // AndroidX 类库 + /*api 'androidx.appcompat:appcompat:1.1.0' + //api 'com.google.android.material:material:1.4.0' + //api 'androidx.viewpager:viewpager:1.0.0' + //api 'androidx.vectordrawable:vectordrawable:1.1.0' + //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' + //api 'androidx.fragment:fragment:1.1.0'*/ + + + // 米盟 + //api 'com.miui.zeus:mimo-ad-sdk:5.3.+'//请使用最新版sdk + //注意:以下5个库必须要引入 + //implementation 'androidx.appcompat:appcompat:1.4.1' + api 'androidx.recyclerview:recyclerview:1.0.0' + api 'com.github.bumptech.glide:glide:4.9.0' + //annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + + implementation "androidx.annotation:annotation:1.3.0" + implementation "androidx.core:core:1.6.0" + implementation "androidx.drawerlayout:drawerlayout:1.1.1" + implementation "androidx.preference:preference:1.1.1" + implementation "androidx.viewpager:viewpager:1.0.0" + implementation "com.google.android.material:material:1.4.0" + implementation "com.google.guava:guava:24.1-jre" + /* + implementation "io.noties.markwon:core:$markwonVersion" + implementation "io.noties.markwon:ext-strikethrough:$markwonVersion" + implementation "io.noties.markwon:linkify:$markwonVersion" + implementation "io.noties.markwon:recycler:$markwonVersion" + */ + implementation 'com.termux:terminal-emulator:0.118.0' + implementation 'com.termux:terminal-view:0.118.0' + implementation 'com.termux:termux-shared:0.118.0' + + // Biometric (指纹识别) + implementation 'androidx.biometric:biometric:1.1.0' + + // WinBoLL库 nexus.winboll.cc 地址 + api 'cc.winboll.studio:libappbase:15.21.+' + api 'cc.winboll.studio:libaes:15.21.+' + + // 备用库 jitpack.io 地址 + //api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.33' + //api 'com.github.ZhanGSKen:libaes:aes-v15.20.16' + + api fileTree(dir: 'libs', include: ['*.jar']) +} diff --git a/winboll/build.properties b/winboll/build.properties new file mode 100644 index 0000000..58fd00b --- /dev/null +++ b/winboll/build.properties @@ -0,0 +1,8 @@ +#Created by .winboll/winboll_app_build.gradle +#Tue Jul 21 09:55:56 HKT 2026 +stageCount=1 +libraryProject= +baseVersion=15.21 +publishVersion=15.21.0 +buildCount=0 +baseBetaVersion=15.21.1 diff --git a/winboll/libs/libWeWorkSpecSDK.so b/winboll/libs/libWeWorkSpecSDK.so new file mode 100644 index 0000000..d9f592b Binary files /dev/null and b/winboll/libs/libWeWorkSpecSDK.so differ diff --git a/winboll/proguard-rules.pro b/winboll/proguard-rules.pro new file mode 100644 index 0000000..a18de74 --- /dev/null +++ b/winboll/proguard-rules.pro @@ -0,0 +1,137 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\tools\adt-bundle-windows-x86_64-20131030\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# ============================== 基础通用规则 ============================== +# 保留系统组件 +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference + +# 保留 WinBoLL 核心包及子类(合并简化规则) +-keep class cc.winboll.studio.** { *; } +-keepclassmembers class cc.winboll.studio.** { *; } + +# 保留所有类中的 public static final String TAG 字段(便于日志定位) +-keepclassmembers class * { + public static final java.lang.String TAG; +} + +# 保留序列化类(避免Parcelable/Gson解析异常) +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +# 保留 R 文件(避免资源ID混淆) +-keepclassmembers class **.R$* { + public static ; +} + +# 保留 native 方法(避免JNI调用失败) +-keepclasseswithmembernames class * { + native ; +} + +# 保留注解和泛型(避免反射/序列化异常) +-keepattributes *Annotation* +-keepattributes Signature + +# 屏蔽 Java 8+ 警告(适配 Java 7 语法) +-dontwarn java.lang.invoke.* +-dontwarn android.support.v8.renderscript.* +-dontwarn java.util.function.** + +# ============================== 第三方框架专项规则 ============================== +# OkHttp 4.4.1(米盟广告请求依赖,完善Lambda兼容) +-keep class okhttp3.** { *; } +-keep interface okhttp3.** { *; } +-keep class okhttp3.internal.** { *; } +-keep class okio.** { *; } +-dontwarn okhttp3.internal.platform.** +-dontwarn okio.** + +# Glide 4.9.0(米盟广告图片加载依赖) +-keep public class * implements com.bumptech.glide.module.GlideModule +-keep public class * extends com.bumptech.glide.module.AppGlideModule +-keep public enum com.bumptech.glide.load.ImageHeaderParser$ImageType { + **[] $VALUES; + public *; +} +-keepclassmembers class * implements com.bumptech.glide.module.AppGlideModule { + (); +} +-dontwarn com.bumptech.glide.** + +# Gson 2.8.5(米盟广告数据序列化依赖) +-keep class com.google.gson.** { *; } +-keep interface com.google.gson.** { *; } +-keepclassmembers class * { + @com.google.gson.annotations.SerializedName ; +} + +# 米盟 SDK(核心广告组件,完整保留避免加载失败) +-keep class com.miui.zeus.** { *; } +-keep interface com.miui.zeus.** { *; } +# 保留米盟日志字段(便于广告加载失败排查) +-keepclassmembers class com.miui.zeus.mimo.sdk.** { + public static final java.lang.String TAG; +} + +# RecyclerView 1.0.0(米盟广告布局渲染依赖) +-keep class androidx.recyclerview.** { *; } +-keep interface androidx.recyclerview.** { *; } +-keepclassmembers class androidx.recyclerview.widget.RecyclerView$Adapter { + public *; +} + +# 其他第三方框架(按引入依赖保留,无则可删除) +# XXPermissions 18.63 +-keep class com.hjq.permissions.** { *; } +-keep interface com.hjq.permissions.** { *; } + +# ZXing 二维码(核心解析组件) +-keep class com.google.zxing.** { *; } +-keep class com.journeyapps.zxing.** { *; } + +# Jsoup HTML解析 +-keep class org.jsoup.** { *; } + +# Pinyin4j 拼音搜索 +-keep class net.sourceforge.pinyin4j.** { *; } + +# JSch SSH组件 +-keep class com.jcraft.jsch.** { *; } + +# AndroidX 基础组件 +-keep class androidx.appcompat.** { *; } +-keep interface androidx.appcompat.** { *; } + +# ============================== 优化与调试配置 ============================== +# 优化级别(平衡混淆效果与性能) +-optimizationpasses 5 +-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* + +# 调试辅助(保留行号便于崩溃定位) +-verbose +-dontpreverify +-dontusemixedcaseclassnames +-keepattributes SourceFile,LineNumberTable + diff --git a/winboll/src/beta/AndroidManifest.xml b/winboll/src/beta/AndroidManifest.xml new file mode 100644 index 0000000..be35225 --- /dev/null +++ b/winboll/src/beta/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/winboll/src/beta/java/cc/winboll/studio/winboll/activities/OllamaWindowActivity.java b/winboll/src/beta/java/cc/winboll/studio/winboll/activities/OllamaWindowActivity.java new file mode 100644 index 0000000..07b804d --- /dev/null +++ b/winboll/src/beta/java/cc/winboll/studio/winboll/activities/OllamaWindowActivity.java @@ -0,0 +1,32 @@ +package cc.winboll.studio.winboll.activities; + +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import cc.winboll.studio.winboll.R; + +/** + * Ollama 模型对话窗口 + */ +public class OllamaWindowActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_ollama_window); + + Toolbar toolbar = findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setTitle("Ollama 窗口"); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + getMenuInflater().inflate(R.menu.menu_ollama_window, menu); + return true; + } +} diff --git a/winboll/src/beta/res/layout/activity_ollama_window.xml b/winboll/src/beta/res/layout/activity_ollama_window.xml new file mode 100644 index 0000000..86f97cd --- /dev/null +++ b/winboll/src/beta/res/layout/activity_ollama_window.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +