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