ソースを参照

下载链接-去除const属性,在获取版本号前获取下载链接

liyijie 1 年間 前
コミット
963f6d2d4f

BIN
PDFReaderPro_Installer/Bin/DuiLib.dll


BIN
PDFReaderPro_Installer/Bin/PDFReaderPro_Insrtaller.exe


+ 6 - 2
PDFReaderPro_Installer/PDFReaderPro_Insrtaller/KeyVar.cpp

@@ -1,11 +1,15 @@
 #include "KeyVar.h"
 
 #pragma region °²×°ÐÅÏ¢
+#ifdef Beta
+const wstring Product::URI_AppXml = L"http://test-pdf-pro.kdan.cn:3021/downloads/pdfreaderprocast_win_en_Us.xml";
+#else
 const wstring Product::URI_AppXml = L"https://www.pdfreaderpro.com/downloads/pdfreaderprocast_win_en_Us.xml";
+#endif 
 #ifdef Beta
-const wstring Product::URI_InstallPackge = L"http://test-pdf-pro.kdan.cn:3021/downloads/PDFReaderPro.exe";
+wstring Product::URI_InstallPackge = L"http://test-pdf-pro.kdan.cn:3021/downloads/PDFReaderPro.exe";
 #else
-const wstring Product::URI_InstallPackge = L"https://pdfreaderpro.oss-cn-shanghai.aliyuncs.com/downloads/PDFReaderPro.exe";
+wstring Product::URI_InstallPackge = L"https://pdfreaderpro.oss-cn-shanghai.aliyuncs.com/downloads/PDFReaderPro.exe";
 #endif 
 const wstring Product::smName_InstallPackage = L"PDFReaderPro.exe";
 const wstring Product::smName_Application = L"PDFReaderProWin.exe";

+ 1 - 1
PDFReaderPro_Installer/PDFReaderPro_Insrtaller/KeyVar.h

@@ -10,7 +10,7 @@ static class Product
 {
 public:
 	static const wstring URI_AppXml;//产品XML文件
-	static const wstring URI_InstallPackge;//安装包下载链接
+	static wstring URI_InstallPackge;//安装包下载链接
 
 	static const wstring smName_InstallPackage;//安装包名称
 	static const wstring smName_Application;//产品可运行的应用程序名称

+ 7 - 0
PDFReaderPro_Installer/PDFReaderPro_Insrtaller/OnlineProduct.cpp

@@ -65,6 +65,13 @@ const char* OnlineProduct::GetVersionFromXmlA()
 		return "";
 	}
 
+	const char* URI = enclosure->Attribute("url");
+	if (URI == NULL)
+	{
+		return "";
+	}
+	Product::URI_InstallPackge = std::wstring(URI, URI + strlen(URI));
+
 	const char* version = enclosure->Attribute("sparkle:version");
 	if (version == NULL)
 	{