aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2025-04-12 19:07:18 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2025-04-12 19:07:18 +0800
commit692b543db135be251bd7177d32a9bce74cd44f78 (patch)
tree7c8eaa8c5d9222d6330a720f05a7e7b4caf2926a
parent47d9b760b80a824329ac79bfe0049f5ce7ac4abd (diff)
使用 Folder-Ico 美化了文件夹
-rw-r--r--.cargo/config2
-rw-r--r--.cargo/desktop.ini6
-rw-r--r--.gitignore4
-rw-r--r--.idea/PhantomLink-Gamepad.iml1
-rw-r--r--.init/desktop.ini6
-rw-r--r--.init/init_project.bat50
-rw-r--r--.obsidian/desktop.ini6
-rw-r--r--client/art/aseprite/desktop.ini6
-rw-r--r--client/desktop.ini6
-rw-r--r--core/desktop.ini6
-rw-r--r--core/server_test/src/main.rs3
-rw-r--r--core/src/player.rs2
-rw-r--r--desktop.ini6
-rw-r--r--doc/desktop.ini6
14 files changed, 79 insertions, 31 deletions
diff --git a/.cargo/config b/.cargo/config
index b18a5b7..4cfe1c1 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -1,2 +1,2 @@
[build]
-target-dir = "./shared/target" \ No newline at end of file
+target-dir = "./.cargo/shared/target" \ No newline at end of file
diff --git a/.cargo/desktop.ini b/.cargo/desktop.ini
new file mode 100644
index 0000000..a0d951a
--- /dev/null
+++ b/.cargo/desktop.ini
@@ -0,0 +1,6 @@
+[.ShellClassInfo]
+IconResource=.\..\.init\Folder-Ico\ico\rust-2.ico,0
+[ViewState]
+Mode=
+Vid=
+FolderType=Generic
diff --git a/.gitignore b/.gitignore
index aece2db..0b87936 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,8 @@
/.init/Folder-Ico/*.*
# Rust Target
-/shared/
-/shared/*.*
+/.cargo/shared/
+/.cargo/shared/*.*
# Documents
/doc/client-documents/
diff --git a/.idea/PhantomLink-Gamepad.iml b/.idea/PhantomLink-Gamepad.iml
index 03e6177..061a65d 100644
--- a/.idea/PhantomLink-Gamepad.iml
+++ b/.idea/PhantomLink-Gamepad.iml
@@ -12,6 +12,7 @@
<excludeFolder url="file://$MODULE_DIR$/doc/client-documents" />
<excludeFolder url="file://$MODULE_DIR$/doc/core-documents" />
<excludeFolder url="file://$MODULE_DIR$/shared" />
+ <excludeFolder url="file://$MODULE_DIR$/.cargo/shared" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
diff --git a/.init/desktop.ini b/.init/desktop.ini
new file mode 100644
index 0000000..ab0aa15
--- /dev/null
+++ b/.init/desktop.ini
@@ -0,0 +1,6 @@
+[.ShellClassInfo]
+IconResource=.\..\.init\Folder-Ico\ico\programmer-4.ico,0
+[ViewState]
+Mode=
+Vid=
+FolderType=Generic
diff --git a/.init/init_project.bat b/.init/init_project.bat
index 5914d4f..cbd0f09 100644
--- a/.init/init_project.bat
+++ b/.init/init_project.bat
@@ -1,13 +1,53 @@
@echo off
-cd %~d0
+setlocal enabledelayedexpansion
+set "SCRIPT_DIR=%~dp0"
-cd ..\client
+:: 初始化目录
+cd /d "%SCRIPT_DIR%" || exit /b 1
+
+:: 客户端构建
+echo Building Module : Client
+pushd ..\client
cargo build
+popd
-cd ..\core
+:: 核心构建
+echo Building Module : Core
+pushd ..\core
cargo build
+popd
+
+:: 图标下载
+echo Downloading icon11 ... ( from github.com/icon11-community/Folder-Ico.git )
+pushd ..\.init
+git clone https://github.com/icon11-community/Folder-Ico.git || (
+ echo [ Failed ]
+ pause
+ exit /b 2
+)
+popd
+
+:: 批量设置系统属性
+for %%D in (
+ ".\..\PhantomLink-Gamepad"
+ ".\.cargo"
+ ".\.idea"
+ ".\.init"
+ ".\.obsidian"
+ ".\client"
+ ".\client\art\aseprite"
+ ".\core"
+ ".\doc"
+) do (
+ if exist "%%~D\desktop.ini" (
+ attrib +s +h "%%~D\desktop.ini"
+ )
+ attrib +s "%%~D"
+)
-cd ..\.init
-git clone https://github.com/icon11-community/Folder-Ico.git
+del /f /q "%LocalAppData%\IconCache.db" >nul
+:: 完成提示
+echo DONE :)
pause
+exit /b 0
diff --git a/.obsidian/desktop.ini b/.obsidian/desktop.ini
new file mode 100644
index 0000000..ff05e69
--- /dev/null
+++ b/.obsidian/desktop.ini
@@ -0,0 +1,6 @@
+[.ShellClassInfo]
+IconResource=..\.init\Folder-Ico\ico\obsidian-2.ico,0
+[ViewState]
+Mode=
+Vid=
+FolderType=Generic
diff --git a/client/art/aseprite/desktop.ini b/client/art/aseprite/desktop.ini
index 3e94eb9..8927f1c 100644
--- a/client/art/aseprite/desktop.ini
+++ b/client/art/aseprite/desktop.ini
@@ -1,6 +1,2 @@
[.ShellClassInfo]
-IconResource=..\..\..\.init\Folder-Ico\ico\aseprite.ico,0
-[ViewState]
-Mode=
-Vid=
-FolderType=Generic
+IconResource=..\..\..\.init\Folder-Ico\ico\aseprite.ico,0 \ No newline at end of file
diff --git a/client/desktop.ini b/client/desktop.ini
new file mode 100644
index 0000000..67e27c9
--- /dev/null
+++ b/client/desktop.ini
@@ -0,0 +1,6 @@
+[.ShellClassInfo]
+IconResource=..\.init\Folder-Ico\ico\microsoft_user.ico,0
+[ViewState]
+Mode=
+Vid=
+FolderType=Generic
diff --git a/core/desktop.ini b/core/desktop.ini
index edde22e..625ab66 100644
--- a/core/desktop.ini
+++ b/core/desktop.ini
@@ -1,6 +1,2 @@
[.ShellClassInfo]
-IconResource=..\.init\Folder-Ico\ico\rust-2.ico,0
-[ViewState]
-Mode=
-Vid=
-FolderType=Generic
+IconResource=..\.init\Folder-Ico\ico\windows_powershell_core.ico,0 \ No newline at end of file
diff --git a/core/server_test/src/main.rs b/core/server_test/src/main.rs
index c134fbc..deff058 100644
--- a/core/server_test/src/main.rs
+++ b/core/server_test/src/main.rs
@@ -1,6 +1,5 @@
-use phantomlink_gamepad_core::message::PlayerMessage;
use phantomlink_gamepad_core::server::{PLServer, PLServerEvent};
-use phantomlink_gamepad_core::player::PlayerInfo;
+use phantomlink_gamepad_core::player::{PlayerInfo, PlayerMessage};
fn main() {
let pl_server = PLServer::default();
diff --git a/core/src/player.rs b/core/src/player.rs
index 78e4d23..92430b8 100644
--- a/core/src/player.rs
+++ b/core/src/player.rs
@@ -35,7 +35,7 @@ impl PlayerInfo {
hasher.update(combined);
let result = hasher.finalize();
- self.name_hash = &format!("{:x}", &result[..16]);
+ self.name_hash = &format!("{:x}", &result[..]);
self
}
diff --git a/desktop.ini b/desktop.ini
index 5eacc4d..603775b 100644
--- a/desktop.ini
+++ b/desktop.ini
@@ -1,6 +1,2 @@
[.ShellClassInfo]
-IconResource=.init\Folder-Ico\ico\microsoft_games.ico,0
-[ViewState]
-Mode=
-Vid=
-FolderType=Generic
+IconResource=.init\Folder-Ico\ico\microsoft_games.ico,0 \ No newline at end of file
diff --git a/doc/desktop.ini b/doc/desktop.ini
index ff05e69..942b5fc 100644
--- a/doc/desktop.ini
+++ b/doc/desktop.ini
@@ -1,6 +1,2 @@
[.ShellClassInfo]
-IconResource=..\.init\Folder-Ico\ico\obsidian-2.ico,0
-[ViewState]
-Mode=
-Vid=
-FolderType=Generic
+IconResource=..\.init\Folder-Ico\ico\markdown-1.ico,0 \ No newline at end of file