diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a2dba2..727aeda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -project(nekoray VERSION 0.1 LANGUAGES CXX) +project(nekobox VERSION 0.1 LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -238,23 +238,23 @@ set(PROJECT_SOURCES # Qt exe if (${QT_VERSION_MAJOR} GREATER_EQUAL 6) - qt_add_executable(nekoray + qt_add_executable(nekobox MANUAL_FINALIZATION ${PROJECT_SOURCES} ) # Define target properties for Android with Qt 6 as: - # set_property(TARGET nekoray APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR + # set_property(TARGET nekobox APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR # ${CMAKE_CURRENT_SOURCE_DIR}/android) # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation else () if (ANDROID) - add_library(nekoray SHARED + add_library(nekobox SHARED ${PROJECT_SOURCES} ) # Define properties for Android with Qt 5 after find_package() calls as: # set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") else () - add_executable(nekoray + add_executable(nekobox ${PROJECT_SOURCES} ) endif () @@ -262,11 +262,11 @@ endif () # Target -set_property(TARGET nekoray PROPERTY AUTOUIC ON) -set_property(TARGET nekoray PROPERTY AUTOMOC ON) -set_property(TARGET nekoray PROPERTY AUTORCC ON) +set_property(TARGET nekobox PROPERTY AUTOUIC ON) +set_property(TARGET nekobox PROPERTY AUTOMOC ON) +set_property(TARGET nekobox PROPERTY AUTORCC ON) -set_target_properties(nekoray PROPERTIES +set_target_properties(nekobox PROPERTIES WIN32_EXECUTABLE TRUE ) @@ -281,17 +281,17 @@ set(LUPDATE_OPTIONS -locations none -no-obsolete ) if (${QT_VERSION_MAJOR} GREATER_EQUAL 6) - qt_add_lupdate(nekoray TS_FILES ${TS_FILES} OPTIONS ${LUPDATE_OPTIONS}) - qt_add_lrelease(nekoray TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES) + qt_add_lupdate(nekobox TS_FILES ${TS_FILES} OPTIONS ${LUPDATE_OPTIONS}) + qt_add_lrelease(nekobox TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES) else () qt5_create_translation(QM_FILES ${PROJECT_SOURCES} ${TS_FILES} OPTIONS ${LUPDATE_OPTIONS}) endif () configure_file(translations/translations.qrc ${CMAKE_BINARY_DIR} COPYONLY) -target_sources(nekoray PRIVATE ${CMAKE_BINARY_DIR}/translations.qrc) +target_sources(nekobox PRIVATE ${CMAKE_BINARY_DIR}/translations.qrc) # Target Link -target_link_libraries(nekoray PRIVATE +target_link_libraries(nekobox PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Svg Threads::Threads ${NKR_EXTERNAL_TARGETS} @@ -299,5 +299,5 @@ target_link_libraries(nekoray PRIVATE ) if (QT_VERSION_MAJOR EQUAL 6) - qt_finalize_executable(nekoray) + qt_finalize_executable(nekobox) endif () diff --git a/appdmg.json b/appdmg.json deleted file mode 100644 index d7f1a40..0000000 --- a/appdmg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "nekoray", - "icon": "res/nekoray.icns", - "contents": [ - { - "x": 448, - "y": 344, - "type": "link", - "path": "/Applications" - }, - { - "x": 192, - "y": 344, - "type": "file", - "path": "build/nekoray.app" - } - ] -} \ No newline at end of file diff --git a/cmake/windows/windows.cmake b/cmake/windows/windows.cmake index 75bd037..5859588 100644 --- a/cmake/windows/windows.cmake +++ b/cmake/windows/windows.cmake @@ -4,12 +4,12 @@ set(PLATFORM_LIBRARIES wininet wsock32 ws2_32 user32 rasapi32 iphlpapi) include(cmake/windows/generate_product_version.cmake) generate_product_version( QV2RAY_RC - ICON "${CMAKE_SOURCE_DIR}/res/nekoray.ico" - NAME "nekoray" - BUNDLE "nekoray" - COMPANY_NAME "nekoray" - COMPANY_COPYRIGHT "nekoray" - FILE_DESCRIPTION "nekoray" + ICON "${CMAKE_SOURCE_DIR}/res/nekobox.ico" + NAME "nekobox" + BUNDLE "nekobox" + COMPANY_NAME "nekobox" + COMPANY_COPYRIGHT "nekobox" + FILE_DESCRIPTION "nekobox" ) add_definitions(-DUNICODE -D_UNICODE -DNOMINMAX) set(GUI_TYPE WIN32) diff --git a/db/ConfigBuilder.cpp b/db/ConfigBuilder.cpp index c28d91a..092dc0e 100644 --- a/db/ConfigBuilder.cpp +++ b/db/ConfigBuilder.cpp @@ -22,7 +22,7 @@ namespace NekoGui { } QString genTunName() { - auto tun_name = "nekoray-tun"; + auto tun_name = "nekobox-tun"; #ifdef Q_OS_MACOS tun_name = "utun9"; #endif @@ -725,8 +725,8 @@ namespace NekoGui { QString WriteVPNSingBoxConfig() { // tun user rule - auto match_out = dataStore->vpn_rule_white ? "nekoray-socks" : "direct"; - auto no_match_out = dataStore->vpn_rule_white ? "direct" : "nekoray-socks"; + auto match_out = dataStore->vpn_rule_white ? "nekobox-socks" : "direct"; + auto no_match_out = dataStore->vpn_rule_white ? "direct" : "nekobox-socks"; QString process_name_rule = dataStore->vpn_rule_process.trimmed(); if (!process_name_rule.isEmpty()) { diff --git a/docs/Build_Linux.md b/docs/Build_Linux.md index ad97f91..966cb77 100644 --- a/docs/Build_Linux.md +++ b/docs/Build_Linux.md @@ -22,9 +22,9 @@ cmake -GNinja .. ninja ``` -编译完成后得到 `nekoray` +编译完成后得到 `nekobox` -解压 Release 的压缩包,替换其中的 `nekoray`,删除 `launcher` 即可使用。 +解压 Release 的压缩包,替换其中的 `nekobox`,删除 `launcher` 即可使用。 ## 复杂编译法 @@ -69,7 +69,7 @@ cmake -GNinja .. ninja ``` -编译完成后得到 `nekoray` +编译完成后得到 `nekobox` ### Go 部分编译 diff --git a/docs/Build_Windows.md b/docs/Build_Windows.md index a8a7728..b8a1469 100644 --- a/docs/Build_Windows.md +++ b/docs/Build_Windows.md @@ -55,9 +55,9 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=D:/path/to/qt/5.15. ninja ``` -编译完成后得到 `nekoray.exe` +编译完成后得到 `nekobox.exe` -最后运行 `windeployqt nekoray.exe` 自动复制所需 DLL 等文件到当前目录 +最后运行 `windeployqt nekobox.exe` 自动复制所需 DLL 等文件到当前目录 ### Go 部分编译 diff --git a/go/cmd/updater/launcher_linux.go b/go/cmd/updater/launcher_linux.go index d9ad958..334708e 100644 --- a/go/cmd/updater/launcher_linux.go +++ b/go/cmd/updater/launcher_linux.go @@ -17,7 +17,7 @@ func Launcher() { _debug := flag.Bool("debug", false, "Debug mode") flag.Parse() - cmd := exec.Command("./nekoray", flag.Args()...) + cmd := exec.Command("./nekobox", flag.Args()...) ld_env := "LD_LIBRARY_PATH=" + filepath.Join(wd, "./usr/lib") qt_plugin_env := "QT_PLUGIN_PATH=" + filepath.Join(wd, "./usr/plugins") diff --git a/go/cmd/updater/main.go b/go/cmd/updater/main.go index 43a63a7..1e6ca63 100644 --- a/go/cmd/updater/main.go +++ b/go/cmd/updater/main.go @@ -30,9 +30,9 @@ func main() { time.Sleep(time.Second) Updater() // 3. start - exec.Command("./nekoray.exe").Start() + exec.Command("./nekobox.exe").Start() } else { - // 1. nekoray stop it self and run "updater.exe" + // 1. main prog quit and run "updater.exe" Copy("./updater.exe", "./updater.old") exec.Command("./updater.old", os.Args[1:]...).Start() } @@ -43,7 +43,7 @@ func main() { if os.Getenv("NKR_FROM_LAUNCHER") == "1" { Launcher() } else { - exec.Command("./nekoray").Start() + exec.Command("./nekobox").Start() } } return diff --git a/go/cmd/updater/updater.go b/go/cmd/updater/updater.go index 5db0b63..c71c775 100644 --- a/go/cmd/updater/updater.go +++ b/go/cmd/updater/updater.go @@ -71,6 +71,11 @@ func Updater() { os.RemoveAll("./nekoray_update") os.RemoveAll("./nekoray.zip") os.RemoveAll("./nekoray.tar.gz") + + // nekoray -> nekobox + os.Remove("./nekoray.exe") + os.Remove("./nekoray.png") + os.Remove("./nekoray_core.exe") } func Exist(path string) bool { diff --git a/libs/deploy_linux64.sh b/libs/deploy_linux64.sh index cf9cf8b..76d0b29 100755 --- a/libs/deploy_linux64.sh +++ b/libs/deploy_linux64.sh @@ -7,7 +7,7 @@ rm -rf $DEST mkdir -p $DEST #### copy binary #### -cp $BUILD/nekoray $DEST +cp $BUILD/nekobox $DEST #### Download: prebuilt runtime #### curl -Lso usr.zip https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/20230202-5.12.8-ubuntu20.04-linux64.zip diff --git a/libs/deploy_windows64.sh b/libs/deploy_windows64.sh index c250719..a513aad 100755 --- a/libs/deploy_windows64.sh +++ b/libs/deploy_windows64.sh @@ -7,11 +7,11 @@ rm -rf $DEST mkdir -p $DEST #### copy exe #### -cp $BUILD/nekoray.exe $DEST +cp $BUILD/nekobox.exe $DEST #### deploy qt & DLL runtime #### pushd $DEST -windeployqt nekoray.exe --no-compiler-runtime --no-system-d3d-compiler --no-opengl-sw --verbose 2 +windeployqt nekobox.exe --no-compiler-runtime --no-system-d3d-compiler --no-opengl-sw --verbose 2 rm -rf translations rm -rf libEGL.dll libGLESv2.dll Qt6Pdf.dll diff --git a/libs/env_deploy.sh b/libs/env_deploy.sh index 5c174ff..9682533 100644 --- a/libs/env_deploy.sh +++ b/libs/env_deploy.sh @@ -1,4 +1,4 @@ SRC_ROOT="$PWD" DEPLOYMENT="$SRC_ROOT/deployment" BUILD="$SRC_ROOT/build" -version_standalone="nekoray-"$(cat nekoray_version.txt) +version_standalone="nekoray-"$(cat nekoray_version.txt) # 下次改 diff --git a/libs/package_debian.sh b/libs/package_debian.sh index d1b7eaf..491aa7d 100644 --- a/libs/package_debian.sh +++ b/libs/package_debian.sh @@ -25,8 +25,8 @@ if [ ! -s /usr/share/applications/nekoray.desktop ]; then [Desktop Entry] Name=nekoray Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box) -Exec=sh -c "PATH=/opt/nekoray:\$PATH /opt/nekoray/nekoray -appdata" -Icon=/opt/nekoray/nekoray.png +Exec=sh -c "PATH=/opt/nekoray:\$PATH /opt/nekoray/nekobox -appdata" +Icon=/opt/nekoray/nekobox.png Terminal=false Type=Application Categories=Network;Application; diff --git a/main/Const.hpp b/main/Const.hpp index 440c847..38d328c 100644 --- a/main/Const.hpp +++ b/main/Const.hpp @@ -18,7 +18,7 @@ namespace NekoGui { namespace CoreType { enum CoreType { - V2RAY, + V2RAY, // DO NOT USE SING_BOX, }; } diff --git a/main/main.cpp b/main/main.cpp index c88dc92..b14f04f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -140,7 +140,7 @@ int main(int argc, char* argv[]) { return 0; } // Some Bad System - QMessageBox::warning(nullptr, "NekoRay", "RunGuard disallow to run, use -many to force start."); + QMessageBox::warning(nullptr, "NekoGui", "RunGuard disallow to run, use -many to force start."); return 0; } MF_release_runguard = [&] { guard.release(); }; @@ -148,7 +148,7 @@ int main(int argc, char* argv[]) { // icons #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) QIcon::setFallbackSearchPaths(QStringList{ - ":/nekoray", + ":/neko", ":/icon", }); #endif @@ -177,9 +177,6 @@ int main(int argc, char* argv[]) { // Load dataStore switch (NekoGui::coreType) { - case NekoGui::CoreType::V2RAY: - NekoGui::dataStore->fn = "groups/nekoray.json"; - break; case NekoGui::CoreType::SING_BOX: NekoGui::dataStore->fn = "groups/nekobox.json"; break; diff --git a/res/dashboard-notice.html b/res/dashboard-notice.html index e42e34b..cfea1c7 100644 --- a/res/dashboard-notice.html +++ b/res/dashboard-notice.html @@ -4,7 +4,7 @@
Please put your clash dashboard files to "nekoray/config/dashboard" dir.
+Please put your clash dashboard files to "./config/dashboard" dir.
For example, you can download from the following URL.
Download Yacd-meta
diff --git a/res/neko.qrc b/res/neko.qrc
index 6e1c3f2..10e97e1 100644
--- a/res/neko.qrc
+++ b/res/neko.qrc
@@ -16,7 +16,6 @@