Commit 8a53aa46 authored by charras's avatar charras

solved some problems in hotkeys files access when spaces are used in names,...

solved some problems in hotkeys files access when spaces are used in names, and udtated paths according to the new tree used in kicad
Added wxWidgets version in about dialog
parent 97c3de7a
...@@ -65,6 +65,8 @@ void InitKiCadAbout(wxAboutDialogInfo& info) ...@@ -65,6 +65,8 @@ void InitKiCadAbout(wxAboutDialogInfo& info)
#else #else
description << (wxT(" 32 bits")); description << (wxT(" 32 bits"));
#endif #endif
description << (wxT("\n with wxWidgets "));
description << wxMAJOR_VERSION << wxT(".") << wxMINOR_VERSION << wxT(".") << wxRELEASE_NUMBER;
description << wxT("\n\nWeb sites:\n"); description << wxT("\n\nWeb sites:\n");
description << wxT("http://iut-tice.ujf-grenoble.fr/kicad/" ); description << wxT("http://iut-tice.ujf-grenoble.fr/kicad/" );
......
...@@ -576,7 +576,7 @@ wxString ReturnHotkeyConfigFilePath( int choice ) ...@@ -576,7 +576,7 @@ wxString ReturnHotkeyConfigFilePath( int choice )
/****************************************************/ /****************************************************/
/* return the hotkey config file path /* return the hotkey config file path
* @param choice : 0 = home, 1 = kicad/template * @param choice : 0 = home, 1 = kicad/share/template
*/ */
{ {
wxString path; wxString path;
...@@ -584,11 +584,11 @@ wxString ReturnHotkeyConfigFilePath( int choice ) ...@@ -584,11 +584,11 @@ wxString ReturnHotkeyConfigFilePath( int choice )
switch( choice ) switch( choice )
{ {
case 0: case 0:
path = DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME; path = wxGetHomeDir() + wxT( "/" );
break; break;
case 1: case 1:
path = DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD; path = ReturnKicadDatasPath() + wxT( "template/" );
break; break;
default: default:
......
...@@ -93,6 +93,7 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event ) ...@@ -93,6 +93,7 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME; FullFileName += HOTKEY_FILENAME;
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT; FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
AddDelimiterString(FullFileName);
wxString editorname = GetEditorName(); wxString editorname = GetEditorName();
if( !editorname.IsEmpty() ) if( !editorname.IsEmpty() )
ExecuteFile( this, editorname, FullFileName ); ExecuteFile( this, editorname, FullFileName );
......
# File: makefile for eeschema, mingw # File: makefile for eeschema, mingw
#used only to define (KICAD_BIN) and (LIBSTDC) : #used only to define (KICAD_PLUGINS) :
include ../../libs.linux include ../../libs.linux
all: netlist_form_pads-pcb all: netlist_form_pads-pcb
...@@ -11,7 +11,7 @@ deps: ...@@ -11,7 +11,7 @@ deps:
-include *.d -include *.d
netlist_form_pads-pcb: netlist_form_pads-pcb.cpp makefile.gtk netlist_form_pads-pcb: netlist_form_pads-pcb.cpp makefile.gtk
gcc -D__UNIX__ -Wall netlist_form_pads-pcb.cpp -o netlist_form_pads-pcb $(LIBSTDC) g++ -D__UNIX__ -Wall netlist_form_pads-pcb.cpp -o netlist_form_pads-pcb
install: netlist_form_pads-pcb install: netlist_form_pads-pcb
mkdir -p $(KICAD_PLUGINS) mkdir -p $(KICAD_PLUGINS)
......
...@@ -71,11 +71,27 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event ) ...@@ -71,11 +71,27 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
Read_Hotkey_Config( this, true ); Read_Hotkey_Config( this, true );
break; break;
case ID_PREFERENCES_EDIT_CONFIG_HOTKEYS:
{
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
AddDelimiterString(FullFileName);
wxString editorname = GetEditorName();
if( !editorname.IsEmpty() )
ExecuteFile( this, editorname, FullFileName );
}
break;
case ID_PREFERENCES_HOTKEY_PATH_IS_HOME: case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD: case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
HandleHotkeyConfigMenuSelection( this, id ); HandleHotkeyConfigMenuSelection( this, id );
break; break;
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST: // Display Current hotkey list for gerbview
DisplayHotkeyList( this, s_Gerbview_Hokeys_Descr );
break;
default: default:
DisplayError( this, wxT( "WinEDA_GerberFrame::Process_Config internal error" ) ); DisplayError( this, wxT( "WinEDA_GerberFrame::Process_Config internal error" ) );
} }
......
...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion ...@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h" # include "config.h"
(wxT(KICAD_SVN_VERSION)) (wxT(KICAD_SVN_VERSION))
# else # else
(wxT("(20080825)")) /* main program version */ (wxT("(20080825-RC1)")) /* main program version */
# endif # endif
#endif #endif
; ;
...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion ...@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion
# include "config.h" # include "config.h"
(wxT(KICAD_ABOUT_VERSION)) (wxT(KICAD_ABOUT_VERSION))
# else # else
(wxT("(20080811.r1188)")) /* svn date & rev (normally overridden) */ (wxT("(20080825-RC1)")) /* svn date & rev (normally overridden) */
# endif # endif
#endif #endif
; ;
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" ) #define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" )
/* define default path for config key file */
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME wxGetHomeDir() + wxT( "/" )
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD g_EDA_Appl->m_BinDir + wxT( "../template/" )
/* keyword idetifier in kicad config use ti store/retrieve path option */ /* keyword idetifier in kicad config use ti store/retrieve path option */
#define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" ) #define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
......
# #
# Configuration for kicad build & install # Configuration for kicad build & install if not using cmake
# and wxWidgets 2.8.8
# #
# You must comment or uncomment this line to disable/enable python support # You must comment or uncomment this line to disable/enable python support
...@@ -12,12 +13,12 @@ ...@@ -12,12 +13,12 @@
# non-standard location edit common/gestfich.ccp so it knows where to # non-standard location edit common/gestfich.ccp so it knows where to
# load help/data/etc. files from. # load help/data/etc. files from.
# Current supported PREFIXes are /usr and /usr/local (standard install for distributions) # Current supported PREFIXes are /usr and /usr/local (standard install for distributions)
# and /usr/local/kicad is used when STD_INSTALL = 0 or STD_INSTALL = 2 # /usr/local/kicad is used when STD_INSTALL = 0, or STD_INSTALL = 2
# all kicad files will be in /usr/local/kicad # all kicad files will be in /usr/local/kicad
# STD_INSTALL = 2 is used only to make static link (only useful when kicad run on an other # STD_INSTALL = 2 is used only to make static link (only useful when kicad run on an other
# linux distribution than the distributions used to compil kicad. # linux distribution than the distributions used to compil kicad.
STD_INSTALL = 1 STD_INSTALL = 0
#******************************************* #*******************************************
#******************************************* #*******************************************
...@@ -32,42 +33,39 @@ ifndef KICAD_STATIC_LINK ...@@ -32,42 +33,39 @@ ifndef KICAD_STATIC_LINK
KICAD_STATIC_LINK = 0 KICAD_STATIC_LINK = 0
endif endif
ifeq ($(STD_INSTALL), 1) ifeq ($(STD_INSTALL), 1) # Used to build linux distribs
PREFIX = /usr PREFIX = /usr # (can also be /usr/local)
KICAD_BIN = $(PREFIX)/bin KICAD_BIN = $(PREFIX)/bin # Install main binaries here
KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins KICAD_PLUGINS = $(KICAD_BIN) # Install other binaries here
KICAD_DOCS=$(PREFIX)/share/doc/kicad KICAD_DOCS=$(PREFIX)/share/doc/kicad # Install doc files here
KICAD_DATA=$(PREFIX)/share/kicad KICAD_DATA=$(PREFIX)/share/kicad # Install libraries and others files here
KICAD_MODULES=$(KICAD_DATA)/modules
KICAD_LIBRARY=$(KICAD_DATA)/library
KICAD_INTERNAT=$(KICAD_DATA)/internat
KICAD_TEMPLATE=$(KICAD_DATA)/template
else else # Install ALL files in /usr/local/kicad
# when STD_INSTALL = 0 or STD_INSTALL = 2 # when STD_INSTALL = 0 or STD_INSTALL = 2
# STD_INSTALL = 2 is used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0) # STD_INSTALL = 0 is used to build kicad intalled in /usr/local
# STD_INSTALL = 2 is used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local
PREFIX = /usr/local/kicad PREFIX = /usr/local/kicad
KICAD_BIN = $(PREFIX)/linux KICAD_BIN = $(PREFIX)/bin
KICAD_PLUGINS = $(KICAD_BIN)/plugins KICAD_PLUGINS = $(KICAD_BIN)/plugins
KICAD_DOCS=$(PREFIX)/help KICAD_DOCS=$(PREFIX)/help
KICAD_DATA=$(PREFIX) KICAD_DATA=$(PREFIX)/share
endif
KICAD_MODULES=$(KICAD_DATA)/modules KICAD_MODULES=$(KICAD_DATA)/modules
KICAD_LIBRARY=$(KICAD_DATA)/library KICAD_LIBRARY=$(KICAD_DATA)/library
KICAD_INTERNAT=$(KICAD_DATA)/internat KICAD_INTERNAT=$(KICAD_DATA)/internat
KICAD_TEMPLATE=$(KICAD_DATA)/template KICAD_TEMPLATE=$(KICAD_DATA)/template
endif
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules
CXX = g++
# define compil and link
LD = g++
SRCSUFF = .cpp SRCSUFF = .cpp
OBJSUFF = .o OBJSUFF = .o
FINAL = 1 FINAL = 1
# turn on/OFF debugging for all executables, only tested without KICAD_PYTHON # turn ON/OFF debugging for all executables, only tested without KICAD_PYTHON
DEBUG = 1 DEBUG = 0
# common CPPFLAGS to all components, further CPPFLAGS customization in # common CPPFLAGS to all components, further CPPFLAGS customization in
...@@ -88,14 +86,6 @@ ifdef USE_MATCH_LAYER ...@@ -88,14 +86,6 @@ ifdef USE_MATCH_LAYER
CPPFLAGS += -DUSE_MATCH_LAYER CPPFLAGS += -DUSE_MATCH_LAYER
endif endif
ifeq ($(KICAD_STATIC_LINK), 1)
LD = gcc
else
LD = g++
endif
ifdef KICAD_PYTHON ifdef KICAD_PYTHON
PYTHON_VERSION=2.5 PYTHON_VERSION=2.5
PYLIBS= -L/usr/lib PYLIBS= -L/usr/lib
...@@ -105,70 +95,40 @@ PYLIBS+= -lboost_python-mt ...@@ -105,70 +95,40 @@ PYLIBS+= -lboost_python-mt
EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing
endif endif
# path and version definition for wxWidgets and mesa libs # mesa (free opengl library) libs
MESALIBSPATH = /usr/local/lib MESALIBSPATH = /usr/local/lib
#for static link: add wx gl lib
LIBVERSION=`wx-config --release`
WXPATH = `wx-config --prefix`/lib WXPATH = `wx-config --prefix`/lib
PREFIX_WX_LIBS = lib`wx-config --basename` PREFIX_WX_LIBS = lib`wx-config --basename`
SUFFIX_WX_LIBSTD = `wx-config --utility=`
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a
# Use static link for libstdc++.a (sometimes also libsupc++.a) ifeq ($(DEBUG), 1)
# locate libstdc++.a and copy it in kicad_dev/syslibs # debug wxWidgets
ifeq ($(KICAD_STATIC_LINK), 1) WXSYSLIB= `wx-config --debug --libs std`
#define path for a copy of libstdc++.a or/and libsupc++.a:
LIBSTDC = ../syslibs/libstdc++.a
else else
# Or Use static link for libsupc++ or libstdc++ (more easy!!) # or use "standard command" for wxWidgets
LIBSTDC = #-lstdc++ is implied when using g++ to link WXSYSLIB= `wx-config --libs std`
endif endif
# use link static
LIBVERSION=`wx-config --release`
LIBREGEX=$(WXPATH)/libwxregexu-$(LIBVERSION).a
# use link static for wxWidgets
ifeq ($(KICAD_STATIC_LINK), 1) ifeq ($(KICAD_STATIC_LINK), 1)
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\ LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
$(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
AUXLIB = -lXxf86vm
#AUXLIB = /usr/X11R6/lib/libXinerama.a
WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
$(WXPATH)/libwxpng-$(LIBVERSION).a\
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
$(LIBREGEX)\
$(AUXLIB)\
-lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\
-lglib-2.0 -lpangoft2-1.0 -lSM\
-L/usr/lib $(PYLIBS)
WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D) WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
else else
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
# debug wxWidgets
WXSYSLIB= `wx-config --debug --libs std`
WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl` WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl`
else else
# or use "standard command" for wxWidgets
WXSYSLIB= `wx-config --libs std`
WXSYSLIB_WITH_GL= `wx-config --libs std,gl` WXSYSLIB_WITH_GL= `wx-config --libs std,gl`
endif endif
endif endif
# attention l'ordre des libairies # attention a l'ordre des libairies
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\ LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
$(EXTRALIBS) $(WXSYSLIB)\ $(EXTRALIBS) $(WXSYSLIB) $(PYLIBS)
$(LIBSTDC) $(PYLIBS)
LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\ LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\
$(EXTRALIBS) $(WXSYSLIB_WITH_GL)\ $(EXTRALIBS) $(WXSYSLIB_WITH_GL) $(PYLIBS)
$(LIBSTDC) $(PYLIBS)
...@@ -104,6 +104,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event ) ...@@ -104,6 +104,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME; FullFileName += HOTKEY_FILENAME;
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT; FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
AddDelimiterString(FullFileName);
wxString editorname = GetEditorName(); wxString editorname = GetEditorName();
if( !editorname.IsEmpty() ) if( !editorname.IsEmpty() )
ExecuteFile( this, editorname, FullFileName ); ExecuteFile( this, editorname, FullFileName );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment