From faa6582adcd6b126a2ff9b04cb3f61dec05d37f7 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 9 Jan 2014 09:01:59 -0600 Subject: [PATCH] file maintenance, update some scripts --- bitmaps_png/mk_icn_res.sh | 56 ++++++++++++++++++++++++++++++++++++ new/toolchain-mingw.cmake | 40 -------------------------- new/toolchain-mingw32.cmake | 34 ++++++++++++++++++++++ new/toolchain-mingw64.cmake | 35 +++++++++++++++++++++++ tools/make-UTF8.sh | 7 ----- tools/update-boost.sh | 57 ------------------------------------- 6 files changed, 125 insertions(+), 104 deletions(-) create mode 100755 bitmaps_png/mk_icn_res.sh delete mode 100644 new/toolchain-mingw.cmake create mode 100644 new/toolchain-mingw32.cmake create mode 100644 new/toolchain-mingw64.cmake delete mode 100755 tools/make-UTF8.sh delete mode 100755 tools/update-boost.sh diff --git a/bitmaps_png/mk_icn_res.sh b/bitmaps_png/mk_icn_res.sh new file mode 100755 index 0000000000..25a40883ca --- /dev/null +++ b/bitmaps_png/mk_icn_res.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# make icons using Inkscape + +# create output directories +cd ../resources/linux/mime/icons/hicolor +rm -r * +mkdir scalable +echo -e '\E[0;34m'"Directory \"scalable\" for .svg icons was created." + +# copy sources to the scalable dir +cd ../../../../../bitmaps_png/sources +cp icon_kicad.svg ../../resources/linux/mime/icons/hicolor/scalable/kicad.svg +cp icon_pcbnew.svg ../../resources/linux/mime/icons/hicolor/scalable/pcbnew.svg +cp icon_eeschema.svg ../../resources/linux/mime/icons/hicolor/scalable/eeschema.svg +echo -e '\E[0;34m'"Sources of icons was copied." + +# convert .svg files into .png files +cd ../../resources/linux/mime/icons/hicolor/scalable + +SIZES="16x16 + 22x22 + 24x24 + 32x32 + 48x48" + +for size in $SIZES +do + sz=${size%x*} + echo -e '\E[0;32m'"\nMaking the mimetypes icons with size $size." + mkdir ../$size + echo -e '\E[0;34m'"Directory $size was created." + mkdir ../$size/mimetypes + echo -e '\E[0;34m'"Subdirectory \"mimetypes\" was created." + tput sgr0 + + inkscape -f kicad.svg -e ../$size/mimetypes/application-x-kicad-project.png -w $sz -h $sz --export-area-snap + inkscape -f eeschema.svg -e ../$size/mimetypes/application-x-kicad-eeschema.png -w $sz -h $sz --export-area-snap + inkscape -f pcbnew.svg -e ../$size/mimetypes/application-x-kicad-pcbnew.png -w $sz -h $sz --export-area-snap + echo -e '\E[0;34m'"Icons with size $size was created." + + if [ $sz -eq 48 ] + then + echo -e '\E[0;32m'"\nMaking the applications icons with size $size." + mkdir ../$size/apps + echo -e '\E[0;34m'"Subdirectory \"apps\" was created." + tput sgr0 + + inkscape -f kicad.svg -e ../$size/apps/kicad.png -w $sz -h $sz --export-area-snap + inkscape -f eeschema.svg -e ../$size/apps/eeschema.png -w $sz -h $sz --export-area-snap + inkscape -f pcbnew.svg -e ../$size/apps/pcbnew.png -w $sz -h $sz --export-area-snap + echo -e '\E[0;34m'"Icons with size $size was created." + tput sgr0 + fi +done + diff --git a/new/toolchain-mingw.cmake b/new/toolchain-mingw.cmake deleted file mode 100644 index 387188aff5..0000000000 --- a/new/toolchain-mingw.cmake +++ /dev/null @@ -1,40 +0,0 @@ - -# This is a CMake toolchain file for ARM: -# http://vtk.org/Wiki/CMake_Cross_Compiling - -# usage -# cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchain-mingw.cmake .. - -# It is here to assist Dick with verifying compilation of /new stuff with mingw (under linux) - -set( CMAKE_SYSTEM_NAME Windows ) - -#---------------------------------------------------- - -# configure only the lines within this block, typically - -# default is specific to Dick's machine, again for testing only: -set( WX_MINGW_BASE /opt/wx2.9-mingw ) - -# specify the cross compiler -set( CMAKE_C_COMPILER i586-mingw32msvc-gcc ) -set( CMAKE_CXX_COMPILER i586-mingw32msvc-g++ ) - -# where is the target environment -set( CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc ) - -include_directories( ${WX_MINGW_BASE}/include ) - - - -#---------------------------------------------------- - -# search for programs in the build host directories -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) - -# for libraries and headers in the target directories -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) - -# try and pre-load this variable, or do it later in ccmake -set( wxWidgets_CONFIG_EXECUTABLE ${WX_MINGW_BASE}/bin/wx-config ) diff --git a/new/toolchain-mingw32.cmake b/new/toolchain-mingw32.cmake new file mode 100644 index 0000000000..cbfb7af14e --- /dev/null +++ b/new/toolchain-mingw32.cmake @@ -0,0 +1,34 @@ + +# This is a CMake toolchain file so we can using Mingw to build Windows32 binaries. +# http://vtk.org/Wiki/CMake_Cross_Compiling + +# usage +# cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw32.cmake ../ + +set( CMAKE_SYSTEM_NAME Windows ) +set( CMAKE_SYSTEM_PROCESSOR i686 ) + +#---------------------------------------------------- + +# configure only the lines within this block, typically + +set( TC_PATH /usr/bin ) +set( CROSS_COMPILE i686-w64-mingw32- ) + +# specify the cross compiler +set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc ) +set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ ) +set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres ) + +# where is the target environment +set( CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ) + +#---------------------------------------------------- + +# search for programs in the build host directories +set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) + +# for libraries and headers in the target directories +set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) +set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) + diff --git a/new/toolchain-mingw64.cmake b/new/toolchain-mingw64.cmake new file mode 100644 index 0000000000..bf4a366df3 --- /dev/null +++ b/new/toolchain-mingw64.cmake @@ -0,0 +1,35 @@ + +# This is a CMake toolchain file so we can run Mingw64 to build a Windows64 binaries. +# http://vtk.org/Wiki/CMake_Cross_Compiling + +# usage +# cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw64.cmake ../ + + +set( CMAKE_SYSTEM_NAME Windows ) +set( CMAKE_SYSTEM_PROCESSOR x86_64 ) + +#---------------------------------------------------- + +# configure only the lines within this block, typically + +set( TC_PATH /usr/bin ) +set( CROSS_COMPILE x86_64-w64-mingw32- ) + +# specify the cross compiler +set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc ) +set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ ) +set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres ) + +# where is the target environment +set( CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 ) + +#---------------------------------------------------- + +# search for programs in the build host directories +set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) + +# for libraries and headers in the target directories +set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) +set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) + diff --git a/tools/make-UTF8.sh b/tools/make-UTF8.sh deleted file mode 100755 index 8e57cf1ae2..0000000000 --- a/tools/make-UTF8.sh +++ /dev/null @@ -1,7 +0,0 @@ - - -WXCONFIG=wx-config -#WXCONFIG=/opt/wx2.9/bin/wx-config - -g++ -g $($WXCONFIG --cppflags) UTF8.cpp -o test $($WXCONFIG --libs) - diff --git a/tools/update-boost.sh b/tools/update-boost.sh deleted file mode 100755 index 7291d42668..0000000000 --- a/tools/update-boost.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# A shell script to update the boost subset within KiCad to newer version. - -BOOST_VERSION=1_49_0 -SRC_BOOST="/tmp/boost_$BOOST_VERSION/boost" -KICAD_BASE="/svn/kicad/testing.checkout" -DST_BOOST="$KICAD_BASE/include/boost" - -# control the subset of boost libs used: -BOOST_DIRS="\ - archive \ - bind \ - concept \ - config \ - detail \ - exception \ - functional \ - heap \ - integer \ - iterator \ - move \ - mpl \ - multi_index \ - optional \ - polygon \ - preprocessor \ - property_tree \ - ptr_container \ - range \ - regex \ - serialization \ - smart_ptr \ - tuple \ - typeof \ - type_traits \ - unordered \ - utility \ - " - - -# remove all old BOOST include files using bzr -eval bzr rm --no-backup --quiet "$DST_BOOST/*" - -# copy all *.hpp files in the base boost directory: -eval cp "$SRC_BOOST/*.hpp" "$DST_BOOST/" - -# copy recursively all chosen boost libraries: -for D in $BOOST_DIRS; do - eval cp -r "$SRC_BOOST/$D" "$DST_BOOST/" -done - -# tell bzr about the new files so they become part of the repo. -eval bzr add "$DST_BOOST/*" - -eval echo "boost version: $BOOST_VERSION" > "$DST_BOOST/boost_version.txt" -