Skip to content

Commit

Permalink
Merge pull request #395 from ctapmex/colorer_1.4.1
Browse files Browse the repository at this point in the history
new colorer integration
  • Loading branch information
trexinc authored May 9, 2021
2 parents dd8b764 + eb9f63a commit 99a449e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 92 deletions.
39 changes: 7 additions & 32 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ install:
- cd far && for /f "tokens=1,2,4 delims=, " %%i in ('tools\m4 -P farversion.inc.m4') do appveyor UpdateBuild -Version %%i.%%j.%%k.%APPVEYOR_BUILD_NUMBER% && cd ..
#clone NetBox
- git clone https://github.com/FarGroup/Far-NetBox.git
#clone and build Colorer-schemes
- git clone https://github.com/colorer/Colorer-schemes.git
- cd Colorer-schemes
- appveyor-retry choco install ant --ignore-dependencies
- set JAVA_HOME=C:\Program Files\Java\jdk1.8.0
- build.cmd base.far.clean
- build.cmd base.far
- cd ..
#clone FarColorer
- git clone https://github.com/colorer/FarColorer.git --branch build-from-far --recursive
#set locale to russian, needed for chm generation
- ps: Set-WinSystemLocale -SystemLocale ru-RU
- ps: Start-Sleep -s 5
Expand Down Expand Up @@ -127,28 +117,13 @@ build_script:
- copy /Y Far-NetBox\*.md ci\%configuration%.%platform%\Plugins\NetBox
- copy /Y Far-NetBox\LICENSE.txt ci\%configuration%.%platform%\Plugins\NetBox
#build FarColorer
- set PROJECT_ROOT=%APPVEYOR_BUILD_FOLDER%\FarColorer
- set PROJECT_CONFIG=%configuration%
- set PROJECT_BUILD=Build
- set PROJECT_CONF=%platform%
- set PROJECT_PLATFORM=Win32
- set COLORER_WIN64_BUILD=ON
- if "%platform%" == "x64" set PROJECT_PLATFORM=x64
- if "%platform%" == "x64" set COLORER_WIN64_BUILD=OFF
- cd FarColorer
- mkdir build\%configuration%\%platform%
- cd build\%configuration%\%platform%
- cmake -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=%PROJECT_CONFIG% -D COLORER_WIN64_BUILD=%COLORER_WIN64_BUILD% %PROJECT_ROOT%
- nmake
- cd ..\..\..\..
- mkdir ci\%configuration%.%platform%\Plugins\FarColorer\base
- xcopy /e /q /y /k Colorer-schemes\build\basefar\* ci\%configuration%.%platform%\Plugins\FarColorer\base
- mkdir ci\%configuration%.%platform%\Plugins\FarColorer\bin
- copy /Y FarColorer\build\%configuration%\%platform%\src\colorer.* ci\%configuration%.%platform%\Plugins\FarColorer\bin
- copy /Y FarColorer\docs\history.ru.txt ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\LICENSE ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\README.md ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\misc\* ci\%configuration%.%platform%\Plugins\FarColorer\bin
- set COLORER_VERSION=1.4.1
- set COLORER_PLATFORM=x86
- if "%platform%" == "x64" set COLORER_PLATFORM=x64
- set COLORER_FILE_NAME=FarColorer.%COLORER_PLATFORM%.v%COLORER_VERSION%.7z
- curl -fsLJO https://github.com/colorer/FarColorer/releases/download/v%COLORER_VERSION%/%COLORER_FILE_NAME%
- mkdir ci\%configuration%.%platform%\Plugins\FarColorer
- 7z x %COLORER_FILE_NAME% -oci\%configuration%.%platform%\Plugins\FarColorer
#remove not needed build artifacts
- if "%platform%" == "x86" powershell "Get-ChildItem ci\${Env:configuration}`.${Env:platform}\FExcept -filter *.map -File | Remove-Item"
- ps: Get-ChildItem ci\${Env:configuration}`.${Env:platform}\ -recurse -File | Where-Object { @(".lib", ".exp", ".ilk") -contains $_.extension } | Remove-Item
Expand Down
8 changes: 0 additions & 8 deletions misc/nightly/colorer.32.bat

This file was deleted.

8 changes: 0 additions & 8 deletions misc/nightly/colorer.64.bat

This file was deleted.

55 changes: 11 additions & 44 deletions misc/nightly/colorer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,23 @@

function bcolorer {
BIT=$1
PLATFORM=$2
PLUGIN=FarColorer

mkdir -p build/Release/${PLATFORM} || return 1

pushd build/Release/${PLATFORM} || return 1

wine cmd /c ../../../../colorer.${BIT}.bat &> ../../../../logs/colorer${BIT}

if [ ! -e src/colorer.dll ]; then
echo "Can't find colorer.dll"
COLORER_VERSION=1.4.1
COLORER_PLATFORM=$2
COLORER_FILE_NAME=FarColorer.${COLORER_PLATFORM}.v${COLORER_VERSION}.7z

rm -f ${COLORER_FILE_NAME}
curl -fsLJO -o ${COLORER_FILE_NAME} https://github.com/colorer/FarColorer/releases/download/v${COLORER_VERSION}/${COLORER_FILE_NAME}
if [ ! -e ${COLORER_FILE_NAME} ]; then
echo "Can't find ${COLORER_FILE_NAME}"
return 1
fi
mkdir outfinalnew${BIT}/Plugins/$PLUGIN
7z x ${COLORER_FILE_NAME} -ooutfinalnew${BIT}/Plugins/$PLUGIN
rm -f ${COLORER_FILE_NAME}

mkdir -p ../../../../outfinalnew${BIT}/Plugins/${PLUGIN}/bin

cp -f src/colorer.dll src/colorer.map ../../../../outfinalnew${BIT}/Plugins/$PLUGIN/bin

popd

cp -f docs/history.ru.txt LICENSE README.md ../outfinalnew${BIT}/Plugins/$PLUGIN/
cp -f misc/* ../outfinalnew${BIT}/Plugins/$PLUGIN/bin

pushd ../Colorer-schemes || return 1
mkdir -p ../outfinalnew${BIT}/Plugins/$PLUGIN/base
cp -Rf build/basefar/* ../outfinalnew${BIT}/Plugins/$PLUGIN/base
popd
}

#git clone must already exist
cd Colorer-schemes || exit 1
git pull || exit 1

#neweset ubuntu ant 1.8.2/1.9.3 has a bug and can't find the resolver, 1.8.4 works fine
PATH=~/apache-ant-1.8.4/bin:$PATH
export PATH
rm -fR build
./build.sh base.far.clean
./build.sh base.far &> ../logs/colorerschemes || exit 1

cd ..

#git clone must already exist
cd FarColorer || exit 1
rm -fR build
git fetch || exit 1
git checkout -B build-from-far origin/build-from-far || exit 1
git pull || exit 1
git submodule update --recursive || exit 1

( \
bcolorer 32 x86 && \
bcolorer 64 x64 \
Expand Down

0 comments on commit 99a449e

Please sign in to comment.