change exe name

This commit is contained in:
armv9
2024-07-05 11:16:05 +09:00
parent be0eae662b
commit 6f81ba7773
20 changed files with 47 additions and 64 deletions

View File

@@ -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 ()

View File

@@ -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"
}
]
}

View File

@@ -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)

View File

@@ -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()) {

View File

@@ -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 部分编译

View File

@@ -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 部分编译

View File

@@ -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")

View File

@@ -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

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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) # 下次改

View File

@@ -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;

View File

@@ -18,7 +18,7 @@ namespace NekoGui {
namespace CoreType {
enum CoreType {
V2RAY,
V2RAY, // DO NOT USE
SING_BOX,
};
}

View File

@@ -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;

View File

@@ -4,7 +4,7 @@
<body>
<h3>
<p>Please put your clash dashboard files to "nekoray/config/dashboard" dir.</p>
<p>Please put your clash dashboard files to "./config/dashboard" dir.</p>
<p>For example, you can download from the following URL.</p>
<p>
<a href="https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip">Download Yacd-meta</a>

View File

@@ -16,7 +16,6 @@
</qresource>
<qresource prefix="/neko">
<file alias="nekobox.png">public/nekobox.png</file>
<file alias="nekoray.png">public/nekoray.png</file>
<file>neko.css</file>
<file>vpn/vpn-run-root.sh</file>
<file>vpn/sing-box-vpn.json</file>

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB