Skip to content

Commit

Permalink
[#6] Added electron app build plan
Browse files Browse the repository at this point in the history
Signed-off-by: Clovis Durand <cd.clovel19@gmail.com>
  • Loading branch information
Clovel committed Mar 18, 2020
1 parent ce35514 commit 9ffb383
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Electron project build plan
#author: Clovis Durand
#description: GitHub action to buid the OSCO-OD-Gen project

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, macOS-latest]
package_manager: [npm]

steps:
- name: Checkout
uses: actions/checkout@master

- name: Checkout submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
- name: Setup NodeJS, NPM & Yarn
uses: actions/setup-node@master
with:
node-version: 13

- name: Install Node dependencies
run: |
npm install
- name: Installing dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
set -x
brew update
brew install doxygen graphviz coreutils
ln -s /usr/bin/local/greadlink /usr/bin/local/readlink
- name: Build C generator dependencies
if: matrix.os != 'windows-latest'
run: |
npm run build-gen
- name: Build C generator dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
mkdir build
cd build
cmake ../generator -DCMAKE_C_FLAGS=/w34716 -DCMAKE_CXX_FLAGS=/w34716
cmake --build .
- name: Test Node project
run: |
npm test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OSCO-OD-Gen - CANOpen Object Dictionary Generator for [OSCO](https://github.com/Clovel/OSCO)

![Electron project build plan](https://github.com/Clovel/OSCO-OD-Gen/workflows/Electron%20project%20build%20plan/badge.svg?branch=master)

This project's is a cross-platform and modern code generator for the CANOpen Object Dictionary of the [OSCO](https://github.com/Clovel/OSCO) stack.

## Program goals
Expand Down
1 change: 1 addition & 0 deletions generator/docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ WARN_LOGFILE =

INPUT = @doxy_main_page@ \
@CMAKE_CURRENT_SOURCE_DIR@/../src \
@CMAKE_CURRENT_SOURCE_DIR@/../inc \

USE_MDFILE_AS_MAINPAGE = @doxy_main_page@

Expand Down
14 changes: 14 additions & 0 deletions generator/inc/APIExports.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef API_EXPORTS_H
#define API_EXPORTS_H

#ifdef _WIN32
#ifdef osco_od_gen_EXPORTS
#define API_EXPORT __declspec(dllexport)
#else
#define API_EXPORT __declspec(dllimport)
#endif
#else
#define API_EXPORT
#endif

#endif /* API_EXPORTS_H */
4 changes: 3 additions & 1 deletion generator/src/EDS.hpp → generator/inc/EDS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
/* Includes -------------------------------------------- */
#include "INI.hpp"

#include "APIExports.h"

/* Defines --------------------------------------------- */

/* Type definitions ------------------------------------ */

/* Forward declarations -------------------------------- */

/* EDS class ------------------------------------------- */
class EDS : public INI {
class API_EXPORT EDS : public INI {
public:
EDS(const std::string &pFile);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Object Dictionary code generator for the OSCO stack",
"main": "gui/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "echo \"Error: no test specified\" && exit 0",
"build-gen": "./buildCGen.sh",
"start": "electron ."
},
Expand Down

0 comments on commit 9ffb383

Please sign in to comment.