在骁龙845设备上的Windows里原生运行Minecraft Java Edition
傻逼都知道微软他妈的不会做移动端的东西, 傻逼才他妈会用ARM设备上的Windows搞半天想要原生运行Minecraft就是为了他妈提高效率, 结果他妈的微软没给他妈的845的显卡驱动做他妈的OpenGL, 还得去下载他妈的兼容包转成他妈的DirectX 12才能他妈的跑.典型的跨平台跨了他妈个寂寞.越想越气, 懒得写了.简单说一下:从https://bell-sw.com/pages/downloads/#/java-17-current下载JRE 17, 选择Windows ARM64.从微软商店下载OpenCL™ 和 OpenGL® 兼容包, 安装完成后无需重启.建议使用HMCL启动器3.5.3及以后的版本, 需要利用到旧版本HMCL或者其他启动器可能没有的特性: https://github.com/Glavo/HMCL-Update本次使用的是1.18.2版本, 其他版本不知道会不会炸.下载https://build.lwjgl.org/release/3.3.0/lwjgl-3.3.0.zip, 取出Minecraft需要的Native文件.需要修改的Libraries文件位于.minecraft\libraries\org\lwjgl下, 从刚刚下载的lwjgl-3.3.0.zip内, 找到相应的文件并替换. 例如lwjgl\3.2.2\lwjgl-3.2.2.jar使用压缩包内的lwjgl\lwjgl.jar替换.同时将压缩包内的对应Native库lwjgl-xxx-natives-windows-arm64.jar解压, 找到windows\arm64\org\lwjgl\lwjgl-xxx.dll, 放置到.minecraft\versions\1.18.1\natives下, 文件名保持原样.一共需要提取7个dll和替换7个jar文件, 自己数.在HMCL里修改游戏设置, 将Native库位置指向刚刚放dll文件的文件夹.启动游戏.
WSL 1存在一个奇怪的bug, 最早在2019年就提出来了.在宿主机上通过wsl命令执行容器内命令的结果会被随机截断, 具体参考这里:https://youtrack.jetbrains.com/issue/IDEA-242469这就导致JetBrains系工具无法使用WSL 1内的Git. JetBrains会默认使用宿主机上的Git, 但是如果Git上有commit hook, 就会出现找不到命令的尴尬情况.但是在上面那个链接里提供了一个简单的trick去解决这个问题:在IDE注册表里启用WSL1内Git的支持: 顶栏->帮助->查找操作->注册表(Registry), 找到git.allow.wsl1.executables, 设置为true.在WSL内创建一个替代的git脚本文件, 并在执行时加入一些延时.设置使用的git为该替代的git脚本: 文件->设置->版本控制->Git->Git可执行文件路径这个脚本文件还有点意思, 原文给的内容如下:#!/bin/sh git "$@" sleep 0.1 #increase timeout as needed但是这样做就会无视掉git命令的返回结果, 导致IDE无法判断执行状态.所以我稍微做了点改动:#!/bin/sh git "$@" EXIT=$? # store the result of git sleep 0.1 #increase timeout as needed exit $EXIT # exit as how git exited完美.当然, 我建议对将git写为绝对路径, 以防止意外的循环调用.
Android和iOS阵营都有给设备充电的提示音, 但是Windows没有, 感觉少了点仪式感. 所以就想着给Windows也加一个充电提示音.@2021/09/12 更新重新组织了一下代码, 修复了将充满识别成断开电源的问题.\#0 获取充电状态第一反应是通过Windows日志获取电源状态更改事件, 然后用计划任务去播放声音.结果实际测试下来这种方法延迟很高(约5秒), 体验不大行, 所以直接使用VBScript去实现查询.我也不知道为什么要这样实现, 四处搜刮得到的代码, 能用就行.pngSet WMI = GetObject("winmgmts:\\.\root\WMI") Dim LastState Function GetCharge Set Query = WMI.ExecQuery("Select PowerOnline From BatteryStatus") For Each Status In Query If Status.PowerOnline <> LastState Then GetCharge = Status.PowerOnline Exit Function End If Next GetCharge = LastState End Function LastState = GetCharge While True Current = GetCharge If Current <> LastState Then If Current Then PlaySound("charge") Else PlaySound("discharge") End If LastState = Current End If WScript.Sleep 500 Wend\#1 播放声音然后cv一个播放声音的代码:Set Fs = CreateObject("Scripting.FileSystemObject") Set Player = CreateObject("WMPlayer.OCX") Function PlaySound(name) Path = "./"+ name +".mp3" If (Not Fs.FileExists(Path)) Then Exit Function End If Player.URL = Path Player.Controls.play End Function\#2 找点音效素材从几个不知名的国外网站上面凑齐了一套MIUI的充电音效:连接充电器:草了, 2021年了, 你的浏览器怎么还不支持HTML5断开充电器:草了, 2021年了, 你的浏览器怎么还不支持HTML5\#3 拼接一下代码Set Fs = CreateObject("Scripting.FileSystemObject") Set Player = CreateObject("WMPlayer.OCX") Set WMI = GetObject("winmgmts:\\.\root\WMI") Dim LastState Function PlaySound(name) Path = "./"+ name +".mp3" If (Not Fs.FileExists(Path)) Then Exit Function End If Player.URL = Path Player.Controls.play End Function Function GetCharge Set Query = WMI.ExecQuery("Select PowerOnline From BatteryStatus") For Each Status In Query If Status.PowerOnline <> LastState Then GetCharge = Status.PowerOnline Exit Function End If Next GetCharge = LastState End Function LastState = GetCharge While True Current = GetCharge If Current <> LastState Then If Current Then PlaySound("charge") Else PlaySound("discharge") End If LastState = Current End If WScript.Sleep 500 Wend\#4 开机启动计划任务就行, 就像这样:<?xml version="1.0" encoding="UTF-16"?> 2021-09-09T11:35:11.9499057 Zapic Play notify sound when charger connected or discconected. \ChargeNotify true S-1-5-18 LeastPrivilege <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> true true <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> true false true true false false false PT0S 7 C:\Windows\ChargeNotify\daemon.vbs C:\Windows\ChargeNotify\ \#5 试一下草了, 2021年了, 你的浏览器怎么还不支持HTML5所有结果都在这个压缩包里了：ChargeNotify.zip (36.6KiB)把整个文件夹放到C:\Windows\下, 然后把文件夹里的ChargeNotify.xml作为计划任务导入即可.
移除Windows 10中资源管理器顶部的7个文件夹
\#0 序言自盘古开天辟地以来, 这七个傻逼文件夹就杵在这里. 除了碍事, 还他妈碍眼.还他妈删不掉.搜索研究了一番, 终于找到了干掉这七个傻逼文件夹的方法.\#1 除之将以下内容保存为remove.reg, 直接双击导入即可:Windows Registry Editor Version 5.00 ;Create by Zapic<kawaiizapic@zapic.moe> @ 2021 ;DO NOT REMOVE THIS MESSAGE ;Visit me at https://i.zapic.moe/ ;3D Objects [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}] ;Videos [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}] ;Pictures [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}] ;Documents [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}] ;Downloads [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}] ;Music [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}] ;Desktop [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]\#2 复之恢复也很简单, 将以下内容保存为restore.reg, 双击导入即可:Windows Registry Editor Version 5.00 ;Create by Zapic<kawaiizapic@zapic.moe> @ 2021 ;DO NOT REMOVE THIS MESSAGE ;Visit me at https://i.zapic.moe/ ;3D Objects [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}] ;Videos [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}] ;Pictures [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}] ;Documents [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}] ;Downloads [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}] ;Music [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}] ;Desktop [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]现在, 再也看不到这堆没用的东西了.