Open Jisu-Woniu opened 3 months ago
I am not familiar with PKGBUILD, and even though I might be able to figure something out, I am almost sure the said issues won't be resolved by a local build. I have my own local build that I use for testing on my Ubuntu system, and dark mode does not work there either, it is a problem that originates in Qt's faulty style manager. Also Nekoray needs a set of libraries to run, by having the libraries and building it locally you can run the executable, but the exact same effect is achieved by running the launcher in the bundled app. In short, I have built Nekoray locally and there is no difference between my local build and the one provided in the release page, so I doubt anything can be achieved by building Nekoray locally.
I have made a working PKGBUILD based on the linked one. And it fixes #59 as expected.
If anyone is interested and willing to give a try, download the tarball below:
Dark mode is also supported, however a restart of the program is needed.
Dark mode is also supported, however a restart of the program is needed.
That's interesting. I can't test it myself, but if it solved dark mode issue for other users as well please submit the PKGBUILD through a PR and I will merge it.
I have my own local build that I use for testing on my Ubuntu system, and dark mode does not work there either
Maybe your theme setting works for Qt 5 only.
For example, the latest version of breeze
on Debian stable is 5.27.5 as of now. It supports Qt 5 only.
On Arch Linux, it is 6.1.2, which supports Qt 6. There is also a breeze5
(also 6.1.2) for Qt 5 apps.
That's interesting. I can't test it myself, but if it solved dark mode issue for other users as well please submit the PKGBUILD through a PR and I will merge it.
It does nothing different than the GitHub Action workflow, just a shorthand for makepkg
on Arch Linux. But maybe we can build a deb package with it for Debian and Ubuntu users?
build() {
cd "${pkgname}/"
git submodule init
git submodule update
(
mkdir -p build
cd build
cmake -GNinja -DQT_VERSION_MAJOR=6 -DNKR_PACKAGE=ON ..
ninja
)
export GOARCH
case $CARCH in
x86_64) GOARCH=amd64 ;;
aarch64) GOARCH=arm64 ;;
riscv64) GOARCH=riscv64 ;;
esac
./libs/build_public_res.sh
GOOS=linux ./libs/build_go.sh
}
package() {
install -dm755 "${pkgdir}/usr/bin/"
# assets
install -Dm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
install -Dm644 ${pkgname}/res/public/{nekoray,nekobox}.png -t "${pkgdir}/usr/share/pixmaps/"
# core
local core_srcdir
case $CARCH in
x86_64) core_srcdir=linux64 ;;
aarch64) core_srcdir=linux-arm64 ;;
riscv64) core_srcdir=linux-riscv64 ;;
esac
install -Dm755 ${pkgname}/deployment/${core_srcdir}/nekobox_core -t "${pkgdir}/usr/lib/${pkgname}/"
# app
install -Dm755 "${pkgname}/build/${pkgname}" -t "${pkgdir}/usr/lib/${pkgname}/"
ln -s "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}
If the theme issue on arch can be solved by building the app locally, I will be glad to include the pkgbuild. If i get it right, to solve the dark theme issue users have to link Nekoray to their own libraries instead of those shipped with the app, am I right? I am not familiar with packaging yet, but is there any way to package and publish the app ( in snap, apt etc ) so that users can simply install the app without the need to compile it?
Currently the seemingly best option is to upload the PKGBUILD to AUR, and also build the package with GitHub Action in an Arch Linux container.
Most Arch users are familiar with the build-and-install process with AUR, so the compilation isn't really a problem. But there is already a package for the original nekoray repo, which seems still being maintained. I am not sure what to do next.
I cannot use the routing correctly, it complains this when I switch to Bypass China:
I cannot use the routing correctly, it complains this when I switch to Bypass China:
This error seems from this code:
Currently the seemingly best option is to upload the PKGBUILD to AUR, and also build the package with GitHub Action in an Arch Linux container.
Most Arch users are familiar with the build-and-install process with AUR, so the compilation isn't really a problem. But there is already a package for the original nekoray repo, which seems still being maintained. I am not sure what to do next.
Then I guess i just include the pkgbuild in the repo so that users can clone and build it.
I cannot use the routing correctly, it complains this when I switch to Bypass China:
The geoip.db and geosite.db should be beside Nekoray's executable, they will be used to generate rule-sets.
I think the geoip and geosite database should be updated separately, and two packages named sing-geoip and sing-geosite already take care of this.
The assets provided in the bundle are from sing-geoip and sing-geosite, and you can manually update the databases. The only point is that their location for the time being is needed to be beside the Nekoray executable and their names should match geoip.db and geosite.db.
I tried to link the geoip.db and geosite.db with symlink, but the error message is still there.
Is there anything I missed in the package?
The /usr/share/nekoray directory looks like this:
The working directory is not set to the /usr/share/nekoray directory, this may be the cause of the problem.
Edit: Still not working.
Maybe you should update the code to respect the resource file path in nekobox Basic setting -> Core:
I tried to link the geoip.db and geosite.db with symlink, but the error message is still there.
~Is there anything I missed in the package?~
The /usr/share/nekoray directory looks like this:
The working directory is not set to the /usr/share/nekoray directory, this may be the cause of the problem.
Edit: Still not working.
I need to look it into it, I had not changed the code around reading the assets too much, might have caused a bug by changing other parts.
Maybe you should update the code to respect the resource file path in nekobox Basic setting -> Core:
Yes this option has also been left behind, I will try to fix it in the next release.
I made some changes to the LD path passed to the app. Can you check if it resolves dark theme issues on arch devices?
Maybe you should update the code to respect the resource file path in nekobox Basic setting -> Core:
It's basically a one-line patch, here's how I fixed it for official nekoray (Arch Linux)
Basically you get nekoray PKGBUILD, put the patch file in the folder, and change the sources
variable in PKGBUILD to include the sha256sum of the patch
made a pr that fixes the issue #188
描述建议 / Suggestion
请提供一套 PKGBUILD 文件,以便 Arch Linux 用户可在自己的设备上编译该程序。
Please provide a set of PKGBUILD files so that Arch Linux users can compile the program on their own devices.
参考:Refer to: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nekoray
建议的必要性 / Necessity
本仓库的 Release 构建中捆绑了 Qt 6 相关的动态链接库,但这导致了一些系统特性无法正常使用,如 #59 #61。如果使用 PKGBUILD 本地构建,或许可以解决这些问题。
The Release build of this repository bundles Qt 6 related libraries, but this causes some system features to not work properly, e.g. #59 #61. These issues may be resolved by a local build with PKGBUILD.