加入了卸载功能

This commit is contained in:
XinJiang1 2025-01-01 17:55:35 +08:00
parent 70eef15dba
commit eeee1a2252
2 changed files with 19 additions and 16 deletions

20
dist/license.txt vendored
View File

@ -1,14 +1,14 @@
# Software License Agreement
**Important Notice**: Please read this Software License Agreement (hereinafter referred to as “this Agreement”) carefully before using this software. If you do not agree with any term of this Agreement, you are not authorized to install, copy, or use this software. By installing or using this software, you acknowledge that you have read, understood, and agree to be bound by all terms and conditions of this Agreement.
**Important Notice**: Please read this Software License Agreement (hereinafter referred to as “this Agreement”) carefully before using this software. If you do not agree with any term of this Agreement, you are not authorized to install, copy, or use this software. By installing or using this software, you acknowledge that you have read, understood, and agree to be bound by all terms and conditions of this Agreement.
---
## 1. Definitions
1. **“Software”** refers to the application named “cotton_double,” developed and provided by **Nanjing Forestry University** (hereinafter referred to as “Licensor”). This includes but is not limited to the related executable files, data, documentation, updates, and upgrades.
2. **“User”** refers to any individual or entity that installs or uses this Software.
3. **“Licensor”** refers to **Nanjing Forestry University**, which holds the copyright or lawful authorization rights to this Software.
1. **“Software”** refers to the application named “cotton_double,” developed and provided by **Nanjing Forestry University** (hereinafter referred to as “Licensor”). This includes but is not limited to the related executable files, data, documentation, updates, and upgrades.
2. **“User”** refers to any individual or entity that installs or uses this Software.
3. **“Licensor”** refers to **Nanjing Forestry University**, which holds the copyright or lawful authorization rights to this Software.
---
@ -33,7 +33,7 @@
1. **Copyright**
The copyright and other intellectual property rights in the Software belong to the Licensor and are protected by applicable laws and international treaties.
2. **Third-Party Components**
Any third-party software or libraries included or referenced within the Software are used under their respective licenses. The Users use of such third-party components shall comply with the relevant third-party license terms.
Any third-party software or libraries included or referenced within the Software are used under their respective licenses. The Users use of such third-party components shall comply with the relevant third-party license terms.
---
@ -58,8 +58,8 @@
## 6. Warranty and Disclaimer
1. **Software Provided “As Is”**
The Software and any related services are provided on an “as is” basis. The Licensor makes no express or implied warranties regarding the performance, quality, compatibility, or suitability of the Software.
1. **Software Provided “As Is”**
The Software and any related services are provided on an “as is” basis. The Licensor makes no express or implied warranties regarding the performance, quality, compatibility, or suitability of the Software.
2. **Assumption of Risk**
The User understands and agrees that any risks or losses arising from the use of or inability to use the Software are borne by the User. The Licensor shall not be liable for any direct or indirect losses arising therefrom.
@ -74,7 +74,7 @@ To the maximum extent permitted by applicable law, the Licensor shall not be lia
## 8. Termination
1. **Termination Conditions**
If the User violates any provision of this Agreement, the Licensor has the right to terminate this Agreement and the Users license to the Software immediately without prior notice.
If the User violates any provision of this Agreement, the Licensor has the right to terminate this Agreement and the Users license to the Software immediately without prior notice.
2. **Consequences of Termination**
Upon termination of this Agreement, the User shall immediately cease using the Software and delete or destroy all copies of the Software.
@ -83,7 +83,7 @@ To the maximum extent permitted by applicable law, the Licensor shall not be lia
## 9. Governing Law and Dispute Resolution
1. **Governing Law**
The formation, interpretation, and performance of this Agreement and the resolution of any disputes shall be governed by the laws of the Peoples Republic of China.
The formation, interpretation, and performance of this Agreement and the resolution of any disputes shall be governed by the laws of the Peoples Republic of China.
2. **Dispute Resolution**
In the event of any dispute arising out of or in connection with this Agreement, the parties shall first attempt to resolve it amicably through negotiation. If negotiation fails, either party may submit the dispute to the competent courts of China.
@ -96,7 +96,7 @@ To the maximum extent permitted by applicable law, the Licensor shall not be lia
2. **Severability**
If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions shall remain in full force and effect.
3. **Modifications**
The Licensor reserves the right to revise this Agreement as necessary. If there are substantial changes, the Licensor will notify the User in an appropriate manner. The Users continued use of the Software after such notification constitutes acceptance of the modified terms.
The Licensor reserves the right to revise this Agreement as necessary. If there are substantial changes, the Licensor will notify the User in an appropriate manner. The Users continued use of the Software after such notification constitutes acceptance of the modified terms.
---

View File

@ -62,6 +62,8 @@ Section "MainSection"
; 如需只对当前用户生效,可改写为 HKCU
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" \
"cotton_double" "$INSTDIR\cotton_double2.exe"
; -- 关键:写出卸载程序 --
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
@ -69,18 +71,19 @@ SectionEnd
; Section: Uninstall
; --------------------------------
Section "Uninstall"
; 删除安装目录及所有文件/子目录
; 卸载时删除安装目录中的所有文件
RMDir /r "$INSTDIR"
; 删除桌面快捷方式
Delete "$DESKTOP\cotton_double2.lnk"
; 删除开始菜单快捷方式、目录
; 删除菜单快捷方式
Delete "$SMPROGRAMS\cotton_double\cotton_double2.lnk"
RMDir "$SMPROGRAMS\cotton_double"
; 移除注册表中的开机自启
; 移除注册表中的开机自启
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "cotton_double"
SectionEnd
; 可选:删除自身(卸载程序),一般放在最后
Delete "$INSTDIR\Uninstall.exe"
SectionEnd