oneplus3t-lineage-14编译-android7

lineageOS-14.1-oneplus3t-build.md

lineageOS-14(android7)的开发者模式/usb调试(adb)有root功能, 而lineageOS-16(android9)无

oneplus3t-lineage-14编译-android7

1

清华linageos镜像

x

lineage-14.1-20180223-nightly-oneplus3-signed.zip

ntfs分区挂载为普通用户目录 , ext4分区挂载为普通用户目录

bfsu/lineageOS镜像

ts/lingeageOS镜像

oneplus3/lineage-build-simple-manual.md, manifest-parser/git-repo#6_build, LineageOS16_oneplus3t_gitRepoLs_clone_desc.pdf

LineageOS/android.git/cm-14.1 : 改为bfsu镜像

高通私有驱动 TheMuppets/proprietary_vendor_oneplus.git/cm-14.1/oneplus3 == TheMuppets/proprietary_vendor_oneplus/.git/8b8001

1. 仓库群下载工具准备


D=/OP3TLos14Build
cd $Dgit clone -b v2.50.1 https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
#file /OP3TLos14Build/git-repo/.git/config
#file  /OP3TLos14Build/git-repo/repoexport GitRepoD=/OP3TLos14Build/git-repo
export PATH_BASE=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH=$PATH_BASE:$GitRepoDwhich repo  # == /OP3TLos14Build/git-repo/repo

2. 仓库群下载

LosVer=cm-14.1#repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b cm-14.1 --git-lfsexport REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
#manifest_repo=https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git
#manifest_repo=https://mirrors.bfsu.edu.cn/git/lineageOS/LineageOS/android.git
manifest_repo=https://gitlab.com/cm-14/android.git #已修改AOSP为国内镜像
repo init --manifest-url $manifest_repo --manifest-branch $LosVer --git-lfsrepo sync

循环显示所有仓库 : repo forall -c 'echo $PWD; echo $(git remote get-url $(git remote)) ; git reset --hard'

2b 我修改的代码

修改/OP3Los14Build/frameworks/base/.git/config origin url为: https://gitlab.com/lineage14_1_oneplus3t/android_frameworks_base.git

3. 下载oneplus3相关仓库

packages/resources/devicesettings

git clone -b $LosVer  https://github.com/LineageOS/android_packages_resources_devicesettings.git  $D/packages/resources/devicesettings#若路径写错为 $D/packages/resources , mak bacon收到如下报错(在日志中距离很远):
# ERROR: resource directory 'device/oppo/common/configpanel/../../../../packages/resources/devicesettings/res' does not exist
#  其中 device/oppo/common/configpanel/../../../../packages/resources/devicesettings/res  ==  packages/resources/devicesettings/res
#   提示 了 android_packages_resources_devicesettings.git 的正确路径是  packages/resources/devicesettings

oneplus3高通私有驱动(vendor)下载 方法1: 不用此法

下载 git仓库,但仓库有将近10个GB,因此不用此方法

注意: 目录TheMuppets-proprietary_vendor_oneplus 不要放在 /OP3TLos14Build 下, 否则 会被 mka showcommands bacon认为和 软链接/OP3TLos14Build/vendor/oneplus/oneplus3 重复了。 这可能是cm-14.1的问题, 貌似 LinageOS-16无此问题.

#命令目标: 构造软链接:  $D/vendor/oneplus/oneplus3 --> /app/TheMuppets-proprietary_vendor_oneplus/oneplus3#D=/OP3TLos14Build
#LosVer=cm-14.1
proprD=/app
proprietary_vendor_oneplus=$proprD/TheMuppets-proprietary_vendor_oneplus
git clone https://githubfast.com/TheMuppets/proprietary_vendor_oneplus.git -b  $LosVer $proprietary_vendor_oneplus
#命令展开: git clone https://githubfast.com/TheMuppets/proprietary_vendor_oneplus.git -b  cm-14.1  /app/TheMuppets-proprietary_vendor_oneplus
ln -s $proprietary_vendor_oneplus/oneplus3  $D/vendor/oneplus/oneplus3
#命令展开:ln -s /app/TheMuppets-proprietary_vendor_oneplus/oneplus3  /OP3TLos14Build/vendor/oneplus/oneplus3

oneplus3高通私有驱动(vendor)下载: 方法2: git仓库给定版本包

注意: 目录proprietary_vendor_oneplus-cm-14.1 不要放在 /OP3TLos14Build 下, 否则 会被 mka showcommands bacon认为和 软链接/OP3TLos14Build/vendor/oneplus/oneplus3 重复了。 这可能是cm-14.1的问题, 貌似 LinageOS-16无此问题.

#命令目标: 构造软链接:  $D/vendor/oneplus/oneplus3 --> /app/proprietary_vendor_oneplus-cm-14.1/oneplus3#D=/OP3TLos14Build
#LosVer=cm-14.1
proprD=/app
wget --output-document=$D/cm-14.1.zip    https://github.com/TheMuppets/proprietary_vendor_oneplus/archive/refs/heads/$LosVer.zip
#命令展开: wget https://github.com/TheMuppets/proprietary_vendor_oneplus/archive/refs/heads/cm-14.1.zip
sha256sum  $D/cm-14.1.zip   #==f008b553dceac26b0feb26fdbda15c7c620ec4e3103c67b749a32900c83a55ec  
unzip $D/$LosVer.zip -d $proprD
#命令展开: unzip /OP3TLos14Build/cm-14.1.zip -d /app/
#解压产物目录为 /app/proprietary_vendor_oneplus-cm-14.1
file /app/proprietary_vendor_oneplus-cm-14.1/oneplus3/Android.mk  #解压产物列举
mkdir -p $D/vendor/oneplus
ln -s $proprD/proprietary_vendor_oneplus-cm-14.1/oneplus3 $D/vendor/oneplus/oneplus3
#命令展开: ln -s /app/proprietary_vendor_oneplus-cm-14.1/oneplus3 /OP3TLos14Build/vendor/oneplus/oneplus3

device/oneplus/oneplus3, device/oppo/common, kernel/oneplus/msm8996, packages/resources


#D=/OP3TLos14Build
#LosVer=cm-14.1git clone -b $LosVer  https://github.com/LineageOS/android_device_oneplus_oneplus3.git  $D/device/oneplus/oneplus3
git clone -b $LosVer  https://github.com/LineageOS/android_device_oppo_common.git       $D/device/oppo/common
git clone -b $LosVer  https://github.com/LineageOS/android_kernel_oneplus_msm8996.git   $D/kernel/oneplus/msm8996

4. 编译错误解决

0. 为方便排查错误 , 将编译进程数改为1 : 失败

sudo pstree -caplT 查看进程树

find /OP3TLos14Build/build/ -type f | xargs -I@ grep -Hn -i "\-j " @

/OP3TLos14Build/build/kati/flags.cc:104:        ERROR("Invalid -j flag: %s", num_jobs_str);
/OP3TLos14Build/build/kati/flags.cc:110:        ERROR("Invalid -j flag: %s", num_jobs_str);
/OP3TLos14Build/build/core/ninja.mk:128:# limited by the -j flag passed to GNU make.
/OP3TLos14Build/build/tools/makeparallel/Makefile:76:	@EXPECTED=""       $(MAKEPARALLEL_NINJA_TEST) -j -l

find /OP3TLos14Build/build/ -type f -name "*.mk" | xargs -I@ grep -Hn -i "job" @

/OP3TLos14Build/build/core/ninja.mk:129:NINJA_REMOTE_NUM_JOBS ?= 500
/OP3TLos14Build/build/core/ninja.mk:130:NINJA_ARGS += -j$(NINJA_REMOTE_NUM_JOBS)

/OP3TLos14Build/build/core/ninja.mk中的NINJA_REMOTE_NUM_JOBS ?= 500改为NINJA_REMOTE_NUM_JOBS = 1

编译命令中的mka改为mk, -j8 改为 -j1

source build/envsetup.sh && export LC_ALL=C && export ALLOW_MISSING_DEPENDENCIES=true && lunch lineage_oneplus3-userdebug && export MAKE_OPTS="-j1" && export TARGET_ARCH=arm && mk bacon

则 确为单进程编译? 不确定,未验证

1.multiple definition of ‘yylloc’

解决编译错误, /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of 'yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here

#D=/OP3TLos14Build
grep url  $D/kernel/oneplus/msm8996/.git/config 
#	url = https://github.com/LineageOS/android_kernel_oneplus_msm8996.git
echo 'HOSTCFLAGS += -fcommon' >> $D/kernel/oneplus/msm8996/Makefile

2. Jack server

解决报错 Communication error with Jack server (56). Try 'jack-diagnose'


export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6G"

5A. 编译依赖工具安装

#所用linux发行版
cat /etc/issue #Ubuntu 22.04.4 LTS \n \l#查找deb包
sudo apt install -y apt-file
sudo apt-file update

lunch lineage_oneplus3-userdebug需要的

sudo apt install -y build-essential 
sudo apt install -y python2.7
sudo ln -s /usr/bin/python2.7 /usr/bin/python

mka bacon 需要的

1
apt-file search "/schedtool" 
#schedtool: /usr/bin/schedtool             
sudo apt install -y schedtool
2
apt-file search "/libncurses.so.5"
#libncurses5: /lib/x86_64-linux-gnu/libncurses.so.5
sudo apt install -y libncurses5
3

下载 https://static.azul.com/zulu/bin?C=S/zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz

#查找jdk8的最新版本为  zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz
pageUrl_azul_jdkLs="https://static.azul.com/zulu/bin?C=S"
alias alias_grep_jdk8_linux_x64_tar_gz_sort_head_n='grep jdk8 | grep linux_x64.tar.gz | sort  --reverse  | head -n'
w3m -T text/html $pageUrl_azul_jdkLs   -dump | alias_grep_jdk8_linux_x64_tar_gz_sort_head_n 2
#[ ]         zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz               2024-10-10 102M
#[ ]         zulu8.82.0.21-ca-fx-jdk8.0.432-linux_x64.tar.gz            2024-10-23 173M#下载zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz 
( cd /app/pack/ &&  wget https://static.azul.com/zulu/bin/zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz  )#解压
tar -xf zulu8.82.0.21-ca-jdk8.0.432-linux_x64.tar.gz  -C /app/#测试
/app/zulu8.82.0.21-ca-jdk8.0.432-linux_x64/bin/javac -version
#javac 1.8.0_432
4
apt-file  search "/ImageMagick"
sudo apt install -y imagemagick 
#不是  libmagickcore-dev libmagick++-dev
5

prebuilts/misc/linux-x86/bison/bison 是32位ELF,

而ubuntu22 默认只支持64位ELF, 因此 要安装32位兼容库

prebuilts/misc/linux-x86/bison/bison --help #报错 说`No such file or directory` , 实际是因为没有32位ELF加载器ldsudo dpkg --add-architecture i386
sudo apt updatesudo apt install -y libc6:i386  libstdc++6:i386 
prebuilts/misc/linux-x86/bison/bison --help #正常运行
6.

报错命令:

prebuilts/misc/linux-x86/bison/bison -d  --defines=/OP3TLos14Build/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h -o /OP3TLos14Build/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy
#prebuilts/misc/linux-x86/bison/bison: m4 subprocess failed: No such file or directory

解决

sudo apt install -y m4
7. javadoc报错不影响编译 : error: package android.support.v14.preference does not exist

source build/envsetup.sh && export LC_ALL=C && export ALLOW_MISSING_DEPENDENCIES=true && lunch lineage_oneplus3-userdebug && export MAKE_OPTS="-j8" && export TARGET_ARCH=arm && mka showcommands bacon 报错:

cat -n OP3-cm14_1-screen-2025-01-18-17-58-22.log | grep -i "error:"

注意 此报错是javadoc命令报错, 不影响继续编译, 因此可以忽略此错误

  8868	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingSwitchPreference.java:19: error: package android.support.v14.preference does not exist8871	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingSwitchPreference.java:20: error: package android.support.v7.preference does not exist8874	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingSwitchPreference.java:27: error: cannot find symbol8878	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:27: error: package android.support.v7.preference does not exist8881	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:28: error: package android.support.v7.preference does not exist8884	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:29: error: package android.support.v7.preference does not exist8887	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:30: error: package android.support.v7.preference does not exist8890	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingSwitchPreference.java:47: error: cannot find symbol8895	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:61: error: cannot find symbol8900	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:71: error: cannot find symbol8905	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:100: error: cannot find symbol8910	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:100: error: cannot find symbol8915	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:104: error: cannot find symbol8920	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:104: error: cannot find symbol8925	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:104: error: cannot find symbol8930	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:299: error: cannot find symbol8935	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingListPreference.java:19: error: package android.support.v7.preference does not exist8938	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingListPreference.java:20: error: package android.support.v7.preference does not exist8941	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingListPreference.java:27: error: cannot find symbol8945	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingListPreference.java:47: error: cannot find symbol8950	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingDropDownPreference.java:19: error: package android.support.v7.preference does not exist8953	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingDropDownPreference.java:20: error: package android.support.v7.preference does not exist8956	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingDropDownPreference.java:27: error: cannot find symbol8960	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingDropDownPreference.java:47: error: cannot find symbol8965	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:351: error: cannot find symbol8970	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:351: error: cannot find symbol8975	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:351: error: cannot find symbol8980	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:355: error: cannot find symbol8985	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:355: error: cannot find symbol8990	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:355: error: cannot find symbol8995	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:369: error: cannot find symbol9000	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:369: error: cannot find symbol9005	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/ConstraintsHelper.java:377: error: cannot find symbol9010	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/RemotePreference.java:26: error: package android.support.v7.preference does not exist9013	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingPreference.java:19: error: package android.support.v7.preference does not exist9016	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingPreference.java:20: error: package android.support.v7.preference does not exist9019	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingPreference.java:21: error: package android.support.v7.preference does not exist9022	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingPreference.java:28: error: cannot find symbol9026	vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingPreference.java:52: error: cannot find symbol

简要确认此报错是javadoc命令产生的
cat -n OP3-cm14_1-screen-2025-01-18-17-58-22.log | grep -B 1 -i "vendor/cmsdk/sdk/src/java/cyanogenmod/preference/SelfRemovingSwitchPreference.java:19: error: package android.support.v14.preference does not exist" | grep javadoc 匹配到javadoc命令

8. ninja: build stopped: subcommand failed.需要具体排查

wc -l OP3-cm14_1-screen-2025-01-18-17-58-22.log == 85313

cat -n OP3-cm14_1-screen-2025-01-18-17-58-22.log | tail -n 8 有报错

 85306	ninja: build stopped: subcommand failed.85307	make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 185308	make: Leaving directory '/OP3TLos14Build'85309	85310	#### make failed to build some targets (02:06:05 (hh:mm:ss)) ####

如果能将ninja的并发数改为1, 报错行将会大大靠近结果, 排查难道会降低

8.1 查找 error: (排除)

grep -Hn -i "error:" OP3-cm14_1-screen-2025-01-18-17-58-22.log : 获得的是 7 中的javadoc报错(不影响继续编译)

8.2 查找command not found(疑似)

grep -Hn "command not found" OP3-cm14_1-screen-2025-01-18-17-58-22.log

85296: /bin/bash: line 1: xmllint: command not found 距离 85306 ninja: build stopped: subcommand failed. 只有10行, 因此 可能是此报错

解决

apt-file search --regexp "/xmllint$"
#libxml2-utils: /usr/bin/xmllint
sudo apt install -y libxml2-utils

5B. github加速

加速githubusercontent(可选)

githubusercontent 后加s

#D=/OP3TLos14Build
sed -i 's/raw.githubusercontent.com/raw.githubusercontents.com/g' $D/vendor/cm/vendorsetup.sh

提高 source build/envsetup.sh速度

已修改在: lineage14_1_oneplus3t/android_vendor_cm.git/3a218

5. 编译


screen -L  -Logfile ~/OP3-cm14_1-screen-$(date +%Y-%m-%d-%H-%M-%S).log -S OP3#编译步骤正文 开始
D=/OP3TLos14Build
cd $Djdk8_d=/app/zulu8.82.0.21-ca-jdk8.0.432-linux_x64
export PATH_BASE=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH=$PATH_BASE:$jdk8_d/binexport ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6G"#单行编译命令 开始
source build/envsetup.sh#export V=1
export LC_ALL=C
export ALLOW_MISSING_DEPENDENCIES=true
#export DEBUG_MODULE_android_runtime=true
#export TARGET_CUSTOM_DEBUG_CFLAGS="-O0 -g" 
#export MAKE_OPTS="-j8" 
#export TARGET_ARCH=arm  
lunch lineage_oneplus3-userdebug && mka showcommands bacon  # lineage_oneplus3-eng
#单行编译命令 结束#编译步骤正文 结束#离开screen但不退出快捷键: ctrl+ad#进入screen :  screen -r OP3#编译完成后 关闭 jack服务
$D/prebuilts/sdk/tools/jack-admin  stop-server

编译步骤 中 不同用途 的 单行编译命令

完整编译

source build/envsetup.sh && export LC_ALL=C &&   export ALLOW_MISSING_DEPENDENCIES=true && lunch lineage_oneplus3-userdebug   && export MAKE_OPTS="-j8" && export TARGET_ARCH=arm  && mka showcommands bacon

6 编译产物(ota rom卡刷包)

ls -lh /OP3TLos14Build/out/target/product/oneplus3/lineage-14.1-20250117-UNOFFICIAL-oneplus3.zip
# -rw-rw-r--   506M    source /app/bash-simplify/android_aid/env/android9.0-platform-tools-env.sh  && android9_0_platformTools_envfastboot boot /oneplus3t/twrp-3.2.1-0-oneplus3.img
#twrp界面:  Wipe所有, Advance --> adb sideload (勾选清理所有)adb sideload /OP3TLos14Build/out/target/product/oneplus3/lineage-14.1-20250117-UNOFFICIAL-oneplus3.zipadb reboot
#重启手机, linageOS图标 大约转了30圈 才进入 android首次安装界面

7. lineageOS-14/ adb root

lineageOS-14(android7)的开发者模式/usb调试(adb)启用root功能

adb root shell
adb shell

进入root shell, 比如可以挂载system分区为可读可写

lineageOS-17的adb 进不到root shell, 只能重启到twrp 才能进到root shell

mount -o remount,rw /system
echo zzz >  /system/test_file_1
rm -v /system/test_file_1mount -o remount,ro /system

备注

一般备注

grep url  $D/.repo/manifests/.git/config 
#	url = https://gitlab.com/cm-14/android.git#查看screen日志
tail -f ~/OP3-screen-*.log#关机命令
sleep 60 ;  cd /tmp; echo z |sudo -S umount /OP3TLos14Build ; echo z |sudo -S umount /mnt/OP3TLos14Build ;  echo z |sudo -S  poweroff

确认版本号 为 cm-14.1

cd /tmp/
git clone https://mirrors.bfsu.edu.cn/git/lineageOS/LineageOS/android.git
cd /tmp/android/git --no-pager branch  --all  | grep cm-14.1  # == remotes/origin/cm-14.1
git --no-pager tag --list  | grep cm-14.1 #无

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/67928.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

PyTorch使用教程(9)-使用profiler进行模型性能分析

1、简介 PyTorch Profiler是一个内置的性能分析工具,可以帮助开发者定位计算资源(如CPU、GPU)的瓶颈,从而更好地优化PyTorch程序。通过捕获和分析GPU的计算、内存和带宽利用情况,能够有效识别并解决性能瓶颈。 2、原…

2025-01-22 Unity Editor 1 —— MenuItem 入门

文章目录 1 Editor 文件夹2 MenuItem3 使用示例3.1 打开网址3.2 打开文件夹3.3 Menu Toggle3.4 Menu 代码复用3.5 MenuItem 激活与失活4 代码示例 1 Editor 文件夹 ​ Editor 文件夹是 Unity 中的特殊文件夹,Unity 中所有编辑器相关的脚本都需要放置在其中&#xf…

docker 安装 mysql 详解

在平常的开发工作中,我们经常需要用到 mysql 数据库。那么在docker容器中,应该怎么安装mysql数据库呢。简单来说,第一步:拉取镜像;第二步:创建挂载目录并设置 my.conf;第三步:启动容…

linux-samba服务配置与应用

1.了解samba的配置文件 2.熟悉samba服务的实例 以前我们在windows上共享文件的话,只需右击要共享的文件夹,然后选择共享相关的选项设置即可,然后如何实现windows和linux的文件共享呢,这就涉及到了samba服务,这个软件…

Spring Boot 整合 Redis 步骤详解

文章目录 1. 引言2. 添加依赖3. 配置 Redis 连接信息4. 创建 Redis 操作服务类5. 使用 RedisTemplate 或 ReactiveRedisTemplate6. 测试 Redis 功能7. 注意事项8. 总结 Redis 是一个高性能的键值存储系统,常用于缓存、消息队列等多种场景。将 Redis 与 Spring Boot …

缓存商品、购物车(day07)

缓存菜品 问题说明 问题说明:用户端小程序展示的菜品数据都是通过查询数据库获得,如果用户端访问量比较大,数据库访问压力随之增大。 结果: 系统响应慢、用户体验差 实现思路 通过Redis来缓存菜品数据,减少数据库查询…

K8S中Service详解(三)

HeadLiness类型的Service 在某些场景中,开发人员可能不想使用Service提供的负载均衡功能,而希望自己来控制负载均衡策略,针对这种情况,kubernetes提供了HeadLiness Service,这类Service不会分配Cluster IP,…

npm install 报错:Command failed: git checkout 2.2.0-c

[TOC](npm install 报错:Command failed: git checkout 2.2.0-c) npm install 报错:Command failed: git checkout 2.2.0-c export NODE_HOME/usr/local/node-v14.14.0-linux-x64 npm config set registry https://registry.npmmirror.com 使用如上环…

DDD - 微服务落地的技术实践

文章目录 Pre概述如何发挥微服务的优势怎样提供微服务接口原则微服务的拆分与防腐层的设计 去中心化的数据管理数据关联查询的难题Case 1Case 2Case 3 总结 Pre DDD - 软件退化原因及案例分析 DDD - 如何运用 DDD 进行软件设计 DDD - 如何运用 DDD 进行数据库设计 DDD - 服…

通过视觉语言模型蒸馏进行 3D 形状零件分割

大家读完觉得有帮助记得关注和点赞!!!对应英文要求比较高,特此说明! Abstract This paper proposes a cross-modal distillation framework, PartDistill, which transfers 2D knowledge from vision-language models …

【大模型】ChatGPT 高效处理图片技巧使用详解

目录 一、前言 二、ChatGPT 4 图片处理介绍 2.1 ChatGPT 4 图片处理概述 2.1.1 图像识别与分类 2.1.2 图像搜索 2.1.3 图像生成 2.1.4 多模态理解 2.1.5 细粒度图像识别 2.1.6 生成式图像任务处理 2.1.7 图像与文本互动 2.2 ChatGPT 4 图片处理应用场景 三、文生图操…

从零到一:Spring Boot 与 RocketMQ 的完美集成指南

1.Rocket的概念与原理 RocketMQ 是一款由阿里巴巴开源的分布式消息中间件,最初用于支持阿里巴巴的海量业务。它基于发布-订阅模型,具备高吞吐、低延迟、高可用和强一致性的特点,适用于消息队列、大规模数据流处理等场景。以下是对 RocketMQ …

(1)STM32 USB设备开发-基础知识

开篇感谢: 【经验分享】STM32 USB相关知识扫盲 - STM32团队 ST意法半导体中文论坛 单片机学习记录_桃成蹊2.0的博客-CSDN博客 USB_不吃鱼的猫丿的博客-CSDN博客 1、USB鼠标_哔哩哔哩_bilibili usb_冰糖葫的博客-CSDN博客 USB_lqonlylove的博客-CSDN博客 USB …

没有公网IP实现seafile本地IP访问和虚拟局域网IP同时访问和上传文件

前言 Ubuntu 24.04 LTSDocker 安装 seafileOpenWrtTailscale Ubuntu 24.04 LTS 通过 docker desktop 安装 seafile 搭建个人网盘中,已经实现了本地局域网放问Ubuntu IP来访问Seafile,以及通过 Ubuntu 的 Tailscale IP 访问Seafile。但是,文…

【Uniapp-Vue3】setTabBar设置TabBar和下拉刷新API

一、setTabBar设置 uni.setTabBarItem({ index:"需要修改第几个", text:"修改后的文字内容" }) 二、tabBar的隐藏和显式 // 隐藏tabBar uni.hideTabBar(); // 显示tabBar uni.showTabBar(); 三、为tabBar右上角添加文本 uni.setTabBarBadge({ index:"…

TCP全连接队列

1. 理解 int listen(int sockfd, int backlog) 第二个参数的作用 backlog:表示tcp全连接队列的连接个数1。 如果连接个数等于backlog1,后续连接就会失败,假设tcp连接个数为0,最大连接个数就为1,并且不accept获取连接…

windows下使用docker执行器并配置 hosts 解析

本篇目录 1. 问题背景2. 环境准备2.1 云上开通windows 2022 英文版机器2.1.1 安装 git2.1.2 安装 runner2.1.3 装docker2.1.4 注册runner并使用docker执行器 3. 项目信息3.1 编写window bat脚本3.2 项目.gitlab-ci.yml文件 4. 测试结论4.1 运行流水线 5. troubleshooting问题1&…

计算机毕业设计hadoop+spark视频推荐系统 短视频推荐系统 视频流量预测系统 短视频爬虫 视频数据分析 视频可视化 视频大数据 大数据

温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 作者简介:Java领…

mysql的主从配置

#mysql数据库 #主从 MySQL数据库主从配置 1.MySQL主从介绍 MySQL 主从又叫做 Replication、AB 复制。简单讲就是 A 和 B 两台机器做主 从后,在 A 上写数据,另外一台 B 也会跟着写数据,两者数据实时同步的。 MySQL 主从是基于 binlog 的&…

MySQL、HBase、ES的特点和区别

MySQL:关系型数据库,主要面向OLTP,支持事务,支持二级索引,支持sql,支持主从、Group Replication架构模型(本文全部以Innodb为例,不涉及别的存储引擎)。 HBase&#xff1…