Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: initial attempt to build on Windows #93

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
72 changes: 55 additions & 17 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,81 @@ on:
branches: ["main"]

jobs:

build:
runs-on: ${{ matrix.os }}

env:
RUNNER_DEFAULT_SHELL: bash

strategy:
matrix:
os: [macos-latest]
os: [macos-latest, windows-latest]

steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Dependencies
- name: Install Dependencies - Windows
if: runner.os == 'windows'
run: |
if [ "${{ matrix.os }}" = "macos-latest" ]; then
#brew update
brew install wxwidgets m4 tinyxml zstd autoconf libtool automake wxwidgets libpng sqlite
brew install dylibbundler
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt-get update
sudo apt install libwxgtk3.2-dev || sudo apt install wx3.2-headers || sudo apt install libwxgtk3.0-gtk3-dev || sudo apt install libwxgtk3.0-dev
fi
- name: remove local redundancy to build-deps
choco install --no-progress mingw wxwidgets sqlite make
choco install --no-progress gnuwin32-m4
echo "I: This is where our home is"
pwd
echo "I: Changing to wxWidgets install directory"
cd C:\wxWidgets-3.1.2
pwd
echo "I: Now compiling wxWidgets"
#mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release mswu
mingw32-make
- name: Install Dependencies - Linux
if: runner.os == 'linux'
run: |
sudo apt-get update
sudo apt install libwxgtk3.2-dev || sudo apt install wx3.2-headers
- name: Install Dependencies - MacOS
if: runner.os == 'macos'
run: |
brew install wxwidgets m4 tinyxml zstd autoconf libtool automake
brew install libpng sqlite
brew install dylibbundler
- name: remove local redundancy to build-deps - Linux or MacOS
if: runner.os == 'linux' || runner.os == 'macOS'
run: rm -f mysql* sqlite* && rm -rf clustalw tinyxml
- name: autogen
- name: autogen - Linux or MacOS
if: runner.os == 'linux' || runner.os == 'macOS'
run: ./autogen.sh
- name: configure
- name: configure - Linux or MacOS
if: runner.os == 'linux' || runner.os == 'macOS'
run: ./configure
- name: make
run: make
- name: make - Windows
if: runner.os == 'windows'
run: |
pwd
g++ -D__WXMSW__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\include\msvc -o GENtle *.cpp ipc/*.cpp
- name: make - Linux or MacOS
if: runner.os == 'linux' || runner.os == 'macOS'
run: |
if [ "${{ matrix.os }}" = "macos-latest" ]; then
make
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
make
else
echo "Unexpected runer.os: ${{ runner.os }}"
exit
fi
- name: install asciidoc
if: runner.os == 'linux' || runner.os == 'macOS'
run: |
if [ "${{ matrix.os }}" = "macos-latest" ]; then
brew install asciidoc
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt install asciidoc
fi
- name: build manual.html
- name: build manual.html - Linux or MacOS
if: runner.os == 'windows'
run: echo "No manual created for ${{ matrix.os }}." > docs/manual.html
- name: build manual.html - regular
if: runner.os == 'linux' || runner.os == 'macOS'
run: asciidoc docs/manual.adoc
- name: Archive production artifacts
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '40 21 * * 3'

Expand All @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp' ]
language: ['c-cpp']

steps:
- name: Checkout repository
Expand Down
12 changes: 7 additions & 5 deletions CloningAssistant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,15 @@ void TCloningAssistantPanel::arrange ()
for ( c = b - 1 ; c >= 0 ; c-- )
{
if ( b > 0 && c >= 0 &&
i->children[c]->vector == i->children[b]->vector &&
i->children[b]->original == NULL &&
i->children[c]->original == NULL &&
i->children[c]->vector == i->children[b]->vector &&
i->children[b]->original == NULL &&
i->children[c]->original == NULL &&
// i->children[c]->item &&
// i->children[b]->item &&
i->children[c]->item->to + 50 < i->children[b]->item->from )
break ;
i->children[c]->item->to + 50 < i->children[b]->item->from )
{
break ;
}
}
if ( c >= 0 && ( i->children[b]->item->getType() != VIT_CDS || i->children[c]->item->getType() != VIT_CDS ))
{
Expand Down
Loading