Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit bbd1b35

Browse files
authored
Merge branch 'master' into master
2 parents b3fbb95 + bc49314 commit bbd1b35

File tree

79 files changed

+3994
-3093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3994
-3093
lines changed

Deploy/SPCode.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ File Microsoft.WindowsAPICodePack.Shell.dll
5656
File lang_0_spcode.xml
5757
File GPLv3.txt
5858

59+
CreateDirectory "$APPDATA\spcode\crashlogs"
5960
CreateDirectory "$APPDATA\spcode\sourcepawn"
6061
CreateDirectory "$APPDATA\spcode\sourcepawn\errorfiles"
61-
CreateDirectory "$APPDATA\spcode\sourcepawn\scripts"
6262
CreateDirectory "$APPDATA\spcode\sourcepawn\temp"
6363
CreateDirectory "$APPDATA\spcode\sourcepawn\templates"
6464
CreateDirectory "$APPDATA\spcode\sourcepawn\configs"

Deploy/SpcodeUpdater/Program.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public static void Main()
1818
{
1919
var processes = Process.GetProcessesByName("Spcode");
2020
foreach (var process in processes)
21+
{
2122
try
2223
{
2324
process.WaitForExit();
@@ -26,7 +27,7 @@ public static void Main()
2627
{
2728
// ignored
2829
}
29-
30+
}
3031

3132
Application.EnableVisualStyles();
3233
Thread.Sleep(2000);
@@ -54,7 +55,10 @@ private static void Worker(object arg)
5455
{
5556
// Dont override the sourcemod files
5657
var files = archive.Entries.Where(e => !e.FullName.StartsWith(@"sourcepawn\"));
57-
foreach (var file in files) file.ExtractToFile(file.FullName, true);
58+
foreach (var file in files)
59+
{
60+
file.ExtractToFile(file.FullName, true);
61+
}
5862
}
5963

6064
zipInfo.Delete();

Deploy/SpcodeUpdater/UpdateMarquee.Designer.cs

Lines changed: 61 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Deploy/SpcodeUpdater/UpdateMarquee.resx

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,10 @@
123123
</data>
124124
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
125125
<data name="progressBar1.Location" type="System.Drawing.Point, System.Drawing">
126-
<value>76, 34</value>
127-
</data>
128-
<data name="progressBar1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
129-
<value>4, 5, 4, 5</value>
126+
<value>51, 23</value>
130127
</data>
131128
<data name="progressBar1.Size" type="System.Drawing.Size, System.Drawing">
132-
<value>242, 35</value>
129+
<value>161, 23</value>
133130
</data>
134131
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
135132
<data name="progressBar1.TabIndex" type="System.Int32, mscorlib">
@@ -154,13 +151,10 @@
154151
<value>NoControl</value>
155152
</data>
156153
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
157-
<value>76, 0</value>
158-
</data>
159-
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
160-
<value>4, 0, 4, 0</value>
154+
<value>51, 4</value>
161155
</data>
162156
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
163-
<value>115, 20</value>
157+
<value>84, 13</value>
164158
</data>
165159
<data name="label1.TabIndex" type="System.Int32, mscorlib">
166160
<value>2</value>
@@ -184,13 +178,10 @@
184178
<value>NoControl</value>
185179
</data>
186180
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
187-
<value>0, 0</value>
188-
</data>
189-
<data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
190-
<value>4, 5, 4, 5</value>
181+
<value>3, 4</value>
191182
</data>
192183
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
193-
<value>68, 69</value>
184+
<value>45, 45</value>
194185
</data>
195186
<data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
196187
<value>StretchImage</value>
@@ -211,13 +202,10 @@
211202
<value>3</value>
212203
</data>
213204
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
214-
<value>327, 34</value>
215-
</data>
216-
<data name="button1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
217-
<value>4, 5, 4, 5</value>
205+
<value>218, 23</value>
218206
</data>
219207
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
220-
<value>112, 35</value>
208+
<value>75, 23</value>
221209
</data>
222210
<data name="button1.TabIndex" type="System.Int32, mscorlib">
223211
<value>3</value>
@@ -244,10 +232,10 @@
244232
<value>True</value>
245233
</metadata>
246234
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
247-
<value>9, 20</value>
235+
<value>6, 13</value>
248236
</data>
249237
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
250-
<value>450, 69</value>
238+
<value>300, 54</value>
251239
</data>
252240
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
253241
<value>
@@ -1956,9 +1944,6 @@
19561944
AACAPwAAgD8AAP//AAA=
19571945
</value>
19581946
</data>
1959-
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
1960-
<value>4, 5, 4, 5</value>
1961-
</data>
19621947
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
19631948
<value>CenterScreen</value>
19641949
</data>

Interop/ConfigControl.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static Config[] Load()
6464
// (calculate it based on installation being standalone or portable)
6565
if (IsStandardConfig && string.IsNullOrEmpty(_SMDirectoryStr))
6666
{
67-
SMDirs.Add(Paths.GetConfigsFolderPath());
67+
SMDirs.Add(Paths.GetConfigsDirectory());
6868
}
6969

7070
foreach (var dir in SMDirectoriesSplitted)
@@ -79,7 +79,7 @@ public static Config[] Load()
7979
// Extra assurance for the program to always load a proper config
8080
if (IsStandardConfig && SMDirs.Count == 0)
8181
{
82-
SMDirs.Add(Paths.GetConfigsFolderPath());
82+
SMDirs.Add(Paths.GetConfigsDirectory());
8383
}
8484

8585
int _OptimizationLevel = 2, _VerboseLevel = 1;
@@ -106,7 +106,7 @@ public static Config[] Load()
106106
var _FTPPW = ManagedAES.Decrypt(encryptedFTPPW);
107107
var _FTPDir = ReadAttributeStringSafe(ref node, "FTPDir");
108108
var _RConEngineSourceStr = ReadAttributeStringSafe(ref node, "RConSourceEngine", "1");
109-
bool _RConEngineTypeSource = !(_RConEngineSourceStr == "0" || string.IsNullOrWhiteSpace(_RConEngineSourceStr));
109+
var _RConEngineTypeSource = !(_RConEngineSourceStr == "0" || string.IsNullOrWhiteSpace(_RConEngineSourceStr));
110110
var _RConIP = ReadAttributeStringSafe(ref node, "RConIP", "127.0.0.1");
111111
var _RConPortStr = ReadAttributeStringSafe(ref node, "RConPort", "27015");
112112

@@ -177,8 +177,13 @@ public static Config[] Load()
177177
private static string ReadAttributeStringSafe(ref XmlNode node, string attributeName, string defaultValue = "")
178178
{
179179
for (var i = 0; i < node.Attributes.Count; ++i)
180+
{
180181
if (node.Attributes[i].Name == attributeName)
182+
{
181183
return node.Attributes[i].Value;
184+
}
185+
}
186+
182187
return defaultValue;
183188
}
184189
}
@@ -225,7 +230,11 @@ public string
225230

226231
public SMDefinition GetSMDef()
227232
{
228-
if (SMDef == null) LoadSMDef();
233+
if (SMDef == null)
234+
{
235+
LoadSMDef();
236+
}
237+
229238
return SMDef;
230239
}
231240

@@ -236,7 +245,11 @@ public void InvalidateSMDef()
236245

237246
public void LoadSMDef()
238247
{
239-
if (SMDef != null) return;
248+
if (SMDef != null)
249+
{
250+
return;
251+
}
252+
240253
try
241254
{
242255
var def = new SMDefinition();

0 commit comments

Comments
 (0)