You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

830 lines
27 KiB

8 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
8 years ago
8 years ago
8 years ago
18 years ago
18 years ago
18 years ago
8 years ago
8 years ago
18 years ago
8 years ago
8 years ago
18 years ago
18 years ago
8 years ago
18 years ago
8 years ago
18 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
  1. if( UNIX AND NOT APPLE )
  2. # Setting this ON slows down linking and is a advanced (=hidden) developer option for
  3. # linux, not a user option.
  4. option( PCBNEW_LINK_MAPS
  5. "Developer: create linker map files for pcbnew binaries, not typical for Debug builds"
  6. )
  7. mark_as_advanced( PCBNEW_LINK_MAPS )
  8. endif()
  9. add_definitions( -DPCBNEW )
  10. add_subdirectory(router)
  11. # psnrouter depends on make_lexer outputs in common (bug # 1285878 )
  12. add_dependencies( pnsrouter pcbcommon )
  13. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  14. file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swig )
  15. # Infrequently needed headers go at end of search paths, append to INC_AFTER
  16. set( INC_AFTER ${INC_AFTER} swig )
  17. set( INC_AFTER ${INC_AFTER} ../common/swig )
  18. #message( STATUS "pcbnew INC_AFTER:${INC_AFTER}" )
  19. endif()
  20. if( BUILD_GITHUB_PLUGIN )
  21. set( GITHUB_3DLIBRARIES_WIZARD
  22. dialogs/wizard_3DShape_Libs_downloader_base.cpp
  23. dialogs/wizard_3DShape_Libs_downloader.cpp
  24. )
  25. endif()
  26. include_directories( BEFORE ${INC_BEFORE} )
  27. include_directories(
  28. ./dialogs
  29. ./autorouter
  30. ../3d-viewer
  31. ../common
  32. ../polygon
  33. ../common/dialogs
  34. ./exporters
  35. ../lib_dxf
  36. ./import_dxf
  37. ../utils/idftools
  38. ${GLM_INCLUDE_DIR}
  39. ./specctra_import_export
  40. ${INC_AFTER}
  41. )
  42. set( PCBNEW_DIALOGS
  43. dialogs/dialog_SVG_print.cpp
  44. dialogs/dialog_SVG_print_base.cpp
  45. dialogs/dialog_block_options.cpp
  46. dialogs/dialog_block_options_base.cpp
  47. dialogs/dialog_cleaning_options.cpp
  48. dialogs/dialog_cleaning_options_base.cpp
  49. dialogs/dialog_copper_zones.cpp
  50. dialogs/dialog_copper_zones_base.cpp
  51. dialogs/dialog_create_array.cpp
  52. dialogs/dialog_create_array_base.cpp
  53. dialogs/dialog_design_rules.cpp
  54. dialogs/dialog_design_rules_base.cpp
  55. dialogs/dialog_dimension_editor_base.cpp
  56. dialogs/dialog_display_options.cpp
  57. dialogs/dialog_display_options_base.cpp
  58. dialogs/dialog_drc.cpp
  59. dialogs/dialog_drc_base.cpp
  60. dialogs/dialog_edit_footprint_for_BoardEditor.cpp
  61. dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
  62. dialogs/dialog_edit_footprint_for_fp_editor.cpp
  63. dialogs/dialog_edit_footprint_for_fp_editor_base.cpp
  64. dialogs/dialog_edit_footprint_text.cpp
  65. dialogs/dialog_edit_footprint_text_base.cpp
  66. dialogs/dialog_enum_pads.cpp
  67. dialogs/dialog_enum_pads_base.cpp
  68. dialogs/dialog_exchange_footprints.cpp
  69. dialogs/dialog_exchange_footprints_base.cpp
  70. dialogs/dialog_export_idf.cpp
  71. dialogs/dialog_export_idf_base.cpp
  72. dialogs/dialog_export_step.cpp
  73. dialogs/dialog_export_step_base.cpp
  74. dialogs/dialog_export_vrml.cpp
  75. dialogs/dialog_export_vrml_base.cpp
  76. dialogs/dialog_find.cpp
  77. dialogs/dialog_find_base.cpp
  78. dialogs/dialog_footprint_wizard_list.cpp
  79. dialogs/dialog_footprint_wizard_list_base.cpp
  80. dialogs/dialog_fp_lib_table.cpp
  81. dialogs/dialog_fp_lib_table_base.cpp
  82. dialogs/dialog_fp_plugin_options.cpp
  83. dialogs/dialog_fp_plugin_options_base.cpp
  84. dialogs/dialog_gen_footprint_position_file_base.cpp
  85. dialogs/dialog_gencad_export_options.cpp
  86. dialogs/dialog_gendrill.cpp
  87. dialogs/dialog_gendrill_base.cpp
  88. dialogs/dialog_general_options.cpp
  89. dialogs/dialog_general_options_BoardEditor_base.cpp
  90. dialogs/dialog_get_footprint.cpp
  91. dialogs/dialog_get_footprint_base.cpp
  92. dialogs/dialog_get_footprint_by_name_base.cpp
  93. dialogs/dialog_global_deletion.cpp
  94. dialogs/dialog_global_deletion_base.cpp
  95. dialogs/dialog_global_edit_tracks_and_vias.cpp
  96. dialogs/dialog_global_edit_tracks_and_vias_base.cpp
  97. dialogs/dialog_global_footprints_fields_edition.cpp
  98. dialogs/dialog_global_footprints_fields_edition_base.cpp
  99. dialogs/dialog_global_pads_edition.cpp
  100. dialogs/dialog_global_pads_edition_base.cpp
  101. dialogs/dialog_graphic_item_properties.cpp
  102. dialogs/dialog_graphic_item_properties_base.cpp
  103. dialogs/dialog_graphic_item_properties_for_fp_editor.cpp
  104. dialogs/dialog_graphic_items_options.cpp
  105. dialogs/dialog_graphic_items_options_base.cpp
  106. dialogs/dialog_keepout_area_properties.cpp
  107. dialogs/dialog_keepout_area_properties_base.cpp
  108. dialogs/dialog_layer_selection_base.cpp
  109. dialogs/dialog_layers_setup.cpp
  110. dialogs/dialog_layers_setup_base.cpp
  111. dialogs/dialog_mask_clearance.cpp
  112. dialogs/dialog_mask_clearance_base.cpp
  113. dialogs/dialog_modedit_display_options.cpp
  114. dialogs/dialog_modedit_options.cpp
  115. dialogs/dialog_modedit_options_base.cpp
  116. dialogs/dialog_move_exact.cpp
  117. dialogs/dialog_move_exact_base.cpp
  118. dialogs/dialog_netlist.cpp
  119. dialogs/dialog_netlist_base.cpp
  120. dialogs/dialog_non_copper_zones_properties.cpp
  121. dialogs/dialog_non_copper_zones_properties_base.cpp
  122. dialogs/dialog_pad_basicshapes_properties.cpp
  123. dialogs/dialog_pad_properties.cpp
  124. dialogs/dialog_pad_properties_base.cpp
  125. dialogs/dialog_pcb_text_properties.cpp
  126. dialogs/dialog_pcb_text_properties_base.cpp
  127. dialogs/dialog_plot.cpp
  128. dialogs/dialog_plot_base.cpp
  129. dialogs/dialog_pns_diff_pair_dimensions.cpp
  130. dialogs/dialog_pns_diff_pair_dimensions_base.cpp
  131. dialogs/dialog_pns_length_tuning_settings.cpp
  132. dialogs/dialog_pns_length_tuning_settings_base.cpp
  133. dialogs/dialog_pns_settings.cpp
  134. dialogs/dialog_pns_settings_base.cpp
  135. dialogs/dialog_position_relative.cpp
  136. dialogs/dialog_position_relative_base.cpp
  137. dialogs/dialog_print_for_modedit.cpp
  138. dialogs/dialog_print_for_modedit_base.cpp
  139. dialogs/dialog_print_using_printer.cpp
  140. dialogs/dialog_print_using_printer_base.cpp
  141. dialogs/dialog_select_net_from_list.cpp
  142. dialogs/dialog_select_net_from_list_base.cpp
  143. dialogs/dialog_select_pretty_lib.cpp
  144. dialogs/dialog_select_pretty_lib_base.cpp
  145. dialogs/dialog_set_grid.cpp
  146. dialogs/dialog_set_grid_base.cpp
  147. dialogs/dialog_target_properties_base.cpp
  148. dialogs/dialog_track_via_properties.cpp
  149. dialogs/dialog_track_via_properties_base.cpp
  150. dialogs/dialog_track_via_size.cpp
  151. dialogs/dialog_track_via_size_base.cpp
  152. dialogs/dialog_update_pcb.cpp
  153. dialogs/dialog_update_pcb_base.cpp
  154. footprint_wizard.cpp
  155. footprint_wizard_frame.cpp
  156. footprint_wizard_frame_functions.cpp
  157. ${GITHUB_3DLIBRARIES_WIZARD}
  158. )
  159. set( PCBNEW_IMPORT_DXF
  160. import_dxf/dialog_dxf_import.cpp
  161. import_dxf/dialog_dxf_import_base.cpp
  162. import_dxf/dxf2brd_items.cpp
  163. )
  164. set( PCBNEW_EXPORTERS
  165. exporters/export_d356.cpp
  166. exporters/export_gencad.cpp
  167. exporters/export_idf.cpp
  168. exporters/export_vrml.cpp
  169. exporters/gen_drill_report_files.cpp
  170. exporters/gen_footprints_placefile.cpp
  171. exporters/gendrill_Excellon_writer.cpp
  172. exporters/gendrill_file_writer_base.cpp
  173. exporters/gendrill_gerber_writer.cpp
  174. exporters/gerber_jobfile_writer.cpp
  175. )
  176. set( PCBNEW_MICROWAVE_SRCS
  177. microwave/microwave_inductor.cpp
  178. )
  179. set( PCBNEW_CLASS_SRCS
  180. ${PCBNEW_DIALOGS}
  181. ${PCBNEW_EXPORTERS}
  182. ${PCBNEW_IMPORT_DXF}
  183. autorouter/rect_placement/rect_placement.cpp
  184. autorouter/spread_footprints.cpp
  185. action_plugin.cpp
  186. append_board_to_current.cpp
  187. array_creator.cpp
  188. attribut.cpp
  189. block.cpp
  190. block_footprint_editor.cpp
  191. board_netlist_updater.cpp
  192. build_BOM_from_board.cpp
  193. connect.cpp
  194. controle.cpp
  195. cross-probing.cpp
  196. deltrack.cpp
  197. dimension.cpp
  198. dragsegm.cpp
  199. drc.cpp
  200. drc_clearance_test_functions.cpp
  201. drc_marker_functions.cpp
  202. edgemod.cpp
  203. edit.cpp
  204. edit_pcb_text.cpp
  205. edit_track_width.cpp
  206. editedge.cpp
  207. editrack-part2.cpp
  208. editrack.cpp
  209. edtxtmod.cpp
  210. event_handlers_tracks_vias_sizes.cpp
  211. files.cpp
  212. footprint_info_impl.cpp
  213. footprint_wizard.cpp
  214. footprint_editor_utils.cpp
  215. footprint_editor_onclick.cpp
  216. footprint_editor_options.cpp
  217. footprint_edit_frame.cpp
  218. footprint_libraries_utils.cpp
  219. footprint_viewer_frame.cpp
  220. globaleditpad.cpp
  221. highlight.cpp
  222. hotkeys.cpp
  223. hotkeys_board_editor.cpp
  224. hotkeys_footprint_editor.cpp
  225. initpcb.cpp
  226. layer_widget.cpp
  227. load_select_footprint.cpp
  228. magnetic_tracks_functions.cpp
  229. menubar_footprint_editor.cpp
  230. menubar_pcb_editor.cpp
  231. microwave.cpp
  232. minimun_spanning_tree.cpp
  233. move-drag_pads.cpp
  234. move_or_drag_track.cpp
  235. muwave_command.cpp
  236. netlist.cpp
  237. onleftclick.cpp
  238. onrightclick.cpp
  239. pad_edition_functions.cpp
  240. pcb_base_edit_frame.cpp
  241. pcb_footprint_edit_utils.cpp
  242. pcb_layer_box_selector.cpp
  243. pcb_layer_widget.cpp
  244. # pcb_draw_panel_gal.cpp
  245. # pcb_view.cpp
  246. pcb_edit_frame.cpp
  247. pcbnew_config.cpp
  248. pcb_legacy_draw_utils.cpp
  249. pcbplot.cpp
  250. plot_board_layers.cpp
  251. plot_brditems_plotter.cpp
  252. print_board_functions.cpp
  253. printout_controler.cpp
  254. ratsnest.cpp
  255. specctra_import_export/specctra.cpp
  256. specctra_import_export/specctra_export.cpp
  257. specctra_import_export/specctra_import.cpp
  258. specctra_import_export/specctra_keywords.cpp
  259. swap_layers.cpp
  260. target_edit.cpp
  261. tool_footprint_editor.cpp
  262. tool_footprint_viewer.cpp
  263. tool_onrightclick.cpp
  264. tool_pcb_editor.cpp
  265. toolbars_update_user_interface.cpp
  266. tracks_cleaner.cpp
  267. undo_redo.cpp
  268. zone_filler.cpp
  269. zones_by_polygon.cpp
  270. zones_by_polygon_fill_functions.cpp
  271. zones_functions_for_undo_redo.cpp
  272. zones_test_and_combine_areas.cpp
  273. tools/drawing_tool.cpp
  274. tools/edit_constraints.cpp
  275. tools/edit_points.cpp
  276. tools/edit_tool.cpp
  277. tools/grid_helper.cpp
  278. tools/microwave_tool.cpp
  279. tools/footprint_editor_tools.cpp
  280. tools/pad_tool.cpp
  281. tools/pcb_actions.cpp
  282. tools/pcb_bright_box.cpp
  283. tools/pcb_editor_control.cpp
  284. tools/pcb_selection_conditions.cpp
  285. tools/pcb_tool.cpp
  286. tools/pcbnew_control.cpp
  287. tools/picker_tool.cpp
  288. tools/placement_tool.cpp
  289. tools/point_editor.cpp
  290. tools/position_relative_tool.cpp
  291. tools/selection.cpp
  292. tools/selection_tool.cpp
  293. tools/size_menu.cpp
  294. tools/tool_event_utils.cpp
  295. tools/tools_common.cpp
  296. tools/zone_create_helper.cpp
  297. tools/zone_filler_tool.cpp
  298. footprint_preview_panel.cpp
  299. )
  300. set( PCBNEW_SRCS
  301. ${PCBNEW_MICROWAVE_SRCS}
  302. ${PCBNEW_CLASS_SRCS}
  303. ${PCBNEW_DIALOGS}
  304. )
  305. # extra sources from common
  306. set( PCBNEW_COMMON_SRCS
  307. ../common/dialogs/dialog_page_settings.cpp
  308. ../common/base_units.cpp
  309. )
  310. set( PCBNEW_SCRIPTING_DIALOGS
  311. dialogs/dialog_scripting.cpp
  312. dialogs/dialog_scripting_base.cpp
  313. )
  314. set( PCBNEW_SCRIPTING_PYTHON_HELPERS
  315. ../common/swig/wx_python_helpers.cpp
  316. swig/pcbnew_action_plugins.cpp
  317. swig/pcbnew_footprint_wizards.cpp
  318. swig/pcbnew_scripting_helpers.cpp
  319. swig/python_scripting.cpp
  320. )
  321. # auto-generate specctra_lexer.h and specctra_keywords.cpp
  322. make_lexer(
  323. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra.keywords
  324. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  325. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  326. DSN
  327. # Pass header file with dependency on *_lexer.h as extra_arg
  328. specctra_import_export/specctra.h
  329. )
  330. add_custom_target(
  331. specctra_lexer_source_files ALL
  332. DEPENDS
  333. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  334. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  335. )
  336. if( COMPILER_SUPPORTS_WSHADOW )
  337. # .cpp files are compiled with extra ${WSHADOW_FLAGS}, but not .cxx files
  338. set_source_files_properties(
  339. ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_DIALOGS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  340. PROPERTIES COMPILE_FLAGS ${WSHADOW_FLAGS}
  341. )
  342. # There is a lot of 'local variable shadowed' warnings,
  343. # but we have no control over the generated code
  344. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  345. PROPERTIES COMPILE_FLAGS -Wno-shadow
  346. )
  347. endif()
  348. if( KICAD_SCRIPTING )
  349. set( PCBNEW_SCRIPTING_SRCS
  350. ${PCBNEW_SCRIPTING_DIALOGS}
  351. pcbnew_wrap.cxx
  352. ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  353. )
  354. # Swig generated files do not use the override specifier, therefore
  355. # disable suggest-override warnings
  356. if( COMPILER_SUPPORTS_WSUGGEST_OVERRIDE )
  357. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  358. PROPERTIES COMPILE_FLAGS -Wno-suggest-override
  359. )
  360. endif()
  361. endif()
  362. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  363. set( SWIG_FLAGS
  364. -I${CMAKE_CURRENT_SOURCE_DIR}
  365. -I${CMAKE_CURRENT_SOURCE_DIR}/../include
  366. -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting
  367. -I${CMAKE_CURRENT_SOURCE_DIR}/../common/swig
  368. -I${WXPYTHON_SWIG_DIR}
  369. )
  370. if( DEBUG )
  371. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  372. endif()
  373. # collect CFLAGS , and pass them to swig later
  374. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  375. foreach( d ${DirDefs} )
  376. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  377. endforeach()
  378. endif()
  379. if( KICAD_SCRIPTING ) # Generate pcbnew.py and pcbnew_wrap.cxx using swig
  380. # We deliberately do not use the CMake support for swig here,
  381. # i.e. swig_add_footprint()) because we want full control.
  382. set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
  383. if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
  384. set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
  385. set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
  386. endif()
  387. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
  388. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  389. DEPENDS pcbcommon
  390. DEPENDS plotcontroller.h
  391. DEPENDS exporters/gendrill_Excellon_writer.h
  392. DEPENDS swig/pcbnew.i
  393. DEPENDS swig/board.i
  394. DEPENDS swig/board_connected_item.i
  395. DEPENDS swig/board_design_settings.i
  396. DEPENDS swig/board_item.i
  397. DEPENDS swig/board_item_container.i
  398. DEPENDS swig/connectivity.i
  399. DEPENDS swig/dimension.i
  400. DEPENDS swig/drawsegment.i
  401. DEPENDS swig/edge_mod.i
  402. DEPENDS swig/marker_pcb.i
  403. DEPENDS swig/pcb_target.i
  404. DEPENDS swig/footprint.i
  405. DEPENDS swig/netclass.i
  406. DEPENDS swig/netinfo.i
  407. DEPENDS swig/pad.i
  408. DEPENDS swig/pcb_text.i
  409. DEPENDS swig/plugins.i
  410. DEPENDS swig/text_mod.i
  411. DEPENDS swig/track.i
  412. DEPENDS swig/units.i
  413. DEPENDS swig/typeinfo.i
  414. DEPENDS swig/zone.i
  415. DEPENDS swig/zone_settings.i
  416. DEPENDS ../common/swig/dlist.i
  417. DEPENDS ../common/swig/kicad.i
  418. DEPENDS ../common/swig/wx.i
  419. DEPENDS ../common/swig/ki_exception.i
  420. DEPENDS ../scripting/kicadplugins.i
  421. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
  422. # Make docstrings.i available if it doesn't exist
  423. COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i
  424. COMMAND ${SWIG_EXECUTABLE}
  425. ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx swig/pcbnew.i
  426. COMMAND ${PYTHON_EXECUTABLE}
  427. ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py
  428. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  429. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  430. )
  431. endif()
  432. if( BUILD_GITHUB_PLUGIN )
  433. set( GITHUB_PLUGIN_LIBRARIES github_plugin )
  434. endif()
  435. if( UNIX AND NOT APPLE )
  436. list( APPEND PCBNEW_EXTRA_LIBS rt )
  437. endif()
  438. ###
  439. # Doxygen python documentation
  440. ###
  441. if( DOXYGEN_FOUND )
  442. if( KICAD_SCRIPTING )
  443. # create XML files from doxygen parsing
  444. add_custom_target( doxygen-python-xml
  445. ${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
  446. COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
  447. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  448. DEPENDS Doxyfile_xml
  449. COMMENT "building doxygen docs into directory doxygen-python/html"
  450. )
  451. # create .i files from XML doxygen parsing, docstrings.i will include all of them
  452. add_custom_target( xml-to-docstrings
  453. COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
  454. COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
  455. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
  456. COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
  457. COMMENT "building docstring files"
  458. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  459. DEPENDS pcbnew.py
  460. DEPENDS doxygen-python-xml
  461. )
  462. # The sources to give to the Python Doxygen target
  463. set( DOXYGEN_PYTHON_SOURCES
  464. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  465. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/FootprintWizardBase.py
  466. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/PadArray.py )
  467. # The Doxyfile expects a space-separated list in the env var
  468. string(REPLACE ";" " " DOXYGEN_PYTHON_SOURCES_STR "${DOXYGEN_PYTHON_SOURCES}")
  469. # Create doxygen-python html
  470. add_custom_target( doxygen-python
  471. ${CMAKE_COMMAND} -E remove_directory doxygen-python
  472. COMMAND ${CMAKE_COMMAND} -E env PYTHON_SOURCES_TO_DOC=${DOXYGEN_PYTHON_SOURCES_STR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
  473. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  474. DEPENDS Doxyfile_python
  475. DEPENDS xml-to-docstrings
  476. DEPENDS ${DOXYGEN_PYTHON_SOURCES}
  477. COMMENT "building doxygen docs into directory doxygen-python/html"
  478. )
  479. endif()
  480. endif()
  481. if( MINGW )
  482. # PCBNEW_RESOURCES variable is set by the macro.
  483. mingw_resource_compiler( pcbnew )
  484. else()
  485. set( PCBNEW_RESOURCES pcbnew.rc )
  486. endif()
  487. if( APPLE )
  488. # setup bundle
  489. set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
  490. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
  491. MACOSX_PACKAGE_LOCATION Resources
  492. )
  493. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
  494. MACOSX_PACKAGE_LOCATION Resources
  495. )
  496. set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
  497. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
  498. set( MACOSX_BUNDLE_NAME pcbnew )
  499. endif()
  500. add_subdirectory( pcad2kicadpcb_plugin )
  501. if( BUILD_GITHUB_PLUGIN )
  502. add_subdirectory( github )
  503. # github_plugin depends on make_lexer outputs in common
  504. add_dependencies( github_plugin pcbcommon )
  505. endif()
  506. # a very small program launcher for pcbnew_kiface
  507. add_executable( pcbnew WIN32 MACOSX_BUNDLE
  508. ../common/single_top.cpp
  509. ${PCBNEW_RESOURCES}
  510. )
  511. set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES
  512. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
  513. )
  514. target_link_libraries( pcbnew
  515. #singletop # replaces common, giving us restrictive control and link warnings.
  516. # There's way too much crap coming in from common yet.
  517. common
  518. bitmaps
  519. gal
  520. ${wxWidgets_LIBRARIES}
  521. )
  522. if( PCBNEW_LINK_MAPS )
  523. set_target_properties( pcbnew PROPERTIES
  524. LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" )
  525. endif()
  526. # the main pcbnew program, in DSO form.
  527. add_library( pcbnew_kiface_objects OBJECT
  528. pcbnew.cpp
  529. ${PCBNEW_SRCS}
  530. ${PCBNEW_COMMON_SRCS}
  531. ${PCBNEW_SCRIPTING_SRCS}
  532. )
  533. add_library( pcbnew_kiface MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  534. set_target_properties( pcbnew_kiface PROPERTIES
  535. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  536. # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
  537. OUTPUT_NAME pcbnew
  538. PREFIX ${KIFACE_PREFIX}
  539. SUFFIX ${KIFACE_SUFFIX}
  540. )
  541. if ( KICAD_BUILD_TESTS )
  542. if ( UNIX )
  543. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  544. COMMAND ln -sf _pcbnew.kiface lib_pcbnew_kiface.so )
  545. else()
  546. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  547. COMMAND copy _pcbnew.kiface lib_pcbnew_kiface.dll )
  548. endif()
  549. endif ()
  550. if( ${OPENMP_FOUND} )
  551. set_target_properties( pcbnew_kiface PROPERTIES
  552. COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
  553. )
  554. endif()
  555. set( PCBNEW_KIFACE_LIBRARIES
  556. 3d-viewer
  557. pcbcommon
  558. pnsrouter
  559. pcad2kicadpcb
  560. common
  561. polygon
  562. bitmaps
  563. gal
  564. lib_dxf
  565. idf3
  566. ${wxWidgets_LIBRARIES}
  567. ${GITHUB_PLUGIN_LIBRARIES}
  568. ${GDI_PLUS_LIBRARIES}
  569. ${PYTHON_LIBRARIES}
  570. ${Boost_LIBRARIES} # must follow GITHUB
  571. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  572. ${OPENMP_LIBRARIES}
  573. )
  574. target_link_libraries( pcbnew_kiface ${PCBNEW_KIFACE_LIBRARIES} )
  575. set_source_files_properties( pcbnew.cpp PROPERTIES
  576. # The KIFACE is in pcbnew.cpp, export it:
  577. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  578. )
  579. if( PCBNEW_LINK_MAPS )
  580. set_target_properties( pcbnew_kiface PROPERTIES
  581. LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcbnew.kiface.map"
  582. )
  583. set_target_properties( pcbnew PROPERTIES
  584. LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map"
  585. )
  586. endif()
  587. # if building pcbnew, then also build pcbnew_kiface if out of date.
  588. add_dependencies( pcbnew pcbnew_kiface )
  589. # add dependency to specctra_lexer_source_files, to force
  590. # generation of autogenerated file
  591. add_dependencies( pcbnew_kiface_objects specctra_lexer_source_files )
  592. # these 2 binaries are a matched set, keep them together:
  593. if( APPLE )
  594. set_target_properties( pcbnew PROPERTIES
  595. MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
  596. )
  597. # puts binaries into the *.app bundle while linking
  598. set_target_properties( pcbnew_kiface PROPERTIES
  599. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  600. )
  601. # put individual bundle outside of main bundle as a first step
  602. # will be pulled into the main bundle when creating main bundle
  603. install( TARGETS pcbnew
  604. DESTINATION ${KICAD_BIN}
  605. COMPONENT binary
  606. )
  607. install( CODE "
  608. # override default embedded path settings
  609. ${OSX_BUNDLE_OVERRIDE_PATHS}
  610. # do all the work
  611. include( BundleUtilities )
  612. fixup_bundle( ${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew
  613. \"\"
  614. \"\"
  615. )
  616. " COMPONENT Runtime
  617. )
  618. else()
  619. install( TARGETS pcbnew
  620. DESTINATION ${KICAD_BIN}
  621. COMPONENT binary
  622. )
  623. install( TARGETS pcbnew_kiface
  624. DESTINATION ${KICAD_BIN}
  625. COMPONENT binary
  626. )
  627. endif()
  628. if( KICAD_SCRIPTING )
  629. if( NOT APPLE )
  630. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
  631. else()
  632. # put into bundle at build time, it is relocated at install
  633. add_custom_target( ScriptingPcbnewPyCopy ALL
  634. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
  635. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  636. COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
  637. )
  638. add_dependencies( ScriptingPcbnewPyCopy ScriptingWxpythonCopy )
  639. endif()
  640. # python plugins
  641. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
  642. DESTINATION ${KICAD_DATA}/scripting/plugins
  643. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  644. )
  645. # python shell
  646. if ( KICAD_SCRIPTING_WXPYTHON )
  647. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/kicad_pyshell/
  648. DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell
  649. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  650. )
  651. endif()
  652. endif()
  653. if( KICAD_SCRIPTING_MODULES )
  654. # 1) KICAD_SCRIPTING enables python inside _pcbnew.kiface.
  655. # 2) KICAD_SCRIPTING_MODULES enables python from the OS command line for pcbnew.
  656. # When python is running within _pcbnew.kiface (case 1 above) it uses said
  657. # kiface for the native part of the pcbnew python module. This is a kind of
  658. # circular dependency that works well. When running python from
  659. # the command line (case 2 above) then python needs a native portion of the pcbnew
  660. # python module also, and this is _pcbnew.{so,pyd}. It turns out that the
  661. # kiface file is built adequately to serve the needs of 2) for now if it is
  662. # merely renamed. This is phase 1 of a 2 step plan.
  663. # In phase 2 we will use the _pcbnew.kiface file without renaming, by doctoring
  664. # what the python portion of the pcbnew python module wants to load when run
  665. # from the command line, case 2 above.
  666. # Here is built the _pcbnew.{so,pyd} which is the native part of the pcbnew Python library
  667. # when Python is used from the command line.
  668. if( MINGW )
  669. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
  670. set( PYMOD_EXT "pyd" )
  671. elseif( APPLE )
  672. # put everything into bundle at build time, it is relocated at install
  673. add_custom_target( ScriptingModulesPcbnewSoCopy ALL
  674. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
  675. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
  676. COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
  677. )
  678. add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
  679. set( PYMOD_EXT "so" )
  680. else() # only linux remains among supported platforms
  681. add_library( pcbnew_python MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  682. target_link_libraries( pcbnew_python ${PCBNEW_KIFACE_LIBRARIES} )
  683. set_target_properties( pcbnew_python PROPERTIES OUTPUT_NAME pcbnew PREFIX "_" SUFFIX ".so" )
  684. install( TARGETS pcbnew_python DESTINATION ${PYTHON_DEST} COMPONENT binary )
  685. set( PYMOD_EXT "so" )
  686. endif()
  687. if( APPLE )
  688. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  689. DEPENDS pcbnew_kiface
  690. COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
  691. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  692. )
  693. add_custom_target(
  694. pcbnew_python_module ALL
  695. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  696. )
  697. else()
  698. # For phase 1, copy _pcbnew.kiface to the python module.
  699. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  700. DEPENDS pcbnew_kiface
  701. COMMAND ${CMAKE_COMMAND} -E copy _pcbnew.kiface _pcbnew.${PYMOD_EXT}
  702. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  703. )
  704. add_custom_target(
  705. pcbnew_python_module ALL
  706. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  707. )
  708. endif()
  709. endif()
  710. if( APPLE )
  711. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  712. # find wx-X.Y-osx_cocoa path below PYTHON_SITE_PACKAGE_PATH
  713. file( GLOB WXPYTHON_DIR RELATIVE ${PYTHON_SITE_PACKAGE_PATH} ${PYTHON_SITE_PACKAGE_PATH}/wx-?.?-osx_cocoa )
  714. if( NOT WXPYTHON_DIR )
  715. message( FATAL_ERROR "Could not find 'wx-?.?-osx_cocoa' in '${PYTHON_SITE_PACKAGE_PATH}'" )
  716. endif()
  717. # copy contents
  718. add_custom_target( ScriptingWxpythonCopy ALL
  719. COMMAND ${CMAKE_COMMAND} -E copy_directory "${PYTHON_SITE_PACKAGE_PATH}/${WXPYTHON_DIR}" "${PYTHON_DEST}/${WXPYTHON_DIR}"
  720. COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_SITE_PACKAGE_PATH}/wxversion.py" "${PYTHON_DEST}"
  721. COMMENT "Copying wxPython into ${PYTHON_DEST}"
  722. )
  723. endif()
  724. endif()