diff --git a/res/msi/Package/RustDesk License.rtf b/res/msi/Package/License.rtf
similarity index 100%
rename from res/msi/Package/RustDesk License.rtf
rename to res/msi/Package/License.rtf
diff --git a/res/msi/Package/Package.wxs b/res/msi/Package/Package.wxs
index 8361e2a12..e86494e85 100644
--- a/res/msi/Package/Package.wxs
+++ b/res/msi/Package/Package.wxs
@@ -16,7 +16,7 @@
-
+
diff --git a/res/msi/preprocess.py b/res/msi/preprocess.py
index 7e6190ca7..d4ac7635d 100644
--- a/res/msi/preprocess.py
+++ b/res/msi/preprocess.py
@@ -437,6 +437,19 @@ def init_global_vars(dist_dir, app_name, args):
return True
+def update_license_file(app_name):
+ if app_name == "RustDesk":
+ return
+ license_file = Path(sys.argv[0]).parent.joinpath("Package/License.rtf")
+ with open(license_file, "r") as f:
+ license_content = f.read()
+ license_content = license_content.replace("website rustdesk.com and other ", "")
+ license_content = license_content.replace("RustDesk", app_name)
+ license_content = re.sub("Purslane Ltd", app_name, license_content, flags=re.IGNORECASE)
+ with open(license_file, "w") as f:
+ f.write(license_content)
+
+
def replace_component_guids_in_wxs():
langs_dir = Path(sys.argv[0]).parent.joinpath("Package")
for file_path in langs_dir.glob("**/*.wxs"):
@@ -466,6 +479,8 @@ if __name__ == "__main__":
if not init_global_vars(dist_dir, app_name, args):
sys.exit(-1)
+ update_license_file(app_name)
+
if not gen_pre_vars(args, dist_dir):
sys.exit(-1)