Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Worked to get building on OSX to work
Browse files Browse the repository at this point in the history
 * Changed the syntax of some system commands so that they work with OSX's `cp` and `rm` commands
 * Temporary changed a use of `.so` to `.dylib`; A better long-term solution to this needs to be implemented.
 * Disabled dynamic library detection in the configurator using `ldconfig` since that's a Linux-only executable
 * Fixed some issues regarding the `rand` library in the `util` library
  • Loading branch information
Ameobea committed Aug 23, 2017
1 parent f9f5caa commit 41adbfb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 38 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

53 changes: 26 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ debug:
make node_init

# copy libstd to the dist/lib directory if it's not already there
# TODO: Fix so that this supports all dylib extensions for different platforms
if [[ ! -f dist/lib/$$(find $$(rustc --print sysroot)/lib | grep -E "libstd-.*\.so" | head -1) ]]; then \
cp $$(find $$(rustc --print sysroot)/lib | grep -E "libstd-.*\.so" | head -1) dist/lib; \
cp $$(find $$(rustc --print sysroot)/lib | grep -E "libstd-.*\.dylib" | head -1) dist/lib; \
fi;

# build the configurator
Expand Down Expand Up @@ -147,24 +148,24 @@ strip:
cd dist/lib && strip *

clean:
rm optimizer/target -rf
rm logger/target -rf
rm spawner/target -rf
rm tick_parser/target -rf
rm util/target -rf
rm backtester/target -rf
rm private/target -rf
rm broker_shims/simbroker/target -rf
rm broker_shims/FXCM/native/native/dist -rf
rm broker_shims/FXCM/native/target -rf
rm data_downloaders/fxcm_native/target -rf
rm configurator/target -rf

rm util/js/node_modules -rf
rm mm/node_modules -rf
rm mm-react/node_modules -rf
rm data_downloaders/iex/node_modules -rf
rm data_downloaders/poloniex/node_modules -rf
rm -rf optimizer/target
rm -rf logger/target
rm -rf spawner/target
rm -rf tick_parser/target
rm -rf util/target
rm -rf backtester/target
rm -rf private/target
rm -rf broker_shims/simbroker/target
rm -rf broker_shims/FXCM/native/native/dist
rm -rf broker_shims/FXCM/native/target
rm -rf data_downloaders/fxcm_native/target
rm -rf configurator/target

rm -rf util/js/node_modules
rm -rf mm/node_modules
rm -rf mm-react/node_modules
rm -rf data_downloaders/iex/node_modules
rm -rf data_downloaders/poloniex/node_modules

test:
# copy libstd to the dist/lib directory if it's not already there
Expand Down Expand Up @@ -261,7 +262,6 @@ update:
cd mm && npm update
cd broker_shims/FXCM/native && cargo update
cd configurator && cargo update
git submodule update

doc:
cd configurator && cargo rustdoc --open -- --no-defaults --passes collapse-docs --passes unindent-comments --passes strip-priv-imports
Expand Down Expand Up @@ -297,7 +297,6 @@ config:
make configure

init:
git submodule update --init
rm -rf dist
mkdir dist
mkdir dist/lib
Expand Down Expand Up @@ -332,13 +331,13 @@ node_init:
cd util/js && npm install && touch ./node_modules/installed; \
fi
cd util/js && npm run-script strip
rm data_downloaders/poloniex/node_modules/tickgrinder_util -rf
cp util/js/stripped data_downloaders/poloniex/node_modules/tickgrinder_util -r
cp util/js/node_modules data_downloaders/poloniex/node_modules/tickgrinder_util/node_modules -r
rm -rf data_downloaders/poloniex/node_modules/tickgrinder_util
cp -r util/js/stripped data_downloaders/poloniex/node_modules/tickgrinder_util
cp -r util/js/node_modules data_downloaders/poloniex/node_modules/tickgrinder_util/node_modules
cp util/js/package.json data_downloaders/poloniex/node_modules/tickgrinder_util
rm data_downloaders/iex/node_modules/tickgrinder_util -rf
cp util/js/stripped data_downloaders/iex/node_modules/tickgrinder_util -r
cp util/js/node_modules data_downloaders/iex/node_modules/tickgrinder_util/node_modules -r
rm -rf data_downloaders/iex/node_modules/tickgrinder_util
cp -r util/js/stripped data_downloaders/iex/node_modules/tickgrinder_util
cp -r util/js/node_modules data_downloaders/iex/node_modules/tickgrinder_util/node_modules
cp util/js/package.json data_downloaders/iex/node_modules/tickgrinder_util

node_compile:
Expand Down
Submodule ForexConnectAPI-Linux-x86_64 deleted from dfeae3
6 changes: 3 additions & 3 deletions configurator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::rc::Rc;
use std::str;

use cursive::Cursive;
#[allow(unused_imports)]
use cursive::views::{Dialog, TextView, EditView, ListView, BoxView, LinearLayout, SelectView, Panel};
use cursive::view::SizeConstraint;
use cursive::direction::Orientation;
Expand Down Expand Up @@ -107,7 +106,8 @@ fn first_time(siv: &mut Cursive) {
/// Checks if we think libboost is installed and lets the user know.
fn boost_config(s: &mut Cursive, settings: Settings) {
s.pop_layer();
let content = if libboost_detected() {
// TODO: Fix this so that it detects the library on all platforms
let content = if /*libboost_detected()*/ true {
indoc!(
"From what I can see, libboost is installed on this system. Boost is required for this platform's C++ \
FFI components.
Expand Down Expand Up @@ -333,7 +333,7 @@ fn which(binary: &str) -> String {
.arg(binary)
.stdout(Stdio::piped())
.spawn()
.expect("Unable to spawn `which redis_server`");
.expect("Unable to spawn `which`");

let output = child.wait_with_output()
.expect("Unable to get output from `which redis_server`");
Expand Down
2 changes: 1 addition & 1 deletion mm-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"antd": "^2.7.0",
"babel-plugin-import": "^1.3.1",
"babel-plugin-import": "^1.4.0",
"babel-runtime": "^6.9.2",
"dva": "^1.2.1",
"dva-loading": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ uuid = { version = "=0.5.1", features = ["serde", "v4",] }
indoc = "^0.1.15"
time = "0.1.38"
chrono = "0.4.0"
# rand = "0.3.16"
rand = "0.3.16"
from_hashmap = { path = "from_hashmap" }
clippy = { git = "https://github.com/Manishearth/rust-clippy.git", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion util/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"strip": "rm stripped -rf && babel --out-dir stripped index.js && babel --out-dir stripped/src src/",
"strip": "rm -rf stripped && babel --out-dir stripped index.js && babel --out-dir stripped/src src/",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Casey Primozic <[email protected]>",
Expand Down

0 comments on commit 41adbfb

Please sign in to comment.