@@ -99,6 +99,14 @@ std::vector<RemotePluginItem> PluginHost::GetCachedRemoteManifest() const {
9999 }
100100
101101 // Default built-in manifest fallback to ensure offline / initial launch availability
102+ #if defined(_M_ARM64) || defined(__aarch64__)
103+ const char * defaultPkgUrl = " https://justnullname.github.io/QuickView/plugins/sr_ncnn_vulkan_ARM64.zip" ;
104+ const char * defaultPkgFile = " sr_ncnn_vulkan_ARM64.zip" ;
105+ #else
106+ const char * defaultPkgUrl = " https://justnullname.github.io/QuickView/plugins/sr_ncnn_vulkan_AMD64.zip" ;
107+ const char * defaultPkgFile = " sr_ncnn_vulkan_AMD64.zip" ;
108+ #endif
109+
102110 std::vector<RemotePluginItem> defaultList;
103111 defaultList.push_back ({
104112 " com.quickview.sr.ncnn_vulkan" ,
@@ -107,8 +115,8 @@ std::vector<RemotePluginItem> PluginHost::GetCachedRemoteManifest() const {
107115 " QuickView Core Team" ,
108116 " SuperResolution" ,
109117 " High-Performance In-Process Vulkan Compute Neural Super-Resolution Engine (0-Copy, 0 Disk I/O)." ,
110- " https://justnullname.github.io/QuickView/plugins/sr_ncnn_vulkan.zip " ,
111- " sr_ncnn_vulkan.zip " ,
118+ defaultPkgUrl ,
119+ defaultPkgFile ,
112120 2600000 ,
113121 " 0.1.0" ,
114122 " "
@@ -1261,20 +1269,13 @@ bool PluginHost::DownloadPlugin(const std::wstring& pluginName, const std::strin
12611269
12621270 if (ok) {
12631271 std::lock_guard<std::recursive_mutex> lock (m_srMutex);
1264- if (isZip) {
1265- std::wstring baseName = pluginName;
1266- if (baseName.ends_with (L" .zip" )) baseName = baseName.substr (0 , baseName.size () - 4 );
1267- std::wstring isolatedRel = L" plugins\\ sr\\ " + baseName + L" \\ " + baseName + L" .qvx" ;
1268- std::wstring legacyRel = L" plugins\\ " + baseName + L" .qvx" ;
1269- wchar_t combined[MAX_PATH ];
1270- PathCombineW (combined, exePath, isolatedRel.c_str ());
1271- if (GetFileAttributesW (combined) != INVALID_FILE_ATTRIBUTES ) {
1272- m_srPluginPath = isolatedRel;
1273- } else {
1274- m_srPluginPath = legacyRel;
1275- }
1272+ m_srPluginPath.clear ();
1273+ std::wstring relForIni;
1274+ std::wstring effective = ResolveEffectiveSrPluginPath (&relForIni);
1275+ if (!effective.empty ()) {
1276+ m_srPluginPath = relForIni;
12761277 } else {
1277- m_srPluginPath = L" plugins\\ " + pluginName ;
1278+ m_srPluginPath = L" plugins\\ sr \\ sr_ncnn_vulkan \\ sr_ncnn_vulkan.qvx " ;
12781279 }
12791280 UnloadSrPlugin ();
12801281 EnsureSrModuleLoaded ();
@@ -1511,10 +1512,25 @@ void PluginHost::FetchRemoteManifestAsync(ManifestCallback callback, void* userD
15111512 if (v && yyjson_get_str (v)) r.interfaceName = yyjson_get_str (v);
15121513 v = yyjson_obj_get (item, " description" );
15131514 if (v && yyjson_get_str (v)) r.description = yyjson_get_str (v);
1514- v = yyjson_obj_get (item, " download_url" );
1515+ // Architecture-aware URL and file name selection
1516+ #if defined(_M_ARM64) || defined(__aarch64__)
1517+ v = yyjson_obj_get (item, " download_url_arm64" );
1518+ if (!v || !yyjson_get_str (v)) v = yyjson_obj_get (item, " download_url" );
15151519 if (v && yyjson_get_str (v)) r.downloadUrl = yyjson_get_str (v);
1516- v = yyjson_obj_get (item, " file_name" );
1520+
1521+ v = yyjson_obj_get (item, " file_name_arm64" );
1522+ if (!v || !yyjson_get_str (v)) v = yyjson_obj_get (item, " file_name" );
15171523 if (v && yyjson_get_str (v)) r.fileName = yyjson_get_str (v);
1524+ #else
1525+ v = yyjson_obj_get (item, " download_url_amd64" );
1526+ if (!v || !yyjson_get_str (v)) v = yyjson_obj_get (item, " download_url_x64" );
1527+ if (!v || !yyjson_get_str (v)) v = yyjson_obj_get (item, " download_url" );
1528+ if (v && yyjson_get_str (v)) r.downloadUrl = yyjson_get_str (v);
1529+
1530+ v = yyjson_obj_get (item, " file_name_amd64" );
1531+ if (!v || !yyjson_get_str (v)) v = yyjson_obj_get (item, " file_name" );
1532+ if (v && yyjson_get_str (v)) r.fileName = yyjson_get_str (v);
1533+ #endif
15181534 v = yyjson_obj_get (item, " file_size" );
15191535 if (v) r.fileSize = yyjson_get_uint (v);
15201536 v = yyjson_obj_get (item, " min_app_version" );
0 commit comments