Advertisement
Guest User

Imagine! Updater Mono Diff

a guest
Mar 2nd, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 9.40 KB | None | 0 0
  1. diff -r Imagine! Updater/Imagine Magic Patcher/configurations.cs Imagine! Updater Mono/Imagine Magic Patcher/configurations.cs
  2. 29c29
  3. <         public static string patchPath = "http://yourDomain.FreeHosterName.com/";
  4. ---
  5. >         public static string patchPath = "http://localhost/update/";
  6. 32c32,33
  7. <         public static string savePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\bin";
  8. ---
  9. >         // Use Path.DirectorySeparatorChar instead of \ for directory paths or it will not work on Mac or Linux
  10. >         public static string savePath = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + "bin";
  11. 35c36
  12. <         public static string ExecutableName = "ProgramName.exe";
  13. ---
  14. >         public static string ExecutableName = "test.exe";
  15. 44c45
  16. <         public static string xmlRootName = "ProgramNameWithoutSpaces";
  17. ---
  18. >         public static string xmlRootName = "Test";
  19. diff -r Imagine! Updater/Imagine Magic Patcher/Form1.cs Imagine! Updater Mono/Imagine Magic Patcher/Form1.cs
  20. 88,95c88
  21. <             if (this.contentsTextBox.InvokeRequired)
  22. <             {
  23. <                 updateContentsText d = new updateContentsText(notify);
  24. <                 this.Invoke(d, new object[] { notification });
  25. <             }
  26. <             else
  27. <             {
  28. <                 if (notifications[notifications.Length - 1] != null)
  29. ---
  30. >             if (notifications[notifications.Length - 1] != null)
  31. 111,112c104,106
  32. <                     contentsTextBox.Lines = notifications;
  33. <             }
  34. ---
  35. >               {
  36. >                   contentsTextBox.Text = string.Join("\n", notifications);
  37. >               }
  38. 120,128c114
  39. <             if (this.contentsTextBox.InvokeRequired)
  40. <             {
  41. <                 patchButtonDel d = new patchButtonDel(patchButtonEnabled);
  42. <                 this.Invoke(d, new object[] { boolean });
  43. <             }
  44. <             else
  45. <             {
  46. <                 patchButton.Enabled = boolean;
  47. <             }
  48. ---
  49. >             patchButton.Enabled = boolean;
  50. 136,144c122
  51. <             if (this.contentsTextBox.InvokeRequired)
  52. <             {
  53. <                 playButtonDel d = new playButtonDel(playButtonEnabled);
  54. <                 this.Invoke(d, new object[] { boolean });
  55. <             }
  56. <             else
  57. <             {
  58. <                 playButton.Enabled = boolean;
  59. <             }
  60. ---
  61. >             playButton.Enabled = boolean;
  62. 152,161c130,131
  63. <             if (this.patchlognotesButton.InvokeRequired)
  64. <             {
  65. <                 patchlognotesButtonDel d = new patchlognotesButtonDel(patchlognotesButtonVisible);
  66. <                 this.Invoke(d, new object[] { boolean });
  67. <             }
  68. <             else
  69. <             {
  70. <                 patchlognotesButton.Visible = boolean;
  71. <                 resize();
  72. <             }
  73. ---
  74. >             patchlognotesButton.Visible = boolean;
  75. >             resize();
  76. 169c139
  77. <             if (this.patchlognotesButton.InvokeRequired)
  78. ---
  79. >             if (patchlognotesButton.Text == "Patchnotes")
  80. 171,172c141,142
  81. <                 patchlognotesButtonSwitchDel d = new patchlognotesButtonSwitchDel(patchlognotesButtonSwitch);
  82. <                 this.Invoke(d, new object[] { });
  83. ---
  84. >                 patchlognotesButton.Text = "Patchlog";
  85. >                 contentsTextBox.Text = patchnotes;
  86. 176,185c146,147
  87. <                 if (patchlognotesButton.Text == "Patchnotes")
  88. <                 {
  89. <                     patchlognotesButton.Text = "Patchlog";
  90. <                     contentsTextBox.Text = patchnotes;
  91. <                 }
  92. <                 else
  93. <                 {
  94. <                     patchlognotesButton.Text = "Patchnotes";
  95. <                     contentsTextBox.Lines = notifications;
  96. <                 }
  97. ---
  98. >                 patchlognotesButton.Text = "Patchnotes";
  99. >                 contentsTextBox.Lines = notifications;
  100. 190,198c152
  101. <             if (this.progressBar.InvokeRequired)
  102. <             {
  103. <                 updateProgressBarDel d = new updateProgressBarDel(updateProgressBar);
  104. <                 this.Invoke(d, new object[] {});
  105. <             }
  106. <             else
  107. <             {
  108. <                 progressBar.Value = (alreadyProcessedFiles * 1000) / numberOfFiles;
  109. <             }
  110. ---
  111. >             progressBar.Value = (alreadyProcessedFiles * 1000) / numberOfFiles;
  112. 247c201
  113. <             if (File.Exists(savePath + "\\" + ExecutableName))
  114. ---
  115. >             if (File.Exists(savePath + Path.DirectorySeparatorChar + ExecutableName))
  116. 298,302c252
  117. <                 }
  118. <                 else
  119. <                 {
  120. <                     patch();
  121. <                 }
  122. ---
  123. >               }
  124. 325c275
  125. <             downloadFile(uriTextBox.Text.Substring(0, uriTextBox.Text.Length - parts[parts.Length-1].Length), parts[parts.Length-1], Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\");
  126. ---
  127. >             downloadFile(uriTextBox.Text.Substring(0, uriTextBox.Text.Length - parts[parts.Length-1].Length), parts[parts.Length-1], Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + Path.DirectorySeparatorChar);
  128. 378,381c328,331
  129. <             if (File.Exists(desktopPath + "\\register.xml")) //"C:\Users\Felix Ernst\Desktop\register.xml"))
  130. <                 File.Delete(desktopPath + "\\register.xml");
  131. <             doc.Save(desktopPath + "\\register.xml");
  132. <             notify("Created " + desktopPath + "\\register.xml");
  133. ---
  134. >             if (File.Exists(desktopPath + Path.DirectorySeparatorChar +"register.xml")) //"C:\Users\Felix Ernst\Desktop\register.xml"))
  135. >                 File.Delete(desktopPath + Path.DirectorySeparatorChar +"register.xml");
  136. >             doc.Save(desktopPath + Path.DirectorySeparatorChar +"register.xml");
  137. >             notify("Created " + desktopPath + Path.DirectorySeparatorChar +"register.xml");
  138. 526c476
  139. <                         if (File.Exists(savePath + "\\" + savedFile.Attributes.Item(0).Value))
  140. ---
  141. >                         if (File.Exists(savePath + Path.DirectorySeparatorChar + savedFile.Attributes.Item(0).Value))
  142. 529c479
  143. <                             File.Delete(savePath + "\\" + savedFile.Attributes.GetNamedItem("name").InnerXml);
  144. ---
  145. >                             File.Delete(savePath + Path.DirectorySeparatorChar + savedFile.Attributes.GetNamedItem("name").InnerXml);
  146. 549c499
  147. <                     downloadFile(patchPath, patchFile.Attributes.Item(0).Value.Replace("+", " "), savePath + "\\");
  148. ---
  149. >                     downloadFile(patchPath, patchFile.Attributes.Item(0).Value.Replace("+", " "), savePath + Path.DirectorySeparatorChar);
  150. 563c513
  151. <                         if (Directory.Exists(savePath + "\\" + savedFolder.Attributes.Item(0).Value))
  152. ---
  153. >                         if (Directory.Exists(savePath + Path.DirectorySeparatorChar + savedFolder.Attributes.Item(0).Value))
  154. 566c516
  155. <                             Directory.Delete(savePath + "\\" + savedFolder.Attributes.Item(0).Value, true);
  156. ---
  157. >                             Directory.Delete(savePath + Path.DirectorySeparatorChar + savedFolder.Attributes.Item(0).Value, true);
  158. 581,582c531
  159. <                     Directory.CreateDirectory(savePath + "\\" + patchFolder.Attributes.Item(0).Value);
  160. <                 string PathTest = savePath + patchFolder.Attributes.Item(0).Value;
  161. ---
  162. >                     Directory.CreateDirectory(savePath + Path.DirectorySeparatorChar + patchFolder.Attributes.Item(0).Value);
  163. 584c533
  164. <                     patchPath + patchFolder.Attributes.Item(0).Value + "/", savePath + "\\" + patchFolder.Attributes.Item(0).Value);
  165. ---
  166. >                     patchPath + patchFolder.Attributes.Item(0).Value + "/", savePath + Path.DirectorySeparatorChar + patchFolder.Attributes.Item(0).Value);
  167. 598c547
  168. <                 System.Diagnostics.Process.Start(savePath + "\\" + ExecutableName);
  169. ---
  170. >                 System.Diagnostics.Process.Start(savePath + Path.DirectorySeparatorChar + ExecutableName);
  171. diff -r Imagine! Updater/Imagine Magic Patcher/Form1.Designer.cs Imagine! Updater Mono/Imagine Magic Patcher/Form1.Designer.cs
  172. 31d30
  173. <             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
  174. 154d152
  175. <             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  176. Only in Imagine! Updater Mono/Imagine Magic Patcher: Form1.resources
  177. diff -r Imagine! Updater/Imagine Magic Patcher/Imagine! Updater.csproj Imagine! Updater Mono/Imagine Magic Patcher/Imagine! Updater.csproj
  178. 13,14d12
  179. <     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  180. <     <TargetFrameworkProfile>Client</TargetFrameworkProfile>
  181. 65,66d62
  182. <     <Reference Include="System" />
  183. <     <Reference Include="System.Core" />
  184. 69d64
  185. <     <Reference Include="System.Data.DataSetExtensions" />
  186. 71,72d65
  187. <     <Reference Include="System.Data" />
  188. <     <Reference Include="System.Deployment" />
  189. 75a69,72
  190. >     <Reference Include="System" />
  191. >     <Reference Include="System.Core" />
  192. >     <Reference Include="System.Data" />
  193. >     <Reference Include="System.Data.DataSetExtensions" />
  194. Only in Imagine! Updater Mono/Imagine Magic Patcher/Properties: Resources.resources
  195. diff -r Imagine! Updater/Imagine! Updater.userprefs Imagine! Updater Mono/Imagine! Updater.userprefs
  196. 6c6
  197. <       <File FileName="Imagine Magic Patcher/Form1.cs" Line="431" Column="53" />
  198. ---
  199. >       <File FileName="Imagine Magic Patcher/Form1.cs" Line="283" Column="94" />
  200. 8a9
  201. >       <File FileName="Disassembly" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement