Commit 25375db8f20252ad2a967e90446ef818fa649d7c
1 parent
2a641a65
Exists in
master
compile with static linked libzmq
- also print ZMQ_VERSION at start up - on windows, zmq_version may be saved at a file, it is just a temporary workaround before an about form.
Showing
5 changed files
with
54 additions
and
23 deletions
Show diff stats
dependencies/delphizmq
experiment_runner/experiment_runner.lpi
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | </Target> |
| 33 | 33 | <SearchPaths> |
| 34 | 34 | <IncludeFiles Value="$(ProjOutDir)"/> |
| 35 | - <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/> | |
| 35 | + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/> | |
| 36 | 36 | <OtherUnitFiles Value="units;../dependencies/delphizmq"/> |
| 37 | 37 | <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> |
| 38 | 38 | </SearchPaths> |
| ... | ... | @@ -47,7 +47,8 @@ |
| 47 | 47 | </Options> |
| 48 | 48 | </Linking> |
| 49 | 49 | <Other> |
| 50 | - <CustomOptions Value="-dUseCThreads"/> | |
| 50 | + <CustomOptions Value="-dUseCThreads | |
| 51 | +-dZMQ_STATIC_LINK"/> | |
| 51 | 52 | </Other> |
| 52 | 53 | </CompilerOptions> |
| 53 | 54 | </Item2> |
| ... | ... | @@ -59,7 +60,7 @@ |
| 59 | 60 | </Target> |
| 60 | 61 | <SearchPaths> |
| 61 | 62 | <IncludeFiles Value="$(ProjOutDir)"/> |
| 62 | - <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/> | |
| 63 | + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/> | |
| 63 | 64 | <OtherUnitFiles Value="units;../dependencies/delphizmq"/> |
| 64 | 65 | <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> |
| 65 | 66 | </SearchPaths> |
| ... | ... | @@ -70,6 +71,10 @@ |
| 70 | 71 | </Win32> |
| 71 | 72 | </Options> |
| 72 | 73 | </Linking> |
| 74 | + <Other> | |
| 75 | + <CustomOptions Value="-dZMQ_STATIC_LINK | |
| 76 | +-Fo/home/rafael/Downloads/zeromq-3.2.5/src/"/> | |
| 77 | + </Other> | |
| 73 | 78 | </CompilerOptions> |
| 74 | 79 | </Item3> |
| 75 | 80 | <Item4 Name="Win32 Release"> |
| ... | ... | @@ -80,7 +85,7 @@ |
| 80 | 85 | </Target> |
| 81 | 86 | <SearchPaths> |
| 82 | 87 | <IncludeFiles Value="$(ProjOutDir)"/> |
| 83 | - <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/> | |
| 88 | + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/> | |
| 84 | 89 | <OtherUnitFiles Value="units;../dependencies/delphizmq"/> |
| 85 | 90 | <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> |
| 86 | 91 | </SearchPaths> |
| ... | ... | @@ -119,69 +124,69 @@ |
| 119 | 124 | <IsPartOfProject Value="True"/> |
| 120 | 125 | </Unit0> |
| 121 | 126 | <Unit1> |
| 122 | - <Filename Value="form_matrixgame.pas"/> | |
| 127 | + <Filename Value="../sc_split/experiment_runner/form_matrixgame.pas"/> | |
| 123 | 128 | <IsPartOfProject Value="True"/> |
| 124 | 129 | <ComponentName Value="FormMatrixGame"/> |
| 125 | 130 | <HasResources Value="True"/> |
| 126 | 131 | <ResourceBaseClass Value="Form"/> |
| 127 | 132 | </Unit1> |
| 128 | 133 | <Unit2> |
| 129 | - <Filename Value="README.md"/> | |
| 134 | + <Filename Value="../sc_split/experiment_runner/README.md"/> | |
| 130 | 135 | <IsPartOfProject Value="True"/> |
| 131 | 136 | </Unit2> |
| 132 | 137 | <Unit3> |
| 133 | - <Filename Value="units/zmq_network.pas"/> | |
| 138 | + <Filename Value="../sc_split/experiment_runner/units/zmq_network.pas"/> | |
| 134 | 139 | <IsPartOfProject Value="True"/> |
| 135 | 140 | </Unit3> |
| 136 | 141 | <Unit4> |
| 137 | - <Filename Value="units/game_zmq_actors.pas"/> | |
| 142 | + <Filename Value="../sc_split/experiment_runner/units/game_zmq_actors.pas"/> | |
| 138 | 143 | <IsPartOfProject Value="True"/> |
| 139 | 144 | </Unit4> |
| 140 | 145 | <Unit5> |
| 141 | - <Filename Value="units/game_actors.pas"/> | |
| 146 | + <Filename Value="../sc_split/experiment_runner/units/game_actors.pas"/> | |
| 142 | 147 | <IsPartOfProject Value="True"/> |
| 143 | 148 | </Unit5> |
| 144 | 149 | <Unit6> |
| 145 | - <Filename Value="units/game_experiment.pas"/> | |
| 150 | + <Filename Value="../sc_split/experiment_runner/units/game_experiment.pas"/> | |
| 146 | 151 | <IsPartOfProject Value="True"/> |
| 147 | 152 | </Unit6> |
| 148 | 153 | <Unit7> |
| 149 | - <Filename Value="units/game_file_methods.pas"/> | |
| 154 | + <Filename Value="../sc_split/experiment_runner/units/game_file_methods.pas"/> | |
| 150 | 155 | <IsPartOfProject Value="True"/> |
| 151 | 156 | </Unit7> |
| 152 | 157 | <Unit8> |
| 153 | - <Filename Value="units/game_resources.pas"/> | |
| 158 | + <Filename Value="../sc_split/experiment_runner/units/game_resources.pas"/> | |
| 154 | 159 | <IsPartOfProject Value="True"/> |
| 155 | 160 | </Unit8> |
| 156 | 161 | <Unit9> |
| 157 | - <Filename Value="units/game_control.pas"/> | |
| 162 | + <Filename Value="../sc_split/experiment_runner/units/game_control.pas"/> | |
| 158 | 163 | <IsPartOfProject Value="True"/> |
| 159 | 164 | </Unit9> |
| 160 | 165 | <Unit10> |
| 161 | - <Filename Value="units/string_methods.pas"/> | |
| 166 | + <Filename Value="../sc_split/experiment_runner/units/string_methods.pas"/> | |
| 162 | 167 | <IsPartOfProject Value="True"/> |
| 163 | 168 | </Unit10> |
| 164 | 169 | <Unit11> |
| 165 | - <Filename Value="units/game_actors_point.pas"/> | |
| 170 | + <Filename Value="../sc_split/experiment_runner/units/game_actors_point.pas"/> | |
| 166 | 171 | <IsPartOfProject Value="True"/> |
| 167 | 172 | </Unit11> |
| 168 | 173 | <Unit12> |
| 169 | - <Filename Value="units/game_visual_elements.pas"/> | |
| 174 | + <Filename Value="../sc_split/experiment_runner/units/game_visual_elements.pas"/> | |
| 170 | 175 | <IsPartOfProject Value="True"/> |
| 171 | 176 | </Unit12> |
| 172 | 177 | <Unit13> |
| 173 | - <Filename Value="form_chooseactor.pas"/> | |
| 178 | + <Filename Value="../sc_split/experiment_runner/form_chooseactor.pas"/> | |
| 174 | 179 | <IsPartOfProject Value="True"/> |
| 175 | 180 | <ComponentName Value="FormChooseActor"/> |
| 176 | 181 | <HasResources Value="True"/> |
| 177 | 182 | <ResourceBaseClass Value="Form"/> |
| 178 | 183 | </Unit13> |
| 179 | 184 | <Unit14> |
| 180 | - <Filename Value="units/csv_writer.pas"/> | |
| 185 | + <Filename Value="../sc_split/experiment_runner/units/csv_writer.pas"/> | |
| 181 | 186 | <IsPartOfProject Value="True"/> |
| 182 | 187 | </Unit14> |
| 183 | 188 | <Unit15> |
| 184 | - <Filename Value="units/helpers.pas"/> | |
| 189 | + <Filename Value="../sc_split/experiment_runner/units/helpers.pas"/> | |
| 185 | 190 | <IsPartOfProject Value="True"/> |
| 186 | 191 | </Unit15> |
| 187 | 192 | </Units> |
| ... | ... | @@ -193,7 +198,7 @@ |
| 193 | 198 | </Target> |
| 194 | 199 | <SearchPaths> |
| 195 | 200 | <IncludeFiles Value="$(ProjOutDir)"/> |
| 196 | - <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9"/> | |
| 201 | + <Libraries Value="/usr/lib/gcc/x86_64-linux-gnu/4.9/"/> | |
| 197 | 202 | <OtherUnitFiles Value="units;../dependencies/delphizmq"/> |
| 198 | 203 | <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> |
| 199 | 204 | </SearchPaths> |
| ... | ... | @@ -205,7 +210,8 @@ |
| 205 | 210 | </Options> |
| 206 | 211 | </Linking> |
| 207 | 212 | <Other> |
| 208 | - <CustomOptions Value="-dUseCThreads"/> | |
| 213 | + <CustomOptions Value="-dUseCThreads | |
| 214 | +-dZMQ_STATIC_LINK"/> | |
| 209 | 215 | </Other> |
| 210 | 216 | </CompilerOptions> |
| 211 | 217 | <Debugging> | ... | ... |
experiment_runner/experiment_runner.lpr
experiment_runner/lib/x86_64-linux/experiment_runner.compiled
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | 2 | <CONFIG> |
| 3 | 3 | <Compiler Value="/usr/bin/fpc" Date="1449313866"/> |
| 4 | - <Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -Xg -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"/> | |
| 4 | + <Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -Xg -l -vewnhibq -Fi/home/rafael/git/free-mtrix/experiment_runner/lib/x86_64-linux -Fl/usr/lib/gcc/x86_64-linux-gnu/4.9 -Fl/opt/gnome/lib -Fu/home/rafael/git/free-mtrix/experiment_runner/units -Fu/home/rafael/git/free-mtrix/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/free-mtrix/experiment_runner/ -FU/home/rafael/git/free-mtrix/experiment_runner/lib/x86_64-linux/ -dLCL -dLCLgtk2 -dUseCThreads -dZMQ_STATIC_LINK experiment_runner.lpr"/> | |
| 5 | 5 | </CONFIG> | ... | ... |
experiment_runner/units/helpers.pas
| ... | ... | @@ -8,9 +8,13 @@ uses |
| 8 | 8 | Classes, SysUtils; |
| 9 | 9 | |
| 10 | 10 | function RandomString(ALength : Integer): Utf8String; |
| 11 | +procedure PrintZmqVersion(AAplicationPath:string); | |
| 12 | + | |
| 11 | 13 | |
| 12 | 14 | implementation |
| 13 | 15 | |
| 16 | +uses zmq; | |
| 17 | + | |
| 14 | 18 | function RandomString( ALength: Integer ): Utf8String; |
| 15 | 19 | const |
| 16 | 20 | Chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; |
| ... | ... | @@ -22,6 +26,26 @@ begin |
| 22 | 26 | Result := Result + Chars[Random(Length(Chars)) + 1]; |
| 23 | 27 | end; |
| 24 | 28 | |
| 29 | +procedure PrintZmqVersion(AAplicationPath : string); | |
| 30 | +var | |
| 31 | + LPatch, LMinor, LMajor: Integer; | |
| 32 | + S : TStringList; | |
| 33 | +begin | |
| 34 | + LMajor := 0; LMinor := 0; LPatch := 0; | |
| 35 | + zmq_version(LMajor,LMinor,LPatch); | |
| 36 | + try | |
| 37 | + WriteLn('ZMQVERSION:',LMajor,'.',LMinor,'.',LPatch); | |
| 38 | + except | |
| 39 | + on E : Exception do | |
| 40 | + begin | |
| 41 | + S := TStringList.Create; | |
| 42 | + S.Append(IntToStr(LMajor)+IntToStr(LMinor)+IntToStr(LPatch)); | |
| 43 | + S.SaveToFile(AAplicationPath+PathDelim+'ZMQVERSION'); | |
| 44 | + S.Free; | |
| 45 | + end; | |
| 46 | + end; | |
| 47 | +end; | |
| 48 | + | |
| 25 | 49 | initialization |
| 26 | 50 | |
| 27 | 51 | Randomize; | ... | ... |