- Timestamp:
- Apr 21, 2018, 11:40:27 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 49 added
- 6 deleted
- 7 edited
- 20 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/AI
- Property svn:ignore deleted
-
trunk/GameServer.pas
r120 r124 185 185 Key: string; 186 186 Value: string; 187 BasePath: string; 188 AIFileName: string; 187 189 begin 188 190 Notify := NotifyFunction; … … 205 207 nBrain := bixFirstAI; 206 208 bixBeginner := bixFirstAI; 207 if FindFirst(HomeDir + 'AI' + DirectorySeparator + '*.ai.txt', $21, f) = 0 then 208 repeat 209 with Brain[nBrain] do 210 begin 211 FileName := Copy(f.Name, 1, Length(f.Name) - 7); 212 DLLName := HomeDir + 'AI' + DirectorySeparator + FileName; 213 Name := Copy(f.Name, 1, Length(f.Name) - 7); 209 if FindFirst(HomeDir + 'AI' + DirectorySeparator + '*', faDirectory or faArchive or faReadOnly, f) = 0 then 210 repeat 211 if (f.Name <> '.') and (f.Name <> '..') then begin 212 with Brain[nBrain] do begin 213 BasePath := HomeDir + 'AI' + DirectorySeparator + f.Name; 214 FileName := f.Name; 215 DLLName := BasePath + DirectorySeparator + FileName + '.dll'; 216 AIFileName := BasePath + DirectorySeparator + f.Name + '.ai.txt'; 217 Name := f.Name; 214 218 Credits := ''; 215 219 Flags := fMultiple; … … 217 221 Initialized := false; 218 222 ServerVersion := 0; 219 AssignFile(T, HomeDir + 'AI' + DirectorySeparator + f.Name); 223 if not FileExists(AIFileName) then 224 raise Exception.Create(Format('AI specification file %s not found', [AIFileName])); 225 AssignFile(T, AIFileName); 220 226 Reset(T); 221 227 while not EOF(T) do … … 237 243 bixBeginner := nBrain 238 244 else if Key = '#PATH' then 239 DLLName := HomeDir + 'AI'+ DirectorySeparator + Value245 DLLName := BasePath + DirectorySeparator + Value 240 246 {$IFDEF WINDOWS}{$IFDEF CPU32} 241 247 else if Key = '#PATH_WIN32' then 242 DLLName := HomeDir + 'AI'+ DirectorySeparator + Value248 DLLName := BasePath + DirectorySeparator + Value 243 249 {$ENDIF}{$ENDIF} 244 250 {$IFDEF WINDOWS}{$IFDEF CPU64} 245 251 else if Key = '#PATH_WIN64' then 246 DLLName := HomeDir + 'AI'+ DirectorySeparator + Value252 DLLName := BasePath + DirectorySeparator + Value 247 253 {$ENDIF}{$ENDIF} 248 254 {$IFDEF LINUX}{$IFDEF CPU32} 249 255 else if Key = '#PATH_LINUX32' then 250 DLLName := HomeDir + 'AI'+ DirectorySeparator + Value256 DLLName := BasePath + DirectorySeparator + Value 251 257 {$ENDIF}{$ENDIF} 252 258 {$IFDEF LINUX}{$IFDEF CPU64} 253 259 else if Key = '#PATH_LINUX64' then 254 DLLName := HomeDir + 'AI'+ DirectorySeparator + Value260 DLLName := BasePath + DirectorySeparator + Value 255 261 {$ENDIF}{$ENDIF} 256 262 else if Key = '#GAMEVERSION' then … … 272 278 ((Brain[nBrain].Flags and fDotNet = 0) or (@DotNetClient <> nil)) then 273 279 inc(nBrain); 274 until FindNext(f) <> 0; 280 end; 281 until FindNext(f) <> 0; 275 282 FindClose(F); 283 284 if nBrain = 0 then 285 raise Exception.Create(Format('No AI libraries found in directory %s', [HomeDir + 'AI'])); 276 286 end; 277 287 -
trunk/Install/win/C-evo.iss
r116 r124 70 70 Source: "{#MyAppSubDir}\Language.txt"; DestDir: "{app}"; Flags: ignoreversion 71 71 Source: "{#MyAppSubDir}\Language2.txt"; DestDir: "{app}"; Flags: ignoreversion 72 Source: "{#MyAppSubDir}\AI\ lib\x86_64-win64-Release\StdAI.dll"; DestDir: "{app}\AI"; DestName: "StdAI-win64.dll"; Flags: ignoreversion; Check: Is64BitInstallMode73 Source: "{#MyAppSubDir}\AI\ lib\i386-win32-Release\StdAI.dll"; DestDir: "{app}\AI"; DestName: "StdAI-win32.dll"; Flags: ignoreversion; Check: not Is64BitInstallMode74 Source: "{#MyAppSubDir}\AI\StdAI .png"; DestDir: "{app}\AI"; Flags: ignoreversion;75 Source: "{#MyAppSubDir}\AI\StdAI .ai.txt"; DestDir: "{app}\AI"; Flags: ignoreversion;72 Source: "{#MyAppSubDir}\AI\StdAI\lib\x86_64-win64-Release\StdAI.dll"; DestDir: "{app}\AI\StdAI"; DestName: "StdAI-win64.dll"; Flags: ignoreversion; Check: Is64BitInstallMode 73 Source: "{#MyAppSubDir}\AI\StdAI\lib\i386-win32-Release\StdAI.dll"; DestDir: "{app}\AI\StdAI"; DestName: "StdAI-win32.dll"; Flags: ignoreversion; Check: not Is64BitInstallMode 74 Source: "{#MyAppSubDir}\AI\StdAI\StdAI.png"; DestDir: "{app}\AI\StdAI"; Flags: ignoreversion; 75 Source: "{#MyAppSubDir}\AI\StdAI\StdAI.ai.txt"; DestDir: "{app}\AI\StdAI"; Flags: ignoreversion; 76 76 Source: "{#MyAppSubDir}\Maps\*.*"; DestDir: "{localappdata}\c-evo\Maps"; Flags: ignoreversion createallsubdirs recursesubdirs comparetimestamp 77 77 Source: "{#MyAppSubDir}\Saved\*.*"; DestDir: "{localappdata}\c-evo\Saved"; Flags: ignoreversion createallsubdirs recursesubdirs comparetimestamp -
trunk/Install/win/build.bat
r116 r124 7 7 rem Build AI 8 8 SET PROJECTNAME=AIProject 9 SET MAIN_DLL=..\..\AI\StdAI .dll10 SET WIN32_DLL=..\..\AI\ lib\i386-win32-Release\StdAI.dll11 SET WIN64_DLL=..\..\AI\ lib\x86_64-win64-Release\StdAI.dll9 SET MAIN_DLL=..\..\AI\StdAI\StdAI.dll 10 SET WIN32_DLL=..\..\AI\StdAI\lib\i386-win32-Release\StdAI.dll 11 SET WIN64_DLL=..\..\AI\StdAI\lib\x86_64-win64-Release\StdAI.dll 12 12 IF EXIST %MAIN_DLL% del %MAIN_DLL% 13 13 IF EXIST %WIN32_DLL% del %WIN32_DLL% 14 14 IF EXIST %WIN64_DLL% del %WIN64_DLL% 15 15 16 %LAZDIR%\lazbuild.exe --lazarusdir=%LAZDIR% --build-mode="Release" --cpu=i386 --operating-system=Win32 ..\..\AI\ %PROJECTNAME%.lpi16 %LAZDIR%\lazbuild.exe --lazarusdir=%LAZDIR% --build-mode="Release" --cpu=i386 --operating-system=Win32 ..\..\AI\StdAI\%PROJECTNAME%.lpi 17 17 copy %MAIN_DLL% %WIN32_DLL% 18 %LAZDIR%\lazbuild.exe --lazarusdir=%LAZDIR% --build-mode="Release" --cpu=x86_64 --operating-system=Win64 ..\..\AI\ %PROJECTNAME%.lpi18 %LAZDIR%\lazbuild.exe --lazarusdir=%LAZDIR% --build-mode="Release" --cpu=x86_64 --operating-system=Win64 ..\..\AI\StdAI\%PROJECTNAME%.lpi 19 19 copy %MAIN_DLL% %WIN64_DLL% 20 20 -
trunk/Locale.lfm
r65 r124 8 8 ClientHeight = 456 9 9 ClientWidth = 483 10 DesignTimePPI = 144 10 11 FormStyle = fsStayOnTop 11 12 OnCreate = FormCreate … … 13 14 OnPaint = FormPaint 14 15 OnShow = FormShow 15 LCLVersion = '1. 6.0.4'16 LCLVersion = '1.8.2.0' 16 17 object List: TListBox 17 18 Tag = 15360 … … 34 35 TabOrder = 0 35 36 TabStop = False 36 TopIndex = -137 37 end 38 38 object OKBtn: TButtonA -
trunk/Start.lfm
r117 r124 2 2 Left = 246 3 3 Height = 326 4 Top = 1 094 Top = 120 5 5 Width = 556 6 6 BorderIcons = [] … … 25 25 OnPaint = FormPaint 26 26 OnShow = FormShow 27 LCLVersion = '1.8. 0.6'27 LCLVersion = '1.8.2.0' 28 28 object StartBtn: TButtonA 29 29 Tag = 15104 -
trunk/Start.pas
r118 r124 336 336 for i := bixFirstAI to nBrain - 1 do begin 337 337 BrainPicture[i] := TBitmap.Create; 338 if not LoadGraphicFile(BrainPicture[i], HomeDir + 'AI' + DirectorySeparator + Brain[i].FileName + '.png', 338 if not LoadGraphicFile(BrainPicture[i], HomeDir + 'AI' + DirectorySeparator + 339 Brain[i].FileName + DirectorySeparator + Brain[i].FileName + '.png', 339 340 gfNoError) then begin 340 341 BrainPicture[i].SetSize(64, 64);
Note:
See TracChangeset
for help on using the changeset viewer.