개정판 3276cb1c
issue #00000 autoupdate 수정
Change-Id: Ib2423c882331bb465f05e21273e6b8242221fc27
MarkusAutoUpdate/src/NetSparkle.Samples.NetFramework.WPF/MARKUS.ini | ||
---|---|---|
1 |
#DIG Project DEBUG |
|
2 |
|
|
3 | 1 |
[Internal] |
4 |
IP=192.168.0.67:8977
|
|
2 |
IP=localhost
|
|
5 | 3 |
[External] |
6 |
IP=192.168.0.67:8977
|
|
4 |
IP=125.129.196.207
|
|
7 | 5 |
[BaseClientAddress] |
8 |
URL=http://192.168.0.67:8977
|
|
6 |
URL=http://localhost:8080
|
|
9 | 7 |
[HubAddress] |
10 |
URL=http://192.168.0.67:8977/
|
|
8 |
URL=http://192.168.0.67:5100/
|
|
11 | 9 |
[UpdateVer64] |
12 |
URL=http://192.168.0.67:8977/TileSource/Version/version_x64.xml
|
|
10 |
URL=http://192.168.0.67:5977/TileSource/Version/version_x64.xml
|
|
13 | 11 |
[UpdateVer86] |
14 |
URL=http://192.168.0.67:8977/TileSource/Version/version_x86.xml
|
|
12 |
URL=http://192.168.0.67:5977/TileSource/Version/version_x86.xml
|
|
15 | 13 |
[excelFilePath] |
16 |
URL=http://192.168.0.67:8977/TileSource/Check_Test/CheckList_T.xlsx
|
|
14 |
URL=http://192.168.0.67:5977/TileSource/Check_Test/CheckList_T.xlsx
|
|
17 | 15 |
[KCOM_Get_FinalImage_Get_PdfImage] |
18 |
URL=http://192.168.0.67:8977/Get_FInalImage/Get_PdfImage.asmx
|
|
16 |
URL=http://192.168.0.67:5977/Get_FInalImage/Get_PdfImage.asmx
|
|
19 | 17 |
[KCOM_kr_co_devdoftech_cloud_FileUpload] |
20 |
URL=http://192.168.0.67:8977/ImageUpload/FileUpload.asmx
|
|
18 |
URL=http://192.168.0.67:5977/ImageUpload/FileUpload.asmx
|
|
21 | 19 |
[mainServerImageWebPath] |
22 |
URL=http://192.168.0.67:8977/TileSource/{0}_Tile/{1}/{2}/{3}.png
|
|
20 |
URL=http://192.168.0.67:5977/TileSource/{0}_Tile/{1}/{2}/{3}.png
|
|
23 | 21 |
[subServerImageWebPath] |
24 |
URL=http://192.168.0.67:8977/TileSource/{0}_Tile/{1}/{2}/{3}.png
|
|
22 |
URL=http://192.168.0.67:5977/TileSource/{0}_Tile/{1}/{2}/{3}.png
|
|
25 | 23 |
[Debug_BaseClientAddress] |
26 |
URL=http://192.168.0.67:8977
|
|
24 |
URL=http://192.168.0.67:5979
|
|
27 | 25 |
[HOST_DOMAIN] |
28 | 26 |
DOMAIN= |
29 | 27 |
[GetConversionStateFailed] |
... | ... | |
38 | 36 |
NAME=DAELIM |
39 | 37 |
[PortForwarding] |
40 | 38 |
HUB=5100:5100 |
41 |
RESOURCE=8977:8977
|
|
39 |
RESOURCE=5977:5977
|
|
42 | 40 |
BASE=5979:5979 |
43 | 41 |
[GetImageResourceFailed] |
44 | 42 |
MSG=7ZW064u5IOusuOyEnOydmCB7MH0gUGFnZSBDb252ZXJ06rCAIOygleyDgeyggeydtOyngCDslYrsirXri4jri6QuIOq0gOumrOyekOyXkOqyjCDrrLjsnZjtlbQg7KO87IS47JqULg== |
43 |
|
|
44 |
|
|
45 |
[COMMON] |
|
46 |
IsDocumentHistory = true |
MarkusAutoUpdate/src/NetSparkle.Samples.NetFramework.WPF/Markus.AppUpdate.ini | ||
---|---|---|
1 |
#DIG Project DEBUG
|
|
1 |
#debug APP_CAST Address
|
|
2 | 2 |
|
3 |
[HOST_DOMAIN] |
|
4 |
DOMAIN= |
|
5 | 3 |
|
6 | 4 |
[APP_CAST] |
7 |
URI = http://192.168.0.67:8977/MarkusUpdate/appcast.xml
|
|
5 |
URI = http://localhost:44311/MarkusUpdate/appcast.xml
|
|
8 | 6 |
|
9 |
[VERSION] |
|
10 |
VERSION=1.0.0 |
|
7 |
|
|
8 |
#daelim APP_CAST address |
|
9 |
#[HOST_DOMAIN] |
|
10 |
#DOMAIN=DAELIM.COM |
|
11 |
|
|
12 |
#[APP_CAST] |
|
13 |
#URI = http://172.20.120.141:5977/MarkusUpdate/appcast.xml |
|
14 |
#EXTERNAL_URI = 203.226.6.165:5977 |
MarkusAutoUpdate/src/NetSparkle.Tests/UtilitiesTests.cs | ||
---|---|---|
1 |
using System; |
|
1 |
using NetSparkleUpdater.AssemblyAccessors; |
|
2 |
using System; |
|
2 | 3 |
using Xunit; |
3 | 4 |
|
4 | 5 |
namespace NetSparkleUnitTests |
... | ... | |
40 | 41 |
abosluteURL = NetSparkleUpdater.Utilities.GetAbsoluteURL("./program.exe", "https://example.com/subfolder/appcast.xml"); |
41 | 42 |
Assert.Equal("https://example.com/subfolder/program.exe", abosluteURL.ToString()); |
42 | 43 |
} |
44 |
|
|
45 |
[Fact] |
|
46 |
public void AssemblyReflectionAccessorTest() |
|
47 |
{ |
|
48 |
//AssemblyReflectionAccessor assemblyReflectionAccessor = new AssemblyReflectionAccessor(@"D:\Source\Repos\MARKUS\publish\AppCast_DIG\5.4.1.0\Markus_5.4.1.0\KCOM.exe"); |
|
49 |
AssemblyReflectionAccessor assemblyReflectionAccessor = new AssemblyReflectionAccessor(@"C:\Program Files\Doftech\Markus\KCOM.exe"); |
|
50 |
} |
|
51 |
|
|
43 | 52 |
} |
44 | 53 |
} |
MarkusAutoUpdate/src/NetSparkle/AssemblyAccessors/AssemblyReflectionAccessor.cs | ||
---|---|---|
16 | 16 |
{ |
17 | 17 |
private Assembly _assembly; |
18 | 18 |
private List<Attribute> _assemblyAttributes = new List<Attribute>(); |
19 |
|
|
20 |
/// <summary> |
|
21 |
/// |
|
22 |
/// </summary> |
|
23 |
/// <param name="assemblyPath"></param> |
|
24 |
public Assembly LoadAllDependencies(string assemblyPath) |
|
25 |
{ |
|
26 |
Assembly mainAssembly = Assembly.ReflectionOnlyLoadFrom(assemblyPath); |
|
27 |
|
|
28 |
IList<CustomAttributeData> attributes = null; |
|
29 |
|
|
30 |
try |
|
31 |
{ |
|
32 |
attributes = mainAssembly.GetCustomAttributesData(); |
|
33 |
} |
|
34 |
catch (Exception) |
|
35 |
{ |
|
36 |
|
|
37 |
} |
|
38 |
|
|
39 |
if(attributes == null) |
|
40 |
{ |
|
41 |
// ???? ????????? ??? ???? ???? ????????. |
|
42 |
string mainAssemblyFolder = Path.GetDirectoryName(assemblyPath); |
|
43 |
|
|
44 |
|
|
45 |
// ?????? ????????? ????????. |
|
46 |
AssemblyName[] referencedAssemblies = mainAssembly.GetReferencedAssemblies(); |
|
47 |
|
|
48 |
foreach (AssemblyName assemblyName in referencedAssemblies) |
|
49 |
{ |
|
50 |
string assemblyFileName = assemblyName.Name + ".dll"; // ??????? ???? ??? ???????? |
|
51 |
string assemblyPathInFolder = Path.Combine(mainAssemblyFolder, assemblyFileName); |
|
52 |
try |
|
53 |
{ |
|
54 |
if (File.Exists(assemblyPathInFolder)) |
|
55 |
{ |
|
56 |
// ?????? ??????? ?????? ?????? ??????? ???????. |
|
57 |
Assembly.ReflectionOnlyLoadFrom(assemblyPathInFolder); |
|
58 |
//LoadAllDependencies(assemblyPathInFolder); // ????????? ????? ??? |
|
59 |
} |
|
60 |
else |
|
61 |
{ |
|
62 |
// ?????? ??????? ?????? ?????? ?????? GAC???? ???????. |
|
63 |
Assembly.ReflectionOnlyLoad(assemblyName.FullName); |
|
64 |
} |
|
65 |
} |
|
66 |
catch (Exception ex) |
|
67 |
{ |
|
68 |
System.Diagnostics.Debug.WriteLine(ex); |
|
69 |
} |
|
70 |
} |
|
71 |
return mainAssembly; |
|
72 |
// ???? ???? ????????? ???????. |
|
73 |
//return Assembly.LoadFrom(assemblyPath); |
|
74 |
} |
|
75 |
else |
|
76 |
{ |
|
77 |
return mainAssembly; |
|
78 |
} |
|
19 | 79 |
|
80 |
} |
|
20 | 81 |
/// <summary> |
21 | 82 |
/// Constructor |
22 | 83 |
/// </summary> |
... | ... | |
39 | 100 |
|
40 | 101 |
try |
41 | 102 |
{ |
42 |
_assembly = Assembly.ReflectionOnlyLoad(bytes); |
|
103 |
_assembly = LoadAllDependencies(absolutePath); |
|
104 |
//_assembly = Assembly.ReflectionOnlyLoad(bytes); |
|
43 | 105 |
//_assembly = Assembly.LoadFrom(absolutePath); |
44 | 106 |
_assembly.GetCustomAttributesData(); |
45 | 107 |
} |
46 | 108 |
catch (Exception) |
47 | 109 |
{ |
48 |
_assembly = Assembly.Load(bytes); |
|
49 | 110 |
} |
50 | 111 |
|
51 | 112 |
if (_assembly == null) |
52 | 113 |
{ |
53 |
throw new ArgumentNullException("Unable to load assembly " + absolutePath); |
|
114 |
try |
|
115 |
{ |
|
116 |
_assembly = Assembly.Load(bytes); |
|
117 |
} |
|
118 |
catch (Exception) |
|
119 |
{ |
|
120 |
throw new ArgumentNullException("Unable to load assembly " + absolutePath); |
|
121 |
} |
|
54 | 122 |
} |
123 |
|
|
55 | 124 |
} |
56 | 125 |
|
57 | 126 |
_AssemblyVersion = _assembly.GetName().Version.ToString(); |
내보내기 Unified diff