Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 6d5f303

Browse files
committed
Merge branch 'master' of github.com:cppit/jucipp into python-refactor
2 parents fc3edb0 + 1ec36f4 commit 6d5f303

32 files changed

+672
-409
lines changed

.travis.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
sudo: required
22

3+
# osx_image: xcode7.3
4+
35
env:
46
- distribution: ubuntu
57
- distribution: fedora
68
- distribution: arch
79
- distribution: debian-testing
810
- distribution: debian
911

12+
#matrix:
13+
# include:
14+
# - os: osx
15+
1016
services:
1117
- docker
12-
18+
1319
before_install:
14-
- ./ci/update_travis.sh
20+
- ./ci/update_ci.sh #travis_wait 90 ./ci/update_ci.sh
1521

1622
script:
1723
- script=compile CXX=clang++ CC=clang ./ci/execute.sh
1824
- script=clean ./ci/execute.sh
19-
- script=compile ./ci/execute.sh
25+
- script=compile CXX=g++ CC=gcc ./ci/execute.sh
2026
- script=static_analysis ./ci/execute.sh
21-
- script=compile make_command="broadwayd & make test" ./ci/execute.sh
27+
- script=compile make_command="broadwayd & CTEST_OUTPUT_ON_FAILURE=1 make test" ./ci/execute.sh

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# juCi++ [![Build Status](https://travis-ci.org/cppit/jucipp.svg?branch=master)](https://travis-ci.org/cppit/jucipp)
1+
# juCi++ [![Build Status](https://travis-ci.org/cppit/jucipp.svg?branch=master)](https://travis-ci.org/cppit/jucipp) [![Build status](https://ci.appveyor.com/api/projects/status/tj8ants9q8ouuoob/branch/master?svg=true)](https://ci.appveyor.com/project/zalox/jucipp-6hwdu/branch/master)
2+
23
###### a lightweight, platform independent C++-IDE with support for C++11, C++14, and experimental C++17 features depending on libclang version.
34
<!--<img src="https://github.com/cppit/jucipp/blob/master/docs/images/screenshot3.png"/>-->
45
## About

appveyor.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
platform:
2+
- x64
3+
4+
environment:
5+
MSYSTEM: MSYS
6+
7+
before_build:
8+
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman
9+
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git
10+
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
11+
- C:\msys64\usr\bin\bash -lc "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/update_ci.sh"
12+
13+
build_script:
14+
- C:\msys64\usr\bin\bash -lc "script=compile $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"
15+
- C:\msys64\usr\bin\bash -lc "script=compile make_command='CTEST_OUTPUT_ON_FAILURE=1 make test' $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"

ci/compile.sh

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
#!/bin/bash
22

33
if [ "${cmake_command}" == "" ]; then
4-
cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
4+
if [ "$APPVEYOR" != "" ]; then
5+
if [ "$PLATFORM" == "x64" ]; then
6+
mingw="mingw64"
7+
else
8+
mingw="mingw32"
9+
fi
10+
cmake_command="cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/${mingw} -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
11+
make_command="make"
12+
else
13+
cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
14+
fi
515
fi
616

717
if [ "${make_command}" == "" ]; then
818
make_command="make -j 2"
919
fi
1020

11-
cd jucipp || exit
12-
mkdir -p build && cd build || exit
13-
sh -c "${cmake_command}" || exit
14-
exec sh -c "${make_command}"
21+
cd jucipp || echo "Can't cd into jucipp"
22+
git submodule update --init --recursive # appveyor doesn't checkout recursively
23+
mkdir -p build && cd build || echo "Error making build directory"
24+
sh -c "${cmake_command}" || echo "Cmake configuration failed"
25+
exec sh -c "${make_command}"

ci/execute.sh

+22-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,28 @@ function linux () {
1919

2020
#TODO Should run compile/install instructions for osx
2121
function osx () {
22-
true
22+
cd .. || (echo "Error changing directory";return 1)
23+
if [ "${script}" == "clean" ]; then
24+
sudo rm -rf "./jucipp/build"
25+
return 0
26+
fi
27+
sh -c "./jucipp/ci/${script}.sh" || return 1
28+
}
29+
30+
function windows () {
31+
export PATH="/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
32+
bf=$(cygpath ${APPVEYOR_BUILD_FOLDER})
33+
cd "$bf" || (echo "Error changing directory"; return 1)
34+
if [ "${script}" == "clean" ]; then
35+
sudo rm "./build" -rf
36+
return 0
37+
fi
38+
sh -c "${bf}/ci/${script}.sh"
2339
}
2440

41+
42+
if [ "$TRAVIS_OS_NAME" == "" ]; then
43+
TRAVIS_OS_NAME=windows
44+
fi
45+
2546
$TRAVIS_OS_NAME

ci/update_ci.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
function linux () {
4+
sudo apt-get update
5+
sudo apt-get purge lxc-docker
6+
sudo apt-get install --yes --force-yes -o Dpkg::Options::="--force-confnew" linux-image-extra-$(uname -r) docker-engine
7+
sudo service docker stop || exit
8+
sudo rm -rf /var/lib/docker || exit
9+
sudo service docker start || exit
10+
}
11+
12+
function brew_install() {
13+
(brew outdated "$1" || brew install $1) || (echo "Error installing $1"; return 1)
14+
}
15+
16+
function osx () {
17+
brew update || return 1
18+
brew uninstall llvm --force || return 1
19+
brew upgrade --all || return 1
20+
brew update || return 1
21+
brew upgrade --all || return 1
22+
brew install --with-clang llvm
23+
brew_install "boost" || return 1
24+
brew_install "aspell" || return 1
25+
brew_install "clang-format" || return 1
26+
brew_install "pkg-config" || return 1
27+
brew_install "gtksourceviewmm3" || return 1
28+
}
29+
30+
function windows () {
31+
arch=x86_64
32+
if [ "$PLATFORM" == "x86" ]; then
33+
arch=i686
34+
fi
35+
sh -c "pacman -S --noconfirm git mingw-w64-${arch}-cmake make mingw-w64-${arch}-toolchain mingw-w64-${arch}-clang mingw-w64-${arch}-gtkmm3 mingw-w64-${arch}-gtksourceviewmm3 mingw-w64-${arch}-boost mingw-w64-${arch}-aspell mingw-w64-${arch}-aspell-en"
36+
}
37+
38+
if [ "$TRAVIS_OS_NAME" == "" ]; then
39+
TRAVIS_OS_NAME=windows
40+
fi
41+
42+
$TRAVIS_OS_NAME

ci/update_travis.sh

-22
This file was deleted.

src/CMakeLists.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ set(global_libraries
4444
set(project_files
4545
config.cc
4646
dialogs.cc
47+
dialogs_unix.cc
4748
directories.cc
4849
entrybox.cc
4950
info.cc
@@ -56,8 +57,6 @@ set(project_files
5657
terminal.cc
5758
tooltips.cc
5859
window.cc
59-
60-
../tiny-process-library/process.cpp
6160
)
6261

6362
#Files used both in ../src and ../tests
@@ -83,16 +82,18 @@ set(project_shared_files
8382
../libclangmm/src/Tokens.cc
8483
../libclangmm/src/TranslationUnit.cc
8584
../libclangmm/src/Utility.cc
85+
86+
../tiny-process-library/process.cpp
8687
)
8788

8889
if(LIBLLDB_FOUND)
8990
list(APPEND project_shared_files debug_clang.cc)
9091
endif()
9192

9293
if(MSYS)
93-
list(APPEND project_files dialogs_unix.cc ../tiny-process-library/process_win.cpp)
94+
list(APPEND project_shared_files ../tiny-process-library/process_win.cpp)
9495
else()
95-
list(APPEND project_files dialogs_unix.cc ../tiny-process-library/process_unix.cpp)
96+
list(APPEND project_shared_files ../tiny-process-library/process_unix.cpp)
9697
endif()
9798

9899
include_directories(${global_includes})

src/config.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void Config::load() {
4949
catch(const std::exception &e) {
5050
::Terminal::get().print("Error: could not parse "+config_json+": "+e.what()+"\n", true);
5151
std::stringstream ss;
52-
ss << configjson;
52+
ss << default_config_file;
5353
boost::property_tree::read_json(ss, cfg);
5454
retrieve_config();
5555
}
@@ -64,7 +64,7 @@ void Config::find_or_create_config_files() {
6464
boost::filesystem::create_directories(home/"plugins");
6565

6666
if (!boost::filesystem::exists(config_json))
67-
filesystem::write(config_json, configjson);
67+
filesystem::write(config_json, default_config_file);
6868

6969
auto juci_style_path = home/"styles";
7070
boost::filesystem::create_directories(juci_style_path); // io exp captured by calling method
@@ -163,7 +163,7 @@ void Config::update_config_file() {
163163
try {
164164
if(cfg.get<std::string>("version")!=JUCI_VERSION) {
165165
std::stringstream ss;
166-
ss << configjson;
166+
ss << default_config_file;
167167
boost::property_tree::read_json(ss, default_cfg);
168168
cfg_ok=false;
169169
if(cfg.count("version")>0)
@@ -199,6 +199,7 @@ void Config::get_source() {
199199
source.default_tab_char = source_json.get<char>("default_tab_char");
200200
source.default_tab_size = source_json.get<unsigned>("default_tab_size");
201201
source.auto_tab_char_and_size = source_json.get<bool>("auto_tab_char_and_size");
202+
source.tab_indents_line = source_json.get<bool>("tab_indents_line");
202203

203204
source.wrap_lines = source_json.get<bool>("wrap_lines");
204205

src/config.h

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class Config {
6464
bool auto_tab_char_and_size;
6565
char default_tab_char;
6666
unsigned default_tab_size;
67+
bool tab_indents_line;
6768
bool wrap_lines;
6869
bool highlight_current_line;
6970
bool show_line_numbers;

src/debug_clang.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ void Debug::Clang::select_frame(uint32_t frame_index, uint32_t thread_index_id)
357357
}
358358
}
359359

360-
void Debug::Clang::delete_debug() {
360+
void Debug::Clang::cancel() {
361361
kill();
362362
if(debug_thread.joinable())
363363
debug_thread.join();

src/debug_clang.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace Debug {
5555
std::vector<Variable> get_variables();
5656
void select_frame(uint32_t frame_index, uint32_t thread_index_id=0);
5757

58-
void delete_debug(); //can't use delete as function name
58+
void cancel();
5959

6060
std::string get_value(const std::string &variable, const boost::filesystem::path &file_path, unsigned int line_nr, unsigned int line_index);
6161
std::string get_return_value(const boost::filesystem::path &file_path, unsigned int line_nr, unsigned int line_index);

0 commit comments

Comments
 (0)