Commit 599d81c9d21e67e090df95606967777677f578c0

Authored by Carlos Picanco
1 parent c22f45c6
Exists in master

compile on Linux 64

.gitignore
... ... @@ -31,4 +31,8 @@
31 31 /P*/*
32 32 __history
33 33 *backup*
34   -id
35 34 \ No newline at end of file
  35 +id
  36 +experiment_runner/experiment_runner
  37 +experiment_runner/Participant1/
  38 +experiment_runner/Participant2/
  39 +experiment_runner/Participant3/
36 40 \ No newline at end of file
... ...
experiment_runner/experiment_runner.lpi
... ... @@ -88,7 +88,7 @@
88 88 <PackageName Value="LCL"/>
89 89 </Item2>
90 90 </RequiredPackages>
91   - <Units Count="15">
  91 + <Units Count="16">
92 92 <Unit0>
93 93 <Filename Value="experiment_runner.lpr"/>
94 94 <IsPartOfProject Value="True"/>
... ... @@ -155,6 +155,10 @@
155 155 <Filename Value="units/csv_writer.pas"/>
156 156 <IsPartOfProject Value="True"/>
157 157 </Unit14>
  158 + <Unit15>
  159 + <Filename Value="units/helpers.pas"/>
  160 + <IsPartOfProject Value="True"/>
  161 + </Unit15>
158 162 </Units>
159 163 </ProjectOptions>
160 164 <CompilerOptions>
... ... @@ -165,7 +169,7 @@
165 169 <SearchPaths>
166 170 <IncludeFiles Value="$(ProjOutDir)"/>
167 171 <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/>
168   - <OtherUnitFiles Value="units;../../dependency/delphizmq;../../units"/>
  172 + <OtherUnitFiles Value="units;../dependencies/delphizmq"/>
169 173 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
170 174 </SearchPaths>
171 175 <Linking>
... ... @@ -177,9 +181,6 @@
177 181 </Linking>
178 182 <Other>
179 183 <CustomOptions Value="-dUseCThreads"/>
180   - <OtherDefines Count="1">
181   - <Define0 Value="UseCThreads"/>
182   - </OtherDefines>
183 184 </Other>
184 185 </CompilerOptions>
185 186 <Debugging>
... ...
experiment_runner/experiment_runner.lpr
... ... @@ -11,8 +11,6 @@ program experiment_runner;
11 11  
12 12 {$mode objfpc}{$H+}
13 13  
14   -{$DEFINE DEBUG}
15   -
16 14 uses
17 15 {$IFDEF UNIX}{$IFDEF UseCThreads}
18 16 cthreads,
... ... @@ -26,7 +24,7 @@ uses
26 24 {$ENDIF}
27 25 , StrUtils, Forms, Classes, sysutils
28 26 , form_matrixgame, game_actors
29   - , zhelpers, form_chooseactor
  27 + , helpers
30 28 ;
31 29  
32 30  
... ... @@ -80,7 +78,7 @@ const
80 78 end
81 79 else
82 80 try
83   - ID.Text := s_random(32);
  81 + ID.Text := RandomString(32);
84 82 ID.SaveToFile(F);
85 83 F := Copy(ID.Text,0,Length(ID.Text)-2);
86 84 except
... ...
experiment_runner/lib/x86_64-linux/experiment_runner.compiled 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<CONFIG>
  3 + <Compiler Value="/usr/bin/fpc" Date="1449313866"/>
  4 + <Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fi/home/rafael/git/sc_split/experiment_runner/lib/x86_64-linux -Fl/usr/lib/gcc/x86_64-linux-gnu/4.9 -Fl/opt/gnome/lib -Fu/home/rafael/git/sc_split/experiment_runner/units -Fu/home/rafael/git/sc_split/dependencies/delphizmq -Fu/usr/share/lazarus/1.6.2/lcl/units/x86_64-linux/gtk2 -Fu/usr/share/lazarus/1.6.2/lcl/units/x86_64-linux -Fu/usr/share/lazarus/1.6.2/components/lazutils/lib/x86_64-linux -Fu/usr/share/lazarus/1.6.2/packager/units/x86_64-linux -Fu/home/rafael/git/sc_split/experiment_runner/ -FU/home/rafael/git/sc_split/experiment_runner/lib/x86_64-linux/ -dLCL -dLCLgtk2 -dUseCThreads experiment_runner.lpr"/>
  5 +</CONFIG>
... ...
experiment_runner/units/game_control.pas
... ... @@ -121,7 +121,6 @@ const
121 121 implementation
122 122  
123 123 uses ButtonPanel,Controls,ExtCtrls,StdCtrls,LazUTF8, Forms, Dialogs, strutils
124   - , zhelpers
125 124 , form_matrixgame
126 125 , presentation_classes
127 126 , form_chooseactor
... ...
experiment_runner/units/helpers.pas 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +unit helpers;
  2 +
  3 +{$mode objfpc}{$H+}
  4 +
  5 +interface
  6 +
  7 +uses
  8 + Classes, SysUtils;
  9 +
  10 +function RandomString(ALength : Integer): Utf8String;
  11 +
  12 +implementation
  13 +
  14 +function RandomString( ALength: Integer ): Utf8String;
  15 +const
  16 + Chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
  17 +var
  18 + i: integer;
  19 +begin
  20 + Result := '';
  21 + for i := 1 to ALength do
  22 + Result := Result + Chars[Random(Length(Chars)) + 1];
  23 +end;
  24 +
  25 +initialization
  26 +
  27 + Randomize;
  28 +
  29 +end.
  30 +
... ...