Commit c8462f473685a3c5bce4945d2ea4d249aba20c41

Authored by Rafael Picanço
1 parent bbaeccbd
Exists in master

compiling on windows 10

- must compile with Lazarus 32 bits until delphizmq pool 64 bits support
is available. See: https://github.com/bvarga/delphizmq/issues/17
@@ -20,3 +20,4 @@ mysql -V # client version @@ -20,3 +20,4 @@ mysql -V # client version
20 # on windows, check if libMySQL.dll is necessary... 20 # on windows, check if libMySQL.dll is necessary...
21 21
22 22
  23 +# must compile with Lazarus 32 bits ultil delphi-zmq (pool) 64 bit support is available.
23 \ No newline at end of file 24 \ No newline at end of file
cultural_matrix.lpi
@@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
8 <Title Value="cultural_matrix"/> 8 <Title Value="cultural_matrix"/>
9 <ResourceType Value="res"/> 9 <ResourceType Value="res"/>
10 <UseXPManifest Value="True"/> 10 <UseXPManifest Value="True"/>
11 - <Icon Value="0"/>  
12 </General> 11 </General>
13 <i18n> 12 <i18n>
14 <EnableI18N LFM="False"/> 13 <EnableI18N LFM="False"/>
@@ -16,8 +15,29 @@ @@ -16,8 +15,29 @@
16 <VersionInfo> 15 <VersionInfo>
17 <StringTable ProductVersion=""/> 16 <StringTable ProductVersion=""/>
18 </VersionInfo> 17 </VersionInfo>
19 - <BuildModes Count="1">  
20 - <Item1 Name="Default" Default="True"/> 18 + <BuildModes Count="2">
  19 + <Item1 Name="Linux64" Default="True"/>
  20 + <Item2 Name="Win32">
  21 + <CompilerOptions>
  22 + <Version Value="11"/>
  23 + <Target>
  24 + <Filename Value="cultural_matrix"/>
  25 + </Target>
  26 + <SearchPaths>
  27 + <IncludeFiles Value="$(ProjOutDir)"/>
  28 + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/>
  29 + <OtherUnitFiles Value="units;../../dependency/delphizmq;../../units"/>
  30 + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
  31 + </SearchPaths>
  32 + <Linking>
  33 + <Options>
  34 + <Win32>
  35 + <GraphicApplication Value="True"/>
  36 + </Win32>
  37 + </Options>
  38 + </Linking>
  39 + </CompilerOptions>
  40 + </Item2>
21 </BuildModes> 41 </BuildModes>
22 <PublishOptions> 42 <PublishOptions>
23 <Version Value="2"/> 43 <Version Value="2"/>
@@ -125,7 +145,7 @@ @@ -125,7 +145,7 @@
125 </Target> 145 </Target>
126 <SearchPaths> 146 <SearchPaths>
127 <IncludeFiles Value="$(ProjOutDir)"/> 147 <IncludeFiles Value="$(ProjOutDir)"/>
128 - <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/> 148 + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/>
129 <OtherUnitFiles Value="units;../../dependency/delphizmq;../../units"/> 149 <OtherUnitFiles Value="units;../../dependency/delphizmq;../../units"/>
130 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 150 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
131 </SearchPaths> 151 </SearchPaths>
@@ -138,9 +158,6 @@ @@ -138,9 +158,6 @@
138 </Linking> 158 </Linking>
139 <Other> 159 <Other>
140 <CustomOptions Value="-dUseCThreads"/> 160 <CustomOptions Value="-dUseCThreads"/>
141 - <OtherDefines Count="1">  
142 - <Define0 Value="UseCThreads"/>  
143 - </OtherDefines>  
144 </Other> 161 </Other>
145 </CompilerOptions> 162 </CompilerOptions>
146 <Debugging> 163 <Debugging>
units/game_control.pas
@@ -2,8 +2,6 @@ unit game_control; @@ -2,8 +2,6 @@ unit game_control;
2 2
3 {$mode objfpc}{$H+} 3 {$mode objfpc}{$H+}
4 4
5 -{$DEFINE DEBUG}  
6 -  
7 interface 5 interface
8 6
9 uses 7 uses
@@ -479,7 +477,10 @@ end; @@ -479,7 +477,10 @@ end;
479 477
480 end; 478 end;
481 end; 479 end;
  480 + {$IFDEF DEBUG}
482 WriteLn('Good Bye'); 481 WriteLn('Good Bye');
  482 + {$ENDIF}
  483 +
483 end; 484 end;
484 485
485 procedure ResumeActor; 486 procedure ResumeActor;
@@ -492,7 +493,9 @@ end; @@ -492,7 +493,9 @@ end;
492 493
493 end; 494 end;
494 end; 495 end;
  496 + {$IFDEF DEBUG}
495 WriteLn('Resumed.'); 497 WriteLn('Resumed.');
  498 + {$ENDIF}
496 end; 499 end;
497 500
498 procedure ReceiveLogin; 501 procedure ReceiveLogin;
@@ -505,7 +508,9 @@ end; @@ -505,7 +508,9 @@ end;
505 508
506 end; 509 end;
507 end; 510 end;
  511 + {$IFDEF DEBUG}
508 WriteLn('login'); 512 WriteLn('login');
  513 + {$ENDIF}
509 end; 514 end;
510 515
511 procedure ReceiveLogout; 516 procedure ReceiveLogout;
@@ -518,7 +523,9 @@ end; @@ -518,7 +523,9 @@ end;
518 523
519 end; 524 end;
520 end; 525 end;
  526 + {$IFDEF DEBUG}
521 WriteLn('logout'); 527 WriteLn('logout');
  528 + {$ENDIF}
522 end; 529 end;
523 530
524 begin 531 begin
units/game_experiment.pas
@@ -320,7 +320,9 @@ begin @@ -320,7 +320,9 @@ begin
320 if FFilename <> '' then 320 if FFilename <> '' then
321 SaveExperimentToFile(Self,FFilename) 321 SaveExperimentToFile(Self,FFilename)
322 else 322 else
  323 + {$IFDEF DEBUG}
323 WriteLn(WARN_CANNOT_SAVE) 324 WriteLn(WARN_CANNOT_SAVE)
  325 + {$ENDIF};
324 end; 326 end;
325 327
326 end. 328 end.
units/game_file_methods.pas
@@ -248,7 +248,9 @@ var @@ -248,7 +248,9 @@ var
248 s1 := ReadString(LS, KEY_ENDCRITERIA,''); 248 s1 := ReadString(LS, KEY_ENDCRITERIA,'');
249 if s1 = '' then 249 if s1 = '' then
250 begin 250 begin
  251 + {$IFDEF DEBUG}
251 WriteLn(WARN_CONDITION_WITH_NO_END+LS+'. '+KEY_ENDCRITERIA+KV_SEP+DEF_END+WARN_END); 252 WriteLn(WARN_CONDITION_WITH_NO_END+LS+'. '+KEY_ENDCRITERIA+KV_SEP+DEF_END+WARN_END);
  253 + {$ENDIF}
252 s1 := DEF_END; 254 s1 := DEF_END;
253 end; 255 end;
254 EndCriterium := GetEndCriteria(s1); 256 EndCriterium := GetEndCriteria(s1);
units/game_zmq_actors.pas
@@ -75,7 +75,10 @@ implementation @@ -75,7 +75,10 @@ implementation
75 procedure TZMQWatcher.Start; 75 procedure TZMQWatcher.Start;
76 begin 76 begin
77 inherited Start; 77 inherited Start;
  78 + {$IFDEF DEBUG}
78 WriteLn('TZMQWatcher.Start'); 79 WriteLn('TZMQWatcher.Start');
  80 + {$ENDIF}
  81 +
79 end; 82 end;
80 83
81 { TZMQAdmin } 84 { TZMQAdmin }
@@ -110,13 +113,18 @@ procedure TZMQAdmin.Start; @@ -110,13 +113,18 @@ procedure TZMQAdmin.Start;
110 begin 113 begin
111 inherited Start; 114 inherited Start;
112 FZMQServer.Start; 115 FZMQServer.Start;
  116 + {$IFDEF DEBUG}
113 WriteLn('TZMQAdmin.Start'); 117 WriteLn('TZMQAdmin.Start');
  118 + {$ENDIF}
114 end; 119 end;
115 120
116 { TZMQPlayer } 121 { TZMQPlayer }
117 122
118 procedure TZMQPlayer.SendMessage(AMessage: array of UTF8string); 123 procedure TZMQPlayer.SendMessage(AMessage: array of UTF8string);
119 begin 124 begin
  125 + {$IFDEF DEBUG}
  126 +
  127 + {$ENDIF}
120 FZMQClient.Push(AMessage); 128 FZMQClient.Push(AMessage);
121 end; 129 end;
122 130
@@ -144,7 +152,9 @@ procedure TZMQPlayer.Start; @@ -144,7 +152,9 @@ procedure TZMQPlayer.Start;
144 begin 152 begin
145 inherited Start; 153 inherited Start;
146 FZMQClient.Start; 154 FZMQClient.Start;
147 - WriteLn('TZMQPlayer.Start'); 155 + {$IFDEF DEBUG}
  156 + WriteLn('TZMQPlayer.Start');
  157 + {$ENDIF}
148 end; 158 end;
149 159
150 { TZMQActor } 160 { TZMQActor }
@@ -171,7 +181,9 @@ end; @@ -171,7 +181,9 @@ end;
171 181
172 procedure TZMQActor.Start; 182 procedure TZMQActor.Start;
173 begin 183 begin
  184 + {$IFDEF DEBUG}
174 WriteLn('TZMQActor.Start'); 185 WriteLn('TZMQActor.Start');
  186 + {$ENDIF}
175 end; 187 end;
176 188
177 end. 189 end.