diff --git a/.hgignore b/.hgignore
index fa201b8..6ee0216 100644
--- a/.hgignore
+++ b/.hgignore
@@ -17,3 +17,9 @@ Setup/*
*.bmp
*.xpm
*.htm*
+*.o
+*.ppu
+*.a
+*.compiled
+*.sh
+*.exe
diff --git a/Client/CentrED.lpi b/Client/CentrED.lpi
index 1f264fd..3a3484a 100644
--- a/Client/CentrED.lpi
+++ b/Client/CentrED.lpi
@@ -259,6 +259,7 @@
+
diff --git a/Client/UfrmAbout.lfm b/Client/UfrmAbout.lfm
index d798f59..cf2d044 100644
--- a/Client/UfrmAbout.lfm
+++ b/Client/UfrmAbout.lfm
@@ -1,23 +1,23 @@
object frmAbout: TfrmAbout
Left = 290
- Height = 307
+ Height = 308
Top = 171
- Width = 353
+ Width = 354
AutoSize = True
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'About CentrED'
- ClientHeight = 307
- ClientWidth = 353
+ ClientHeight = 308
+ ClientWidth = 354
Font.Height = -11
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.25'
object Label3: TLabel
Left = 8
- Height = 73
- Top = 198
- Width = 337
+ Height = 62
+ Top = 204
+ Width = 338
Align = alTop
BorderSpacing.Top = 16
BorderSpacing.Around = 8
@@ -28,9 +28,9 @@ object frmAbout: TfrmAbout
end
object Label5: TLabel
Left = 8
- Height = 13
- Top = 118
- Width = 337
+ Height = 14
+ Top = 120
+ Width = 338
Align = alTop
BorderSpacing.Left = 8
BorderSpacing.Right = 8
@@ -40,9 +40,9 @@ object frmAbout: TfrmAbout
end
object Label6: TLabel
Left = 16
- Height = 43
- Top = 131
- Width = 329
+ Height = 46
+ Top = 134
+ Width = 330
Align = alTop
BorderSpacing.Left = 16
BorderSpacing.Right = 8
@@ -52,9 +52,9 @@ object frmAbout: TfrmAbout
end
object Label7: TLabel
Left = 8
- Height = 13
- Top = 105
- Width = 337
+ Height = 14
+ Top = 106
+ Width = 338
Align = alTop
BorderSpacing.Left = 8
BorderSpacing.Right = 8
@@ -64,32 +64,31 @@ object frmAbout: TfrmAbout
WordWrap = True
end
object Panel2: TPanel
- Height = 97
- Width = 353
+ Height = 98
+ Width = 354
Align = alTop
AutoSize = True
BorderSpacing.Bottom = 8
- ClientHeight = 97
- ClientWidth = 353
+ BevelOuter = bvNone
+ ClientHeight = 98
+ ClientWidth = 354
ParentFont = True
TabOrder = 0
object Panel1: TPanel
- Left = 1
- Height = 96
- Top = 1
- Width = 219
+ Height = 98
+ Width = 220
AutoSize = True
BevelInner = bvRaised
BevelOuter = bvLowered
- ClientHeight = 96
- ClientWidth = 219
+ ClientHeight = 98
+ ClientWidth = 220
ParentFont = True
TabOrder = 0
object Label1: TLabel
Left = 2
Height = 38
Top = 2
- Width = 215
+ Width = 216
Align = alTop
Alignment = taCenter
AutoSize = False
@@ -101,9 +100,9 @@ object frmAbout: TfrmAbout
end
object lblVersion: TLabel
Left = 6
- Height = 24
+ Height = 25
Top = 40
- Width = 207
+ Width = 208
Align = alTop
Alignment = taRightJustify
BorderSpacing.Left = 4
@@ -113,9 +112,9 @@ object frmAbout: TfrmAbout
end
object lblCopyright: TLabel
Left = 6
- Height = 24
- Top = 68
- Width = 207
+ Height = 25
+ Top = 69
+ Width = 208
Align = alTop
Alignment = taCenter
BorderSpacing.Around = 4
@@ -127,22 +126,23 @@ object frmAbout: TfrmAbout
object Panel3: TPanel
Left = 8
Height = 25
- Top = 279
- Width = 337
+ Top = 274
+ Width = 338
Align = alTop
BorderSpacing.Around = 8
+ BevelOuter = bvNone
ClientHeight = 25
- ClientWidth = 337
+ ClientWidth = 338
ParentFont = True
TabOrder = 1
object btnClose: TButton
- Left = 261
- Height = 23
- Top = 1
+ Left = 263
+ Height = 25
Width = 75
Align = alRight
BorderSpacing.InnerBorder = 4
Caption = 'Close'
+ OnClick = btnCloseClick
ParentFont = True
TabOrder = 0
end
diff --git a/Server/cedserver.lpi b/Server/cedserver.lpi
index 8c1dfad..a3e50bd 100644
--- a/Server/cedserver.lpi
+++ b/Server/cedserver.lpi
@@ -112,12 +112,16 @@
+
+
+
+
+
-
diff --git a/Setup/CentrED_win32.iss b/Setup/CentrED_win32.iss
index 1aaf009..94950a3 100644
--- a/Setup/CentrED_win32.iss
+++ b/Setup/CentrED_win32.iss
@@ -3,7 +3,7 @@
[Setup]
AppName=CentrED
-AppVerName=CentrED 0.3.6
+AppVerName=CentrED 0.4.0
AppPublisher=AKS DataBasis
AppPublisherURL=http://www.aksdb.de/CentrED
AppSupportURL=http://www.aksdb.de/CentrED
@@ -13,10 +13,10 @@ DefaultGroupName=AKS DataBasis\CentrED
OutputBaseFilename=CentrED_win32
Compression=lzma
SolidCompression=true
-VersionInfoVersion=0.3.6
+VersionInfoVersion=0.4.0
VersionInfoCompany=AKS DataBasis
VersionInfoDescription=Client/Server based multiuser map editor
-VersionInfoTextVersion=0.3.6
+VersionInfoTextVersion=0.4.0
VersionInfoCopyright=Andreas Schneider
AppCopyright=Andreas Schneider
InfoBeforeFile=Changelog.txt
@@ -40,4 +40,4 @@ Name: {commondesktop}\CentrED; Filename: {app}\CentrED.exe; Tasks: desktopicon
[Run]
Filename: {app}\CentrED.exe; Description: {cm:LaunchProgram,CentrED}; Flags: nowait postinstall skipifsilent
[Messages]
-BeveledLabel=Copyright 2007 Andreas Schneider
+BeveledLabel=Copyright 2008 Andreas Schneider
diff --git a/Setup/Changelog.txt b/Setup/Changelog.txt
index 662709e..fa62f7b 100644
--- a/Setup/Changelog.txt
+++ b/Setup/Changelog.txt
@@ -1,5 +1,14 @@
Changelog:
-[C] = Client, [S] = Server
+[C] = Client, [S] = Server, [-] = Both/Unrelated
+
+Version 0.4.0
+=============
+[C] Added regional restrictions to accounts
+[C] Visualize these restrictions for users
+[C] Added better GTK2 compatibility to the Linux version
+[S] Changed config file to use XML
+[S] Bumped config file version to 3
+[-] Removed some memory leaks
Version 0.3.6
=============
diff --git a/Tools/cedserver_config_2_3/cedserver_config_2_3.lpr b/Tools/cedserver_config_2_3/cedserver_config_2_3.lpr
new file mode 100644
index 0000000..00aab56
--- /dev/null
+++ b/Tools/cedserver_config_2_3/cedserver_config_2_3.lpr
@@ -0,0 +1,114 @@
+program cedserver_config_2_3;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes, IniFiles, XMLWrite, dom;
+
+procedure WriteXMLString(AElement: TDOMElement; AName, AValue: string);
+var
+ child: TDOMElement;
+begin
+ child := AElement.OwnerDocument.CreateElement(AName);
+ AElement.AppendChild(child);
+ child.AppendChild(AElement.OwnerDocument.CreateTextNode(AValue));
+end;
+
+procedure WriteXMLAccount(AElement: TDOMElement; AAccountString: string);
+var
+ splitPos: Integer;
+ lastPos: TDOMElement;
+begin
+ //Account name
+ splitPos := Pos('=', AAccountString);
+ WriteXMLString(AElement, 'Name', Copy(AAccountString, 1, splitPos - 1));
+ Delete(AAccountString, 1, splitPos);
+
+ //Accesslevel
+ splitPos := Pos(':', AAccountString);
+ WriteXMLString(AElement, 'Accesslevel', Copy(AAccountString, 1, splitPos - 1));
+ Delete(AAccountString, 1, splitPos);
+
+ lastPos := AElement.OwnerDocument.CreateElement('LastPos');
+ lastPos.AttribStrings['x'] := '0';
+ lastPos.AttribStrings['y'] := '0';
+
+ //Passwordhash
+ splitPos := Pos(':', AAccountString);
+ if splitPos > 0 then
+ begin
+ WriteXMLString(AElement, 'PasswordHash', Copy(AAccountString, 1, splitPos - 1));
+ Delete(AAccountString, 1, splitPos);
+
+ //LastPos
+ splitPos := Pos(':', AAccountString);
+ if splitPos > 0 then
+ begin
+ lastPos.AttribStrings['x'] := Copy(AAccountString, 1, splitPos - 1);
+ lastPos.AttribStrings['y'] := Copy(AAccountString, splitPos + 1, Length(AAccountString));
+ end;
+ end else
+ WriteXMLString(AElement, 'PasswordHash', AAccountString);
+
+ AElement.AppendChild(lastPos);
+ AElement.AppendChild(AElement.OwnerDocument.CreateElement('Regions'));
+end;
+
+var
+ v2ini: TIniFile;
+ v3xml: TXMLDocument;
+ root, parent, child: TDOMElement;
+ i: Integer;
+ rawAccounts: TStringList;
+
+begin
+ writeln('Opening "cedserver.ini"');
+ v2ini := TIniFile.Create('cedserver.ini');
+
+ writeln('Preparing XML structure');
+ v3xml := TXMLDocument.Create;
+ root := v3xml.CreateElement('CEDConfig');
+ root.AttribStrings['Version'] := '3';
+ v3xml.AppendChild(root);
+
+ writeln('Transfering settings');
+
+ WriteXMLString(root, 'Port', v2ini.ReadString('Network', 'Port', '2597'));
+
+ parent := v3xml.CreateElement('Map');
+ root.AppendChild(parent);
+ WriteXMLString(parent, 'Map', v2ini.ReadString('Paths', 'map', 'map0.mul'));
+ WriteXMLString(parent, 'StaIdx', v2ini.ReadString('Paths', 'staidx', 'staidx0.mul'));
+ WriteXMLString(parent, 'Statics', v2ini.ReadString('Paths', 'statics', 'statics0.mul'));
+ WriteXMLString(parent, 'Width', v2ini.ReadString('Parameters', 'Width', '768'));
+ WriteXMLString(parent, 'Height', v2ini.ReadString('Parameters', 'Height', '512'));
+
+ WriteXmlString(root, 'Tiledata', v2ini.ReadString('Paths', 'tiledata', 'tiledata.mul'));
+ WriteXmlString(root, 'Radarcol', v2ini.ReadString('Paths', 'radarcol', 'radarcol.mul'));
+
+ writeln('Transfering accounts');
+
+ parent := v3xml.CreateElement('Accounts');
+ root.AppendChild(parent);
+ rawAccounts := TStringList.Create;
+ v2ini.ReadSectionRaw('Accounts', rawAccounts);
+ for i := 0 to rawAccounts.Count - 1 do
+ begin
+ child := v3xml.CreateElement('Account');
+ parent.AppendChild(child);
+ WriteXMLAccount(child, rawAccounts.Strings[i]);
+ end;
+ rawAccounts.Free;
+
+ root.AppendChild(v3xml.CreateElement('Regions'));
+
+ v2ini.Free;
+
+ writeln('Writing "cedserver.xml"');
+ WriteXMLFile(v3xml, 'cedserver.xml');
+ Writeln('Done.');
+end.
+
diff --git a/version.inc b/version.inc
index 7ead2ea..10b917d 100644
--- a/version.inc
+++ b/version.inc
@@ -1,5 +1,5 @@
const
- ProductVersion = '0.3.7';
+ ProductVersion = '0.4.0';
ProtocolVersion = 6;
- Revision = '41';
+ Revision = '64';
Copyright = '2008 Andreas Schneider';