Skip to content

Commit 0df01e0

Browse files
committed
Bundle capstone without git submodule
Using git submodules caused the following problem: * Travis CI ran into a hard-to-diagnose "error: Server does not allow request for unadvertised object" * If the repository was not cloned recursively, then the capstone library would need to be fetched over git. This requires git and network access. `scripts/update_capstone.sh` can be used to update the bundled `capstone`.
1 parent dc5d694 commit 0df01e0

File tree

632 files changed

+848807
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

632 files changed

+848807
-11
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

build.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate cmake;
1515
extern crate lazy_static;
1616

1717
use std::fs::{File, copy};
18-
use std::path::{Path, PathBuf};
18+
use std::path::PathBuf;
1919
use std::process::Command;
2020
use std::env;
2121
use std::io::Write;
@@ -142,11 +142,6 @@ fn main() {
142142
} else {
143143
debug_println!("Using bundled capstone library");
144144

145-
if !Path::new("capstone/.git").exists() {
146-
let _ = Command::new("git")
147-
.args(&["submodule", "update", "--init", "--depth", "5"])
148-
.status();
149-
}
150145
if cfg!(feature = "build_capstone_cmake") {
151146
#[cfg(feature = "build_src_cmake")]
152147
cmake();

capstone

Lines changed: 0 additions & 1 deletion
This file was deleted.

capstone/.appveyor.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 3.0.4-{build}
2+
3+
os:
4+
- Visual Studio 2015
5+
6+
before_build:
7+
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
8+
9+
build_script:
10+
- mkdir build
11+
- cd build
12+
- cmake -DCMAKE_BUILD_TYPE=RELEASE -G "NMake Makefiles" ..
13+
- nmake
14+

capstone/.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Object files
2+
*.o
3+
*.ko
4+
5+
# Gcc dependency-tracking files
6+
*.d
7+
8+
# Libraries
9+
*.lib
10+
*.a
11+
12+
# Shared objects (inc. Windows DLLs)
13+
*.dll
14+
*.so
15+
*.so.*
16+
*.dylib
17+
18+
# Executables
19+
*.exe
20+
*.out
21+
*.app
22+
23+
# python
24+
bindings/python/build/
25+
bindings/python/capstone.egg-info/
26+
*.pyc
27+
28+
# java
29+
bindings/java/capstone.jar
30+
31+
# ocaml
32+
bindings/ocaml/*.cmi
33+
bindings/ocaml/*.cmx
34+
bindings/ocaml/*.cmxa
35+
bindings/ocaml/*.mli
36+
bindings/ocaml/test
37+
bindings/ocaml/test_arm
38+
bindings/ocaml/test_arm64
39+
bindings/ocaml/test_mips
40+
bindings/ocaml/test_x86
41+
bindings/ocaml/test_detail
42+
bindings/ocaml/test_ppc
43+
bindings/ocaml/test_sparc
44+
bindings/ocaml/test_systemz
45+
bindings/ocaml/test_xcore
46+
47+
48+
# test binaries
49+
tests/test
50+
tests/test_detail
51+
tests/test_iter
52+
tests/test_arm
53+
tests/test_arm64
54+
tests/test_mips
55+
tests/test_x86
56+
tests/test_ppc
57+
tests/test_skipdata
58+
tests/test_sparc
59+
tests/test_systemz
60+
tests/test_xcore
61+
tests/*.static
62+
tests/test_basic
63+
tests/test_customized_mnem
64+
65+
66+
# regress binaries
67+
suite/regress/invalid_read_in_print_operand
68+
69+
70+
# vim tmp file
71+
*.swp
72+
*~
73+
74+
capstone.pc
75+
76+
# local files
77+
_*
78+
79+
# freebsd ports: generated file with "make makesum" command
80+
packages/freebsd/ports/devel/capstone/distinfo
81+
82+
# VisualStudio
83+
ProjectUpgradeLog.log
84+
Debug/
85+
Release/
86+
ipch/
87+
*.sdf
88+
*.opensdf
89+
*.suo
90+
*.user
91+
*.backup
92+
*.VC.db
93+
*.VC.opendb
94+
95+
# CMake build directories
96+
build*/
97+
98+
# Xcode
99+
xcode/Capstone.xcodeproj/xcuserdata
100+
xcode/Capstone.xcodeproj/project.xcworkspace/xcuserdata
101+
102+
# suite/
103+
test_arm_regression
104+
test_arm_regression.o
105+
fuzz_harness
106+
test_iter_benchmark
107+
108+
109+
*.s
110+
.DS_Store
111+
112+
cstool/cstool

capstone/.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: cpp
2+
sudo: false
3+
before_install:
4+
- export LD_LIBRARY_PATH=`pwd`/tests/:$LD_LIBRARY_PATH
5+
script:
6+
- ./make.sh
7+
- make check
8+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp libcapstone.so bindings/python/; fi
9+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp libcapstone.dylib bindings/python/; fi
10+
- cd bindings/python && make check
11+
compiler:
12+
- clang
13+
- gcc
14+
os:
15+
- linux
16+
- osx

0 commit comments

Comments
 (0)