commit 611d39e4789257b2b70e41ac472f65d6af4c09c6 Author: Robert Slover Date: Sun Aug 27 19:11:42 2000 +0000 Initial revision git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@7258 72102866-910b-0410-8b05-ffd578937521 diff --git a/ANNOUNCE b/ANNOUNCE new file mode 100644 index 0000000..b4cb9bd --- /dev/null +++ b/ANNOUNCE @@ -0,0 +1,68 @@ +Announcement +************ + +What is ProjectCenter? +====================== + + ProjectCenter is an application developed for GNUstep which one day should + becoime a full blown development environment. + + The file `INSTALL' gives instructions for installing the package. + + The GNUstep web site at `http://www.prjectcenter.ch' contains more + information. + + ProjectCenter is covered under the GNU Public License. This means if you + make changes to these programs, you cannot charge a fee, other than + distribution fees, for others to use the program. You should read the + COPYING file for more information. + +How can you help? +================= + + * Check the bug list at the ProjectCenter web site. + If you can volunteer for any of the todo's, or if you have any useful + comments send email! + + * Give us feedback! Tell us what you like; tell us what you think + could be better. Send bug reports to . + +Machines +======== + + GNUstep ProjectCenter is known to compile on the following machines. + + * OpenStep 4.x/m68k + + * OpenStep 4.x/ix86 + + * Linux/GNUstep 0.6.5 + +Where do I send bug reports? +============================ + + Bug reports can be sent to . + +Enjoy! +Philippe C.D. Robert + + +Obtaining GNU Software +====================== + + Check out the GNU web site. (`http://www.gnu.org/') + + Check out the GNUstep web site. (`http://www.gnustep.org/') + + Most GNU software is packed using the GNU `gzip' compression program. +Source code is available on most sites distributing GNU software. + + For information on how to order GNU software on tape, floppy or +cd-rom, or printed GNU manuals, check the file etc/ORDERS in the GNU +Emacs distribution or in GNUinfo/ORDERS on prep, or e-mail a request to: + + + By ordering your GNU software from the FSF, you help us continue to +develop more free software. Media revenues are our primary source of +support. Donations to FSF are deductible on US tax returns. + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d544fba --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02111, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..5a02f47 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,54 @@ +# +# Main Makefile for ProjectCenter +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Written by: Philippe C.D. Robert +# +# This file is part of the ProjectCenter +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA +# + +# Install into the system root by default +GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT) + +GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles + +include $(GNUSTEP_MAKEFILES)/common.make + +include ./Version + +PACKAGE_NAME = ProjectCenter + +# +# The list of subproject directories +# + +SUBPROJECTS = \ + PCLib \ + PCAppProj \ + PCToolProj \ + PCLibProj \ + PCBaseFileTypes \ + ProjectCenter + +-include GNUMakefile.preamble + +include $(GNUSTEP_MAKEFILES)/aggregate.make + +-include GNUMakefile.postamble + + diff --git a/GNUmakefile.postamble b/GNUmakefile.postamble new file mode 100644 index 0000000..1db2bd8 --- /dev/null +++ b/GNUmakefile.postamble @@ -0,0 +1,26 @@ +# +# GNUmakefile.postamble +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# +# This file is part of ProjectCenter +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + diff --git a/GNUmakefile.preamble b/GNUmakefile.preamble new file mode 100644 index 0000000..729b8e1 --- /dev/null +++ b/GNUmakefile.preamble @@ -0,0 +1,65 @@ +# +# GNUmakefile.preamble +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# +# This file is part of ProjectCenter +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS = + +# +# Local configuration +# diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..aab1b99 --- /dev/null +++ b/INSTALL @@ -0,0 +1,26 @@ +Installation +************ + +This file documents the installation of the GNUstep ProjectCenter. + + Copyright (C) 2000 Philippe C.D. Robert. You may copy, +distribute, and modify it freely as long as you preserve this copyright +notice and permission notice. + +Installing `ProjectCenter' +==================== + + The ProjectCenter tool runs on OpenStep 4.2 and GNUstep. It's +possible it will run on other versions of OPENSTEP, but it has not been +tried yet. + + Here is a quick-and-dirty example of installation commands: + + +OPENSTEP 4.2: make; make install + + (or open the project in PB.app and compile it from there) + +GNUstep: make; make install; + +In order to do this successfully you must first install PCLib and the bundles and then the application itself! \ No newline at end of file diff --git a/PCAppProj/AppController.h b/PCAppProj/AppController.h new file mode 100644 index 0000000..619b67b --- /dev/null +++ b/PCAppProj/AppController.h @@ -0,0 +1,22 @@ +/* + * AppController.h created by phr on 2000-08-27 11:38:59 +0000 + * + * Project TestApp + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + +#import + +@interface AppController : NSObject +{ +} + +- (id)init; +- (void)dealloc; + +- (void)awakeFromNib; + +@end diff --git a/PCAppProj/AppController.m b/PCAppProj/AppController.m new file mode 100644 index 0000000..3829677 --- /dev/null +++ b/PCAppProj/AppController.m @@ -0,0 +1,31 @@ +/* + * AppController.m created by phr on 2000-08-27 11:38:58 +0000 + * + * Project TestApp + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + +#import "AppController.h" + +@implementation AppController + +- (id)init +{ + if ((self = [super init])) { + } + return self; +} + +- (void)dealloc +{ + [super dealloc]; +} + +- (void)awakeFromNib +{ +} + +@end diff --git a/PCAppProj/AppProject.gmodel b/PCAppProj/AppProject.gmodel new file mode 100644 index 0000000..5dd296b --- /dev/null +++ b/PCAppProj/AppProject.gmodel @@ -0,0 +1,133 @@ +{ + "Object 1" = {elements = ("Object 2"); isa = NSMutableArray; }; + "Object 2" = {className = PCAppProject; isa = IMCustomObject; realObject = "Object 3"; }; + "Object 3" = { + delegate = nil; + isa = NSApplication; + keyWindow = nil; + mainMenu = nil; + mainWindow = nil; + windows = "Object 4"; + }; + "Object 4" = { + elements = ("Object 5", "Object 9", "Object 11"); + isa = NSMutableArray; + }; + "Object 5" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 256; height = 128}"; + contentView = "Object 6"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 6" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 256; height = 128}"; + frame = "{x = 0; y = 0; width = 256; height = 128}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 5"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 7" = {elements = (); isa = NSMutableArray; }; + "Object 8" = { + alpha = 1.000000; + blue = 0.666667; + brightness = 0.666667; + colorSpaceName = NSCalibratedRGBColorSpace; + green = 0.666667; + hue = 0.000000; + isa = NSColor; + red = 0.666667; + saturation = 0.000000; + }; + "Object 9" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 193; height = 208}"; + contentView = "Object 10"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 10" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 193; height = 208}"; + frame = "{x = 0; y = 0; width = 193; height = 208}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 9"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 11" = { + backgroundColor = "Object 8"; + backingType = 2; + contentFrame = "{x = 221; y = 299; width = 512; height = 320}"; + contentView = "Object 12"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = YES; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 514; height = 352}"; + representedFilename = ""; + styleMask = 14; + title = Window; + }; + "Object 12" = { + autoresizesSubviews = NO; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 512; height = 320}"; + frame = "{x = 1; y = 9; width = 512; height = 320}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 11"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + RootObject = {Connections = "Object 7"; Objects = "Object 1"; isa = GMModel; }; + TopLevelObjects = (RootObject); + Version = 1; +} diff --git a/PCAppProj/GNUmakefile b/PCAppProj/GNUmakefile new file mode 100644 index 0000000..2bca6e5 --- /dev/null +++ b/PCAppProj/GNUmakefile @@ -0,0 +1,56 @@ +# GNUmakefile +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# Date: 2000 +# +# This file is part of ProjectCenter +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +include $(GNUSTEP_MAKEFILES)/common.make + +BUNDLE_NAME = PCAppProj +BUNDLE_EXTENSION =.bundle +BUNDLE_INSTALL_DIR =$(GNUSTEP_LOCAL_ROOT)/Library/ProjectCenter/ + +PCAppProj_OBJC_FILES = \ + PCAppProj.m \ + PCAppMakefileFactory.m \ + PCAppProject.m + +PCAppProj_HEADERS= \ + PCAppMakefileFactory.h \ + PCAppProj.h \ + PCAppProject.h + +PCAppProj_PRINCIPAL_CLASS = PCAppProj + +PCAppProj_RESOURCE_FILES = \ + AppProject.gmodel \ + PC.proj \ + Main.gmodel \ + main.m \ + AppController.h \ + AppController.m \ + Info-project.plist + +-include GNUmakefile.preamble + +include $(GNUSTEP_MAKEFILES)/bundle.make + +-include GNUmakefile.postamble + diff --git a/PCAppProj/GNUmakefile.postamble b/PCAppProj/GNUmakefile.postamble new file mode 100644 index 0000000..c85b08f --- /dev/null +++ b/PCAppProj/GNUmakefile.postamble @@ -0,0 +1,30 @@ +# +# Makefile.postamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + diff --git a/PCAppProj/GNUmakefile.preamble b/PCAppProj/GNUmakefile.preamble new file mode 100644 index 0000000..f61a96d --- /dev/null +++ b/PCAppProj/GNUmakefile.preamble @@ -0,0 +1,74 @@ +# +# Makefile.preamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# Makefile.preamble +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += -lPC + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS += + +# +# Local configuration +# + + + diff --git a/PCAppProj/Info-project.plist b/PCAppProj/Info-project.plist new file mode 100644 index 0000000..ed865ab --- /dev/null +++ b/PCAppProj/Info-project.plist @@ -0,0 +1,12 @@ +{ + NOTE = "Automatically generated, do not edit!"; + ApplicationName = ""; + ApplicationDescription = ""; + ApplicationIcon = ""; + ApplicationRelease = ""; + FullVersionID = ""; + Authors = (); + URL = ""; + Copyright = ""; + CopyrightDescription = ""; +} diff --git a/PCAppProj/Info.table b/PCAppProj/Info.table new file mode 100644 index 0000000..e0861e8 --- /dev/null +++ b/PCAppProj/Info.table @@ -0,0 +1,29 @@ +{ + AdditionalAttributes = { + PrincipalClass = {ATTR_CLASS_NAME = "NSString";}; + }; + Allowable_SubprojectTypes = (Subproject, Bundle, Tool, Framework, Library, Palette); + AttributesInspector = ApplicationInspector; + DefaultExtension = ""; + Default_Localizable_Keys = (INTERFACES); + GeneratedFiles = (Makefile, iconHeader); + INSTALLFLAGS = "-c -s -m 755"; + InfoName = ""; + Localizable_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES, HELP_RESOURCES); + MAKEFILE = app.make; + MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; + Other_Keys = (HELP_RESOURCES, OTHER_SOURCES, FRAMEWORKS, OTHER_LIBS); + PBProjectTypeSubClass = "PBApplicationProjectType"; + ProvidesIcons = Yes; + Public_Keys = (H_FILES); + Resource_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES); + SOURCEMODE = 444; + Source_Keys = (CLASSES, H_FILES, OTHER_LINKED); + Subproj_Keys = (SUBPROJECTS); + Targets = (app, debug, profile, install); + ExecutableResults = ( + "$PROJECTNAME$.app/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.debug/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.profile/$PROJECTNAME$$EXECUTABLE_EXT$" + ); +} diff --git a/PCAppProj/Main.gmodel b/PCAppProj/Main.gmodel new file mode 100644 index 0000000..ec0303c --- /dev/null +++ b/PCAppProj/Main.gmodel @@ -0,0 +1,436 @@ +{ + "Object 1" = {elements = ("Object 2", "Object 37"); isa = NSMutableArray; }; + "Object 2" = {className = NSApplication; isa = IMCustomObject; realObject = "Object 3"; }; + "Object 3" = { + delegate = nil; + isa = NSApplication; + keyWindow = nil; + mainMenu = "Object 11"; + mainWindow = nil; + windows = "Object 4"; + }; + "Object 4" = {elements = ("Object 5", "Object 9"); isa = NSMutableArray; }; + "Object 5" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 256; height = 128}"; + contentView = "Object 6"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 6" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 256; height = 128}"; + frame = "{x = 0; y = 0; width = 256; height = 128}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 5"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 7" = {elements = (); isa = NSMutableArray; }; + "Object 8" = { + alpha = 1.000000; + blue = 0.666667; + brightness = 0.666667; + colorSpaceName = NSCalibratedRGBColorSpace; + green = 0.666667; + hue = 0.000000; + isa = NSColor; + red = 0.666667; + saturation = 0.000000; + }; + "Object 9" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 193; height = 208}"; + contentView = "Object 10"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 10" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 193; height = 208}"; + frame = "{x = 0; y = 0; width = 193; height = 208}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 9"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 11" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 12"; + title = GNUstep; + }; + "Object 12" = { + elements = ( + "Object 13", + "Object 20", + "Object 27", + "Object 33", + "Object 35", + "Object 36" + ); + isa = NSMutableArray; + }; + "Object 13" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 15"; + title = Info; + }; + "Object 14" = {isa = NSImage; name = NSMenuArrow; size = "{width = 12; height = 9}"; }; + "Object 15" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 16"; + title = Info; + }; + "Object 16" = { + elements = ("Object 17", "Object 18", "Object 19"); + isa = NSMutableArray; + }; + "Object 17" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Info Panel..."; + }; + "Object 18" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Preferences...; + }; + "Object 19" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = "?"; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Help...; + }; + "Object 20" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 21"; + title = Edit; + }; + "Object 21" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 22"; + title = Edit; + }; + "Object 22" = { + elements = ("Object 23", "Object 24", "Object 25", "Object 26"); + isa = NSMutableArray; + }; + "Object 23" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = x; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Cut; + }; + "Object 24" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = c; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Copy; + }; + "Object 25" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = v; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Paste; + }; + "Object 26" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = a; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Select All"; + }; + "Object 27" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 28"; + title = Windows; + }; + "Object 28" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 29"; + title = Windows; + }; + "Object 29" = { + elements = ("Object 30", "Object 31", "Object 32"); + isa = NSMutableArray; + }; + "Object 30" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Arrange in Front"; + }; + "Object 31" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = m; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Miniaturize Window"; + }; + "Object 32" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = w; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Close Window"; + }; + "Object 33" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 34"; + title = Services; + }; + "Object 34" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 7"; + title = Services; + }; + "Object 35" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = h; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Hide; + }; + "Object 36" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = q; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Quit; + }; + "Object 37" = {className = AppController; isa = IMCustomObject; }; + "Object 38" = { + elements = ( + "Object 39", + "Object 41", + "Object 43", + "Object 45", + "Object 47", + "Object 49", + "Object 51", + "Object 53", + "Object 55", + "Object 57", + "Object 59" + ); + isa = NSMutableArray; + }; + "Object 39" = { + destination = nil; + isa = IMControlConnector; + label = "Object 40"; + source = "Object 23"; + }; + "Object 40" = {isa = NSString; string = "cut:"; }; + "Object 41" = { + destination = nil; + isa = IMControlConnector; + label = "Object 42"; + source = "Object 24"; + }; + "Object 42" = {isa = NSString; string = "copy:"; }; + "Object 43" = { + destination = nil; + isa = IMControlConnector; + label = "Object 44"; + source = "Object 25"; + }; + "Object 44" = {isa = NSString; string = "paste:"; }; + "Object 45" = { + destination = nil; + isa = IMControlConnector; + label = "Object 46"; + source = "Object 26"; + }; + "Object 46" = {isa = NSString; string = "selectAll:"; }; + "Object 47" = { + destination = "Object 2"; + isa = IMControlConnector; + label = "Object 48"; + source = "Object 36"; + }; + "Object 48" = {isa = NSString; string = "terminate:"; }; + "Object 49" = { + destination = "Object 2"; + isa = IMControlConnector; + label = "Object 50"; + source = "Object 35"; + }; + "Object 50" = {isa = NSString; string = "hide:"; }; + "Object 51" = { + destination = nil; + isa = IMControlConnector; + label = "Object 52"; + source = "Object 19"; + }; + "Object 52" = {isa = NSString; string = "showHelp:"; }; + "Object 53" = { + destination = nil; + isa = IMControlConnector; + label = "Object 54"; + source = "Object 31"; + }; + "Object 54" = {isa = NSString; string = "performMiniaturize:"; }; + "Object 55" = { + destination = nil; + isa = IMControlConnector; + label = "Object 56"; + source = "Object 32"; + }; + "Object 56" = {isa = NSString; string = "performClose:"; }; + "Object 57" = { + destination = nil; + isa = IMControlConnector; + label = "Object 58"; + source = "Object 30"; + }; + "Object 58" = {isa = NSString; string = "arrangeInFront:"; }; + "Object 59" = { + destination = "Object 37"; + isa = IMOutletConnector; + label = "Object 60"; + source = "Object 2"; + }; + "Object 60" = {isa = NSString; string = delegate; }; + RootObject = {Connections = "Object 38"; Objects = "Object 1"; isa = GMModel; }; + TopLevelObjects = (RootObject); + Version = 1; +} diff --git a/PCAppProj/Makefile b/PCAppProj/Makefile new file mode 100644 index 0000000..e93f004 --- /dev/null +++ b/PCAppProj/Makefile @@ -0,0 +1,48 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = PCAppProj + +PROJECTVERSION = 2.6 +PROJECT_TYPE = Loadable Bundle +LANGUAGE = English + +GLOBAL_RESOURCES = AppProject.nib GNUmakefile.postamble\ + GNUmakefile.preamble Info.table main.m PC.proj + +CLASSES = PCAppMakefileFactory.m PCAppProj.m PCAppProject.m + +HFILES = PCAppMakefileFactory.h PCAppProj.h PCAppProject.h + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template + +MAKEFILEDIR = $(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = bundle.make +NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter/ +WINDOWS_INSTALLDIR = /MyBundles +LIBS = +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) +BUNDLE_EXTENSION = bundle + + +FRAMEWORKS = -framework Foundation + + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/PCAppProj/Makefile.postamble b/PCAppProj/Makefile.postamble new file mode 100644 index 0000000..36381d4 --- /dev/null +++ b/PCAppProj/Makefile.postamble @@ -0,0 +1,122 @@ +############################################################################### +# NeXT Makefile.postamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project, sub-project, bundle, or +# palette. Each node in the project's tree of sub-projects and bundles +# should have it's own Makefile.preamble and Makefile.postamble. Additional +# rules (e.g., after_install) that are defined by the developer should be +# defined in this file. +# +############################################################################### +# +# Here are the variables exported by the common "app" makefiles that can be +# used in any customizations you make to the template below: +# +# PRODUCT_ROOT - Name of the directory to which resources are copied. +# OFILE_DIR - Directory into which .o object files are generated. +# (Note that this name is calculated based on the target +# architectures specified in Project Builder). +# DERIVED_SRC_DIR - Directory used for all other derived files +# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations +# +# NAME - name of application, bundle, subproject, palette, etc. +# LANGUAGE - langage in which the project is written (default "English") +# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES - non-localized resources of project +# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0) +# ICONSECTIONS - Specifies icon sections when linking executable +# +# CLASSES - Class implementation files in project. +# HFILES - Header files in project. +# MFILES - Other Objective-C source files in project. +# CFILES - Other C source files in project. +# PSWFILES - .psw files in the project +# PSWMFILES - .pswm files in the project +# SUBPROJECTS - Subprojects of this project +# BUNDLES - Bundle subprojects of this project +# OTHERSRCS - Other miscellaneous sources of this project +# OTHERLINKED - Source files not matching a standard source extention +# +# LIBS - Libraries to link with when making app target +# DEBUG_LIBS - Libraries to link with when making debug target +# PROF_LIBS - Libraries to link with when making profile target +# OTHERLINKEDOFILES - Other relocatable files to (always) link in. +# +# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles +# MAKEFILEDIR - Directory in which to find $(MAKEFILE) +# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) +# INSTALLDIR - Directory app will be installed into by 'install' target +# +############################################################################### + + +# Change defaults assumed by the standard makefiles here. Edit the +# following default values as appropriate. (Note that if no Makefile.postamble +# exists, these values will have defaults set in common.make). + +# Versioning of frameworks, libraries, bundles, and palettes: +#CURRENTLY_ACTIVE_VERSION = YES + # Set to "NO" to produce a compatibility binary +#DEPLOY_WITH_VERSION_NAME = A + # This should be incremented as your API changes. +#COMPATIBILITY_PROJECT_VERSION = 1 + # This should be incremented as your API grows. +#CURRENT_PROJECT_VERSION = 1 + # Defaults to using the "vers_string" hack. + +# Some compiler flags can be easily overridden here, but onlytake effect at +# the top-level: +#OPTIMIZATION_CFLAG = -O +#DEBUG_SYMBOLS_CFLAG = -g +#WARNING_CFLAGS = -Wmost +#DEBUG_BUILD_CFLAGS = -DDEBUG +#PROFILE_BUILD_CFLAGS = -pg -DPROFILE + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO + +# Flags passed to yacc +#YFLAGS = -d + +# Library and Framework projects only: +# 1. If you want something other than the default .dylib name, override it here +#DYLIB_INSTALL_NAME = lib$(NAME).dylib + +# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all. +#DYLIB_INSTALL_DIR = $(INSTALLDIR) + +# Ownership and permissions of files installed by 'install' target +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + +# Options to strip for various project types. Note: -S strips debugging symbols +# (executables can be stripped down further with -x or, if they load no bundles, with no +# options at all). +#APP_STRIP_OPTS = -S +#TOOL_STRIP_OPTS = -S +#LIBRARY_STRIP_OPTS = -S + # for .a archives +#DYNAMIC_STRIP_OPTS = -S + # for bundles and shared libraries + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. "Official" +# user-defined rules are: +# * before_install +# * after_install +# * after_installhdrs +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# +# Note: on MS Windows, executables, have an extension, so rules and dependencies +# for generated tools should use $(EXECUTABLE_EXT) on the end. diff --git a/PCAppProj/Makefile.preamble b/PCAppProj/Makefile.preamble new file mode 100644 index 0000000..5c0a25a --- /dev/null +++ b/PCAppProj/Makefile.preamble @@ -0,0 +1,130 @@ +############################################################################### +# NeXT Makefile.preamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project. Each node in a project +# tree of sub-projects, tools, etc. should have its own Makefile.preamble and +# Makefile.postamble. +# +############################################################################### +## Configure the flags passed to $(CC) here. These flags will also be +## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and +## -L flags in ProjectBuilder's Build Options inspector if at all possible. +## To change the default flags that get passed to ${CC} +## (e.g. change -O to -O2), see Makefile.postamble. + +# Flags passed to compiler (in addition to -g, -O, etc) +OTHER_CFLAGS = +# Flags passed to ld (in addition to -ObjC, etc.) +OTHER_LDFLAGS = +# Flags passed to libtool when building libraries +OTHER_LIBTOOL_FLAGS = +# For ordering named sections on NEXTSTEP (see ld(1)) +SECTORDER_FLAGS = + +# If you do not want any headers exported before compilations begin, +# uncomment the following line. This can be a big time saver. +#SKIP_EXPORTING_HEADERS = YES + +# Stuff related to exporting headers from this project that isn't already +# handled by PB. +OTHER_PUBLIC_HEADERS = +OTHER_PROJECT_HEADERS = +OTHER_PRIVATE_HEADERS = + +# Set these two macros if you want a precomp to be built as part of +# installation. The cc -precomp will be run in the public header directory +# on the specified public header files with the specified additional flags. +PUBLIC_PRECOMPILED_HEADERS = +PUBLIC_PRECOMPILED_HEADERS_CFLAGS = + +# Set this for library projects if you want to publish header files. If your +# app or tool project exports headers Don't +# include $(DSTROOT); this is added for you automatically. +PUBLIC_HEADER_DIR = +PRIVATE_HEADER_DIR = + +# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR# +# (say, to add a subdirectory like "/sys"), you can use: +PUBLIC_HEADER_DIR_SUFFIX = +PRIVATE_HEADER_DIR_SUFFIX = + +# Set this for dynamic library projects on platforms where code which references +# a dynamic library must link against an import library (i.e., Windows NT) +# Don't include $(DSTROOT); this is added for you automatically. +IMPORT_LIBRARY_DIR = + +# Additional (non-localized) resources for this project, which can be generated +OTHER_RESOURCES = + +# Uncomment this to produce a static archive-style (.a) library +#LIBRARY_STYLE = STATIC + +# Set this to YES if you don't want a final libtool call for a library/framework. +BUILD_OFILES_LIST_ONLY = + +# Additional relocatables to be linked into this project +OTHER_OFILES = +# Additional libraries to link against +OTHER_LIBS = +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +## Configure how things get built here. Additional dependencies, source files, +## derived files, and build order should be specified here. + +# Other dependencies of this project +OTHER_PRODUCT_DEPENDS = +# Built *before* building subprojects/bundles +OTHER_INITIAL_TARGETS = +# Other source files maintained by .pre/postamble +OTHER_SOURCEFILES = +# Additional files to be removed by `make clean' +OTHER_GARBAGE = + +# Targets to build before installation +OTHER_INSTALL_DEPENDS = + +# More obscure flags you might want to set for pswrap, yacc, lex, etc. +PSWFLAGS = +YFLAGS = +LFLAGS = + +## Delete this line if you want fast and loose cleans that will not remove +## things like precomps and user-defined OTHER_GARBAGE in subprojects. +CLEAN_ALL_SUBPROJECTS = YES + +## Add more obscure source files here to cause them to be automatically +## processed by the appropriate tool. Note that these files should also be +## added to "Supporting Files" in ProjectBuilder. The desired .o files that +## result from these files should also be added to OTHER_OFILES above so they +## will be linked in. + +# .msg files that should have msgwrap run on them +MSGFILES = +# .defs files that should have mig run on them +DEFSFILES = +# .mig files (no .defs files) that should have mig run on them +MIGFILES = +# .x files that should have rpcgen run on them +RPCFILES = + +## Add additional Help directories here (add them to the project as "Other +## Resources" in Project Builder) so that they will be compressed into .store +## files and copied into the app wrapper. If the help directories themselves +## need to also be in the app wrapper, then a cp command will need to be added +## in an after_install target. +OTHER_HELP_DIRS = + +# After you have saved your project using the 4.0 PB, you will automatically +# start using the makefiles in /NextDeveloper/Makefiles/project. If you should +# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to +# be /NextDeveloper/Makefiles/app. + +# Don't add more rules here unless you want the first one to be the default +# target for make! Put all your targets in Makefile.postamble. + diff --git a/PCAppProj/PB.project b/PCAppProj/PB.project new file mode 100644 index 0000000..275c2df --- /dev/null +++ b/PCAppProj/PB.project @@ -0,0 +1,24 @@ +{ + APPCLASS = PCAppProj; + BUNDLE_EXTENSION = bundle; + DYNAMIC_CODE_GEN = YES; + FILESTABLE = { + CLASSES = (PCAppMakefileFactory.m, PCAppProj.m, PCAppProject.m); + FRAMEWORKS = (Foundation.framework); + H_FILES = (PCAppMakefileFactory.h, PCAppProj.h, PCAppProject.h); + INTERFACES = (AppProject.nib); + OTHER_RESOURCES = (GNUmakefile.postamble, GNUmakefile.preamble, Info.table, main.m, PC.proj); + OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template); + }; + LANGUAGE = English; + LOCALIZABLE_FILES = {}; + MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles"; + NEXTSTEP_BUILDTOOL = /bin/gnumake; + NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter/; + PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make; + PROJECTNAME = PCAppProj; + PROJECTTYPE = "Loadable Bundle"; + PROJECTVERSION = 2.6; + WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make; + WINDOWS_INSTALLDIR = /MyBundles; +} diff --git a/PCAppProj/PC.proj b/PCAppProj/PC.proj new file mode 100644 index 0000000..e78336c --- /dev/null +++ b/PCAppProj/PC.proj @@ -0,0 +1,34 @@ +{ + APPCLASS = "NSApplication"; + APPKIT = "GNUSTEP-GUI"; + APPLICATIONICON = ""; + BUILDTOOL = "gnumake"; + CLASS_FILES = ("main.m","AppController.m"); + COMPILEROPTIONS = ""; + CREATION_DATE = ""; + DOCU_FILES = (); + FOUNDATION = "GNUSTEP-BASE"; + FRAMEWORKS = (); + HEADER_FILES = ("AppController.h"); + INTERFACES = ("Main.gmodel"); + IMAGES = (); + LANGUAGE = "English"; + LAST_EDITING = ""; + LIBRARIES = ("gnustep-base","gnustep-gui"); + MAININTERFACE = "Main.gmodel"; + MAKEFILEDIR = "/usr/GNUstep/Makefiles"; + INSTALLDIR = "$(HOME)/Apps"; + OTHER_FILES = (); + OTHER_RESOURCES = (); + OTHER_SOURCES = (); + PRINCIPAL_CLASS = "main.m"; + PROJECT_CREATOR = ""; + PROJECT_DESCRIPTION = "No description avaliable!"; + PROJECT_MAINTAINER = ""; + PROJECT_NAME = ""; + PROJECT_TYPE = "Application"; + PROJECT_BUILDER = "PCAppProj"; + PROJECT_VERSION = 1.0; + SUBPROJECTS = (); + SUPPORTING_FILES = ("GNUmakefile.preamble", "GNUmakefile", "GNUmakefile.postamble"); +} diff --git a/PCAppProj/PCAppMakefileFactory.h b/PCAppProj/PCAppMakefileFactory.h new file mode 100644 index 0000000..43799f5 --- /dev/null +++ b/PCAppProj/PCAppMakefileFactory.h @@ -0,0 +1,38 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCAppMakefileFactory : NSObject +{ +} + ++ (PCAppMakefileFactory *)sharedFactory; + +- (NSData *)makefileForProject:(PCProject *)aProject; + +@end diff --git a/PCAppProj/PCAppMakefileFactory.m b/PCAppProj/PCAppMakefileFactory.m new file mode 100644 index 0000000..9e5e694 --- /dev/null +++ b/PCAppProj/PCAppMakefileFactory.m @@ -0,0 +1,159 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCAppMakefileFactory.h" + +@implementation PCAppMakefileFactory + +static PCAppMakefileFactory *_factory = nil; + ++ (PCAppMakefileFactory *)sharedFactory +{ + if (!_factory) { + _factory = [[[self class] alloc] init]; + } + return _factory; +} + +- (NSData *)makefileForProject:(PCProject *)aProject; +{ + NSMutableString *string = [NSMutableString string]; + NSString *prName = [aProject projectName]; + NSDictionary *prDict = [aProject projectDict]; + NSString *tmp; + NSEnumerator *enumerator; + int i; + + // Header information + [string appendString:@"#\n"]; + [string appendString:@"# GNUmakefile - Generated by the ProjectCenter\n"]; + [string appendString:@"# Written by Philippe C.D. Robert \n"]; + [string appendString:@"#\n"]; + [string appendString:@"# NOTE: Do NOT change this file -- ProjectCenter maintains it!\n"]; + [string appendString:@"#\n"]; + [string appendString:@"# Put all of your customisations in GNUmakefile.preamble and\n"]; + [string appendString:@"# GNUmakefile.postamble\n"]; + [string appendString:@"#\n\n"]; + + // The 'real' thing + [string appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Subprojects\n"]; + [string appendString:@"#\n\n"]; + + if ([[aProject subprojects] count]) { + enumerator = [[prDict objectForKey:PCSubprojects] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + } + + [string appendString:@"#\n"]; + [string appendString:@"# Main application\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"APP_NAME=%@\n",prName]]; + // [string appendString:[NSString stringWithFormat:@"%@_PRINCIPAL_CLASS=%@\n",prName,[prDict objectForKey:PCPrincipalClass]]]; + [string appendString:[NSString stringWithFormat:@"%@_MAIN_MODEL_FILE=%@\n",prName,[prDict objectForKey:PCMainGModelFile]]]; + [string appendString:[NSString stringWithFormat:@"%@_APPLICATION_ICON=%@\n",prName, [prDict objectForKey:PCAppIcon]]]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Additional libraries\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_ADDITIONAL_GUI_LIBS += ",prName]]; + + if ([[prDict objectForKey:PCLibraries] count]) { + enumerator = [[prDict objectForKey:PCLibraries] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + if (![tmp isEqualToString:@"gnustep-base"] && + ![tmp isEqualToString:@"gnustep-gui"]) { + [string appendString:[NSString stringWithFormat:@"-l%@ ",tmp]]; + } + } + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Resource files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_RESOURCE_FILES= ",prName]]; + + for (i=0;i<[[aProject resourceFileKeys] count];i++) { + NSString *k = [[aProject resourceFileKeys] objectAtIndex:i]; + + enumerator = [[prDict objectForKey:k] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\nEnglish.lproj/%@ ",tmp]]; + } + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Header files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_HEADERS= ",prName]]; + + enumerator = [[prDict objectForKey:PCHeaders] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Class files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_OBJC_FILES= ",prName]]; + + enumerator = [[prDict objectForKey:PCClasses] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# C files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_C_FILES= ",prName]]; + + enumerator = [[prDict objectForKey:PCOtherSources] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n"]; + + [string appendString:@"-include GNUmakefile.preamble\n"]; + [string appendString:@"-include GNUmakefile.local\n"]; + [string appendString:@"include $(GNUSTEP_MAKEFILES)/aggregate.make\n"]; + [string appendString:@"include $(GNUSTEP_MAKEFILES)/application.make\n"]; + [string appendString:@"-include GNUmakefile.postamble\n"]; + + return [string dataUsingEncoding:[NSString defaultCStringEncoding]]; +} + +@end diff --git a/PCAppProj/PCAppProj.h b/PCAppProj/PCAppProj.h new file mode 100644 index 0000000..1cfe5cd --- /dev/null +++ b/PCAppProj/PCAppProj.h @@ -0,0 +1,48 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCAppProj : NSObject +{ +} + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator; + +- (Class)projectClass; + +- (NSString *)projectTypeName; +- (NSDictionary *)typeTable; + +- (PCProject *)createProjectAt:(NSString *)path; +- (PCProject *)openProjectAt:(NSString *)path; + +@end diff --git a/PCAppProj/PCAppProj.m b/PCAppProj/PCAppProj.m new file mode 100644 index 0000000..f74d3b3 --- /dev/null +++ b/PCAppProj/PCAppProj.m @@ -0,0 +1,146 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + PCAppProj creates new project of the type Application! + +*/ + +#import "PCAppProj.h" +#import "PCAppProject.h" + +@implementation PCAppProj + +static NSString *_projTypeName = @"Application"; +static PCAppProj *_creator = nil; + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator +{ + if (!_creator) { + _creator = [[[self class] alloc] init]; + } + return _creator; +} + +- (Class)projectClass +{ + return [PCAppProject class]; +} + +- (NSString *)projectTypeName +{ + return _projTypeName; +} + +- (NSDictionary *)typeTable +{ + NSString *_path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Info" ofType:@"table"]; + + return [NSDictionary dictionaryWithContentsOfFile:_path]; +} + +- (PCProject *)createProjectAt:(NSString *)path +{ + PCAppProject *project = nil; + NSFileManager *fm = [NSFileManager defaultManager]; + + NSAssert(path,@"No valid project path provided!"); + + if ([fm createDirectoryAtPath:path attributes:nil]) { + NSString *_file; + NSString *_resourcePath; + NSMutableDictionary *dict; + + project = [[[PCAppProject alloc] init] autorelease]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"PC" ofType:@"proj"]; + dict = [NSMutableDictionary dictionaryWithContentsOfFile:_file]; + + // Customise the project + [dict setObject:[path lastPathComponent] forKey:PCProjectName]; + [dict setObject:[project principalClass] forKey:PCProjType]; + + // Save the project to disc + [dict writeToFile:[path stringByAppendingPathComponent:@"PC.project"] atomically:YES]; + + // Copy the project files to the provided path + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"postamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.postamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"preamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.preamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"main" ofType:@"m"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"main.m"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"AppController" ofType:@"m"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"AppController.m"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"AppController" ofType:@"h"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"AppController.h"] handler:nil]; + + // Resources + _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"]; + [fm createDirectoryAtPath:_resourcePath attributes:nil]; + [fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Images"] attributes:nil]; + [fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"] attributes:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"Main" ofType:@"gmodel"]; + [fm copyPath:_file toPath:[_resourcePath stringByAppendingPathComponent:@"Main.gmodel"] handler:nil]; + + // The path cannot be in the PC.project file! + [project setProjectPath:path]; + + // Set the new dictionary - this causes the GNUmakefile to be written to disc + if(![project assignProjectDict:dict]) { + NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path); + return nil; + } + } + return project; +} + +- (PCProject *)openProjectAt:(NSString *)path +{ + NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; + id obj; + + NSLog(@"<%@ %x>: opening project at %@",[self class],self,path); + + obj = [dict objectForKey:PCProjectBuilderClass]; + if ([obj isEqualToString:@"PCAppProj"]) { + return [[[PCAppProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease]; + } + return nil; +} + +@end diff --git a/PCAppProj/PCAppProject.h b/PCAppProj/PCAppProject.h new file mode 100644 index 0000000..0214a94 --- /dev/null +++ b/PCAppProj/PCAppProject.h @@ -0,0 +1,66 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + This is the project type 'Application' for GNUstep. You never should create + it yourself but use PCAppProj for doing this. Otherwise needed files don't + get copied to the right place. + + */ + +#import +#import + +@interface PCAppProject : PCProject +{ + @private + BOOL _needsAdditionalReleasing; +} + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init; +- (void)dealloc; + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile; + +- (BOOL)isValidDictionary:(NSDictionary *)aDict; + +- (NSArray *)sourceFileKeys; +- (NSArray *)resourceFileKeys; +- (NSArray *)otherKeys; +- (NSArray *)buildTargets; +- (NSString *)projectDescription; + +@end diff --git a/PCAppProj/PCAppProject.m b/PCAppProj/PCAppProject.m new file mode 100644 index 0000000..25e1282 --- /dev/null +++ b/PCAppProj/PCAppProject.m @@ -0,0 +1,180 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCAppProject.h" +#import "PCAppMakefileFactory.h" + +#import + +#if defined(GNUSTEP) +#import +#endif + +@interface PCAppProject (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCAppProject (CreateUI) + +- (void)_initUI +{ + // Always call super!!! + [super _initUI]; + + projectAttributeInspectorView = [[NSBox alloc] init]; + [projectAttributeInspectorView setTitlePosition:NSAtTop]; + [projectAttributeInspectorView setBorderType:NSGrooveBorder]; + // [projectAttributeInspectorView addSubview:projectTypePopup]; + [projectAttributeInspectorView sizeToFit]; + [projectAttributeInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectProjectInspectorView = [[NSBox alloc] init]; + [projectProjectInspectorView setTitlePosition:NSAtTop]; + [projectProjectInspectorView setBorderType:NSGrooveBorder]; + // [projectProjectInspectorView addSubview:projectTypePopup]; + [projectProjectInspectorView sizeToFit]; + [projectProjectInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectFileInspectorView = [[NSBox alloc] init]; + [projectFileInspectorView setTitlePosition:NSAtTop]; + [projectFileInspectorView setBorderType:NSGrooveBorder]; + // [projectFileInspectorView addSubview:projectTypePopup]; + [projectFileInspectorView sizeToFit]; + [projectFileInspectorView setAutoresizingMask:NSViewWidthSizable]; + + _needsAdditionalReleasing = YES; +} + +@end + +@implementation PCAppProject + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init +{ + if ((self = [super init])) { + rootCategories = [[NSDictionary dictionaryWithObjectsAndKeys: + PCGModels,@"Interfaces", + PCImages,@"Images", + PCOtherResources,@"Other Resources", + PCSubprojects,@"Subprojects", + PCLibraries,@"Libraries", + PCDocuFiles,@"Documentation", + PCOtherSources,@"Other Sources", + PCHeaders,@"Headers", + PCClasses,@"Classes", + nil] retain]; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"AppProject.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load AppProject.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + } + return self; +} + +- (void)dealloc +{ + [rootCategories release]; + + if (_needsAdditionalReleasing) { + [projectAttributeInspectorView release]; + [projectProjectInspectorView release]; + [projectFileInspectorView release]; + } + + [super dealloc]; +} + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile +{ + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *makefile = [projectPath stringByAppendingPathComponent:@"GNUmakefile"]; + NSData *content; + + if (![super writeMakefile]) { + NSLog(@"Couldn't update PC.project..."); + } + + if (![fm movePath:makefile toPath:[projectPath stringByAppendingPathComponent:@"GNUmakefile~"] handler:nil]) { + NSLog(@"Couldn't write a backup GNUmakefile..."); + } + + if (!(content = [[PCAppMakefileFactory sharedFactory] makefileForProject:self])) { + NSLog([NSString stringWithFormat:@"Couldn't build the GNUmakefile %@!",makefile]); + return NO; + } + if (![content writeToFile:makefile atomically:YES]) { + NSLog([NSString stringWithFormat:@"Couldn't write the GNUmakefile %@!",makefile]); + return NO; + } + return YES; +} + +- (BOOL)isValidDictionary:(NSDictionary *)aDict +{ +#warning No project check implemented, yet! + return YES; +} + +- (NSArray *)sourceFileKeys +{ + return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil]; +} + +- (NSArray *)resourceFileKeys +{ + return [NSArray arrayWithObjects:PCGModels,PCOtherResources,PCImages,nil]; +} + +- (NSArray *)otherKeys +{ + return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil]; +} + +- (NSArray *)buildTargets +{ +} + +- (NSString *)projectDescription +{ + return @"Project that handles GNUstep/ObjC based applications."; +} + +@end diff --git a/PCAppProj/h.template b/PCAppProj/h.template new file mode 100644 index 0000000..7b523c7 --- /dev/null +++ b/PCAppProj/h.template @@ -0,0 +1,11 @@ +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/PCAppProj/m.template b/PCAppProj/m.template new file mode 100644 index 0000000..1216fe5 --- /dev/null +++ b/PCAppProj/m.template @@ -0,0 +1,18 @@ +$$ Lines starting with $$ are not inserted into newly created files +$$ The following substitutions are made: +$$ +$$ $FILENAME$ e.g. foo.m +$$ $FILENAMESANSEXTENSION$ e.g. foo +$$ $DIRECTORY$ e.g. /tmp/MyNewApp +$$ $PROJECTNAME$ e.g. MyNewApp +$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj +$$ $USERNAME$ e.g. mwagner +$$ $DATE$ e.g. Jan-1-1994 +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/PCAppProj/main.m b/PCAppProj/main.m new file mode 100644 index 0000000..1ef1c5b --- /dev/null +++ b/PCAppProj/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char *argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/PCBaseFileTypes/FileIcon_.c.tiff b/PCBaseFileTypes/FileIcon_.c.tiff new file mode 100644 index 0000000..60829b8 Binary files /dev/null and b/PCBaseFileTypes/FileIcon_.c.tiff differ diff --git a/PCBaseFileTypes/FileIcon_.h.tiff b/PCBaseFileTypes/FileIcon_.h.tiff new file mode 100644 index 0000000..5ecfc90 Binary files /dev/null and b/PCBaseFileTypes/FileIcon_.h.tiff differ diff --git a/PCBaseFileTypes/FileIcon_.m.tiff b/PCBaseFileTypes/FileIcon_.m.tiff new file mode 100644 index 0000000..e667755 Binary files /dev/null and b/PCBaseFileTypes/FileIcon_.m.tiff differ diff --git a/PCBaseFileTypes/GNUmakefile b/PCBaseFileTypes/GNUmakefile new file mode 100644 index 0000000..60b285a --- /dev/null +++ b/PCBaseFileTypes/GNUmakefile @@ -0,0 +1,48 @@ +# GNUmakefile +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# Date: 2000 +# +# This file is part of ProjectCenter +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +include $(GNUSTEP_MAKEFILES)/common.make + +BUNDLE_NAME = PCBaseFileTypes +BUNDLE_EXTENSION =.bundle +PCBaseFileTypes_PRINCIPAL_CLASS = PCBaseFileType +BUNDLE_INSTALL_DIR =$(GNUSTEP_LOCAL_ROOT)/Library/ProjectCenter/ + +PCBaseFileTypes_OBJC_FILES = \ + PCBaseFileType.m + +PCBaseFileTypes_HEADERS= \ + PCBaseFileType.h + +PCBaseFileTypes_RESOURCE_FILES = \ + cfile.template \ + cheader.template \ + class.template \ + header.template + +-include GNUmakefile.preamble + +include $(GNUSTEP_MAKEFILES)/bundle.make + +-include GNUmakefile.postamble + diff --git a/PCBaseFileTypes/Makefile b/PCBaseFileTypes/Makefile new file mode 100755 index 0000000..ec3ef51 --- /dev/null +++ b/PCBaseFileTypes/Makefile @@ -0,0 +1,49 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = PCBaseFileTypes + +PROJECTVERSION = 2.6 +PROJECT_TYPE = Loadable Bundle +LANGUAGE = English + +GLOBAL_RESOURCES = FileIcon_.m.tiff FileIcon_.h.tiff FileIcon_.c.tiff\ + cfile.template cheader.template class.template\ + header.template + +CLASSES = PCBaseFileType.m + +HFILES = PCBaseFileType.h + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template + +MAKEFILEDIR = $(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = bundle.make +NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter +WINDOWS_INSTALLDIR = /MyBundles +LIBS = -lPCLib +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) +BUNDLE_EXTENSION = bundle + + +FRAMEWORKS = -framework Foundation + + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/PCBaseFileTypes/Makefile.postamble b/PCBaseFileTypes/Makefile.postamble new file mode 100755 index 0000000..36381d4 --- /dev/null +++ b/PCBaseFileTypes/Makefile.postamble @@ -0,0 +1,122 @@ +############################################################################### +# NeXT Makefile.postamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project, sub-project, bundle, or +# palette. Each node in the project's tree of sub-projects and bundles +# should have it's own Makefile.preamble and Makefile.postamble. Additional +# rules (e.g., after_install) that are defined by the developer should be +# defined in this file. +# +############################################################################### +# +# Here are the variables exported by the common "app" makefiles that can be +# used in any customizations you make to the template below: +# +# PRODUCT_ROOT - Name of the directory to which resources are copied. +# OFILE_DIR - Directory into which .o object files are generated. +# (Note that this name is calculated based on the target +# architectures specified in Project Builder). +# DERIVED_SRC_DIR - Directory used for all other derived files +# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations +# +# NAME - name of application, bundle, subproject, palette, etc. +# LANGUAGE - langage in which the project is written (default "English") +# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES - non-localized resources of project +# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0) +# ICONSECTIONS - Specifies icon sections when linking executable +# +# CLASSES - Class implementation files in project. +# HFILES - Header files in project. +# MFILES - Other Objective-C source files in project. +# CFILES - Other C source files in project. +# PSWFILES - .psw files in the project +# PSWMFILES - .pswm files in the project +# SUBPROJECTS - Subprojects of this project +# BUNDLES - Bundle subprojects of this project +# OTHERSRCS - Other miscellaneous sources of this project +# OTHERLINKED - Source files not matching a standard source extention +# +# LIBS - Libraries to link with when making app target +# DEBUG_LIBS - Libraries to link with when making debug target +# PROF_LIBS - Libraries to link with when making profile target +# OTHERLINKEDOFILES - Other relocatable files to (always) link in. +# +# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles +# MAKEFILEDIR - Directory in which to find $(MAKEFILE) +# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) +# INSTALLDIR - Directory app will be installed into by 'install' target +# +############################################################################### + + +# Change defaults assumed by the standard makefiles here. Edit the +# following default values as appropriate. (Note that if no Makefile.postamble +# exists, these values will have defaults set in common.make). + +# Versioning of frameworks, libraries, bundles, and palettes: +#CURRENTLY_ACTIVE_VERSION = YES + # Set to "NO" to produce a compatibility binary +#DEPLOY_WITH_VERSION_NAME = A + # This should be incremented as your API changes. +#COMPATIBILITY_PROJECT_VERSION = 1 + # This should be incremented as your API grows. +#CURRENT_PROJECT_VERSION = 1 + # Defaults to using the "vers_string" hack. + +# Some compiler flags can be easily overridden here, but onlytake effect at +# the top-level: +#OPTIMIZATION_CFLAG = -O +#DEBUG_SYMBOLS_CFLAG = -g +#WARNING_CFLAGS = -Wmost +#DEBUG_BUILD_CFLAGS = -DDEBUG +#PROFILE_BUILD_CFLAGS = -pg -DPROFILE + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO + +# Flags passed to yacc +#YFLAGS = -d + +# Library and Framework projects only: +# 1. If you want something other than the default .dylib name, override it here +#DYLIB_INSTALL_NAME = lib$(NAME).dylib + +# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all. +#DYLIB_INSTALL_DIR = $(INSTALLDIR) + +# Ownership and permissions of files installed by 'install' target +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + +# Options to strip for various project types. Note: -S strips debugging symbols +# (executables can be stripped down further with -x or, if they load no bundles, with no +# options at all). +#APP_STRIP_OPTS = -S +#TOOL_STRIP_OPTS = -S +#LIBRARY_STRIP_OPTS = -S + # for .a archives +#DYNAMIC_STRIP_OPTS = -S + # for bundles and shared libraries + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. "Official" +# user-defined rules are: +# * before_install +# * after_install +# * after_installhdrs +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# +# Note: on MS Windows, executables, have an extension, so rules and dependencies +# for generated tools should use $(EXECUTABLE_EXT) on the end. diff --git a/PCBaseFileTypes/Makefile.preamble b/PCBaseFileTypes/Makefile.preamble new file mode 100755 index 0000000..5c0a25a --- /dev/null +++ b/PCBaseFileTypes/Makefile.preamble @@ -0,0 +1,130 @@ +############################################################################### +# NeXT Makefile.preamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project. Each node in a project +# tree of sub-projects, tools, etc. should have its own Makefile.preamble and +# Makefile.postamble. +# +############################################################################### +## Configure the flags passed to $(CC) here. These flags will also be +## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and +## -L flags in ProjectBuilder's Build Options inspector if at all possible. +## To change the default flags that get passed to ${CC} +## (e.g. change -O to -O2), see Makefile.postamble. + +# Flags passed to compiler (in addition to -g, -O, etc) +OTHER_CFLAGS = +# Flags passed to ld (in addition to -ObjC, etc.) +OTHER_LDFLAGS = +# Flags passed to libtool when building libraries +OTHER_LIBTOOL_FLAGS = +# For ordering named sections on NEXTSTEP (see ld(1)) +SECTORDER_FLAGS = + +# If you do not want any headers exported before compilations begin, +# uncomment the following line. This can be a big time saver. +#SKIP_EXPORTING_HEADERS = YES + +# Stuff related to exporting headers from this project that isn't already +# handled by PB. +OTHER_PUBLIC_HEADERS = +OTHER_PROJECT_HEADERS = +OTHER_PRIVATE_HEADERS = + +# Set these two macros if you want a precomp to be built as part of +# installation. The cc -precomp will be run in the public header directory +# on the specified public header files with the specified additional flags. +PUBLIC_PRECOMPILED_HEADERS = +PUBLIC_PRECOMPILED_HEADERS_CFLAGS = + +# Set this for library projects if you want to publish header files. If your +# app or tool project exports headers Don't +# include $(DSTROOT); this is added for you automatically. +PUBLIC_HEADER_DIR = +PRIVATE_HEADER_DIR = + +# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR# +# (say, to add a subdirectory like "/sys"), you can use: +PUBLIC_HEADER_DIR_SUFFIX = +PRIVATE_HEADER_DIR_SUFFIX = + +# Set this for dynamic library projects on platforms where code which references +# a dynamic library must link against an import library (i.e., Windows NT) +# Don't include $(DSTROOT); this is added for you automatically. +IMPORT_LIBRARY_DIR = + +# Additional (non-localized) resources for this project, which can be generated +OTHER_RESOURCES = + +# Uncomment this to produce a static archive-style (.a) library +#LIBRARY_STYLE = STATIC + +# Set this to YES if you don't want a final libtool call for a library/framework. +BUILD_OFILES_LIST_ONLY = + +# Additional relocatables to be linked into this project +OTHER_OFILES = +# Additional libraries to link against +OTHER_LIBS = +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +## Configure how things get built here. Additional dependencies, source files, +## derived files, and build order should be specified here. + +# Other dependencies of this project +OTHER_PRODUCT_DEPENDS = +# Built *before* building subprojects/bundles +OTHER_INITIAL_TARGETS = +# Other source files maintained by .pre/postamble +OTHER_SOURCEFILES = +# Additional files to be removed by `make clean' +OTHER_GARBAGE = + +# Targets to build before installation +OTHER_INSTALL_DEPENDS = + +# More obscure flags you might want to set for pswrap, yacc, lex, etc. +PSWFLAGS = +YFLAGS = +LFLAGS = + +## Delete this line if you want fast and loose cleans that will not remove +## things like precomps and user-defined OTHER_GARBAGE in subprojects. +CLEAN_ALL_SUBPROJECTS = YES + +## Add more obscure source files here to cause them to be automatically +## processed by the appropriate tool. Note that these files should also be +## added to "Supporting Files" in ProjectBuilder. The desired .o files that +## result from these files should also be added to OTHER_OFILES above so they +## will be linked in. + +# .msg files that should have msgwrap run on them +MSGFILES = +# .defs files that should have mig run on them +DEFSFILES = +# .mig files (no .defs files) that should have mig run on them +MIGFILES = +# .x files that should have rpcgen run on them +RPCFILES = + +## Add additional Help directories here (add them to the project as "Other +## Resources" in Project Builder) so that they will be compressed into .store +## files and copied into the app wrapper. If the help directories themselves +## need to also be in the app wrapper, then a cp command will need to be added +## in an after_install target. +OTHER_HELP_DIRS = + +# After you have saved your project using the 4.0 PB, you will automatically +# start using the makefiles in /NextDeveloper/Makefiles/project. If you should +# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to +# be /NextDeveloper/Makefiles/app. + +# Don't add more rules here unless you want the first one to be the default +# target for make! Put all your targets in Makefile.postamble. + diff --git a/PCBaseFileTypes/PB.project b/PCBaseFileTypes/PB.project new file mode 100755 index 0000000..e352f96 --- /dev/null +++ b/PCBaseFileTypes/PB.project @@ -0,0 +1,25 @@ +{ + APPCLASS = PCBaseFileType; + BUNDLE_EXTENSION = bundle; + DYNAMIC_CODE_GEN = YES; + FILESTABLE = { + CLASSES = (PCBaseFileType.m); + FRAMEWORKS = (Foundation.framework); + H_FILES = (PCBaseFileType.h); + IMAGES = (FileIcon_.m.tiff, FileIcon_.h.tiff, FileIcon_.c.tiff); + OTHER_LIBS = (PCLib); + OTHER_RESOURCES = (cfile.template, cheader.template, class.template, header.template); + OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template); + }; + LANGUAGE = English; + LOCALIZABLE_FILES = {}; + MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles"; + NEXTSTEP_BUILDTOOL = /bin/gnumake; + NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter; + PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make; + PROJECTNAME = PCBaseFileTypes; + PROJECTTYPE = "Loadable Bundle"; + PROJECTVERSION = 2.6; + WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make; + WINDOWS_INSTALLDIR = /MyBundles; +} diff --git a/PCBaseFileTypes/PCBaseFileType.h b/PCBaseFileTypes/PCBaseFileType.h new file mode 100644 index 0000000..04c2c56 --- /dev/null +++ b/PCBaseFileTypes/PCBaseFileType.h @@ -0,0 +1,49 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@class PCProject; + +@interface PCBaseFileType : NSObject +{ + NSMutableString *file; +} + ++ (id)sharedCreator; + +- (NSString *)name; +- (NSDictionary *)creatorDictionary; + +- (NSDictionary *)createFileOfType:(NSString *)type path:(NSString *)path project:(PCProject *)aProject; + // The implementation needs some heavy cleanup! + +- (void)replaceTagsInFileAtPath:(NSString *)newFile withProject:(PCProject *)aProject type:(NSString *)aType; + +@end + + diff --git a/PCBaseFileTypes/PCBaseFileType.m b/PCBaseFileTypes/PCBaseFileType.m new file mode 100644 index 0000000..66b6c1b --- /dev/null +++ b/PCBaseFileTypes/PCBaseFileType.m @@ -0,0 +1,203 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCBaseFileType.h" +#import + +#define ObjCClass @"ObjC Class" +#define ObjCHeader @"ObjC Header" +#define CFile @"C File" +#define CHeaderFile @"C Header" + +@implementation PCBaseFileType + +static PCBaseFileType *_creator = nil; +static NSString *_name = @"BaseFileCreator"; +static NSDictionary *dict = nil; + ++ (id)sharedCreator +{ + if (!_creator) { + NSDictionary *classDict; + NSDictionary *headerDict; + NSDictionary *ccDict; + NSDictionary *chDict; + + _creator = [[[self class] alloc] init]; + + // Setting up the dictionary needed for registration! + classDict = [NSDictionary dictionaryWithObjectsAndKeys:_creator,@"Creator",PCClasses,@"ProjectKey",nil]; + headerDict = [NSDictionary dictionaryWithObjectsAndKeys:_creator,@"Creator",PCHeaders,@"ProjectKey",nil]; + ccDict = [NSDictionary dictionaryWithObjectsAndKeys:_creator,@"Creator",PCOtherSources,@"ProjectKey",nil]; + chDict = [NSDictionary dictionaryWithObjectsAndKeys:_creator,@"Creator",PCHeaders,@"ProjectKey",nil]; + + dict = [[NSDictionary alloc] initWithObjectsAndKeys:classDict,ObjCClass,headerDict,ObjCHeader,ccDict,CFile,chDict,CHeaderFile,nil]; + } + return _creator; +} + +- (NSString *)name +{ + return _name; +} + +- (NSDictionary *)creatorDictionary +{ + return dict; +} + +- (NSDictionary *)createFileOfType:(NSString *)type path:(NSString *)path project:(PCProject *)aProject +{ + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *_file; + NSString *newFile = nil; + NSMutableDictionary *files; + + // A class and possibly a header + files = [NSMutableDictionary dictionaryWithCapacity:2]; + + NSLog(@"<%@ %x>: create %@ at %@",[self class],self,type,path); + + /* + * + */ + + if ([type isEqualToString:ObjCClass]) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"class" ofType:@"template"]; + newFile = [path stringByAppendingPathExtension:@"m"]; + [fm copyPath:_file toPath:newFile handler:nil]; + [files setObject:ObjCClass forKey:newFile]; + + [self replaceTagsInFileAtPath:newFile withProject:aProject type:type]; + + // Should a header be created as well? + newFile = [path stringByAppendingPathExtension:@"h"]; + if (NSRunAlertPanel(@"Attention!",@"Should %@ be created and inserted in the project as well?",@"Yes",@"No",nil,[newFile lastPathComponent])) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"header" ofType:@"template"]; + [fm copyPath:_file toPath:newFile handler:nil]; + + [self replaceTagsInFileAtPath:newFile withProject:aProject type:ObjCHeader]; + [files setObject:ObjCHeader forKey:newFile]; + } + } + + /* + * + */ + + else if ([type isEqualToString:CFile]) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"cfile" ofType:@"template"]; + newFile = [path stringByAppendingPathExtension:@"c"]; + [fm copyPath:_file toPath:newFile handler:nil]; + [files setObject:CFile forKey:newFile]; + + [self replaceTagsInFileAtPath:newFile withProject:aProject type:type]; + + // Should a header be created as well? + newFile = [path stringByAppendingPathExtension:@"h"]; + if (NSRunAlertPanel(@"Attention!",@"Should %@ be created and inserted in the project as well?",@"Yes",@"No",nil,[newFile lastPathComponent])) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"cheader" ofType:@"template"]; + [fm copyPath:_file toPath:newFile handler:nil]; + + [self replaceTagsInFileAtPath:newFile withProject:aProject type:CHeaderFile]; + [files setObject:CHeaderFile forKey:newFile]; + } + } + + /* + * + */ + + else if ([type isEqualToString:ObjCHeader]) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"header" ofType:@"template"]; + newFile = [path stringByAppendingPathExtension:@"h"]; + [fm copyPath:_file toPath:newFile handler:nil]; + [self replaceTagsInFileAtPath:newFile withProject:aProject type:type]; + [files setObject:ObjCHeader forKey:newFile]; + } + + /* + * + */ + + else if ([type isEqualToString:CHeaderFile]) { + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"cheader" ofType:@"template"]; + newFile = [path stringByAppendingPathExtension:@"h"]; + [fm copyPath:_file toPath:newFile handler:nil]; + [self replaceTagsInFileAtPath:newFile withProject:aProject type:type]; + [files setObject:ObjCHeader forKey:newFile]; + } + + /* + * Notify the browser! + */ + + [[NSNotificationCenter defaultCenter] postNotificationName:@"ProjectDictDidChangeNotification" object:self]; + + return files; +} + +- (void)replaceTagsInFileAtPath:(NSString *)newFile withProject:(PCProject *)aProject type:(NSString *)aType +{ + NSString *user = NSUserName(); + NSString *pname = [aProject projectName]; + NSString *date = [[NSCalendarDate calendarDate] description]; + NSString *aFile = [newFile lastPathComponent]; + + file = [[NSMutableString stringWithContentsOfFile:newFile] retain]; + + [file replaceCharactersInRange: + [file rangeOfString:@"$FILENAME$"] withString:aFile]; + + [file replaceCharactersInRange: + [file rangeOfString:@"$USERNAME$"] withString:user]; + + [file replaceCharactersInRange: + [file rangeOfString:@"$PROJECTNAME$"] withString:pname]; + + [file replaceCharactersInRange: + [file rangeOfString:@"$DATE$"] withString:date]; + + if ([aType isEqualToString:ObjCClass] || + [aType isEqualToString:CFile] || + [aType isEqualToString:ObjCHeader]) { + NSString *name = [aFile stringByDeletingPathExtension]; + + [file replaceCharactersInRange: + [file rangeOfString:@"$FILENAMESANSEXTENSION$"] withString:name]; + + if ([aType isEqualToString:ObjCClass]) { + [file replaceCharactersInRange: + [file rangeOfString:@"$FILENAMESANSEXTENSION$"] withString:name]; + } + } + [file writeToFile:newFile atomically:YES]; + [file autorelease]; +} + +@end + + diff --git a/PCBaseFileTypes/cfile.template b/PCBaseFileTypes/cfile.template new file mode 100644 index 0000000..266a59e --- /dev/null +++ b/PCBaseFileTypes/cfile.template @@ -0,0 +1,11 @@ +/* + * $FILENAME$ created by $USERNAME$ on $DATE$ + * + * Project $PROJECTNAME$ + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + +#include "$FILENAMESANSEXTENSION$.h" diff --git a/PCBaseFileTypes/cheader.template b/PCBaseFileTypes/cheader.template new file mode 100644 index 0000000..5b45ed0 --- /dev/null +++ b/PCBaseFileTypes/cheader.template @@ -0,0 +1,10 @@ +/* + * $FILENAME$ created by $USERNAME$ on $DATE$ + * + * Project $PROJECTNAME$ + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + diff --git a/PCBaseFileTypes/class.template b/PCBaseFileTypes/class.template new file mode 100644 index 0000000..2100a62 --- /dev/null +++ b/PCBaseFileTypes/class.template @@ -0,0 +1,15 @@ +/* + * $FILENAME$ created by $USERNAME$ on $DATE$ + * + * Project $PROJECTNAME$ + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/PCBaseFileTypes/header.template b/PCBaseFileTypes/header.template new file mode 100644 index 0000000..0cf48af --- /dev/null +++ b/PCBaseFileTypes/header.template @@ -0,0 +1,18 @@ +/* + * $FILENAME$ created by $USERNAME$ on $DATE$ + * + * Project $PROJECTNAME$ + * + * Created with ProjectCenter - http://www.projectcenter.ch + * + * $Id$ + */ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/PCLib/FileCreator.h b/PCLib/FileCreator.h new file mode 100644 index 0000000..72eaf28 --- /dev/null +++ b/PCLib/FileCreator.h @@ -0,0 +1,44 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@class PCProject; + +@protocol FileCreator + ++ (id)sharedCreator; + +- (NSString *)name; +- (NSDictionary *)creatorDictionary; + // Object is the creator and key is the type of the file to be created + +- (NSDictionary *)createFileOfType:(NSString *)type path:(NSString *)path project:(PCProject *)aProject; + // Creates the file and returns a dictionary containing the full path of it as the key and the type as object (and perhaps other files that have been added during this process!); including path extensions etc! + +@end + + diff --git a/PCLib/GNUmakefile b/PCLib/GNUmakefile new file mode 100644 index 0000000..159db9e --- /dev/null +++ b/PCLib/GNUmakefile @@ -0,0 +1,97 @@ +# +# src makefile for the PCLib +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Written by: Philippe C.D. Robert +# +# This file is part of the ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. +# + +# Install into the system root by default +PCLIB_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT) +GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles + +include $(GNUSTEP_MAKEFILES)/common.make + +include ../Version + +srcdir = . + +PACKAGE_NAME = PCLib +LIBRARY_VAR = PCLIB + +# The library to be compiled +LIBRARY_NAME=libPC + +PCLIB_INSTALL_PREFIX=$(GNUSTEP_LOCAL_ROOT) + +# Grep for these names to build the legally-required "AUTHORS" file. +FILE_AUTHORS = \ + "Philippe C.D. Robert" + +# The source files + +libPC_MFILES = \ + PCBrowserController.m \ + PCBundleLoader.m \ + PCDataSource.m \ + PCFileManager.m \ + PCProject.m \ + PCProjectBuilder.m \ + PCProjectManager.m \ + PCServer.m + +libPC_CFILES = + +libPC_HFILES = \ + FileCreator.h \ + PCBrowserController.h \ + PCBundleLoader.h \ + PCDataSource.h \ + PCFileManager.h \ + PCProject.h \ + PCProjectBuilder.h \ + PCProjectManager.h \ + PCServer.h \ + PreferenceController.h \ + ProjectBuilder.h \ + ProjectCenter.h \ + ProjectDebugger.h \ + ProjectEditor.h \ + ProjectType.h \ + Server.h + +HEADERS_INSTALL = $(libPC_HFILES) + +# The Objective-C source files to be compiled +libPC_OBJC_FILES = $(libPC_MFILES) + +# The C source files to be compiled +libPC_C_FILES = $(libPC_CFILES) + +# The headers +libPC_HEADER_FILES_DIR = . +libPC_HEADER_FILES_INSTALL_DIR = /ProjectCenter +libPC_HEADER_FILES = $(libPC_HFILES) + +-include GNUmakefile.preamble + +include $(GNUSTEP_MAKEFILES)/library.make + + + diff --git a/PCLib/GNUmakefile.preamble b/PCLib/GNUmakefile.preamble new file mode 100644 index 0000000..d878583 --- /dev/null +++ b/PCLib/GNUmakefile.preamble @@ -0,0 +1,67 @@ +# +# GNUmakefile.preamble +# +# Copyright (C) 1999 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# +# This file is part of ProjectCenter +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS = $(PCLIB_INSTALL_PREFIX)/Headers/ProjectCenter + +# +# Local configuration +# + + diff --git a/PCLib/Makefile b/PCLib/Makefile new file mode 100755 index 0000000..df60e97 --- /dev/null +++ b/PCLib/Makefile @@ -0,0 +1,65 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = PCLib + +PROJECTVERSION = 2.6 +PROJECT_TYPE = Library +LANGUAGE = English + +CLASSES = PCBundleLoader.m PCDataSource.m PCProjectManager.m PCServer.m\ + PCProject.m PCFileManager.m PCBrowserController.m\ + PCProjectBuilder.m + +HFILES = PCBundleLoader.h PCDataSource.h PCProjectManager.h PCServer.h\ + PCProject.h PCFileManager.h PCBrowserController.h\ + PreferenceController.h ProjectCenter.h ProjectDebugger.h\ + ProjectEditor.h ProjectType.h Server.h ProjectBuilder.h\ + FileCreator.h PCProjectBuilder.h + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template + +MAKEFILEDIR = $(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles +CURRENTLY_ACTIVE_VERSION = YES +DEPLOY_WITH_VERSION_NAME = A +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = library.make +NEXTSTEP_INSTALLDIR = /usr/local/lib +WINDOWS_INSTALLDIR = $(HOMEDRIVE)/LocalDeveloper/Libraries +PDO_UNIX_INSTALLDIR = /usr/local/lib +LIBS = +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) + + +FRAMEWORKS = -framework AppKit -framework Foundation +PUBLIC_HEADERS = PCBundleLoader.h PCProjectManager.h PCServer.h\ + ProjectCenter.h ProjectDebugger.h ProjectEditor.h\ + Server.h ProjectType.h PreferenceController.h\ + PCDataSource.h PCProject.h ProjectBuilder.h\ + FileCreator.h PCFileManager.h PCBrowserController.h + + + +NEXTSTEP_PUBLIC_HEADERS_DIR = /LocalDeveloper/Headers/$(NAME) + +WINDOWS_PUBLIC_HEADERS_DIR = $(HOMEDRIVE)/LocalDeveloper/Headers/$(NAME) + +PDO_UNIX_PUBLIC_HEADERS_DIR = /LocalDeveloper/Headers/$(NAME) + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/PCLib/Makefile.postamble b/PCLib/Makefile.postamble new file mode 100755 index 0000000..36381d4 --- /dev/null +++ b/PCLib/Makefile.postamble @@ -0,0 +1,122 @@ +############################################################################### +# NeXT Makefile.postamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project, sub-project, bundle, or +# palette. Each node in the project's tree of sub-projects and bundles +# should have it's own Makefile.preamble and Makefile.postamble. Additional +# rules (e.g., after_install) that are defined by the developer should be +# defined in this file. +# +############################################################################### +# +# Here are the variables exported by the common "app" makefiles that can be +# used in any customizations you make to the template below: +# +# PRODUCT_ROOT - Name of the directory to which resources are copied. +# OFILE_DIR - Directory into which .o object files are generated. +# (Note that this name is calculated based on the target +# architectures specified in Project Builder). +# DERIVED_SRC_DIR - Directory used for all other derived files +# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations +# +# NAME - name of application, bundle, subproject, palette, etc. +# LANGUAGE - langage in which the project is written (default "English") +# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES - non-localized resources of project +# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0) +# ICONSECTIONS - Specifies icon sections when linking executable +# +# CLASSES - Class implementation files in project. +# HFILES - Header files in project. +# MFILES - Other Objective-C source files in project. +# CFILES - Other C source files in project. +# PSWFILES - .psw files in the project +# PSWMFILES - .pswm files in the project +# SUBPROJECTS - Subprojects of this project +# BUNDLES - Bundle subprojects of this project +# OTHERSRCS - Other miscellaneous sources of this project +# OTHERLINKED - Source files not matching a standard source extention +# +# LIBS - Libraries to link with when making app target +# DEBUG_LIBS - Libraries to link with when making debug target +# PROF_LIBS - Libraries to link with when making profile target +# OTHERLINKEDOFILES - Other relocatable files to (always) link in. +# +# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles +# MAKEFILEDIR - Directory in which to find $(MAKEFILE) +# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) +# INSTALLDIR - Directory app will be installed into by 'install' target +# +############################################################################### + + +# Change defaults assumed by the standard makefiles here. Edit the +# following default values as appropriate. (Note that if no Makefile.postamble +# exists, these values will have defaults set in common.make). + +# Versioning of frameworks, libraries, bundles, and palettes: +#CURRENTLY_ACTIVE_VERSION = YES + # Set to "NO" to produce a compatibility binary +#DEPLOY_WITH_VERSION_NAME = A + # This should be incremented as your API changes. +#COMPATIBILITY_PROJECT_VERSION = 1 + # This should be incremented as your API grows. +#CURRENT_PROJECT_VERSION = 1 + # Defaults to using the "vers_string" hack. + +# Some compiler flags can be easily overridden here, but onlytake effect at +# the top-level: +#OPTIMIZATION_CFLAG = -O +#DEBUG_SYMBOLS_CFLAG = -g +#WARNING_CFLAGS = -Wmost +#DEBUG_BUILD_CFLAGS = -DDEBUG +#PROFILE_BUILD_CFLAGS = -pg -DPROFILE + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO + +# Flags passed to yacc +#YFLAGS = -d + +# Library and Framework projects only: +# 1. If you want something other than the default .dylib name, override it here +#DYLIB_INSTALL_NAME = lib$(NAME).dylib + +# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all. +#DYLIB_INSTALL_DIR = $(INSTALLDIR) + +# Ownership and permissions of files installed by 'install' target +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + +# Options to strip for various project types. Note: -S strips debugging symbols +# (executables can be stripped down further with -x or, if they load no bundles, with no +# options at all). +#APP_STRIP_OPTS = -S +#TOOL_STRIP_OPTS = -S +#LIBRARY_STRIP_OPTS = -S + # for .a archives +#DYNAMIC_STRIP_OPTS = -S + # for bundles and shared libraries + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. "Official" +# user-defined rules are: +# * before_install +# * after_install +# * after_installhdrs +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# +# Note: on MS Windows, executables, have an extension, so rules and dependencies +# for generated tools should use $(EXECUTABLE_EXT) on the end. diff --git a/PCLib/Makefile.preamble b/PCLib/Makefile.preamble new file mode 100755 index 0000000..5c0a25a --- /dev/null +++ b/PCLib/Makefile.preamble @@ -0,0 +1,130 @@ +############################################################################### +# NeXT Makefile.preamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project. Each node in a project +# tree of sub-projects, tools, etc. should have its own Makefile.preamble and +# Makefile.postamble. +# +############################################################################### +## Configure the flags passed to $(CC) here. These flags will also be +## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and +## -L flags in ProjectBuilder's Build Options inspector if at all possible. +## To change the default flags that get passed to ${CC} +## (e.g. change -O to -O2), see Makefile.postamble. + +# Flags passed to compiler (in addition to -g, -O, etc) +OTHER_CFLAGS = +# Flags passed to ld (in addition to -ObjC, etc.) +OTHER_LDFLAGS = +# Flags passed to libtool when building libraries +OTHER_LIBTOOL_FLAGS = +# For ordering named sections on NEXTSTEP (see ld(1)) +SECTORDER_FLAGS = + +# If you do not want any headers exported before compilations begin, +# uncomment the following line. This can be a big time saver. +#SKIP_EXPORTING_HEADERS = YES + +# Stuff related to exporting headers from this project that isn't already +# handled by PB. +OTHER_PUBLIC_HEADERS = +OTHER_PROJECT_HEADERS = +OTHER_PRIVATE_HEADERS = + +# Set these two macros if you want a precomp to be built as part of +# installation. The cc -precomp will be run in the public header directory +# on the specified public header files with the specified additional flags. +PUBLIC_PRECOMPILED_HEADERS = +PUBLIC_PRECOMPILED_HEADERS_CFLAGS = + +# Set this for library projects if you want to publish header files. If your +# app or tool project exports headers Don't +# include $(DSTROOT); this is added for you automatically. +PUBLIC_HEADER_DIR = +PRIVATE_HEADER_DIR = + +# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR# +# (say, to add a subdirectory like "/sys"), you can use: +PUBLIC_HEADER_DIR_SUFFIX = +PRIVATE_HEADER_DIR_SUFFIX = + +# Set this for dynamic library projects on platforms where code which references +# a dynamic library must link against an import library (i.e., Windows NT) +# Don't include $(DSTROOT); this is added for you automatically. +IMPORT_LIBRARY_DIR = + +# Additional (non-localized) resources for this project, which can be generated +OTHER_RESOURCES = + +# Uncomment this to produce a static archive-style (.a) library +#LIBRARY_STYLE = STATIC + +# Set this to YES if you don't want a final libtool call for a library/framework. +BUILD_OFILES_LIST_ONLY = + +# Additional relocatables to be linked into this project +OTHER_OFILES = +# Additional libraries to link against +OTHER_LIBS = +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +## Configure how things get built here. Additional dependencies, source files, +## derived files, and build order should be specified here. + +# Other dependencies of this project +OTHER_PRODUCT_DEPENDS = +# Built *before* building subprojects/bundles +OTHER_INITIAL_TARGETS = +# Other source files maintained by .pre/postamble +OTHER_SOURCEFILES = +# Additional files to be removed by `make clean' +OTHER_GARBAGE = + +# Targets to build before installation +OTHER_INSTALL_DEPENDS = + +# More obscure flags you might want to set for pswrap, yacc, lex, etc. +PSWFLAGS = +YFLAGS = +LFLAGS = + +## Delete this line if you want fast and loose cleans that will not remove +## things like precomps and user-defined OTHER_GARBAGE in subprojects. +CLEAN_ALL_SUBPROJECTS = YES + +## Add more obscure source files here to cause them to be automatically +## processed by the appropriate tool. Note that these files should also be +## added to "Supporting Files" in ProjectBuilder. The desired .o files that +## result from these files should also be added to OTHER_OFILES above so they +## will be linked in. + +# .msg files that should have msgwrap run on them +MSGFILES = +# .defs files that should have mig run on them +DEFSFILES = +# .mig files (no .defs files) that should have mig run on them +MIGFILES = +# .x files that should have rpcgen run on them +RPCFILES = + +## Add additional Help directories here (add them to the project as "Other +## Resources" in Project Builder) so that they will be compressed into .store +## files and copied into the app wrapper. If the help directories themselves +## need to also be in the app wrapper, then a cp command will need to be added +## in an after_install target. +OTHER_HELP_DIRS = + +# After you have saved your project using the 4.0 PB, you will automatically +# start using the makefiles in /NextDeveloper/Makefiles/project. If you should +# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to +# be /NextDeveloper/Makefiles/app. + +# Don't add more rules here unless you want the first one to be the default +# target for make! Put all your targets in Makefile.postamble. + diff --git a/PCLib/PB.project b/PCLib/PB.project new file mode 100755 index 0000000..5019866 --- /dev/null +++ b/PCLib/PB.project @@ -0,0 +1,69 @@ +{ + CURRENTLY_ACTIVE_VERSION = YES; + DEPLOY_WITH_VERSION_NAME = A; + DYNAMIC_CODE_GEN = YES; + FILESTABLE = { + CLASSES = ( + PCBundleLoader.m, + PCDataSource.m, + PCProjectManager.m, + PCServer.m, + PCProject.m, + PCFileManager.m, + PCBrowserController.m, + PCProjectBuilder.m + ); + FRAMEWORKS = (AppKit.framework, Foundation.framework); + H_FILES = ( + PCBundleLoader.h, + PCDataSource.h, + PCProjectManager.h, + PCServer.h, + PCProject.h, + PCFileManager.h, + PCBrowserController.h, + PreferenceController.h, + ProjectCenter.h, + ProjectDebugger.h, + ProjectEditor.h, + ProjectType.h, + Server.h, + ProjectBuilder.h, + FileCreator.h, + PCProjectBuilder.h + ); + OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template); + PUBLIC_HEADERS = ( + PCBundleLoader.h, + PCProjectManager.h, + PCServer.h, + ProjectCenter.h, + ProjectDebugger.h, + ProjectEditor.h, + Server.h, + ProjectType.h, + PreferenceController.h, + PCDataSource.h, + PCProject.h, + ProjectBuilder.h, + FileCreator.h, + PCFileManager.h, + PCBrowserController.h + ); + }; + LANGUAGE = English; + LOCALIZABLE_FILES = {}; + MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles"; + NEXTSTEP_BUILDTOOL = /bin/gnumake; + NEXTSTEP_INSTALLDIR = /usr/local/lib; + NEXTSTEP_PUBLICHEADERSDIR = "/LocalDeveloper/Headers/$(NAME)"; + PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make; + PDO_UNIX_INSTALLDIR = /usr/local/lib; + PDO_UNIX_PUBLICHEADERSDIR = "/LocalDeveloper/Headers/$(NAME)"; + PROJECTNAME = PCLib; + PROJECTTYPE = Library; + PROJECTVERSION = 2.6; + WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make; + WINDOWS_INSTALLDIR = "$(HOMEDRIVE)/LocalDeveloper/Libraries"; + WINDOWS_PUBLICHEADERSDIR = "$(HOMEDRIVE)/LocalDeveloper/Headers/$(NAME)"; +} diff --git a/PCLib/PCBrowserController.h b/PCLib/PCBrowserController.h new file mode 100644 index 0000000..39a130e --- /dev/null +++ b/PCLib/PCBrowserController.h @@ -0,0 +1,58 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@class PCProject; + +@interface PCBrowserController : NSObject +{ + id browser; + PCProject *project; +} + +- (void)dealloc; + +- (void)click:(id)sender; +- (void)doubleClick:(id)sender; + +- (void)projectDictDidChange:(NSNotification *)aNotif; + +- (NSString *)nameOfSelectedFile; +- (NSString *)pathOfSelectedFile; + +- (void)setBrowser:(NSBrowser *)aBrowser; +- (void)setProject:(PCProject *)aProj; + +@end + +@interface PCBrowserController (ProjectBrowserDelegate) + +- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix; +- (void)browser:(NSBrowser *)sender willDisplayCell:(id)cell atRow:(int)row column:(int)column; +- (BOOL)browser:(NSBrowser *)sender selectCellWithString:(NSString *)title inColumn:(int)column; + +@end diff --git a/PCLib/PCBrowserController.m b/PCLib/PCBrowserController.m new file mode 100644 index 0000000..6bbc578 --- /dev/null +++ b/PCLib/PCBrowserController.m @@ -0,0 +1,190 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCBrowserController.h" +#import "PCProject.h" + +@implementation PCBrowserController + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [super dealloc]; +} + +- (void)click:(id)sender +{ + NSTextView *pTextView; + + if ([[sender selectedCell] isLeaf]) { + NSString *ctitle = [[sender selectedCellInColumn:0] stringValue]; + NSString *text = [NSString stringWithFormat:@"Display File %@",[[sender selectedCell] stringValue] +]; + pTextView = [project textView]; + + if ([ctitle isEqualToString:@"Classes"]) { + [pTextView setString:text]; + } + + } +} + +- (void)doubleClick:(id)sender +{ +#warning No subproject support here yet! + /* + if ([sender selectedColumn] == 0) { + // Ask the project about the valid file types + //NSArray *types = [project typesForKeyPath:[sender pathToColumn:0]]; + NSOpenPanel *openPanel; + int retval; + NSArray *types; + + openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:NO]; + [openPanel setCanChooseDirectories:NO]; + [openPanel setCanChooseFiles:YES]; + + if ((retval = [openPanel runModalForDirectory:[[NSUserDefaults standardUserDefaults] objectForKey:@"LastOpenDirectory"] file:nil types:types])) { + NSString *key = [project projectKeyForKeyPath:[sender path]]; + + [project addFile:[[openPanel filenames] objectAtIndex:0] forKey:key]; + + [[NSUserDefaults standardUserDefaults] setObject:[openPanel directory] forKey:@"LastOpenDirectory"]; + } + } + else { + } + */ +} + +- (void)projectDictDidChange:(NSNotification *)aNotif +{ + [browser loadColumnZero]; +} + +- (NSString *)nameOfSelectedFile +{ + NSString *name = nil; + + // Doesn't work with subprojects! + if ([browser selectedColumn] != 0) { + name = [[[browser path] componentsSeparatedByString:@"/"] lastObject]; + } + + return name; +} + +- (NSString *)pathOfSelectedFile +{ + NSString *path = nil; + + // Doesn't work with subprojects! + if ([browser selectedColumn] != 0) { + path = [browser path]; + } + + return path; +} + +- (void)setBrowser:(NSBrowser *)aBrowser +{ + [browser autorelease]; + browser = [aBrowser retain]; + + [browser setTitled:NO]; + + [browser setTarget:self]; + [browser setAction:@selector(click:)]; + [browser setDoubleAction:@selector(doubleClick:)]; + + [browser setMaxVisibleColumns:3]; + [browser setAllowsMultipleSelection:NO]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(projectDictDidChange:) name:@"ProjectDictDidChangeNotification" object:project]; +} + +- (void)setProject:(PCProject *)aProj +{ + [project autorelease]; + project = [aProj retain]; +} + +@end + +@implementation PCBrowserController (ProjectBrowserDelegate) + +- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix +{ + NSString *pathToCol = [sender pathToColumn:column]; + NSArray *files = [project contentAtKeyPath:pathToCol]; + int i; + int count = [files count]; + + if (count == 0) { + NSLog(@"<%@ %x>: create rows for column aborted - 0 files!",[self class],self); + return; + } + +#ifdef DEBUG + NSLog(@"<%@ %x>: create rows for column %d in %x",[self class],self,column,sender); +#endif DEBUG + + for (i = 0; i < count; ++i) { + NSMutableString *keyPath = [NSMutableString stringWithString:pathToCol]; + id cell; + + [matrix insertRow:i]; + + cell = [matrix cellAtRow:i column:0]; + [cell setStringValue:[files objectAtIndex:i]]; + + [keyPath appendString:@"/"]; + [keyPath appendString:[files objectAtIndex:i]]; + + [cell setLeaf:![project hasChildrenAtKeyPath:keyPath]]; + } +} + +- (void)browser:(NSBrowser *)sender willDisplayCell:(id)cell atRow:(int)row column:(int)column +{ +#ifdef DEBUG + NSLog(@"<%@ %x>: browser %x will display %@ %x at %d,%d",[self class],self,sender,[cell class],cell,row,column); +#endif DEBUG +} + +- (BOOL)browser:(NSBrowser *)sender selectCellWithString:(NSString *)title inColumn:(int)column +{ + return YES; +} + +@end + + + + + diff --git a/PCLib/PCBundleLoader.h b/PCLib/PCBundleLoader.h new file mode 100644 index 0000000..d56dfcc --- /dev/null +++ b/PCLib/PCBundleLoader.h @@ -0,0 +1,80 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Descriotion: + + PCBundleLoader loads all PC bundles from all the paths that are stored in the + defaults under the key BundlePaths. + + */ +#import + +#import "PreferenceController.h" +#import "ProjectEditor.h" +#import "ProjectDebugger.h" + +@interface PCBundleLoader : NSObject +{ + id delegate; // The PCAppController! + + NSMutableArray *loadedBundles; +} + +//---------------------------------------------------------------------------- +// Init and free methods +//---------------------------------------------------------------------------- + +- (id)init; +- (void)dealloc; + +- (id)delegate; +- (void)setDelegate:(id)aDelegate; + +- (void)loadBundles; +// Load all bundles found in the BundlePaths + +- (NSArray *)loadedBundles; + // Returns all loaded ProjectCenter bundles. + +//---------------------------------------------------------------------------- +// BundleLoader +//---------------------------------------------------------------------------- + +- (BOOL)registerProjectSubmenu:(NSMenu *)menu; +- (BOOL)registerFileSubmenu:(NSMenu *)menu; +- (BOOL)registerToolsSubmenu:(NSMenu *)menu; +- (BOOL)registerPrefController:(id)prefs; +- (BOOL)registerEditor:(id)anEditor; +- (BOOL)registerDebugger:(id)aDebugger; + +@end + +@interface NSObject (BundleLoaderDelegates) + +- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle; + +@end diff --git a/PCLib/PCBundleLoader.m b/PCLib/PCBundleLoader.m new file mode 100644 index 0000000..3907cf0 --- /dev/null +++ b/PCLib/PCBundleLoader.m @@ -0,0 +1,128 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCBundleLoader.h" +#import "ProjectCenter.h" + +@interface PCBundleLoader (PrivateLoader) + +- (void)loadAdditionalBundlesAt:(NSString *)path; + +@end + +@implementation PCBundleLoader (PrivateLoader) + +- (void)loadAdditionalBundlesAt:(NSString *)path +{ + NSBundle *bundle; + + NSAssert(path,@"No valid bundle path specified!"); + +#ifdef DEBUG + NSLog([NSString stringWithFormat:@"Loading bundle %@...",path]); +#endif DEBUG + + if ((bundle = [NSBundle bundleWithPath:path])) { + [loadedBundles addObject:bundle]; + +#ifdef DEBUG + NSLog([NSString stringWithFormat:@"Bundle %@ successfully loaded!",path]); +#endif DEBUG + + if (delegate && [delegate respondsToSelector:@selector(bundleLoader: didLoadBundle:)]) { + [delegate bundleLoader:self didLoadBundle:bundle]; + } + } + else { + NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path); + } +} + +@end + +@implementation PCBundleLoader + +//---------------------------------------------------------------------------- +// Init and free methods +//---------------------------------------------------------------------------- + +- (id)init +{ + if ((self = [super init])) { + loadedBundles = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc +{ + [loadedBundles release]; + + [super dealloc]; +} + +- (id)delegate +{ + return delegate; +} + +- (void)setDelegate:(id)aDelegate +{ + delegate = aDelegate; +} + +- (void)loadBundles +{ + NSEnumerator *enumerator; + NSString *bundleName; + NSArray *dir; + NSString *path = [[NSUserDefaults standardUserDefaults] objectForKey:BundlePaths]; + + if (!path || path == @"" || ![[NSFileManager defaultManager] fileExistsAtPath:path]) { + [NSException raise:@"PCBundleLoaderPathException" format:@"No valid bundle path specified!"]; + return; + } + else { + NSLog([NSString stringWithFormat:@"Loading bundles at %@",path]); + } + + dir = [[NSFileManager defaultManager] directoryContentsAtPath:path]; + enumerator = [dir objectEnumerator]; + while (bundleName = [enumerator nextObject]) { + if ([[bundleName pathExtension] isEqualToString:@"bundle"]) { + NSString *fullPath = [NSString stringWithFormat:@"%@/%@",path,bundleName]; + + [self loadAdditionalBundlesAt:fullPath]; + } + } +} + +- (NSArray *)loadedBundles +{ + return loadedBundles; +} + +@end diff --git a/PCLib/PCDataSource.h b/PCLib/PCDataSource.h new file mode 100644 index 0000000..7f9d0e1 --- /dev/null +++ b/PCLib/PCDataSource.h @@ -0,0 +1,58 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +/* + Description: + + PCDataSource is used as a data source for a NSTableView. + +*/ + +@interface PCDataSource : NSObject +{ + NSMutableArray *data; +} + +- (id)init; +- (void)dealloc; + +- (void)insertObject:(id)object; + +- (void)removeObject:(id)object; +- (void)removeObjectAtIndex:(unsigned int)index; +- (void)removeAllObjects; + +- (NSArray *)allObjects; + +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; + +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; + +- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; + +@end diff --git a/PCLib/PCDataSource.m b/PCLib/PCDataSource.m new file mode 100644 index 0000000..37c9fa1 --- /dev/null +++ b/PCLib/PCDataSource.m @@ -0,0 +1,107 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCDataSource.h" + +@implementation PCDataSource + +- (id)init +{ + if (self = [super init]) { + data = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc +{ + [data release]; + [super dealloc]; +} + +//=========================================================================================== +//==== Data handling +//=========================================================================================== + +- (void)insertObject:(id)object +{ + if([data indexOfObject:object] == NSNotFound) { + [data addObject:object]; + } +} + +- (void)removeObject:(id)object +{ + int index = [data indexOfObject:object]; + + if(index != NSNotFound) { + [data removeObjectAtIndex:index]; + } +} + +- (void)removeObjectAtIndex:(unsigned int)index +{ + if(index < [data count]) { + [data removeObjectAtIndex:index]; + } +} + +- (void)removeAllObjects +{ + [data removeAllObjects]; +} + +- (NSArray *)allObjects +{ + return data; +} + +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [data count]; +} + +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +{ + id record; + + NSParameterAssert(rowIndex >= 0 && rowIndex < [data count]); + + record = [data objectAtIndex:rowIndex]; + return [record objectForKey:[aTableColumn identifier]]; +} + +- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +{ + id record; + + NSParameterAssert(rowIndex >= 0 && rowIndex < [data count]); + + record = [data objectAtIndex:rowIndex]; + [record setObject:anObject forKey:[aTableColumn identifier]]; +} + +@end diff --git a/PCLib/PCFileManager.h b/PCLib/PCFileManager.h new file mode 100644 index 0000000..08f61b0 --- /dev/null +++ b/PCLib/PCFileManager.h @@ -0,0 +1,90 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@interface PCFileManager : NSObject +{ + id newFileWindow; + id fileTypePopup; + id newFileName; + + id delegate; + + id fileTypeAccessaryView; + id addFileTypePopup; + + NSMutableDictionary *creators; + + BOOL _needsAdditionalReleasing; +} + +//=========================================================================================== +// ==== Init and free +//=========================================================================================== + +- (id)init; +- (void)dealloc; + +- (void)awakeFromNib; + +// =========================================================================== +// ==== Delegate +// =========================================================================== + +- (id)delegate; +- (void)setDelegate:(id)aDelegate; + +// =========================================================================== +// ==== File stuff +// =========================================================================== + +- (void)fileTypePopupChanged:(id)sender; +- (void)showAddFileWindow; + +- (void)showNewFileWindow; +- (void)buttonsPressed:(id)sender; + +- (void)createFile; + +- (void)registerCreatorsWithObjectsAndKeys:(NSDictionary *)dict; + +@end + +@interface NSObject (FileManagerDelegates) + +- (NSString *)fileManager:(id)sender willCreateFile:(NSString *)aFile withKey:(NSString *)key; + // Returns the correct, full path - or nil! + +- (void)fileManager:(id)sender didCreateFile:(NSString *)aFile withKey:(NSString *)key; + +- (id)fileManagerWillAddFiles:(id)sender; + // Is invoked to get the currently active project! + +- (BOOL)fileManager:(id)sender shouldAddFile:(NSString *)file forKey:(NSString *)key; +- (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key; + +@end diff --git a/PCLib/PCFileManager.m b/PCLib/PCFileManager.m new file mode 100644 index 0000000..7a9df44 --- /dev/null +++ b/PCLib/PCFileManager.m @@ -0,0 +1,369 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCFileManager.h" +#import "ProjectCenter.h" + +#if defined(GNUSTEP) +#import +#endif + +@interface PCFileManager (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCFileManager (CreateUI) + +- (void)_initUI +{ + NSView *_c_view; + unsigned int style = NSTitledWindowMask | NSClosableWindowMask | + NSMiniaturizableWindowMask | NSResizableWindowMask; + NSBox *box; + NSRect _w_frame; + NSMatrix* matrix; + id button; + NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease]; + id textField; + + /* + * the file creation window + * + */ + + _w_frame = NSMakeRect(100,100,264,160); + newFileWindow = [[NSWindow alloc] initWithContentRect:_w_frame + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; + [newFileWindow setMinSize:NSMakeSize(264,160)]; + [newFileWindow setTitle:@"New File..."]; + + box = [[[NSBox alloc] init] autorelease]; + [box setFrame:NSMakeRect(16,96,224,56)]; + fileTypePopup = [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(32,2,160,20) + pullsDown:NO] autorelease]; + [fileTypePopup addItemWithTitle:@"No type available!"]; + [fileTypePopup setAutoresizingMask: (NSViewWidthSizable)]; + [box setTitle:@"Type"]; + [box setTitlePosition:NSAtTop]; + [box setBorderType:NSGrooveBorder]; + [box addSubview:fileTypePopup]; + [box setAutoresizingMask: (NSViewWidthSizable | NSViewMinYMargin)]; + + _c_view = [newFileWindow contentView]; + [_c_view addSubview:box]; + + /* + * Button matrix + */ + + _w_frame = NSMakeRect(136,8,116,24); + matrix = [[[NSMatrix alloc] initWithFrame: _w_frame + mode: NSHighlightModeMatrix + prototype: buttonCell + numberOfRows: 1 + numberOfColumns: 2] autorelease]; + [matrix setSelectionByRect:YES]; + [matrix setAutoresizingMask: (NSViewMinXMargin | NSViewMaxYMargin)]; + [matrix setTarget:self]; + [matrix setAction:@selector(buttonsPressed:)]; + [matrix setIntercellSpacing: NSMakeSize(2,2)]; + [_c_view addSubview:matrix]; + + button = [matrix cellAtRow:0 column:0]; + [button setTag:0]; + [button setStringValue:@"Cancel"]; + [button setBordered:YES]; + [button setButtonType:NSMomentaryPushButton]; + + button = [matrix cellAtRow:0 column:1]; + [button setTag:1]; + [button setStringValue:@"OK"]; + [button setBordered:YES]; + [button setButtonType:NSMomentaryPushButton]; + + /* + * The name of the new file... + */ + + // Status message + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(16,56,48,21)]; + [textField setAlignment: NSLeftTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: NO]; + [textField setBezeled: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Name:"]; + [textField setAutoresizingMask: (NSViewMaxXMargin | + NSViewWidthSizable | + NSViewMinYMargin)]; + [_c_view addSubview:[textField autorelease]]; + + // Target + newFileName = [[NSTextField alloc] initWithFrame:NSMakeRect(64,56,176,21)]; + [newFileName setAlignment: NSLeftTextAlignment]; + [newFileName setBordered: YES]; + [newFileName setBezeled: YES]; + [newFileName setEditable: YES]; + [newFileName setDrawsBackground: YES]; + [newFileName setStringValue:@""]; + [newFileName setAutoresizingMask: (NSViewWidthSizable | NSViewMinYMargin)]; + [_c_view addSubview:[newFileName autorelease]]; + + /* + * the accessory view needed for adding files + * + */ + + fileTypeAccessaryView = [[NSBox alloc] init]; + addFileTypePopup = [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(20,30,160,20) pullsDown:NO] autorelease]; + [addFileTypePopup addItemWithTitle:@"No type available!"]; + + [fileTypeAccessaryView setTitle:@"Add to category"]; + [fileTypeAccessaryView setTitlePosition:NSAtTop]; + [fileTypeAccessaryView setBorderType:NSGrooveBorder]; + [fileTypeAccessaryView addSubview:addFileTypePopup]; + [fileTypeAccessaryView sizeToFit]; + [fileTypeAccessaryView setAutoresizingMask: NSViewWidthSizable]; + + [fileTypePopup setTarget:self]; + [fileTypePopup setAction:@selector(fileTypePopupChanged:)]; + + _needsAdditionalReleasing = YES; +} + +@end + +@implementation PCFileManager + +//=========================================================================================== +// ==== Init and free +//=========================================================================================== + +- (id)init +{ + if ((self = [super init])) { + creators = [[NSMutableDictionary alloc] init]; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"FileCreation.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load FileCreation.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + } + return self; +} + +- (void)dealloc +{ + [creators release]; + + if (_needsAdditionalReleasing) { + [fileTypeAccessaryView release]; + [newFileWindow release]; + } + + [super dealloc]; +} + +- (void)awakeFromNib +{ + [fileTypePopup removeAllItems]; +} + +// =========================================================================== +// ==== Delegate +// =========================================================================== + +- (id)delegate +{ + return delegate; +} + +- (void)setDelegate:(id)aDelegate +{ + delegate = aDelegate; +} + +// =========================================================================== +// ==== File stuff +// =========================================================================== + +- (void)fileTypePopupChanged:(id)sender +{ +} + +- (void)showAddFileWindow +{ + NSOpenPanel *openPanel; + int retval; + NSMutableArray *validTypes = nil; + NSDictionary *categories = nil; + PCProject *project = nil; + + if (delegate && [delegate respondsToSelector:@selector(fileManagerWillAddFiles:)]) { + if (!(project = [delegate fileManagerWillAddFiles:self])) { + NSLog(@"No project to add files available..."); + } + } + + // Ask the active project for the valid file types first! + categories = [project rootCategories]; + validTypes = [NSMutableArray arrayWithArray:[categories allKeys]]; + [validTypes removeObject:@"Subprojects"]; + + [addFileTypePopup removeAllItems]; + [addFileTypePopup addItemsWithTitles:validTypes]; + + openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:YES]; + [openPanel setCanChooseDirectories:NO]; + [openPanel setCanChooseFiles:YES]; + + [openPanel setTitle:@"Add File(s)..."]; + [openPanel setAccessoryView:fileTypeAccessaryView]; + + retval = [openPanel runModalForDirectory:[[NSUserDefaults standardUserDefaults] objectForKey:@"LastOpenDirectory"] file:nil types:nil]; + + if (retval == NSOKButton) { + NSString *key = [categories objectForKey:[addFileTypePopup titleOfSelectedItem]]; + NSEnumerator *enumerator; + NSString *file; + + [[NSUserDefaults standardUserDefaults] setObject:[openPanel directory] forKey:@"LastOpenDirectory"]; + + enumerator = [[openPanel filenames] objectEnumerator]; + while (file = [enumerator nextObject]) { + if ([delegate fileManager:self shouldAddFile:file forKey:key]) { + NSString *fileName = [file lastPathComponent]; + NSString *pth = [[project projectPath] stringByAppendingPathComponent:fileName]; + + if (![key isEqualToString:PCLibraries]) { + if ([[NSFileManager defaultManager] copyPath:file toPath:pth handler:nil]) { + [delegate fileManager:self didAddFile:pth forKey:key]; + } + } + else { + [delegate fileManager:self didAddFile:pth forKey:key]; + } + } + } + } +} + +- (void)showNewFileWindow +{ + [newFileWindow center]; + [newFileWindow makeKeyAndOrderFront:self]; +} + +- (void)buttonsPressed:(id)sender +{ + switch ([[sender selectedCell] tag]) { + case 0: + break; + case 1: + [self createFile]; + break; + } + [newFileWindow orderOut:self]; + [newFileName setStringValue:@""]; +} + +- (void)createFile +{ + NSString *path = nil; + NSString *fileName = [newFileName stringValue]; + NSString *fileType = [fileTypePopup titleOfSelectedItem]; + NSString *key = [[creators objectForKey:fileType] objectForKey:@"ProjectKey"]; + + if (delegate) { + path = [delegate fileManager:self willCreateFile:fileName withKey:key]; + } + + NSLog(@"<%@ %x>: creating file at %@",[self class],self,path); + + // Create file + if (path) { + NSDictionary *newFiles; + id creator = [[creators objectForKey:fileType] objectForKey:@"Creator"]; + PCProject *p = [delegate activeProject]; + + if (!creator) { + NSRunAlertPanel(@"Attention!",@"Could not create %@. The appropriate creator is missing!",@"OK",nil,nil,fileName); + return; + } + + // Do it finally... + newFiles = [creator createFileOfType:fileType path:path project:p]; + if (delegate && [delegate respondsToSelector:@selector(fileManager:didCreateFile:withKey:)]) { + NSEnumerator *enumerator; + NSString *aFile; + + enumerator = [[newFiles allKeys] objectEnumerator]; // Key: name of the file + while (aFile = [enumerator nextObject]) { + NSString *theType = [newFiles objectForKey:aFile]; + NSString *theKey = [[creators objectForKey:theType] objectForKey:@"ProjectKey"]; + + [delegate fileManager:self didCreateFile:aFile withKey:theKey]; + } + } + } +} + +- (void)registerCreatorsWithObjectsAndKeys:(NSDictionary *)dict +{ + NSEnumerator *enumerator = [dict keyEnumerator]; + id type; + + NSLog(@"<%@ %x>: Registering creators...",[self class],self); + + while (type = [enumerator nextObject]) { + id creator = [[dict objectForKey:type] objectForKey:@"Creator"]; + + if (![creator conformsToProtocol:@protocol(FileCreator)]) { + [NSException raise:@"FileManagerGenericException" format:@"The target does not conform to the FileCreator protocol!"]; + return; + } + + if ([creators objectForKey:type]) { + [NSException raise:@"FileManagerGenericException" format:@"There is alreay a creator registered for this type!"]; + return; + } + + // Register the creator! + [creators setObject:[dict objectForKey:type] forKey:type]; + [fileTypePopup addItemWithTitle:type]; + } +} + +@end diff --git a/PCLib/PCProject.h b/PCLib/PCProject.h new file mode 100644 index 0000000..b13eb6c --- /dev/null +++ b/PCLib/PCProject.h @@ -0,0 +1,230 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#import "ProjectBuilder.h" + +#define TOUCHED_NOTHING (0) +#define TOUCHED_EVERYTHING (1 << 0) +#define TOUCHED_PROJECT_NAME (1 << 1) +#define TOUCHED_LANGUAGE (1 << 2) +#define TOUCHED_PROJECT_TYPE (1 << 3) +#define TOUCHED_INSTALL_DIR (1 << 4) +#define TOUCHED_ICON_NAMES (1 << 5) +#define TOUCHED_FILES (1 << 6) +#define TOUCHED_MAINNIB (1 << 7) +#define TOUCHED_PRINCIPALCLASS (1 << 8) +#define TOUCHED_TARGETS (1 << 9) +#define TOUCHED_PB_PROJECT (1 << 10) +#define TOUCHED_SYST_EXT (1 << 11) +#define TOUCHED_EXTENSION (1 << 12) +#define TOUCHED_PATHS (1 << 13) + +typedef int PCProjInfoBits; + +typedef enum { + defaultTarget = 0, + debug, + profile, + install +} btarget; + +//=========================================================================================== +// ==== Project keys +//=========================================================================================== + +static NSString * const PCClasses = @"CLASS_FILES"; +static NSString * const PCHeaders = @"HEADER_FILES"; +static NSString * const PCOtherSources = @"OTHER_SOURCES"; +static NSString * const PCOtherResources = @"OTHER_RESOURCES"; +static NSString * const PCSupportingFiles = @"SUPPORTING_FILES"; +static NSString * const PCDocuFiles = @"DOCU_FILES"; +static NSString * const PCSubprojects = @"SUBPROJECTS"; +static NSString * const PCGModels = @"INTERFACES"; +static NSString * const PCImages = @"IMAGES"; +static NSString * const PCLibraries = @"LIBRARIES"; +static NSString * const PCCompilerOptions = @"COMPILEROPTIONS"; +static NSString * const PCProjectName = @"PROJECT_NAME"; +static NSString * const PCProjType = @"PROJECT_TYPE"; +static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS"; +static NSString * const PCAppIcon = @"APPLICATIONICON"; +static NSString * const PCToolIcon = @"TOOLICON"; +static NSString * const PCProjectBuilderClass = @"PROJECT_BUILDER"; +static NSString * const PCMainGModelFile = @"MAININTERFACE"; +static NSString * const PCPackageName = @"PACKAGE_NAME"; +static NSString * const PCLibraryVar = @"LIBRARY_VAR"; + +@interface PCProject : NSObject +{ + id projectWindow; + id delegate; + id projectBuilder; + id browserController; + + id textView; + + id projectAttributeInspectorView; + id projectProjectInspectorView; + id projectFileInspectorView; + + id buildTargetPanel; + id buildTargetPopup; + + id buildStatusField; + id targetField; + + NSString *projectName; + NSString *projectPath; + NSMutableDictionary *projectDict; + + NSDictionary *rootCategories; // Needs to be initialised by subclasses! + + @private + BOOL _needsReleasing; + btarget _buildTarget; +} + +//=========================================================================================== +// ==== Init and free +//=========================================================================================== + +- (id)init; +- (id)initWithProjectDictionary:(NSDictionary *)dict path:(NSString *)path; + +- (void)dealloc; + +//=========================================================================================== +// ==== Accessor methods +//=========================================================================================== + +- (id)browserController; + +- (void)setProjectName:(NSString *)aName; +- (NSString *)projectName; +- (NSWindow *)projectWindow; + +- (Class)principalClass; + +//=========================================================================================== +// ==== Delegate and manager +//=========================================================================================== + +- (id)delegate; +- (void)setDelegate:(id)aDelegate; + +- (void)setProjectBuilder:(id)aBuilder; +- (id)projectBuilder; + +//=========================================================================================== +// ==== To be overriden! +//=========================================================================================== + +- (BOOL)writeMakefile; + // Writes the PC.project file to disc. Subclasses need to call this before doing sth else! + +- (BOOL)isValidDictionary:(NSDictionary *)aDict; + +- (NSArray *)sourceFileKeys; +- (NSArray *)resourceFileKeys; +- (NSArray *)otherKeys; +- (NSArray *)buildTargets; + +- (NSString *)projectDescription; + // Returns a string describing the project type + +- (id)textView; + +//=========================================================================================== +// ==== Miscellaneous +//=========================================================================================== + +- (BOOL)doesAcceptFile:(NSString *)file forKey:(NSString *)key; + // Returns YES if type is a valid key and file is not contained in the project already + +- (void)addFile:(NSString *)file forKey:(NSString *)key; +- (void)removeFile:(NSString *)file forKey:(NSString *)key; +- (BOOL)removeSelectedFilePermanently:(BOOL)yn; + +- (BOOL)assignProjectDict:(NSDictionary *)aDict; +- (NSDictionary *)projectDict; + +- (void)setProjectPath:(NSString *)aPath; +- (NSString *)projectPath; + +- (NSDictionary *)rootCategories; + +- (BOOL)save; +- (BOOL)saveAt:(NSString *)projPath; + +- (BOOL)saveFileNamed:(NSString *)file; +- (BOOL)saveAllFiles; +- (BOOL)saveAllFilesIfNeeded; + // Saves all the files that need to be saved. + +- (NSArray *)subprojects; +- (void)addSubproject:(PCProject *)aSubproject; +- (PCProject *)superProject; +- (PCProject *)rootProject; +- (void)newSubprojectNamed:(NSString *)aName; +- (void)removeSubproject:(PCProject *)aSubproject; + +- (BOOL)isSubProject; + +@end + +@interface PCProject (ProjectBuilding) + +- (void)showInspector:(id)sender; +- (id)updatedAttributeView; +- (id)updatedProjectView; +- (id)updatedFilesView; + +- (void)showBuildTargetPanel:(id)sender; +- (void)setTarget:(id)sender; +- (void)setHost:(id)sender; +- (void)setArguments:(id)sender; + +- (void)build:(id)sender; +- (void)clean:(id)sender; + +@end + +@interface PCProject (ProjectKeyPaths) + +- (NSArray *)contentAtKeyPath:(NSString *)keyPath; +- (BOOL)hasChildrenAtKeyPath:(NSString *)keyPath; +- (NSString *)projectKeyForKeyPath:(NSString *)kp; + +@end + +@interface PCProject (ProjectWindowDelegate) + +- (void)windowDidBecomeKey:(NSNotification *)aNotification; +- (void)windowDidBecomeMain:(NSNotification *)aNotification; +- (void)windowWillClose:(NSNotification *)aNotification; + +@end diff --git a/PCLib/PCProject.m b/PCLib/PCProject.m new file mode 100644 index 0000000..15d5e9e --- /dev/null +++ b/PCLib/PCProject.m @@ -0,0 +1,800 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCProject.h" +#import "ProjectCenter.h" +#import "PCProjectBuilder.h" + +#if defined(GNUSTEP) +#import +#endif + +@interface PCProject (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCProject (CreateUI) + +- (void)_initUI +{ + NSView *_c_view; + unsigned int style = NSTitledWindowMask | NSClosableWindowMask | + NSMiniaturizableWindowMask | NSResizableWindowMask; + NSBrowser *browser; + NSSplitView *split; + NSScrollView * scrollView; + NSRect _w_frame; + NSMatrix* matrix; + NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease]; + id textField; + id button; + + browserController = [[PCBrowserController alloc] init]; + + /* + * Project Window + * + */ + + _w_frame = NSMakeRect(100,100,512,320); + projectWindow = [[NSWindow alloc] initWithContentRect:_w_frame + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; + [projectWindow setDelegate:self]; + [projectWindow setMinSize:NSMakeSize(512,320)]; + + browser = [[[NSBrowser alloc] initWithFrame:NSMakeRect(30,30,280,400)] autorelease]; + [browser setDelegate:browserController]; + [browser setMaxVisibleColumns:3]; + [browser setAllowsMultipleSelection:NO]; + + [browserController setBrowser:browser]; + [browserController setProject:self]; + + textView = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,472,88)]; + [textView setMaxSize:NSMakeSize(1e7, 1e7)]; + [textView setVerticallyResizable:YES]; + [textView setHorizontallyResizable:YES]; + [textView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; + [textView setBackgroundColor:[NSColor whiteColor]]; + [[textView textContainer] setWidthTracksTextView:YES]; + + scrollView = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,496,92)]; + [scrollView setDocumentView:textView]; + [textView setMinSize:NSMakeSize(0.0,[scrollView contentSize].height)]; + [[textView textContainer] setContainerSize:NSMakeSize([scrollView contentSize].width,1e7)]; + [scrollView setHasHorizontalScroller: YES]; + [scrollView setHasVerticalScroller: YES]; + [scrollView setBorderType: NSBezelBorder]; + [scrollView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)]; + [scrollView autorelease]; + + split = [[[NSSplitView alloc] initWithFrame:NSMakeRect(8,0,496,264)] autorelease]; + [split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)]; + [split addSubview: browser]; + [split addSubview: scrollView]; + + _c_view = [projectWindow contentView]; + [_c_view addSubview:split]; + + // Left button matrix + _w_frame = NSMakeRect(8,268,144,48); + matrix = [[[NSMatrix alloc] initWithFrame: _w_frame + mode: NSHighlightModeMatrix + prototype: buttonCell + numberOfRows: 1 + numberOfColumns: 3] autorelease]; + [matrix setSelectionByRect:YES]; + [matrix setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)]; + [_c_view addSubview:matrix]; + + button = [matrix cellAtRow:0 column:0]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_build.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + [button setTarget:self]; + [button setAction:@selector(build:)]; + + button = [matrix cellAtRow:0 column:1]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_clean.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + [button setTarget:self]; + [button setAction:@selector(clean:)]; + + button = [matrix cellAtRow:0 column:2]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_prefs.tiff"] autorelease]]; + [button setTarget:self]; + [button setAction:@selector(showBuildTarget:)]; + [button setButtonType:NSMomentaryPushButton]; + [button setTarget:self]; + [button setAction:@selector(showBuildTargetPanel:)]; + + // Right button matrix + _w_frame = NSMakeRect(304,268,192,48); + matrix = [[[NSMatrix alloc] initWithFrame: _w_frame + mode: NSHighlightModeMatrix + prototype: buttonCell + numberOfRows: 1 + numberOfColumns: 4] autorelease]; + [matrix setSelectionByRect:YES]; + [matrix setAutoresizingMask: (NSViewMinXMargin | NSViewMinYMargin)]; + [_c_view addSubview:matrix]; + + button = [matrix cellAtRow:0 column:0]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_run.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + + button = [matrix cellAtRow:0 column:1]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_uml.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + + button = [matrix cellAtRow:0 column:2]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_documentation.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + + button = [matrix cellAtRow:0 column:3]; + [button setImagePosition:NSImageOnly]; + [button setImage:[[[NSImage alloc] initWithContentsOfFile:@"ProjectCentre_find.tiff"] autorelease]]; + [button setButtonType:NSMomentaryPushButton]; + + // Status + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(152,296,48,15)]; + [textField setAlignment: NSRightTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: NO]; + [textField setBezeled: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Status:"]; + [textField setAutoresizingMask: (NSViewMaxXMargin | + NSViewMinYMargin)]; + [_c_view addSubview:[textField autorelease]]; + + // Status message + buildStatusField = [[NSTextField alloc] initWithFrame:NSMakeRect(204,296,104,15)]; + [buildStatusField setAlignment: NSLeftTextAlignment]; + [buildStatusField setBordered: NO]; + [buildStatusField setEditable: NO]; + [buildStatusField setBezeled: NO]; + [buildStatusField setDrawsBackground: NO]; + [buildStatusField setStringValue:@"waiting..."]; + [buildStatusField setAutoresizingMask: (NSViewMaxXMargin | + NSViewWidthSizable | + NSViewMinYMargin)]; + [_c_view addSubview:[buildStatusField autorelease]]; + + // Target + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(152,272,48,15)]; + [textField setAlignment: NSRightTextAlignment]; + [textField setBordered: NO]; + [textField setBezeled: NO]; + [textField setEditable: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Target:"]; + [textField setAutoresizingMask: (NSViewMaxXMargin | + NSViewMinYMargin)]; + [_c_view addSubview:[textField autorelease]]; + + // Target message + targetField = [[NSTextField alloc] initWithFrame:NSMakeRect(204,272,104,15)]; + [targetField setAlignment: NSLeftTextAlignment]; + [targetField setBordered: NO]; + [targetField setEditable: NO]; + [targetField setBezeled: NO]; + [targetField setDrawsBackground: NO]; + [targetField setStringValue:@"Default..."]; + [targetField setAutoresizingMask: (NSViewMaxXMargin | + NSViewWidthSizable | + NSViewMinYMargin)]; + [_c_view addSubview:[targetField autorelease]]; + + /* + * Build Panel + * + */ + + _w_frame = NSMakeRect(100,100,272,104); + buildTargetPanel = [[NSWindow alloc] initWithContentRect:_w_frame styleMask:style backing:NSBackingStoreBuffered defer:NO]; + + [buildTargetPanel setReleasedWhenClosed:NO]; + [buildTargetPanel setTitle:@"Build Options"]; + _c_view = [buildTargetPanel contentView]; + + buildTargetPopup = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(72,24,184,20)]; + [buildTargetPopup addItemWithTitle:@"Default"]; + [buildTargetPopup addItemWithTitle:@"Debug"]; + [buildTargetPopup addItemWithTitle:@"Profile"]; + [buildTargetPopup addItemWithTitle:@"Install"]; + [buildTargetPopup autorelease]; + + [buildTargetPopup setTarget:self]; + [buildTargetPopup setAction:@selector(setTarget:)]; + [_c_view addSubview:buildTargetPopup]; + + // Target (popup) + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(16,24,56,21)]; + [textField setAlignment: NSRightTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: NO]; + [textField setBezeled: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Target:"]; + [_c_view addSubview:[textField autorelease]]; + + // Host + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(16,48,56,21)]; + [textField setAlignment: NSRightTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: NO]; + [textField setBezeled: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Host:"]; + [_c_view addSubview:[textField autorelease]]; + + // Host message + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,48,184,21)]; + [textField setAlignment: NSLeftTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: YES]; + [textField setBezeled: YES]; + [textField setDrawsBackground: YES]; + [textField setStringValue:@"localhost"]; + [_c_view addSubview:[textField autorelease]]; + + // Args + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,68,60,21)]; + [textField setAlignment: NSRightTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: NO]; + [textField setBezeled: NO]; + [textField setDrawsBackground: NO]; + [textField setStringValue:@"Arguments:"]; + [_c_view addSubview:[textField autorelease]]; + + // Args message + textField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,68,184,21)]; + [textField setAlignment: NSLeftTextAlignment]; + [textField setBordered: NO]; + [textField setEditable: YES]; + [textField setBezeled: YES]; + [textField setDrawsBackground: YES]; + [textField setStringValue:@""]; + [_c_view addSubview:[textField autorelease]]; + + // Redisplay! + [browser loadColumnZero]; + + _needsReleasing = YES; +} + +@end + +@implementation PCProject + +//=========================================================================================== +// ==== Init and free +//=========================================================================================== + +- (id)init +{ + if ((self = [super init])) { + _buildTarget = defaultTarget; + + _needsReleasing = NO; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"Project.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load Project.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + } + return self; +} + +- (id)initWithProjectDictionary:(NSDictionary *)dict path:(NSString *)path; +{ + NSAssert(dict,@"No valid project dictionary!"); + + if ((self = [self init])) { + if ([[path lastPathComponent] isEqualToString:@"PC.project"]) { + projectPath = [[path stringByDeletingLastPathComponent] copy]; + } + else { + projectPath = [path copy]; + } + + if(![self assignProjectDict:dict]) { + NSLog(@"<%@ %x>: could not load the project...",[self class],self); + [self autorelease]; + return nil; + } + } + return self; +} + +- (void)dealloc +{ + [projectName release]; + [projectPath release]; + [projectDict release]; + + if (_needsReleasing) { + [browserController release]; + [projectWindow release]; + [buildTargetPanel release]; + } + + [super dealloc]; +} + +//=========================================================================================== +// ==== Accessor methods +//=========================================================================================== + +- (id)browserController +{ + return browserController; +} + +- (void)setProjectName:(NSString *)aName +{ + [projectName autorelease]; + projectName = [aName copy]; +} + +- (NSString *)projectName +{ + return projectName; +} + +- (NSWindow *)projectWindow +{ + if (!projectWindow) NSLog(@"No window??????"); + + return projectWindow; +} + +- (Class)principalClass +{ + return [self class]; +} + +//=========================================================================================== +// ==== Delegate and manager +//=========================================================================================== + +- (id)delegate +{ + return delegate; +} + +- (void)setDelegate:(id)aDelegate +{ + delegate = aDelegate; +} + +- (void)setProjectBuilder:(id)aBuilder +{ + [projectBuilder autorelease]; + projectBuilder = [aBuilder retain]; +} + +- (id)projectBuilder +{ + return projectBuilder; +} + +//=========================================================================================== +// ==== To be overriden +//=========================================================================================== + +- (BOOL)writeMakefile +{ + return [projectDict writeToFile:[projectPath stringByAppendingPathComponent:@"PC.project"] atomically:YES]; +} + +- (BOOL)isValidDictionary:(NSDictionary *)aDict +{ + return NO; +} + +- (NSArray *)sourceFileKeys +{ + return nil; +} + +- (NSArray *)resourceFileKeys +{ + return nil; +} + +- (NSArray *)otherKeys +{ + return nil; +} + +- (NSArray *)buildTargets +{ + return nil; +} + +- (NSString *)projectDescription +{ + return @"Abstract PCProject class!"; +} + +- (id)textView +{ + return textView; +} + +//=========================================================================================== +// ==== Miscellaneous +//=========================================================================================== + +- (BOOL)doesAcceptFile:(NSString *)file forKey:(NSString *)type +{ + if ([[projectDict allKeys] containsObject:type]) { + NSArray *files = [projectDict objectForKey:type]; + + if (![files containsObject:file]) { + return YES; + } + } + + return NO; +} + +- (void)addFile:(NSString *)file forKey:(NSString *)type +{ + NSMutableArray *files = [NSMutableArray arrayWithArray:[projectDict objectForKey:type]]; + NSMutableString *newFile = [NSMutableString stringWithString:[file lastPathComponent]]; + + if ([type isEqualToString:PCLibraries]) { + [newFile deleteCharactersInRange:NSMakeRange(0,3)]; + newFile = [newFile stringByDeletingPathExtension]; + } + + if ([files containsObject:newFile]) { + NSRunAlertPanel(@"Attention!",@"The file %@ is already contained in this project!",@"OK",nil,nil,newFile); + return; + } + + NSLog(@"<%@ %x>: adding file %@ for key %@",[self class],self,newFile,type); + + // Add the new file + [files addObject:newFile]; + [projectDict setObject:files forKey:type]; + + // Synchronise the makefile! + [self writeMakefile]; +} + +- (void)removeFile:(NSString *)file forKey:(NSString *)key +{ + NSMutableArray *array; + + if (!file || !key) { + return; + } + + array = [NSMutableArray arrayWithArray:[projectDict objectForKey:key]]; + [array removeObject:file]; + [projectDict setObject:array forKey:key]; + [self writeMakefile]; +} + +- (BOOL)removeSelectedFilePermanently:(BOOL)yn +{ + NSString *file = [browserController nameOfSelectedFile]; + NSMutableArray *array; + NSString *key; + + if (!file) { + return NO; + } + + key = [self projectKeyForKeyPath:[browserController pathOfSelectedFile]]; + [self removeFile:file forKey:key]; + + // Remove the file permanently?! + if (yn) { + NSString *pth = [projectPath stringByAppendingPathComponent:file]; + + [[NSFileManager defaultManager] removeFileAtPath:pth handler:nil]; + } + + return YES; +} + +- (BOOL)assignProjectDict:(NSDictionary *)aDict +{ + NSAssert(aDict,@"No valid project dictionary!"); + + if (![self isValidDictionary:aDict]) { + return NO; + } + + [projectDict autorelease]; + projectDict = [[NSMutableDictionary alloc] initWithDictionary:aDict]; + + [self setProjectName:[projectDict objectForKey:PCProjectName]]; + + [projectWindow setTitle:[NSString stringWithFormat:@"%@ - %@",projectName,projectPath]]; + + // Update the GNUmakefile! + [self writeMakefile]; + + [[NSNotificationCenter defaultCenter] postNotificationName:@"ProjectDictDidChangeNotification" object:self]; + + return YES; +} + +- (NSDictionary *)projectDict +{ + return (NSDictionary *)projectDict; +} + +- (void)setProjectPath:(NSString *)aPath +{ + [projectPath autorelease]; + projectPath = [aPath copy]; +} + +- (NSString *)projectPath +{ + return projectPath; +} + +- (NSDictionary *)rootCategories +{ + return rootCategories; +} + +- (BOOL)save +{ +} + +- (BOOL)saveAt:(NSString *)projPath +{ +} + +- (BOOL)saveFileNamed:(NSString *)file +{ +} + +- (BOOL)saveAllFiles +{ +} + +- (BOOL)saveAllFilesIfNeeded +{ +} + +- (NSArray *)subprojects +{ + return [projectDict objectForKey:PCSubprojects]; +} + +- (void)addSubproject:(PCProject *)aSubproject +{ +} + +- (PCProject *)superProject +{ + return nil; +} + +- (PCProject *)rootProject +{ + return self; +} + +- (void)newSubprojectNamed:(NSString *)aName +{ +} + +- (void)removeSubproject:(PCProject *)aSubproject +{ +} + +- (BOOL)isSubProject +{ +} + +@end + +@implementation PCProject (ProjectBuilding) + +- (void)showInspector:(id)sender +{ + [projectBuilder showInspectorForProject:self]; +} + +- (id)updatedAttributeView +{ + return projectAttributeInspectorView; +} + +- (id)updatedProjectView +{ + return projectProjectInspectorView; +} + +- (id)updatedFilesView +{ + return projectFileInspectorView; +} + +- (void)showBuildTargetPanel:(id)sender +{ + [buildTargetPanel center]; + [buildTargetPanel makeKeyAndOrderFront:self]; +} + +- (void)setTarget:(id)sender +{ + _buildTarget = [buildTargetPopup indexOfSelectedItem]; +} + +- (void)setHost:(id)sender +{ + NSLog(@"Setting host..."); +} + +- (void)setArguments:(id)sender +{ + NSLog(@"Setting args..."); +} + +- (void)build:(id)sender +{ + BOOL ret = YES; + NSString *target = [buildTargetPopup titleOfSelectedItem]; + NSMutableDictionary *optionDict = [NSMutableDictionary dictionary]; + + [buildStatusField setStringValue:@"Building..."]; + + // Check the panel for this option! + if ([target isEqualToString:@"Debug"]) { + [optionDict setObject:TARGET_MAKE_DEBUG forKey:BUILD_KEY]; + } + if ([target isEqualToString:@"Profile"]) { + [optionDict setObject:TARGET_MAKE_PROFILE forKey:BUILD_KEY]; + } + if ([target isEqualToString:@"Install"]) { + [optionDict setObject:TARGET_MAKE_INSTALL forKey:BUILD_KEY]; + } + else { + [optionDict setObject:TARGET_MAKE forKey:BUILD_KEY]; + } + + [[PCProjectBuilder sharedBuilder] buildProject:self options:optionDict]; + + if (ret) { + [buildStatusField setStringValue:@"Build completed!"]; + } + else { + [buildStatusField setStringValue:@"Build failed!"]; + } +} + +- (void)clean:(id)sender +{ + BOOL ret = YES; + NSMutableDictionary *optionDict = [NSMutableDictionary dictionary]; + + [buildStatusField setStringValue:@"Cleaning..."]; + + // Check the panel for this option! + [optionDict setObject:TARGET_MAKE_CLEAN forKey:BUILD_KEY]; + [[PCProjectBuilder sharedBuilder] buildProject:self options:optionDict]; + + if (ret) { + [buildStatusField setStringValue:@"Cleaning completed!"]; + } + else { + [buildStatusField setStringValue:@"Cleaning failed!"]; + } +} + +@end + +@implementation PCProject (ProjectKeyPaths) + +- (NSArray *)contentAtKeyPath:(NSString *)keyPath +{ + NSString *key; + + NSLog(@"<%@ %x>: content at path %@",[self class],self,keyPath); + + if ([keyPath isEqualToString:@""] || [keyPath isEqualToString:@"/"]) { + return [rootCategories allKeys]; + } + + key = [[keyPath componentsSeparatedByString:@"/"] lastObject]; + return [projectDict objectForKey:[rootCategories objectForKey:key]]; +} + +- (BOOL)hasChildrenAtKeyPath:(NSString *)keyPath +{ + NSString *key; + + if (!keyPath || [keyPath isEqualToString:@""]) { + return NO; + } + + key = [[keyPath componentsSeparatedByString:@"/"] lastObject]; + if ([[rootCategories allKeys] containsObject:key] || [[projectDict objectForKey:PCSubprojects] containsObject:key]) { + return YES; + } + + return NO; +} + +- (NSString *)projectKeyForKeyPath:(NSString *)kp +{ + NSString *type = [[kp componentsSeparatedByString:@"/"] objectAtIndex:1]; + + return [rootCategories objectForKey:type]; +} + +@end + +@implementation PCProject (ProjectWindowDelegate) + +- (void)windowDidBecomeKey:(NSNotification *)aNotification +{ + [projectBuilder setActiveProject:self]; +} + +- (void)windowDidBecomeMain:(NSNotification *)aNotification +{ + [projectBuilder setActiveProject:self]; +} + +- (void)windowWillClose:(NSNotification *)aNotification +{ + if ([[self projectWindow] isDocumentEdited]) { + if (NSRunAlertPanel(@"Project changed!",@"The project %@ has unsaved files! Should they be saved before closing it?",@"Yes",@"No",nil,[self projectName])) { + [self save]; + } + } + // The PCProjectController is our delegate! + [projectBuilder closeProject:self]; +} + +@end diff --git a/PCLib/PCProjectBuilder.h b/PCLib/PCProjectBuilder.h new file mode 100644 index 0000000..3ad3c7c --- /dev/null +++ b/PCLib/PCProjectBuilder.h @@ -0,0 +1,60 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@class PCProject; + +#define BUILD_KEY @"BuildKey" +#define BUILD_OPTIONS_KEY @"BuildOptionsKey" + +#define TARGET_MAKE @"Make" +#define TARGET_MAKE_DEBUG @"MakeDebug" +#define TARGET_MAKE_PROFILE @"MakeProfile" +#define TARGET_MAKE_INSTALL @"MakeInstall" +#define TARGET_MAKE_CLEAN @"MakeClean" + +@class NSWindow; +@class NSTextView; + +@interface PCProjectBuilder : NSObject +{ + NSWindow *buildWindow; + + NSTextView *logOutput; + + NSMutableDictionary *buildTasks; + NSString *makePath; +} + ++ (id)sharedBuilder; + +- (id)init; +- (void)dealloc; + +- (BOOL)buildProject:(PCProject *)aProject options:(NSDictionary *)optionDict; + +@end diff --git a/PCLib/PCProjectBuilder.m b/PCLib/PCProjectBuilder.m new file mode 100644 index 0000000..3daed46 --- /dev/null +++ b/PCLib/PCProjectBuilder.m @@ -0,0 +1,228 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCProjectBuilder.h" +#import "PCProject.h" + +#import + +@interface PCProjectBuilder (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCProjectBuilder (CreateUI) + +- (void)_initUI +{ + NSView *_c_view; + unsigned int style = NSTitledWindowMask | NSClosableWindowMask | + NSMiniaturizableWindowMask | NSResizableWindowMask; + NSSplitView *split; + NSScrollView *scrollView1; + + NSScrollView *scrollView2; + NSTextView *textView2; + + NSRect _w_frame; + + /* + * Build Window + * + */ + + _w_frame = NSMakeRect(100,100,512,320); + buildWindow = [[NSWindow alloc] initWithContentRect:_w_frame + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; + [buildWindow setDelegate:self]; + [buildWindow setReleasedWhenClosed:NO]; + [buildWindow setMinSize:NSMakeSize(512,320)]; + + logOutput = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,472,88)]; + [logOutput setMaxSize:NSMakeSize(1e7, 1e7)]; + [logOutput setVerticallyResizable:YES]; + [logOutput setHorizontallyResizable:YES]; + [logOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; + [logOutput setBackgroundColor:[NSColor whiteColor]]; + [[logOutput textContainer] setWidthTracksTextView:YES]; + + scrollView1 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,496,92)]; + [scrollView1 setDocumentView:logOutput]; + [logOutput setMinSize:NSMakeSize(0.0,[scrollView1 contentSize].height)]; + [[logOutput textContainer] setContainerSize:NSMakeSize([scrollView1 contentSize].width,1e7)]; + [scrollView1 setHasHorizontalScroller: YES]; + [scrollView1 setHasVerticalScroller: YES]; + [scrollView1 setBorderType: NSBezelBorder]; + [scrollView1 setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; + [scrollView1 autorelease]; + + /* + * + */ + + textView2 = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,472,88)]; + [textView2 setMaxSize:NSMakeSize(1e7, 1e7)]; + [textView2 setVerticallyResizable:YES]; + [textView2 setHorizontallyResizable:YES]; + [textView2 setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; + [textView2 setBackgroundColor:[NSColor whiteColor]]; + [[textView2 textContainer] setWidthTracksTextView:YES]; + + scrollView2 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,496,92)]; + [scrollView2 setDocumentView:textView2]; + [textView2 setMinSize:NSMakeSize(0.0,[scrollView2 contentSize].height)]; + [[textView2 textContainer] setContainerSize:NSMakeSize([scrollView2 contentSize].width,1e7)]; + [scrollView2 setHasHorizontalScroller: YES]; + [scrollView2 setHasVerticalScroller: YES]; + [scrollView2 setBorderType: NSBezelBorder]; + [scrollView2 setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; + [scrollView2 autorelease]; + + split = [[[NSSplitView alloc] initWithFrame:NSMakeRect(8,0,496,264)] autorelease]; + [split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)]; + [split addSubview: scrollView1]; + [split addSubview: scrollView2]; + + _c_view = [buildWindow contentView]; + [_c_view addSubview:split]; +} + +@end + +@implementation PCProjectBuilder + +static PCProjectBuilder *_builder; + ++ (id)sharedBuilder +{ + if (!_builder) { + _builder = [[PCProjectBuilder alloc] init]; + } + return _builder; +} + +- (id)init +{ + if ((self = [super init])) { + [self _initUI]; + makePath = [[NSString stringWithString:@"/usr/bin/make"] retain]; + buildTasks = [[NSMutableDictionary dictionary] retain]; + } + return self; +} + +- (void)dealloc +{ + [buildWindow release]; + [makePath release]; + [buildTasks release]; + + [super dealloc]; +} + +- (BOOL)buildProject:(PCProject *)aProject options:(NSDictionary *)optionDict +{ + BOOL ret = NO; + NSString *tg = nil; + NSTask *makeTask; + NSMutableArray *args; + NSString *output = nil; + NSPipe *logPipe; + NSFileHandle *readHandle; + NSData *inData = nil; + + logPipe = [NSPipe pipe]; + readHandle = [logPipe fileHandleForReading]; + + NSAssert(aProject,@"No project provided!"); + + makeTask = [[NSTask alloc] init]; + + if ((tg = [optionDict objectForKey:BUILD_KEY])) { + if ([tg isEqualToString:TARGET_MAKE_DEBUG]) { + args = [NSMutableArray array]; + [args addObject:@"debug=yes"]; + [makeTask setArguments:args]; + } + else if ([tg isEqualToString:TARGET_MAKE_PROFILE]) { + args = [NSMutableArray array]; + [args addObject:@"profile=YES"]; + [args addObject:@"static=YES"]; + [makeTask setArguments:args]; + } + else if ([tg isEqualToString:TARGET_MAKE_INSTALL]) { + args = [NSMutableArray array]; + [args addObject:@"install"]; + [makeTask setArguments:args]; + } + else if ([tg isEqualToString:TARGET_MAKE_CLEAN]) { + args = [NSMutableArray array]; + [args addObject:@"clean"]; + [makeTask setArguments:args]; + } + + [makeTask setCurrentDirectoryPath:[aProject projectPath]]; + [makeTask setLaunchPath:makePath]; + + [makeTask setStandardOutput:logPipe]; + [makeTask setStandardError:logPipe]; + + if (![buildWindow isVisible]) { + [buildWindow center]; + [buildWindow makeKeyAndOrderFront:self]; + } + + [makeTask launch]; + + /* + * This is just a quick hack for now... + */ + + while ((inData = [readHandle availableData]) && [inData length]) { + output = [[NSString alloc] initWithData:inData encoding:NSASCIIStringEncoding]; + [logOutput setString:[NSString stringWithFormat:@"%@%@\n", [logOutput string], output]]; + [logOutput scrollRangeToVisible:NSMakeRange([[logOutput textStorage] length], 0)]; + [output release]; + } + + [makeTask waitUntilExit]; + + ret = [makeTask terminationStatus]; + +#ifdef DEBUG + NSLog(@"Task terminated %@...",(ret)?@"successfully":@"not successfully"); +#endif DEBUG + + [makeTask autorelease]; + } + + return ret; +} + +@end diff --git a/PCLib/PCProjectManager.h b/PCLib/PCProjectManager.h new file mode 100644 index 0000000..3e1aa23 --- /dev/null +++ b/PCLib/PCProjectManager.h @@ -0,0 +1,169 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#import "PCProject.h" +#import "ProjectBuilder.h" + +@interface PCProjectManager : NSObject +{ + id delegate; // The PCAppController + id fileManager; + + id inspector; + id inspectorView; + id inspectorPopup; + + NSMutableDictionary *loadedProjects; + PCProject *activeProject; + + NSString *rootBuildPath; + + @private + BOOL _needsReleasing; +} + +// =========================================================================== +// ==== Class files +// =========================================================================== + ++ (void)initialize; + +// =========================================================================== +// ==== Intialization & deallocation +// =========================================================================== + +- (id)init; +- (void)dealloc; + +// =========================================================================== +// ==== Delegate +// =========================================================================== + +- (id)delegate; +- (void)setDelegate:(id)aDelegate; + +// =========================================================================== +// ==== Project management +// =========================================================================== + +- (NSMutableDictionary *)loadedProjects; + // Returns all currently loaded projects. They are stored with their absolut paths as the keys. + +- (PCProject *)activeProject; + // Returns the currently active project + +- (void)setActiveProject:(PCProject *)aProject; +// Sets the new currently active project + +- (void)saveAllProjects; + // Saves all projects if needed. + +- (NSString *)rootBuildPath; + // Gets set while initialising! + +// =========================================================================== +// ==== Project actions +// =========================================================================== + +- (PCProject *)loadProjectAt:(NSString *)aPath; + // Returns the loaded project if the builder class is known, nil else. + +- (BOOL)openProjectAt:(NSString *)aPath; + // Invokes loadProjectAt to load the project properly. + +- (BOOL)createProjectOfType:(NSString *)projectType path:(NSString *)aPath; + // projectType is exactly the name of the class to be invoked to create the project! + +- (BOOL)saveProject; + // Saves the current project + +- (BOOL)saveProjectAs:(NSString *)projName; + +- (void)inspectorPopupDidChange:(id)sender; + +- (void)showInspectorForProject:(PCProject *)aProject; + // Opens the inspector for aProject + +- (void)showLoadedProjects; + // Opens a panel containing all opened projects + +- (void)saveFiles; + // Saves all the edited files from the currently active project + +- (void)revertToSaved; + // Reverts the currently active project + +- (BOOL)newSubproject; +- (BOOL)addSubprojectAt:(NSString *)path; +- (void)removeSubproject; + +- (void)closeProject:(PCProject *)aProject; +- (void)closeProject; + // Closes the currently active project + +// =========================================================================== +// ==== File actions +// =========================================================================== + +- (BOOL)openFile:(NSString *)path; +- (BOOL)addFile:(NSString *)path; +- (BOOL)newFile:(NSString *)path; +- (BOOL)saveFile; +- (BOOL)saveFileAs:(NSString *)path; +- (BOOL)revertFile; +- (BOOL)renameFileTo:(NSString *)path; +- (BOOL)removeFilePermanently:(BOOL)yn; + +@end + +@interface PCProjectManager (FileManagerDelegates) + +- (NSString *)fileManager:(id)sender willCreateFile:(NSString *)aFile withKey:(NSString *)key; + // Returns the full path if the type is valid, nil else. + +- (void)fileManager:(id)sender didCreateFile:(NSString *)aFile withKey:(NSString *)key; + // Adds the file to the project and updates the makefile! + +- (id)fileManagerWillAddFiles:(id)sender; + // Returns the active project + +- (BOOL)fileManager:(id)sender shouldAddFile:(NSString *)file forKey:(NSString *)key; + +- (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key; + // Adds the file to the project and update the makefile! + +@end + +@interface NSObject (PCProjectManagerDelegates) + +- (void)projectManager:(id)sender willCloseProject:(PCProject *)aProject; +- (void)projectManager:(id)sender didCloseProject:(PCProject *)aProject; +- (void)projectManager:(id)sender didOpenProject:(PCProject *)aProject; +- (BOOL)projectManager:(id)sender shouldOpenProject:(PCProject *)aProject; + +@end diff --git a/PCLib/PCProjectManager.m b/PCLib/PCProjectManager.m new file mode 100644 index 0000000..6e3278a --- /dev/null +++ b/PCLib/PCProjectManager.m @@ -0,0 +1,462 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCProjectManager.h" +#import "ProjectCenter.h" + +#if defined(GNUSTEP) +#import +#endif + +@interface PCProjectManager (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCProjectManager (CreateUI) + +- (void)_initUI +{ + NSView *_c_view; + unsigned int style = NSTitledWindowMask | NSClosableWindowMask | + NSResizableWindowMask; + NSRect _w_frame; + NSBox *line; + + /* + * Inspector Window + * + */ + + _w_frame = NSMakeRect(200,300,280,384); + inspector = [[NSWindow alloc] initWithContentRect:_w_frame + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; + [inspector setMinSize:NSMakeSize(280,384)]; + [inspector setTitle:@"Inspector"]; + _c_view = [inspector contentView]; + + inspectorPopup = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(80,352,128,20)]; + [inspectorPopup addItemWithTitle:@"None"]; + [inspectorPopup setTarget:self]; + [inspectorPopup setAction:@selector(inspectorPopupDidChange:)]; + [_c_view addSubview:inspectorPopup]; + + line = [[[NSBox alloc] init] autorelease]; + [line setTitlePosition:NSNoTitle]; + [line setFrameFromContentFrame:NSMakeRect(0,336,280,2)]; + [_c_view addSubview:line]; + + inspectorView = [[NSBox alloc] init]; + [inspectorView setTitlePosition:NSNoTitle]; + [inspectorView setFrameFromContentFrame:NSMakeRect(2,2,276,330)]; + [inspectorView setBorderType:NSNoBorder]; + [_c_view addSubview:inspectorView]; + + _needsReleasing = YES; +} + +@end + +@implementation PCProjectManager + +// =========================================================================== +// ==== Class methods +// =========================================================================== + ++ (void)initialize +{ +} + +// =========================================================================== +// ==== Intialization & deallocation +// =========================================================================== + +- (id)init +{ + if ((self = [super init])) { + loadedProjects = [[NSMutableDictionary alloc] init]; + + rootBuildPath = [[[NSUserDefaults standardUserDefaults] stringForKey:RootBuildDirectory] copy]; + if (!rootBuildPath || rootBuildPath == @"") { + rootBuildPath = [NSTemporaryDirectory() copy]; + } + _needsReleasing = NO; + } + return self; +} + +- (void)dealloc +{ + [rootBuildPath release]; + [loadedProjects release]; + + if (_needsReleasing) { + [inspector release]; + [inspectorView release]; + [inspectorPopup release]; + } + + [super dealloc]; +} + +// =========================================================================== +// ==== Delegate +// =========================================================================== + +- (id)delegate +{ + return delegate; +} + +- (void)setDelegate:(id)aDelegate +{ + delegate = aDelegate; +} + +// =========================================================================== +// ==== Project management +// =========================================================================== + +- (NSMutableDictionary *)loadedProjects +{ + return loadedProjects; +} + +- (PCProject *)activeProject +{ + return activeProject; +} + +- (void)setActiveProject:(PCProject *)aProject +{ + if (aProject != activeProject) { + activeProject = aProject; + + //~ Is this needed? + if (activeProject) { + [[activeProject projectWindow] makeKeyAndOrderFront:self]; + } + + if ([inspector isVisible]) { + [self inspectorPopupDidChange:inspectorPopup]; + } + } +} + +- (void)saveAllProjects +{ +} + +- (NSString *)rootBuildPath +{ + return rootBuildPath; +} + +// =========================================================================== +// ==== Project actions +// =========================================================================== + +- (PCProject *)loadProjectAt:(NSString *)aPath +{ + if (delegate && [delegate respondsToSelector:@selector(projectTypes)]) { + NSDictionary *builders = [delegate projectTypes]; + NSEnumerator *enumerator = [builders keyEnumerator]; + NSString *builderKey; + + while (builderKey = [enumerator nextObject]) { + id concretBuilder; + PCProject *project; + + NSLog([NSString stringWithFormat:@"Builders %@ for key %@",[builders description],builderKey]); + + concretBuilder = [NSClassFromString([builders objectForKey:builderKey]) sharedCreator]; + + if ((project = [concretBuilder openProjectAt:aPath])) { + return project; + } + } + } + else { + NSLog(@"No project manager delegate available!"); + } + + return nil; +} + +- (BOOL)openProjectAt:(NSString *)aPath +{ + BOOL isDir = NO; + + if ([loadedProjects objectForKey:aPath]) { + NSLog([NSString stringWithFormat:@"Project %@ is already loaded!",aPath]); + return NO; + } + + if ([[NSFileManager defaultManager] fileExistsAtPath:aPath isDirectory:&isDir] && !isDir) { + PCProject *project = [self loadProjectAt:aPath]; + + if (!project) { + NSLog(@"Couldn't instantiate the project..."); + return NO; + } + + [project setProjectBuilder:self]; + [loadedProjects setObject:project forKey:aPath]; + [self setActiveProject:project]; + [project setDelegate:self]; + + return YES; + } + return NO; +} + +- (BOOL)createProjectOfType:(NSString *)projectType path:(NSString *)aPath +{ + Class creatorClass = NSClassFromString(projectType); + PCProject * project; + + if (![creatorClass conformsToProtocol:@protocol(ProjectType)]) { + [NSException raise:NOT_A_PROJECT_TYPE_EXCEPTION format:@"%@ does not conform to ProjectType!",projectType]; + return NO; + } + + if (!(project = [[creatorClass sharedCreator] createProjectAt:aPath])) { + return NO; + } + + [project setProjectBuilder:self]; + [loadedProjects setObject:project forKey:aPath]; + [self setActiveProject:project]; + [project setDelegate:self]; + + return YES; +} + +- (BOOL)saveProject +{ + // Save all files that need to be saved + + // Save PC.project and the makefile! +} + +- (BOOL)saveProjectAs:(NSString *)projName +{ +} + +- (void)inspectorPopupDidChange:(id)sender +{ + NSView *view = nil; + + if (![self activeProject]) { + return; + } + + switch([sender indexOfSelectedItem]) { + case 0: + view = [[[self activeProject] updatedAttributeView] retain]; + break; + case 1: + view = [[[self activeProject] updatedProjectView] retain]; + break; + case 2: + view = [[[self activeProject] updatedFilesView] retain]; + break; + } + [(NSBox *)inspectorView setContentView:view]; + [inspectorView display]; +} + +- (void)showInspectorForProject:(PCProject *)aProject +{ + if (!inspectorPopup) { +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"Inspector.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load Inspector.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + + [inspectorPopup removeAllItems]; + [inspectorPopup addItemWithTitle:@"Build Attributes"]; + [inspectorPopup addItemWithTitle:@"Project Attributes"]; + [inspectorPopup addItemWithTitle:@"File Attributes"]; + } + + [self inspectorPopupDidChange:inspectorPopup]; + [inspector makeKeyAndOrderFront:self]; +} + +- (void)showLoadedProjects +{ +} + +- (void)saveFiles +{ +} + +- (void)revertToSaved +{ +} + +- (BOOL)newSubproject +{ +} + +- (BOOL)addSubprojectAt:(NSString *)path +{ +} + +- (void)removeSubproject +{ +} + +- (void)closeProject:(PCProject *)aProject +{ + PCProject *currentProject; + NSString *key = [[aProject projectPath] stringByAppendingPathComponent:@"PC.project"]; + + currentProject = [[loadedProjects objectForKey:key] retain]; + + // Remove it from the loaded projects! + [loadedProjects removeObjectForKey:key]; + [self setActiveProject:[[loadedProjects allValues] lastObject]]; + + [currentProject autorelease]; + + //~ Should I activate another project here?! +} + +- (void)closeProject +{ + [[[self activeProject] projectWindow] performClose:self]; +} + +// =========================================================================== +// ==== File actions +// =========================================================================== + +- (BOOL)openFile:(NSString *)path +{ + id editor = [[[delegate prefController] preferencesDict] objectForKey:Editor]; + + if (!editor) { + } + + [editor openFile:path]; +} + +- (BOOL)addFile:(NSString *)path +{ +} + +- (BOOL)newFile:(NSString *)path +{ +} + +- (BOOL)saveFile +{ +} + +- (BOOL)saveFileAs:(NSString *)path +{ +} + +- (BOOL)revertFile +{ +} + +- (BOOL)renameFileTo:(NSString *)path +{ +} + +- (BOOL)removeFilePermanently:(BOOL)yn +{ + if (!activeProject) { + return NO; + } + + return [activeProject removeSelectedFilePermanently:yn]; +} + +@end + +@implementation PCProjectManager (FileManagerDelegates) + +- (NSString *)fileManager:(id)sender willCreateFile:(NSString *)aFile withKey:(NSString *)key +{ + NSString *path = nil; + + NSLog(@"<%@ %x>: will create file %@ for key %@",[self class],self,aFile,key); + + if ([activeProject doesAcceptFile:aFile forKey:key] ) { + path = [[activeProject projectPath] stringByAppendingPathComponent:aFile]; + } + + return path; +} + +- (void)fileManager:(id)sender didCreateFile:(NSString *)aFile withKey:(NSString *)key +{ + NSLog(@"<%@ %x>: did create file %@ for key %@",[self class],self,aFile,key); + [activeProject addFile:aFile forKey:key]; +} + +- (id)fileManagerWillAddFiles:(id)sender +{ + return activeProject; +} + +- (BOOL)fileManager:(id)sender shouldAddFile:(NSString *)file forKey:(NSString *)key +{ + NSMutableString *fn = [NSMutableString stringWithString:[file lastPathComponent]]; + + NSLog(@"<%@ %x>: should add file %@ for key %@",[self class],self,file,key); + + if ([key isEqualToString:PCLibraries]) { + [fn deleteCharactersInRange:NSMakeRange(1,3)]; + fn = [fn stringByDeletingPathExtension]; + } + + if ([[[activeProject projectDict] objectForKey:key] containsObject:fn]) { + NSRunAlertPanel(@"Attention!",@"The file %@ is already part of project %@!",@"OK",nil,nil,fn,[activeProject projectName]); + return NO; + } + return YES; +} + +- (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key +{ + NSLog(@"<%@ %x>: did add file %@ for key %@",[self class],self,file,key); + [activeProject addFile:file forKey:key]; +} + + +@end diff --git a/PCLib/PCServer.h b/PCLib/PCServer.h new file mode 100644 index 0000000..e7e3864 --- /dev/null +++ b/PCLib/PCServer.h @@ -0,0 +1,101 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#import "Server.h" +#import "PCProject.h" + +extern NSString *PCProjectWillOpenNotification; +extern NSString *PCProjectDidOpenNotification; +extern NSString *PCProjectWillCloseNotification; +extern NSString *PCProjectDidCloseNotification; +extern NSString *PCProjectDidChangeNotification; +extern NSString *PCProjectWillSaveNotification; +extern NSString *PCProjectDidSaveNotification; +extern NSString *PCProjectSaveDidFailNotification; +extern NSString *PCProjectDidUpdateNotification; + +extern NSString *PCFileAddedToProjectNotification; +extern NSString *PCFileRemovedFromProjectNotification; +extern NSString *PCFileWillOpenNotification; +extern NSString *PCFileDidOpenNotification; +extern NSString *PCFileWillCloseNotification; +extern NSString *PCFileDidCloseNotification; + +extern NSString *PCFileDidChangeNotification; +extern NSString *PCFileWillSaveNotification; +extern NSString *PCFileDidSaveNotification; +extern NSString *PCFileSaveDidFailNotification; +extern NSString *PCFileWillRevertNotification; +extern NSString *PCFileDidRevertNotification; +extern NSString *PCFileDeletedNotification; +extern NSString *PCFileRenamedNotification; + +extern NSString *PCProjectBuildWillBeginNotification; +extern NSString *PCProjectBuildDidBeginNotification; +extern NSString *PCProjectBuildDidSucceedNotification; +extern NSString *PCProjectBuildDidFailNotification; +extern NSString *PCProjectBuildDidStopNotification; + +@interface PCServer : NSObject +{ + NSMutableArray *clients; +} + +- (id)init; +- (void)dealloc; + +//---------------------------------------------------------------------------- +// Server +//---------------------------------------------------------------------------- + +- (BOOL)registerProjectSubmenu:(NSMenu *)menu; +- (BOOL)registerFileSubmenu:(NSMenu *)menu; +- (BOOL)registerToolsSubmenu:(NSMenu *)menu; +- (BOOL)registerPrefController:(id)prefs; +- (BOOL)registerEditor:(id)anEditor; +- (BOOL)registerDebugger:(id)aDebugger; + +- (PCProject *)activeProject; +- (NSString*)pathToActiveProject; + +- (id)activeFile; +- (NSString*)pathToActiveFile; + +- (NSArray*)selectedFiles; +- (NSArray*)touchedFiles; +// Both methods return full paths! + +- (BOOL)querTouchedFiles; + // Prompts user to save all files and projects with dirtied buffers. + +- (BOOL)addFileAt:(NSString*)filePath toProject:(PCProject *)projectPath; +- (BOOL)removeFileFromProject:(NSString *)filePath; + +- (void)connectionDidDie:(NSNotification *)notif; + +@end diff --git a/PCLib/PCServer.m b/PCLib/PCServer.m new file mode 100644 index 0000000..33eb332 --- /dev/null +++ b/PCLib/PCServer.m @@ -0,0 +1,123 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCServer.h" +#import "ProjectCenter.h" + +@implementation PCServer + +- (id)init +{ + if ((self = [super init])) { + clients = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc +{ + [clients release]; + [super dealloc]; +} + +- (BOOL)registerProjectSubmenu:(NSMenu *)menu +{ +} + +- (BOOL)registerFileSubmenu:(NSMenu *)menu +{ +} + +- (BOOL)registerToolsSubmenu:(NSMenu *)menu +{ +} + +- (BOOL)registerPrefController:(id)prefs +{ +} + +- (BOOL)registerEditor:(id)anEditor +{ +} + +- (BOOL)registerDebugger:(id)aDebugger +{ +} + +- (PCProject *)activeProject +{ +} + +- (NSString*)pathToActiveProject +{ +} + +- (id)activeFile +{ +} + +- (NSString*)pathToActiveFile +{ +} + +- (NSArray*)selectedFiles +{ +} + +- (NSArray*)touchedFiles +{ +} + +- (BOOL)querTouchedFiles +{ +} + +- (BOOL)addFileAt:(NSString*)filePath toProject:(PCProject *)projectPath +{ +} + +- (BOOL)removeFileFromProject:(NSString *)filePath +{ +} + +- (void)connectionDidDie:(NSNotification *)notif +{ + id clientCon = [notif object]; + + if ([clientCon isKindOfClass:[NSConnection class]]) { + int i; + + for (i=0;i<[clients count];i++) { + id client = [clients objectAtIndex:i]; + + if ([client isProxy] && [client connectionForProxy] == clientCon) { + [clients removeObjectAtIndex:i]; + } + } + } +} + +@end diff --git a/PCLib/PreferenceController.h b/PCLib/PreferenceController.h new file mode 100644 index 0000000..ca67502 --- /dev/null +++ b/PCLib/PreferenceController.h @@ -0,0 +1,47 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + A PreferenceController is used to create a part of PC's preferences. In this + way a 3rd party developer can extend the prefs easily. + + With this approach this procedure can be implemented as a bundle and + therefore PC remains open for future extensions! +*/ + +#import + +@protocol PreferenceController + +- (NSString *)contentViewName; +- (NSView *)contentView; +- (void)revert; +- (void)save; +- (id)controller; + +@end diff --git a/PCLib/ProjectBuilder.h b/PCLib/ProjectBuilder.h new file mode 100644 index 0000000..539b462 --- /dev/null +++ b/PCLib/ProjectBuilder.h @@ -0,0 +1,37 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@class PCProject; + +@protocol ProjectBuilder + +- (void)setActiveProject:(PCProject *)aProject; +- (void)closeProject:(PCProject *)aProject; +- (void)showInspectorForProject:(PCProject *)aProject; + +@end diff --git a/PCLib/ProjectCenter.h b/PCLib/ProjectCenter.h new file mode 100644 index 0000000..37d09d1 --- /dev/null +++ b/PCLib/ProjectCenter.h @@ -0,0 +1,71 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#define PC_EXTERN extern +#define PRIVATE_EXTERN __private_extern__ + +#define BUNDLE_PATH @"/LocalDeveloper/ProjectCenter/Bundles" + +#define Editor @"Editor" +#define Debugger @"Debugger" +#define Compiler @"Compiler" +#define PromtOnClean @"PromtOnClean" +#define PromtOnQuit @"PromtOnQuit" +#define AutoSave @"UAutoSaveRL" +#define RemoveBackup @"RemoveBackup" +#define AutoSavePeriod @"AutoSavePeriod" +#define RootBuildDirectory @"RootBuildDirectory" +#define DeleteCacheWhenQuitting @"DeleteBuildCacheWhenQuitting" +#define BundlePaths @"BundlePaths" +#define SuccessSound @"SuccessSound" +#define FailureSound @"FailureSound" + +#define PCAppDidInitNotification @"PCAppDidInit" +#define PCAppWillTerminateNotification @"PCAppWillTerminate" + +#define NIB_NOT_FOUND_EXCEPTION @"NibNotFoundException" +#define UNKNOWN_PROJECT_TYPE_EXCEPTION @"UnknownProjectTypeException" +#define NOT_A_PROJECT_TYPE_EXCEPTION @"NoProjectTypeCreatorException" +#define PROJECT_CREATION_EXCEPTION @"ProjectCreationException" +#define PROJECT_OPEN_FAILED_EXCEPTION @"ProjectOpenFailedException" +#define PROJECT_SAVE_FAILED_EXCEPTION @"ProjectSaveFailedException" +#define BUNDLE_MANAGER_EXCEPTION @"BundleManagerException" + +#import "PCBundleLoader.h" +#import "PCDataSource.h" +#import "PCProjectManager.h" +#import "PCServer.h" +#import "PCProject.h" +#import "PCFileManager.h" +#import "PCBrowserController.h" +#import "ProjectDebugger.h" +#import "ProjectEditor.h" +#import "ProjectType.h" +#import "Server.h" +#import "PreferenceController.h" +#import "ProjectBuilder.h" +#import "FileCreator.h" +#import "PCProjectBuilder.h" diff --git a/PCLib/ProjectDebugger.h b/PCLib/ProjectDebugger.h new file mode 100644 index 0000000..b42791d --- /dev/null +++ b/PCLib/ProjectDebugger.h @@ -0,0 +1,41 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + A ProjectDebugger is used to create a debugger (frontend) that will work + together with PC. Every such debugger must conform to this protocol! + + With this approach this procedure can be implemented as a bundle and + therefore PC remains open for future extensions! +*/ + +#import + +@protocol ProjectDebugger + +@end diff --git a/PCLib/ProjectEditor.h b/PCLib/ProjectEditor.h new file mode 100644 index 0000000..39edae8 --- /dev/null +++ b/PCLib/ProjectEditor.h @@ -0,0 +1,56 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + A ProjectEditor is used to create an editor that will work together with PC. + Every such editor must conform to this protocol! + + With this approach this procedure can be implemented as a bundle and + therefore PC remains open for future extensions! +*/ + +#import + +@protocol ProjectEditor + +- (void)openFile:(NSString *)path; +- (void)saveFile:(NSString *)path; +- (void)closeFile:(NSString *)path; +- (void)revertFile:(NSString *)path; + +@end + +@interface NSObject (EditorDelegates) + +- (void)editor:(id)editor didOpenFile:(NSString *)path; +- (void)editor:(id)editor didModifyFile:(NSString *)path; +- (void)editor:(id)editor didSaveFile:(NSString *)path; +- (void)editor:(id)editor didCloseFile:(NSString *)path; +- (void)editorWillTerminate:(id)editor; + +@end diff --git a/PCLib/ProjectType.h b/PCLib/ProjectType.h new file mode 100644 index 0000000..7c78aca --- /dev/null +++ b/PCLib/ProjectType.h @@ -0,0 +1,53 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + A ProjectType is used to create a project of a certain type. With this + approach this procedure can be implemented as a bundle and therefore PC + remains open for future extensions! +*/ + +#import + +@class PCProject; + +@protocol ProjectType + ++ (id)sharedCreator; + +- (Class)projectClass; +// Returns the real project class + +- (NSString *)projectTypeName; +- (NSDictionary *)typeTable; +// Type Attributes live in the ProjType.table in the wrapper + +- (PCProject *)createProjectAt:(NSString *)path; +- (PCProject *)openProjectAt:(NSString *)path; + +@end diff --git a/PCLib/Server.h b/PCLib/Server.h new file mode 100644 index 0000000..463d61c --- /dev/null +++ b/PCLib/Server.h @@ -0,0 +1,59 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#import "PCProject.h" +#import "PreferenceController.h" +#import "ProjectEditor.h" +#import "ProjectDebugger.h" + +@protocol Server + +- (BOOL)registerProjectSubmenu:(NSMenu *)menu; +- (BOOL)registerFileSubmenu:(NSMenu *)menu; +- (BOOL)registerToolsSubmenu:(NSMenu *)menu; +- (BOOL)registerPrefController:(id)prefs; +- (BOOL)registerEditor:(id)anEditor; +- (BOOL)registerDebugger:(id)aDebugger; + +- (PCProject *)activeProject; +- (NSString*)pathToActiveProject; + +- (id)activeFile; +- (NSString*)pathToActiveFile; + +- (NSArray*)selectedFiles; +- (NSArray*)touchedFiles; +// Returns array of paths of files that are "unsaved" or nil if none. + +- (BOOL)querTouchedFiles; + // Prompts user to save all files and projects with dirtied buffers. + +- (BOOL)addFileAt:(NSString*)filePath toProject:(PCProject *)projectPath; +- (BOOL)removeFileFromProject:(PCProject *)filePath; + +@end diff --git a/PCLib/h.template b/PCLib/h.template new file mode 100644 index 0000000..99dff7d --- /dev/null +++ b/PCLib/h.template @@ -0,0 +1,34 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/PCLib/m.template b/PCLib/m.template new file mode 100644 index 0000000..4405217 --- /dev/null +++ b/PCLib/m.template @@ -0,0 +1,31 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/PCLibProj/GNUmakefile b/PCLibProj/GNUmakefile new file mode 100644 index 0000000..4bab216 --- /dev/null +++ b/PCLibProj/GNUmakefile @@ -0,0 +1,54 @@ +# GNUmakefile +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# Date: 2000 +# +# This file is part of ProjectCenter +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +include $(GNUSTEP_MAKEFILES)/common.make + +BUNDLE_NAME = PCLibProj +BUNDLE_EXTENSION=.bundle +BUNDLE_INSTALL_DIR=$(GNUSTEP_LOCAL_ROOT)/Library/ProjectCenter/ + +PCLibProj_OBJC_FILES = \ + PCLibProj.m \ + PCLibMakefileFactory.m \ + PCLibProject.m + +PCLibProj_HEADERS= \ + PCLibMakefileFactory.h \ + PCLibProj.h \ + PCLibProject.h + +PCLibProj_PRINCIPAL_CLASS = PCLibProj + +PCLibProj_RESOURCE_FILES = \ + PC.proj \ + Version \ + LibProject.gmodel + +-include GNUmakefile.preamble + +-include GNUmakefile.local + +include $(GNUSTEP_MAKEFILES)/bundle.make + +-include GNUmakefile.postamble + diff --git a/PCLibProj/GNUmakefile.postamble b/PCLibProj/GNUmakefile.postamble new file mode 100644 index 0000000..a205b9c --- /dev/null +++ b/PCLibProj/GNUmakefile.postamble @@ -0,0 +1,26 @@ +# +# Makefile.postamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/PCLibProj/GNUmakefile.preamble b/PCLibProj/GNUmakefile.preamble new file mode 100644 index 0000000..ce01357 --- /dev/null +++ b/PCLibProj/GNUmakefile.preamble @@ -0,0 +1,71 @@ +# +# Makefile.preamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# Makefile.preamble +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS += + +# +# Local configuration +# diff --git a/PCLibProj/Info.table b/PCLibProj/Info.table new file mode 100644 index 0000000..e0861e8 --- /dev/null +++ b/PCLibProj/Info.table @@ -0,0 +1,29 @@ +{ + AdditionalAttributes = { + PrincipalClass = {ATTR_CLASS_NAME = "NSString";}; + }; + Allowable_SubprojectTypes = (Subproject, Bundle, Tool, Framework, Library, Palette); + AttributesInspector = ApplicationInspector; + DefaultExtension = ""; + Default_Localizable_Keys = (INTERFACES); + GeneratedFiles = (Makefile, iconHeader); + INSTALLFLAGS = "-c -s -m 755"; + InfoName = ""; + Localizable_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES, HELP_RESOURCES); + MAKEFILE = app.make; + MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; + Other_Keys = (HELP_RESOURCES, OTHER_SOURCES, FRAMEWORKS, OTHER_LIBS); + PBProjectTypeSubClass = "PBApplicationProjectType"; + ProvidesIcons = Yes; + Public_Keys = (H_FILES); + Resource_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES); + SOURCEMODE = 444; + Source_Keys = (CLASSES, H_FILES, OTHER_LINKED); + Subproj_Keys = (SUBPROJECTS); + Targets = (app, debug, profile, install); + ExecutableResults = ( + "$PROJECTNAME$.app/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.debug/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.profile/$PROJECTNAME$$EXECUTABLE_EXT$" + ); +} diff --git a/PCLibProj/LibProject.gmodel b/PCLibProj/LibProject.gmodel new file mode 100644 index 0000000..5dd296b --- /dev/null +++ b/PCLibProj/LibProject.gmodel @@ -0,0 +1,133 @@ +{ + "Object 1" = {elements = ("Object 2"); isa = NSMutableArray; }; + "Object 2" = {className = PCAppProject; isa = IMCustomObject; realObject = "Object 3"; }; + "Object 3" = { + delegate = nil; + isa = NSApplication; + keyWindow = nil; + mainMenu = nil; + mainWindow = nil; + windows = "Object 4"; + }; + "Object 4" = { + elements = ("Object 5", "Object 9", "Object 11"); + isa = NSMutableArray; + }; + "Object 5" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 256; height = 128}"; + contentView = "Object 6"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 6" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 256; height = 128}"; + frame = "{x = 0; y = 0; width = 256; height = 128}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 5"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 7" = {elements = (); isa = NSMutableArray; }; + "Object 8" = { + alpha = 1.000000; + blue = 0.666667; + brightness = 0.666667; + colorSpaceName = NSCalibratedRGBColorSpace; + green = 0.666667; + hue = 0.000000; + isa = NSColor; + red = 0.666667; + saturation = 0.000000; + }; + "Object 9" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 193; height = 208}"; + contentView = "Object 10"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 10" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 193; height = 208}"; + frame = "{x = 0; y = 0; width = 193; height = 208}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 9"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 11" = { + backgroundColor = "Object 8"; + backingType = 2; + contentFrame = "{x = 221; y = 299; width = 512; height = 320}"; + contentView = "Object 12"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = YES; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 514; height = 352}"; + representedFilename = ""; + styleMask = 14; + title = Window; + }; + "Object 12" = { + autoresizesSubviews = NO; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 512; height = 320}"; + frame = "{x = 1; y = 9; width = 512; height = 320}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 11"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + RootObject = {Connections = "Object 7"; Objects = "Object 1"; isa = GMModel; }; + TopLevelObjects = (RootObject); + Version = 1; +} diff --git a/PCLibProj/Makefile b/PCLibProj/Makefile new file mode 100755 index 0000000..226962b --- /dev/null +++ b/PCLibProj/Makefile @@ -0,0 +1,49 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = PCLibProj + +PROJECTVERSION = 2.6 +PROJECT_TYPE = Loadable Bundle +LANGUAGE = English + +GLOBAL_RESOURCES = LibProject.nib GNUmakefile.postamble\ + GNUmakefile.preamble Info.table LibProject.gmodel\ + PC.proj + +CLASSES = PCLibMakefileFactory.m PCLibProj.m PCLibProject.m + +HFILES = PCLibMakefileFactory.h PCLibProj.h PCLibProject.h + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template + +MAKEFILEDIR = $(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = bundle.make +NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter/ +WINDOWS_INSTALLDIR = /MyBundles +LIBS = +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) +BUNDLE_EXTENSION = bundle + + +FRAMEWORKS = -framework Foundation + + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/PCLibProj/Makefile.postamble b/PCLibProj/Makefile.postamble new file mode 100755 index 0000000..36381d4 --- /dev/null +++ b/PCLibProj/Makefile.postamble @@ -0,0 +1,122 @@ +############################################################################### +# NeXT Makefile.postamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project, sub-project, bundle, or +# palette. Each node in the project's tree of sub-projects and bundles +# should have it's own Makefile.preamble and Makefile.postamble. Additional +# rules (e.g., after_install) that are defined by the developer should be +# defined in this file. +# +############################################################################### +# +# Here are the variables exported by the common "app" makefiles that can be +# used in any customizations you make to the template below: +# +# PRODUCT_ROOT - Name of the directory to which resources are copied. +# OFILE_DIR - Directory into which .o object files are generated. +# (Note that this name is calculated based on the target +# architectures specified in Project Builder). +# DERIVED_SRC_DIR - Directory used for all other derived files +# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations +# +# NAME - name of application, bundle, subproject, palette, etc. +# LANGUAGE - langage in which the project is written (default "English") +# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES - non-localized resources of project +# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0) +# ICONSECTIONS - Specifies icon sections when linking executable +# +# CLASSES - Class implementation files in project. +# HFILES - Header files in project. +# MFILES - Other Objective-C source files in project. +# CFILES - Other C source files in project. +# PSWFILES - .psw files in the project +# PSWMFILES - .pswm files in the project +# SUBPROJECTS - Subprojects of this project +# BUNDLES - Bundle subprojects of this project +# OTHERSRCS - Other miscellaneous sources of this project +# OTHERLINKED - Source files not matching a standard source extention +# +# LIBS - Libraries to link with when making app target +# DEBUG_LIBS - Libraries to link with when making debug target +# PROF_LIBS - Libraries to link with when making profile target +# OTHERLINKEDOFILES - Other relocatable files to (always) link in. +# +# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles +# MAKEFILEDIR - Directory in which to find $(MAKEFILE) +# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) +# INSTALLDIR - Directory app will be installed into by 'install' target +# +############################################################################### + + +# Change defaults assumed by the standard makefiles here. Edit the +# following default values as appropriate. (Note that if no Makefile.postamble +# exists, these values will have defaults set in common.make). + +# Versioning of frameworks, libraries, bundles, and palettes: +#CURRENTLY_ACTIVE_VERSION = YES + # Set to "NO" to produce a compatibility binary +#DEPLOY_WITH_VERSION_NAME = A + # This should be incremented as your API changes. +#COMPATIBILITY_PROJECT_VERSION = 1 + # This should be incremented as your API grows. +#CURRENT_PROJECT_VERSION = 1 + # Defaults to using the "vers_string" hack. + +# Some compiler flags can be easily overridden here, but onlytake effect at +# the top-level: +#OPTIMIZATION_CFLAG = -O +#DEBUG_SYMBOLS_CFLAG = -g +#WARNING_CFLAGS = -Wmost +#DEBUG_BUILD_CFLAGS = -DDEBUG +#PROFILE_BUILD_CFLAGS = -pg -DPROFILE + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO + +# Flags passed to yacc +#YFLAGS = -d + +# Library and Framework projects only: +# 1. If you want something other than the default .dylib name, override it here +#DYLIB_INSTALL_NAME = lib$(NAME).dylib + +# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all. +#DYLIB_INSTALL_DIR = $(INSTALLDIR) + +# Ownership and permissions of files installed by 'install' target +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + +# Options to strip for various project types. Note: -S strips debugging symbols +# (executables can be stripped down further with -x or, if they load no bundles, with no +# options at all). +#APP_STRIP_OPTS = -S +#TOOL_STRIP_OPTS = -S +#LIBRARY_STRIP_OPTS = -S + # for .a archives +#DYNAMIC_STRIP_OPTS = -S + # for bundles and shared libraries + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. "Official" +# user-defined rules are: +# * before_install +# * after_install +# * after_installhdrs +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# +# Note: on MS Windows, executables, have an extension, so rules and dependencies +# for generated tools should use $(EXECUTABLE_EXT) on the end. diff --git a/PCLibProj/Makefile.preamble b/PCLibProj/Makefile.preamble new file mode 100755 index 0000000..5c0a25a --- /dev/null +++ b/PCLibProj/Makefile.preamble @@ -0,0 +1,130 @@ +############################################################################### +# NeXT Makefile.preamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project. Each node in a project +# tree of sub-projects, tools, etc. should have its own Makefile.preamble and +# Makefile.postamble. +# +############################################################################### +## Configure the flags passed to $(CC) here. These flags will also be +## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and +## -L flags in ProjectBuilder's Build Options inspector if at all possible. +## To change the default flags that get passed to ${CC} +## (e.g. change -O to -O2), see Makefile.postamble. + +# Flags passed to compiler (in addition to -g, -O, etc) +OTHER_CFLAGS = +# Flags passed to ld (in addition to -ObjC, etc.) +OTHER_LDFLAGS = +# Flags passed to libtool when building libraries +OTHER_LIBTOOL_FLAGS = +# For ordering named sections on NEXTSTEP (see ld(1)) +SECTORDER_FLAGS = + +# If you do not want any headers exported before compilations begin, +# uncomment the following line. This can be a big time saver. +#SKIP_EXPORTING_HEADERS = YES + +# Stuff related to exporting headers from this project that isn't already +# handled by PB. +OTHER_PUBLIC_HEADERS = +OTHER_PROJECT_HEADERS = +OTHER_PRIVATE_HEADERS = + +# Set these two macros if you want a precomp to be built as part of +# installation. The cc -precomp will be run in the public header directory +# on the specified public header files with the specified additional flags. +PUBLIC_PRECOMPILED_HEADERS = +PUBLIC_PRECOMPILED_HEADERS_CFLAGS = + +# Set this for library projects if you want to publish header files. If your +# app or tool project exports headers Don't +# include $(DSTROOT); this is added for you automatically. +PUBLIC_HEADER_DIR = +PRIVATE_HEADER_DIR = + +# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR# +# (say, to add a subdirectory like "/sys"), you can use: +PUBLIC_HEADER_DIR_SUFFIX = +PRIVATE_HEADER_DIR_SUFFIX = + +# Set this for dynamic library projects on platforms where code which references +# a dynamic library must link against an import library (i.e., Windows NT) +# Don't include $(DSTROOT); this is added for you automatically. +IMPORT_LIBRARY_DIR = + +# Additional (non-localized) resources for this project, which can be generated +OTHER_RESOURCES = + +# Uncomment this to produce a static archive-style (.a) library +#LIBRARY_STYLE = STATIC + +# Set this to YES if you don't want a final libtool call for a library/framework. +BUILD_OFILES_LIST_ONLY = + +# Additional relocatables to be linked into this project +OTHER_OFILES = +# Additional libraries to link against +OTHER_LIBS = +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +## Configure how things get built here. Additional dependencies, source files, +## derived files, and build order should be specified here. + +# Other dependencies of this project +OTHER_PRODUCT_DEPENDS = +# Built *before* building subprojects/bundles +OTHER_INITIAL_TARGETS = +# Other source files maintained by .pre/postamble +OTHER_SOURCEFILES = +# Additional files to be removed by `make clean' +OTHER_GARBAGE = + +# Targets to build before installation +OTHER_INSTALL_DEPENDS = + +# More obscure flags you might want to set for pswrap, yacc, lex, etc. +PSWFLAGS = +YFLAGS = +LFLAGS = + +## Delete this line if you want fast and loose cleans that will not remove +## things like precomps and user-defined OTHER_GARBAGE in subprojects. +CLEAN_ALL_SUBPROJECTS = YES + +## Add more obscure source files here to cause them to be automatically +## processed by the appropriate tool. Note that these files should also be +## added to "Supporting Files" in ProjectBuilder. The desired .o files that +## result from these files should also be added to OTHER_OFILES above so they +## will be linked in. + +# .msg files that should have msgwrap run on them +MSGFILES = +# .defs files that should have mig run on them +DEFSFILES = +# .mig files (no .defs files) that should have mig run on them +MIGFILES = +# .x files that should have rpcgen run on them +RPCFILES = + +## Add additional Help directories here (add them to the project as "Other +## Resources" in Project Builder) so that they will be compressed into .store +## files and copied into the app wrapper. If the help directories themselves +## need to also be in the app wrapper, then a cp command will need to be added +## in an after_install target. +OTHER_HELP_DIRS = + +# After you have saved your project using the 4.0 PB, you will automatically +# start using the makefiles in /NextDeveloper/Makefiles/project. If you should +# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to +# be /NextDeveloper/Makefiles/app. + +# Don't add more rules here unless you want the first one to be the default +# target for make! Put all your targets in Makefile.postamble. + diff --git a/PCLibProj/PB.project b/PCLibProj/PB.project new file mode 100755 index 0000000..51d23bb --- /dev/null +++ b/PCLibProj/PB.project @@ -0,0 +1,30 @@ +{ + APPCLASS = PCLibProj; + BUNDLE_EXTENSION = bundle; + DYNAMIC_CODE_GEN = YES; + FILESTABLE = { + CLASSES = (PCLibMakefileFactory.m, PCLibProj.m, PCLibProject.m); + FRAMEWORKS = (Foundation.framework); + H_FILES = (PCLibMakefileFactory.h, PCLibProj.h, PCLibProject.h); + INTERFACES = (LibProject.nib); + OTHER_RESOURCES = ( + GNUmakefile.postamble, + GNUmakefile.preamble, + Info.table, + LibProject.gmodel, + PC.proj + ); + OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template); + }; + LANGUAGE = English; + LOCALIZABLE_FILES = {}; + MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles"; + NEXTSTEP_BUILDTOOL = /bin/gnumake; + NEXTSTEP_INSTALLDIR = /LocalLibrary/ProjectCenter/; + PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make; + PROJECTNAME = PCLibProj; + PROJECTTYPE = "Loadable Bundle"; + PROJECTVERSION = 2.6; + WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make; + WINDOWS_INSTALLDIR = /MyBundles; +} diff --git a/PCLibProj/PC.proj b/PCLibProj/PC.proj new file mode 100644 index 0000000..ed3d01c --- /dev/null +++ b/PCLibProj/PC.proj @@ -0,0 +1,28 @@ +{ + APPKIT = "GNUSTEP-GUI"; + BUILDTOOL = "gnumake"; + CLASS_FILES = (); + COMPILEROPTIONS = ""; + CREATION_DATE = ""; + DOCU_FILES = (); + FOUNDATION = "GNUSTEP-BASE"; + FRAMEWORKS = (); + HEADER_FILES = (); + LANGUAGE = "English"; + LAST_EDITING = ""; + LIBRARIES = ("gnustep-base"); + MAKEFILEDIR = "/usr/GNUstep/Makefiles"; + INSTALLDIR = "$(HOME)/Apps"; + OTHER_FILES = (); + OTHER_RESOURCES = ("Version"); + OTHER_SOURCES = (); + PROJECT_CREATOR = ""; + PROJECT_DESCRIPTION = "No description avaliable!"; + PROJECT_MAINTAINER = ""; + PROJECT_NAME = ""; + PROJECT_TYPE = "Library"; + PROJECT_BUILDER = "PCLibProj"; + PROJECT_VERSION = 1.0; + SUBPROJECTS = (); + SUPPORTING_FILES = ("GNUmakefile.preamble", "GNUmakefile", "GNUmakefile.postamble"); +} diff --git a/PCLibProj/PCLibMakefileFactory.h b/PCLibProj/PCLibMakefileFactory.h new file mode 100644 index 0000000..f5386a0 --- /dev/null +++ b/PCLibProj/PCLibMakefileFactory.h @@ -0,0 +1,38 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCLibMakefileFactory : NSObject +{ +} + ++ (PCLibMakefileFactory *)sharedFactory; + +- (NSData *)makefileForProject:(PCProject *)aProject; + +@end diff --git a/PCLibProj/PCLibMakefileFactory.m b/PCLibProj/PCLibMakefileFactory.m new file mode 100644 index 0000000..95a90ac --- /dev/null +++ b/PCLibProj/PCLibMakefileFactory.m @@ -0,0 +1,148 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCLibMakefileFactory.h" + +@implementation PCLibMakefileFactory + +static PCLibMakefileFactory *_factory = nil; + ++ (PCLibMakefileFactory *)sharedFactory +{ + if (!_factory) { + _factory = [[[self class] alloc] init]; + } + return _factory; +} + +- (NSData *)makefileForProject:(PCProject *)aProject; +{ + NSMutableString *string = [NSMutableString string]; + NSString *prName = [aProject projectName]; + NSDictionary *prDict = [aProject projectDict]; + NSString *tmp; + NSEnumerator *enumerator; + NSString *libName; + + // Header information + [string appendString:@"#\n"]; + [string appendString:@"# GNUmakefile - Generated by the ProjectCenter\n"]; + [string appendString:@"# Written by Philippe C.D. Robert \n"]; + [string appendString:@"#\n"]; + [string appendString:@"# NOTE: Do NOT change this file -- ProjectCenter maintains it!\n"]; + [string appendString:@"#\n"]; + [string appendString:@"# Put all of your customisations in GNUmakefile.preamble and\n"]; + [string appendString:@"# GNUmakefile.postamble\n"]; + [string appendString:@"#\n\n"]; + + // The 'real' thing + [string appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"]; + [string appendString:@"include English.lproj/Version\n"]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Subprojects\n"]; + [string appendString:@"#\n\n"]; + + if ([[aProject subprojects] count]) { + enumerator = [[prDict objectForKey:PCSubprojects] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + } + + [string appendString:@"#\n"]; + [string appendString:@"# Library\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"PACKAGE_NAME=%@\n",prName]]; + [string appendString:[NSString stringWithFormat:@"LIBRARY_VAR=%@\n",[prName uppercaseString]]]; + libName = [NSString stringWithFormat:@"lib%@",prName]; + [string appendString:[NSString stringWithFormat:@"LIBRARY_NAME=%@\n",libName]]; + + // Install path + [string appendString:[NSString stringWithFormat:@"%@_INSTALL_PREFIX=$(GNUSTEP_SYSTEM_ROOT)\n",[prName uppercaseString]]]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Additional libraries\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_ADDITIONAL_TOOL_LIBS += ",prName]]; + + if ([[prDict objectForKey:PCLibraries] count]) { + enumerator = [[prDict objectForKey:PCLibraries] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + if (![tmp isEqualToString:@"gnustep-base"]) { + [string appendString:[NSString stringWithFormat:@"-l%@ ",tmp]]; + } + } + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Header files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_HEADERS= ",libName]]; + + enumerator = [[prDict objectForKey:PCHeaders] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Class files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_OBJC_FILES= ",libName]]; + + enumerator = [[prDict objectForKey:PCClasses] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# C files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_C_FILES= ",libName]]; + + enumerator = [[prDict objectForKey:PCOtherSources] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_HEADER_FILES_INSTALL_DIR=/%@\n",libName,prName]]; + + [string appendString:@"-include GNUmakefile.preamble\n"]; + [string appendString:@"-include GNUmakefile.local\n"]; + [string appendString:@"include $(GNUSTEP_MAKEFILES)/library.make\n"]; + [string appendString:@"-include GNUmakefile.postamble\n"]; + + return [string dataUsingEncoding:[NSString defaultCStringEncoding]]; +} + +@end diff --git a/PCLibProj/PCLibProj.h b/PCLibProj/PCLibProj.h new file mode 100644 index 0000000..7b45ac5 --- /dev/null +++ b/PCLibProj/PCLibProj.h @@ -0,0 +1,48 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCLibProj : NSObject +{ +} + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator; + +- (Class)projectClass; + +- (NSString *)projectTypeName; +- (NSDictionary *)typeTable; + +- (PCProject *)createProjectAt:(NSString *)path; +- (PCProject *)openProjectAt:(NSString *)path; + +@end diff --git a/PCLibProj/PCLibProj.m b/PCLibProj/PCLibProj.m new file mode 100644 index 0000000..009d01a --- /dev/null +++ b/PCLibProj/PCLibProj.m @@ -0,0 +1,134 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + PCLibProj creates new project of the type Application! + +*/ + +#import "PCLibProj.h" +#import "PCLibProject.h" + +@implementation PCLibProj + +static NSString *_projTypeName = @"Library"; +static PCLibProj *_creator = nil; + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator +{ + if (!_creator) { + _creator = [[[self class] alloc] init]; + } + return _creator; +} + +- (Class)projectClass +{ + return [PCLibProject class]; +} + +- (NSString *)projectTypeName +{ + return _projTypeName; +} + +- (NSDictionary *)typeTable +{ + NSString *_path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Info" ofType:@"table"]; + + return [NSDictionary dictionaryWithContentsOfFile:_path]; +} + +- (PCProject *)createProjectAt:(NSString *)path +{ + PCLibProject *project = nil; + NSFileManager *fm = [NSFileManager defaultManager]; + + NSAssert(path,@"No valid project path provided!"); + + if ([fm createDirectoryAtPath:path attributes:nil]) { + NSString *_file; + NSString *_resourcePath; + NSMutableDictionary *dict; + + project = [[[PCLibProject alloc] init] autorelease]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"PC" ofType:@"proj"]; + dict = [NSMutableDictionary dictionaryWithContentsOfFile:_file]; + + // Customise the project + [dict setObject:[path lastPathComponent] forKey:PCProjectName]; + [dict setObject:[project principalClass] forKey:PCProjType]; + + // Save the project to disc + [dict writeToFile:[path stringByAppendingPathComponent:@"PC.project"] atomically:YES]; + + // Copy the project files to the provided path + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"postamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.postamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"preamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.preamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"main" ofType:@"m"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"main.m"] handler:nil]; + + // Resources + _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"]; + [fm createDirectoryAtPath:_resourcePath attributes:nil]; + [fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"] attributes:nil]; + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"Version" ofType:@""]; + [fm copyPath:_file toPath:[_resourcePath stringByAppendingPathComponent:@"Version"] handler:nil]; + + // The path cannot be in the PC.project file! + [project setProjectPath:path]; + + // Set the new dictionary - this causes the GNUmakefile to be written to disc + if(![project assignProjectDict:dict]) { + NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path); + return nil; + } + } + return project; +} + +- (PCProject *)openProjectAt:(NSString *)path +{ + NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; + + if ([[dict objectForKey:PCProjectBuilderClass] isEqualToString:@"PCLibProj"]) { + return [[[PCLibProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease]; + } + return nil; +} + +@end diff --git a/PCLibProj/PCLibProject.h b/PCLibProj/PCLibProject.h new file mode 100644 index 0000000..1633041 --- /dev/null +++ b/PCLibProj/PCLibProject.h @@ -0,0 +1,65 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + This is the project type 'Application' for GNUstep. You never should create it yourself but + use PCLibProj for doing this. Otherwise needed files don't get copied to the right place. + + */ + +#import +#import + +@interface PCLibProject : PCProject +{ + @private + BOOL _needsAdditionalReleasing; +} + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init; +- (void)dealloc; + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile; + +- (BOOL)isValidDictionary:(NSDictionary *)aDict; + +- (NSArray *)sourceFileKeys; +- (NSArray *)resourceFileKeys; +- (NSArray *)otherKeys; +- (NSArray *)buildTargets; +- (NSString *)projectDescription; + +@end diff --git a/PCLibProj/PCLibProject.m b/PCLibProj/PCLibProject.m new file mode 100644 index 0000000..ef2a37c --- /dev/null +++ b/PCLibProj/PCLibProject.m @@ -0,0 +1,172 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCLibProject.h" +#import "PCLibMakefileFactory.h" + +#import + +#if defined(GNUSTEP) +#import +#endif + +@interface PCLibProject (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCLibProject (CreateUI) + +- (void)_initUI +{ + // Always call super!!! + [super _initUI]; + + projectAttributeInspectorView = [[NSBox alloc] init]; + [projectAttributeInspectorView setTitlePosition:NSAtTop]; + [projectAttributeInspectorView setBorderType:NSGrooveBorder]; + // [projectAttributeInspectorView addSubview:projectTypePopup]; + [projectAttributeInspectorView sizeToFit]; + [projectAttributeInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectProjectInspectorView = [[NSBox alloc] init]; + [projectProjectInspectorView setTitlePosition:NSAtTop]; + [projectProjectInspectorView setBorderType:NSGrooveBorder]; + // [projectProjectInspectorView addSubview:projectTypePopup]; + [projectProjectInspectorView sizeToFit]; + [projectProjectInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectFileInspectorView = [[NSBox alloc] init]; + [projectFileInspectorView setTitlePosition:NSAtTop]; + [projectFileInspectorView setBorderType:NSGrooveBorder]; + // [projectFileInspectorView addSubview:projectTypePopup]; + [projectFileInspectorView sizeToFit]; + [projectFileInspectorView setAutoresizingMask:NSViewWidthSizable]; + + _needsAdditionalReleasing = YES; +} + +@end + +@implementation PCLibProject + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init +{ + if ((self = [super init])) { + rootCategories = [[NSDictionary dictionaryWithObjectsAndKeys:PCClasses,@"Classes",PCHeaders,@"Headers",PCOtherSources,@"Other Sources",PCOtherResources,@"Other Resources", PCSubprojects, @"Subprojects", PCLibraries, @"Libraries",PCDocuFiles,@"Documentation",nil] retain]; + + _needsAdditionalReleasing = NO; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"LibProject.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load LibProject.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + } + return self; +} + +- (void)dealloc +{ + [rootCategories release]; + + if (_needsAdditionalReleasing) { + [projectAttributeInspectorView release]; + [projectProjectInspectorView release]; + [projectFileInspectorView release]; + } + + [super dealloc]; +} + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile +{ + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *makefile = [projectPath stringByAppendingPathComponent:@"GNUmakefile"]; + NSData *content; + + if (![super writeMakefile]) { + NSLog(@"Couldn't update PC.project..."); + } + + if (![fm movePath:makefile toPath:[projectPath stringByAppendingPathComponent:@"GNUmakefile~"] handler:nil]) { + NSLog(@"Couldn't write a backup GNUmakefile..."); + } + + if (!(content = [[PCLibMakefileFactory sharedFactory] makefileForProject:self])) { + NSLog([NSString stringWithFormat:@"Couldn't build the GNUmakefile %@!",makefile]); + return NO; + } + if (![content writeToFile:makefile atomically:YES]) { + NSLog([NSString stringWithFormat:@"Couldn't write the GNUmakefile %@!",makefile]); + return NO; + } + return YES; +} + +- (BOOL)isValidDictionary:(NSDictionary *)aDict +{ +#warning No project check implemented, yet! + return YES; +} + +- (NSArray *)sourceFileKeys +{ + return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil]; +} + +- (NSArray *)resourceFileKeys +{ + return [NSArray array]; +} + +- (NSArray *)otherKeys +{ + return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil]; +} + +- (NSArray *)buildTargets +{ +} + +- (NSString *)projectDescription +{ + return @"Project that handles GNUstep/ObjC based libraries."; +} + +@end diff --git a/PCLibProj/Version b/PCLibProj/Version new file mode 100644 index 0000000..c8601c2 --- /dev/null +++ b/PCLibProj/Version @@ -0,0 +1,12 @@ +# This file is included in various Makefile's to get version information. +# Compatible with Bourne shell syntax, so it can included there too. + +# The gcc version required to compile the library. +GCC_VERSION=2.8.0 + +# The version number of this release. +MAJOR_VERSION=0 +MINOR_VERSION=0 +SUBMINOR_VERSION=1 +LIB_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION} +VERSION=${LIB_VERSION} diff --git a/PCLibProj/h.template b/PCLibProj/h.template new file mode 100644 index 0000000..7b523c7 --- /dev/null +++ b/PCLibProj/h.template @@ -0,0 +1,11 @@ +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/PCLibProj/m.template b/PCLibProj/m.template new file mode 100644 index 0000000..1216fe5 --- /dev/null +++ b/PCLibProj/m.template @@ -0,0 +1,18 @@ +$$ Lines starting with $$ are not inserted into newly created files +$$ The following substitutions are made: +$$ +$$ $FILENAME$ e.g. foo.m +$$ $FILENAMESANSEXTENSION$ e.g. foo +$$ $DIRECTORY$ e.g. /tmp/MyNewApp +$$ $PROJECTNAME$ e.g. MyNewApp +$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj +$$ $USERNAME$ e.g. mwagner +$$ $DATE$ e.g. Jan-1-1994 +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/PCToolProj/GNUmakefile b/PCToolProj/GNUmakefile new file mode 100644 index 0000000..58a3f91 --- /dev/null +++ b/PCToolProj/GNUmakefile @@ -0,0 +1,52 @@ +# GNUmakefile +# +# Copyright (C) 2000 Philippe C.D. Robert +# +# Author: Philippe C.D. Robert +# Date: 2000 +# +# This file is part of ProjectCenter +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +include $(GNUSTEP_MAKEFILES)/common.make + +BUNDLE_NAME = PCToolProj +BUNDLE_EXTENSION =.bundle +BUNDLE_INSTALL_DIR =$(GNUSTEP_LOCAL_ROOT)/Library/ProjectCenter/ + +PCToolProj_OBJC_FILES = \ + PCToolProj.m \ + PCToolMakefileFactory.m \ + PCToolProject.m + +PCToolProj_HEADERS= \ + PCToolMakefileFactory.h \ + PCToolProj.h \ + PCToolProject.h + +PCToolProj_PRINCIPAL_CLASS = PCToolProj + +PCToolProj_RESOURCE_FILES = \ + main.m \ + PC.proj \ + Info-project.plist + +-include GNUmakefile.preamble + +include $(GNUSTEP_MAKEFILES)/bundle.make + +-include GNUmakefile.postamble + diff --git a/PCToolProj/GNUmakefile.postamble b/PCToolProj/GNUmakefile.postamble new file mode 100644 index 0000000..c85b08f --- /dev/null +++ b/PCToolProj/GNUmakefile.postamble @@ -0,0 +1,30 @@ +# +# Makefile.postamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + diff --git a/PCToolProj/GNUmakefile.preamble b/PCToolProj/GNUmakefile.preamble new file mode 100644 index 0000000..f61a96d --- /dev/null +++ b/PCToolProj/GNUmakefile.preamble @@ -0,0 +1,74 @@ +# +# Makefile.preamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# Makefile.preamble +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += -lPC + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS += + +# +# Local configuration +# + + + diff --git a/PCToolProj/Info-project.plist b/PCToolProj/Info-project.plist new file mode 100644 index 0000000..aaa95fe --- /dev/null +++ b/PCToolProj/Info-project.plist @@ -0,0 +1,12 @@ +{ + NOTE = "Automatically generated, do not edit!"; + ToolName = ""; + ToolDescription = ""; + ToolIcon = ""; + ToolRelease = ""; + FullVersionID = ""; + Authors = (); + URL = ""; + Copyright = ""; + CopyrightDescription = ""; +} diff --git a/PCToolProj/Info.table b/PCToolProj/Info.table new file mode 100644 index 0000000..d516b0c --- /dev/null +++ b/PCToolProj/Info.table @@ -0,0 +1,29 @@ +{ + AdditionalAttributes = { + PrincipalClass = {ATTR_CLASS_NAME = "NSString";}; + }; + Allowable_SubprojectTypes = (Subproject, Bundle, Tool); + AttributesInspector = ToolInspector; + DefaultExtension = ""; + Default_Localizable_Keys = (INTERFACES); + GeneratedFiles = (Makefile, iconHeader); + INSTALLFLAGS = "-c -s -m 755"; + InfoName = ""; + Localizable_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES, HELP_RESOURCES); + MAKEFILE = tool.make; + MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles"; + Other_Keys = (HELP_RESOURCES, OTHER_SOURCES, FRAMEWORKS, OTHER_LIBS); + PBProjectTypeSubClass = "PBApplicationProjectType"; + ProvidesIcons = Yes; + Public_Keys = (H_FILES); + Resource_Keys = (INTERFACES, IMAGES, OTHER_RESOURCES); + SOURCEMODE = 444; + Source_Keys = (CLASSES, H_FILES, OTHER_LINKED); + Subproj_Keys = (SUBPROJECTS); + Targets = (app, debug, profile, install); + ExecutableResults = ( + "$PROJECTNAME$.app/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.debug/$PROJECTNAME$$EXECUTABLE_EXT$", + "$PROJECTNAME$.profile/$PROJECTNAME$$EXECUTABLE_EXT$" + ); +} diff --git a/PCToolProj/PC.proj b/PCToolProj/PC.proj new file mode 100644 index 0000000..19cc7d6 --- /dev/null +++ b/PCToolProj/PC.proj @@ -0,0 +1,30 @@ +{ + TOOLICON = ""; + BUILDTOOL = "gnumake"; + CLASS_FILES = ("main.m"); + COMPILEROPTIONS = ""; + CREATION_DATE = ""; + DOCU_FILES = (); + FOUNDATION = "GNUSTEP-BASE"; + FRAMEWORKS = (); + HEADER_FILES = (); + IMAGES = (); + LANGUAGE = "English"; + LAST_EDITING = ""; + LIBRARIES = ("gnustep-base"); + MAKEFILEDIR = "/usr/GNUstep/Makefiles"; + INSTALLDIR = "$(HOME)/Tools"; + OTHER_FILES = (); + OTHER_RESOURCES = (); + OTHER_SOURCES = (); + PRINCIPAL_CLASS = "main.m"; + PROJECT_CREATOR = ""; + PROJECT_DESCRIPTION = "No description avaliable!"; + PROJECT_MAINTAINER = ""; + PROJECT_NAME = ""; + PROJECT_TYPE = "Tool"; + PROJECT_BUILDER = "PCToolProj"; + PROJECT_VERSION = 1.0; + SUBPROJECTS = (); + SUPPORTING_FILES = ("GNUmakefile.preamble", "GNUmakefile", "GNUmakefile.postamble"); +} diff --git a/PCToolProj/PCToolMakefileFactory.h b/PCToolProj/PCToolMakefileFactory.h new file mode 100644 index 0000000..b9c12ca --- /dev/null +++ b/PCToolProj/PCToolMakefileFactory.h @@ -0,0 +1,38 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCToolMakefileFactory : NSObject +{ +} + ++ (PCToolMakefileFactory *)sharedFactory; + +- (NSData *)makefileForProject:(PCProject *)aProject; + +@end diff --git a/PCToolProj/PCToolMakefileFactory.m b/PCToolProj/PCToolMakefileFactory.m new file mode 100644 index 0000000..55b6eaf --- /dev/null +++ b/PCToolProj/PCToolMakefileFactory.m @@ -0,0 +1,157 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCToolMakefileFactory.h" + +@implementation PCToolMakefileFactory + +static PCToolMakefileFactory *_factory = nil; + ++ (PCToolMakefileFactory *)sharedFactory +{ + if (!_factory) { + _factory = [[[self class] alloc] init]; + } + return _factory; +} + +- (NSData *)makefileForProject:(PCProject *)aProject; +{ + NSMutableString *string = [NSMutableString string]; + NSString *prName = [aProject projectName]; + NSDictionary *prDict = [aProject projectDict]; + NSString *tmp; + NSEnumerator *enumerator; + int i; + + // Header information + [string appendString:@"#\n"]; + [string appendString:@"# GNUmakefile - Generated by the ProjectCenter\n"]; + [string appendString:@"# Written by Philippe C.D. Robert \n"]; + [string appendString:@"#\n"]; + [string appendString:@"# NOTE: Do NOT change this file -- ProjectCenter maintains it!\n"]; + [string appendString:@"#\n"]; + [string appendString:@"# Put all of your customisations in GNUmakefile.preamble and\n"]; + [string appendString:@"# GNUmakefile.postamble\n"]; + [string appendString:@"#\n\n"]; + + // The 'real' thing + [string appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Subprojects\n"]; + [string appendString:@"#\n\n"]; + + if ([[aProject subprojects] count]) { + enumerator = [[prDict objectForKey:PCSubprojects] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + } + + [string appendString:@"#\n"]; + [string appendString:@"# Tool\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"TOOL_NAME=%@\n",prName]]; + // [string appendString:[NSString stringWithFormat:@"%@_PRINCIPAL_CLASS=%@\n",prName,[prDict objectForKey:PCPrincipalClass]]]; + [string appendString:[NSString stringWithFormat:@"%@_TOOL_ICON=%@\n",prName, [prDict objectForKey:PCToolIcon]]]; + + [string appendString:@"#\n\n"]; + [string appendString:@"# Additional libraries\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_ADDITIONAL_TOOL_LIBS += ",prName]]; + + if ([[prDict objectForKey:PCLibraries] count]) { + enumerator = [[prDict objectForKey:PCLibraries] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + if (![tmp isEqualToString:@"gnustep-base"]) { + [string appendString:[NSString stringWithFormat:@"-l%@ ",tmp]]; + } + } + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Resource files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_RESOURCE_FILES= ",prName]]; + + for (i=0;i<[[aProject resourceFileKeys] count];i++) { + NSString *k = [[aProject resourceFileKeys] objectAtIndex:i]; + + enumerator = [[prDict objectForKey:k] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Header files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_HEADERS= ",prName]]; + + enumerator = [[prDict objectForKey:PCHeaders] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# Class files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_OBJC_FILES= ",prName]]; + + enumerator = [[prDict objectForKey:PCClasses] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n#\n\n"]; + [string appendString:@"# C files\n"]; + [string appendString:@"#\n\n"]; + + [string appendString:[NSString stringWithFormat:@"%@_C_FILES= ",prName]]; + + enumerator = [[prDict objectForKey:PCOtherSources] objectEnumerator]; + while (tmp = [enumerator nextObject]) { + [string appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]]; + } + + [string appendString:@"\n\n"]; + + [string appendString:@"-include GNUmakefile.preamble\n"]; + [string appendString:@"-include GNUmakefile.local\n"]; + [string appendString:@"include $(GNUSTEP_MAKEFILES)/aggregate.make\n"]; + [string appendString:@"include $(GNUSTEP_MAKEFILES)/tool.make\n"]; + [string appendString:@"-include GNUmakefile.postamble\n"]; + + return [string dataUsingEncoding:[NSString defaultCStringEncoding]]; +} + +@end diff --git a/PCToolProj/PCToolProj.h b/PCToolProj/PCToolProj.h new file mode 100644 index 0000000..9c718d9 --- /dev/null +++ b/PCToolProj/PCToolProj.h @@ -0,0 +1,48 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import +#import + +@interface PCToolProj : NSObject +{ +} + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator; + +- (Class)projectClass; + +- (NSString *)projectTypeName; +- (NSDictionary *)typeTable; + +- (PCProject *)createProjectAt:(NSString *)path; +- (PCProject *)openProjectAt:(NSString *)path; + +@end diff --git a/PCToolProj/PCToolProj.m b/PCToolProj/PCToolProj.m new file mode 100644 index 0000000..72409bf --- /dev/null +++ b/PCToolProj/PCToolProj.m @@ -0,0 +1,137 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + PCToolProj creates new project of the type Application! + +*/ + +#import "PCToolProj.h" +#import "PCToolProject.h" + +@implementation PCToolProj + +static NSString *_projTypeName = @"Tool"; +static PCToolProj *_creator = nil; + +//---------------------------------------------------------------------------- +// ProjectType +//---------------------------------------------------------------------------- + ++ (id)sharedCreator +{ + if (!_creator) { + _creator = [[[self class] alloc] init]; + } + return _creator; +} + +- (Class)projectClass +{ + return [PCToolProject class]; +} + +- (NSString *)projectTypeName +{ + return _projTypeName; +} + +- (NSDictionary *)typeTable +{ + NSString *_path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Info" ofType:@"table"]; + + return [NSDictionary dictionaryWithContentsOfFile:_path]; +} + +- (PCProject *)createProjectAt:(NSString *)path +{ + PCToolProject *project = nil; + NSFileManager *fm = [NSFileManager defaultManager]; + + NSAssert(path,@"No valid project path provided!"); + + if ([fm createDirectoryAtPath:path attributes:nil]) { + NSString *_file; + NSString *_resourcePath; + NSMutableDictionary *dict; + + project = [[[PCToolProject alloc] init] autorelease]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"PC" ofType:@"proj"]; + dict = [NSMutableDictionary dictionaryWithContentsOfFile:_file]; + + // Customise the project + [dict setObject:[path lastPathComponent] forKey:PCProjectName]; + [dict setObject:[project principalClass] forKey:PCProjType]; + + // Save the project to disc + [dict writeToFile:[path stringByAppendingPathComponent:@"PC.project"] atomically:YES]; + + // Copy the project files to the provided path + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"postamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.postamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"preamble"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.preamble"] handler:nil]; + + _file = [[NSBundle bundleForClass:[self class]] pathForResource:@"main" ofType:@"m"]; + [fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"main.m"] handler:nil]; + + // Resources + _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"]; + [fm createDirectoryAtPath:_resourcePath attributes:nil]; + [fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Images"] attributes:nil]; + [fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"] attributes:nil]; + + // The path cannot be in the PC.project file! + [project setProjectPath:path]; + + // Set the new dictionary - this causes the GNUmakefile to be written + if(![project assignProjectDict:dict]) { + NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path); + return nil; + } + } + return project; +} + +- (PCProject *)openProjectAt:(NSString *)path +{ + NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; + id obj; + + NSLog(@"<%@ %x>: opening project at %@",[self class],self,path); + + obj = [dict objectForKey:PCProjectBuilderClass]; + if ([obj isEqualToString:@"PCToolProj"]) { + return [[[PCToolProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease]; + } + return nil; +} + +@end diff --git a/PCToolProj/PCToolProject.h b/PCToolProj/PCToolProject.h new file mode 100644 index 0000000..9f304ac --- /dev/null +++ b/PCToolProj/PCToolProject.h @@ -0,0 +1,67 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +/* + Description: + + This is the project type 'Tool' for GNUstep. You never should create + it yourself but use PCToolProj for doing this. Otherwise needed files don't + get copied to the right place. + + */ + +#import +#import + +@interface PCToolProject : PCProject +{ + @private + BOOL _needsAdditionalReleasing; +} + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init; +- (void)dealloc; + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile; + +- (BOOL)isValidDictionary:(NSDictionary *)aDict; + +- (NSArray *)sourceFileKeys; +- (NSArray *)resourceFileKeys; +- (NSArray *)otherKeys; +- (NSArray *)buildTargets; +- (NSString *)projectDescription; + +@end + diff --git a/PCToolProj/PCToolProject.m b/PCToolProj/PCToolProject.m new file mode 100644 index 0000000..d14cda5 --- /dev/null +++ b/PCToolProj/PCToolProject.m @@ -0,0 +1,179 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCToolProject.h" +#import "PCToolMakefileFactory.h" + +#import + +#if defined(GNUSTEP) +#import +#endif + +@interface PCToolProject (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCToolProject (CreateUI) + +- (void)_initUI +{ + // Always call super!!! + [super _initUI]; + + projectAttributeInspectorView = [[NSBox alloc] init]; + [projectAttributeInspectorView setTitlePosition:NSAtTop]; + [projectAttributeInspectorView setBorderType:NSGrooveBorder]; + // [projectAttributeInspectorView addSubview:projectTypePopup]; + [projectAttributeInspectorView sizeToFit]; + [projectAttributeInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectProjectInspectorView = [[NSBox alloc] init]; + [projectProjectInspectorView setTitlePosition:NSAtTop]; + [projectProjectInspectorView setBorderType:NSGrooveBorder]; + // [projectProjectInspectorView addSubview:projectTypePopup]; + [projectProjectInspectorView sizeToFit]; + [projectProjectInspectorView setAutoresizingMask:NSViewWidthSizable]; + + projectFileInspectorView = [[NSBox alloc] init]; + [projectFileInspectorView setTitlePosition:NSAtTop]; + [projectFileInspectorView setBorderType:NSGrooveBorder]; + // [projectFileInspectorView addSubview:projectTypePopup]; + [projectFileInspectorView sizeToFit]; + [projectFileInspectorView setAutoresizingMask:NSViewWidthSizable]; + + _needsAdditionalReleasing = YES; +} + +@end + +@implementation PCToolProject + +//---------------------------------------------------------------------------- +// Init and free +//---------------------------------------------------------------------------- + +- (id)init +{ + if ((self = [super init])) { + rootCategories = [[NSDictionary dictionaryWithObjectsAndKeys: + PCImages,@"Images", + PCOtherResources,@"Other Resources", + PCSubprojects,@"Subprojects", + PCLibraries,@"Libraries", + PCDocuFiles,@"Documentation", + PCOtherSources,@"Other Sources", + PCHeaders,@"Headers", + PCClasses,@"Classes", + nil] retain]; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"ToolProject.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load ToolProject.gmodel" userInfo:nil] raise]; + return nil; + } +#endif + } + return self; +} + +- (void)dealloc +{ + [rootCategories release]; + + if (_needsAdditionalReleasing) { + [projectAttributeInspectorView release]; + [projectProjectInspectorView release]; + [projectFileInspectorView release]; + } + + [super dealloc]; +} + +//---------------------------------------------------------------------------- +// Project +//---------------------------------------------------------------------------- + +- (BOOL)writeMakefile +{ + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *makefile = [projectPath stringByAppendingPathComponent:@"GNUmakefile"]; + NSData *content; + + if (![super writeMakefile]) { + NSLog(@"<%@ %x>: Couldn't update PC.project...",[self class],self); + } + + if (![fm movePath:makefile toPath:[projectPath stringByAppendingPathComponent:@"GNUmakefile~"] handler:nil]) { + NSLog(@"Couldn't write a backup GNUmakefile..."); + } + + if (!(content = [[PCToolMakefileFactory sharedFactory] makefileForProject:self])) { + NSLog([NSString stringWithFormat:@"Couldn't build the GNUmakefile %@!",makefile]); + return NO; + } + if (![content writeToFile:makefile atomically:YES]) { + NSLog([NSString stringWithFormat:@"Couldn't write the GNUmakefile %@!",makefile]); + return NO; + } + return YES; +} + +- (BOOL)isValidDictionary:(NSDictionary *)aDict +{ +#warning No project check implemented, yet! + return YES; +} + +- (NSArray *)sourceFileKeys +{ + return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil]; +} + +- (NSArray *)resourceFileKeys +{ + return [NSArray arrayWithObjects:PCOtherResources,PCImages,nil]; +} + +- (NSArray *)otherKeys +{ + return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil]; +} + +- (NSArray *)buildTargets +{ +} + +- (NSString *)projectDescription +{ + return @"Project that handles GNUstep/ObjC based tools."; +} + +@end diff --git a/PCToolProj/h.template b/PCToolProj/h.template new file mode 100644 index 0000000..7b523c7 --- /dev/null +++ b/PCToolProj/h.template @@ -0,0 +1,11 @@ +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/PCToolProj/m.template b/PCToolProj/m.template new file mode 100644 index 0000000..1216fe5 --- /dev/null +++ b/PCToolProj/m.template @@ -0,0 +1,18 @@ +$$ Lines starting with $$ are not inserted into newly created files +$$ The following substitutions are made: +$$ +$$ $FILENAME$ e.g. foo.m +$$ $FILENAMESANSEXTENSION$ e.g. foo +$$ $DIRECTORY$ e.g. /tmp/MyNewApp +$$ $PROJECTNAME$ e.g. MyNewApp +$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj +$$ $USERNAME$ e.g. mwagner +$$ $DATE$ e.g. Jan-1-1994 +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/PCToolProj/main.m b/PCToolProj/main.m new file mode 100644 index 0000000..17e0a17 --- /dev/null +++ b/PCToolProj/main.m @@ -0,0 +1,13 @@ +#import + +int main(int argc, const char *argv[]) { + id pool = [[NSAutoreleasePool alloc] init]; + + // Your code here... + + // The end... + [pool release]; + + exit(0); + return 0; +} diff --git a/ProjectCenter/English.lproj/ProjectCenter.gmodel b/ProjectCenter/English.lproj/ProjectCenter.gmodel new file mode 100755 index 0000000..17573e3 --- /dev/null +++ b/ProjectCenter/English.lproj/ProjectCenter.gmodel @@ -0,0 +1,1734 @@ +{ + "Object 1" = { + elements = ( + "Object 2", + "Object 114", + "Object 115", + "Object 116", + "Object 117", + "Object 118", + "Object 119", + "Object 120", + "Object 121", + "Object 122" + ); + isa = NSMutableArray; + }; + "Object 2" = {className = NSApplication; isa = IMCustomObject; realObject = "Object 3"; }; + "Object 3" = { + delegate = nil; + isa = NSApplication; + keyWindow = nil; + mainMenu = "Object 11"; + mainWindow = nil; + windows = "Object 4"; + }; + "Object 4" = {elements = ("Object 5", "Object 9"); isa = NSMutableArray; }; + "Object 5" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 256; height = 128}"; + contentView = "Object 6"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 6" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 256; height = 128}"; + frame = "{x = 0; y = 0; width = 256; height = 128}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 5"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 7" = {elements = (); isa = NSMutableArray; }; + "Object 8" = { + alpha = 1.000000; + blue = 0.666667; + brightness = 0.666667; + colorSpaceName = NSCalibratedRGBColorSpace; + green = 0.666667; + hue = 0.000000; + isa = NSColor; + red = 0.666667; + saturation = 0.000000; + }; + "Object 9" = { + backgroundColor = "Object 8"; + backingType = 0; + contentFrame = "{x = 0; y = 0; width = 193; height = 208}"; + contentView = "Object 10"; + frameAutosaveName = nil; + hidesOnDeactivate = NO; + initialFirstResponder = nil; + isAutodisplay = NO; + isReleasedWhenClosed = NO; + isVisible = NO; + isa = NSWindow; + level = 0; + maxSize = "{width = 3.40282e+38; height = 3.40282e+38}"; + minSize = "{width = 0; height = 0}"; + representedFilename = ""; + styleMask = 0; + title = ""; + }; + "Object 10" = { + autoresizesSubviews = YES; + autoresizingMask = 0; + bounds = "{x = 0; y = 0; width = 193; height = 208}"; + frame = "{x = 0; y = 0; width = 193; height = 208}"; + interfaceStyle = 0; + isa = NSView; + nextKeyView = nil; + nextResponder = "Object 9"; + postsBoundsChangedNotifications = YES; + postsFrameChangedNotifications = YES; + previousKeyView = nil; + subviews = "Object 7"; + superview = nil; + }; + "Object 11" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 12"; + title = ProjectCenter; + }; + "Object 12" = { + elements = ( + "Object 13", + "Object 20", + "Object 36", + "Object 46", + "Object 53", + "Object 98", + "Object 104", + "Object 110", + "Object 112", + "Object 113" + ); + isa = NSMutableArray; + }; + "Object 13" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 15"; + title = Info; + }; + "Object 14" = {isa = NSImage; name = NSMenuArrow; size = "{width = 7; height = 9}"; }; + "Object 15" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 16"; + title = Info; + }; + "Object 16" = { + elements = ("Object 17", "Object 18", "Object 19"); + isa = NSMutableArray; + }; + "Object 17" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Info Panel..."; + }; + "Object 18" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Preferences...; + }; + "Object 19" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = "?"; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Help...; + }; + "Object 20" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 21"; + title = Project; + }; + "Object 21" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 22"; + title = Project; + }; + "Object 22" = { + elements = ( + "Object 23", + "Object 24", + "Object 25", + "Object 26", + "Object 27", + "Object 28", + "Object 29", + "Object 30" + ); + isa = NSMutableArray; + }; + "Object 23" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = o; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Open...; + }; + "Object 24" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = n; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = New; + }; + "Object 25" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = s; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Save; + }; + "Object 26" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = S; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Save As..."; + }; + "Object 27" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Save All"; + }; + "Object 28" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Revert to Saved"; + }; + "Object 29" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Close; + }; + "Object 30" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 31"; + title = Subproject; + }; + "Object 31" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 32"; + title = Subproject; + }; + "Object 32" = { + elements = ("Object 33", "Object 34", "Object 35"); + isa = NSMutableArray; + }; + "Object 33" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Add; + }; + "Object 34" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = New; + }; + "Object 35" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Remove; + }; + "Object 36" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 37"; + title = File; + }; + "Object 37" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 38"; + title = File; + }; + "Object 38" = { + elements = ( + "Object 39", + "Object 40", + "Object 41", + "Object 42", + "Object 43", + "Object 44", + "Object 45" + ); + isa = NSMutableArray; + }; + "Object 39" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = O; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Open; + }; + "Object 40" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = A; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Add File"; + }; + "Object 41" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = N; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "New in Project"; + }; + "Object 42" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Remove File"; + }; + "Object 43" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Save; + }; + "Object 44" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Save As..."; + }; + "Object 45" = { + action = nil; + image = nil; + isEnabled = NO; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Revert to Saved"; + }; + "Object 46" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 47"; + title = Edit; + }; + "Object 47" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 48"; + title = Edit; + }; + "Object 48" = { + elements = ("Object 49", "Object 50", "Object 51", "Object 52"); + isa = NSMutableArray; + }; + "Object 49" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = x; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Cut; + }; + "Object 50" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = c; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Copy; + }; + "Object 51" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = v; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Paste; + }; + "Object 52" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = a; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Select All"; + }; + "Object 53" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 54"; + title = Format; + }; + "Object 54" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 55"; + title = Format; + }; + "Object 55" = { + elements = ("Object 56", "Object 87", "Object 97"); + isa = NSMutableArray; + }; + "Object 56" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 57"; + title = Font; + }; + "Object 57" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 58"; + title = Font; + }; + "Object 58" = { + elements = ( + "Object 59", + "Object 60", + "Object 61", + "Object 62", + "Object 63", + "Object 70", + "Object 76", + "Object 84", + "Object 85", + "Object 86" + ); + isa = NSMutableArray; + }; + "Object 59" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = t; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Font Panel..."; + }; + "Object 60" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = b; + representedObject = nil; + state = 0; + tag = 2; + target = nil; + title = Bold; + }; + "Object 61" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = i; + representedObject = nil; + state = 0; + tag = 1; + target = nil; + title = Italic; + }; + "Object 62" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Underline; + }; + "Object 63" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 64"; + title = Kern; + }; + "Object 64" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 65"; + title = Kern; + }; + "Object 65" = { + elements = ("Object 66", "Object 67", "Object 68", "Object 69"); + isa = NSMutableArray; + }; + "Object 66" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use Default"; + }; + "Object 67" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use None"; + }; + "Object 68" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Tighten; + }; + "Object 69" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Loosen; + }; + "Object 70" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 71"; + title = Ligature; + }; + "Object 71" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 72"; + title = Ligature; + }; + "Object 72" = { + elements = ("Object 73", "Object 74", "Object 75"); + isa = NSMutableArray; + }; + "Object 73" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use Default"; + }; + "Object 74" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use None"; + }; + "Object 75" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use All"; + }; + "Object 76" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 77"; + title = Baseline; + }; + "Object 77" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 78"; + title = Baseline; + }; + "Object 78" = { + elements = ("Object 79", "Object 80", "Object 81", "Object 82", "Object 83"); + isa = NSMutableArray; + }; + "Object 79" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Use Default"; + }; + "Object 80" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Superscript; + }; + "Object 81" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Subscript; + }; + "Object 82" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Raise; + }; + "Object 83" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Lower; + }; + "Object 84" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Colors...; + }; + "Object 85" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = 3; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Copy Font"; + }; + "Object 86" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = 4; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Paste Font"; + }; + "Object 87" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 88"; + title = Text; + }; + "Object 88" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 89"; + title = Text; + }; + "Object 89" = { + elements = ( + "Object 90", + "Object 91", + "Object 92", + "Object 93", + "Object 94", + "Object 95", + "Object 96" + ); + isa = NSMutableArray; + }; + "Object 90" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Align Left"; + }; + "Object 91" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Center; + }; + "Object 92" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Justify; + }; + "Object 93" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Align Right"; + }; + "Object 94" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Show Ruler"; + }; + "Object 95" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = 1; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Copy Ruler"; + }; + "Object 96" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = 2; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Paste Ruler"; + }; + "Object 97" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = P; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Page Layout..."; + }; + "Object 98" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 99"; + title = Tools; + }; + "Object 99" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 100"; + title = Tools; + }; + "Object 100" = { + elements=("Object 101", "Object 102", "Object 103"); + isa = NSMutableArray; + }; + "Object 101" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Inspector...; + }; + "Object 102" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Loaded Projects..."; + }; + "Object 103" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = f; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Find Panel"; + }; + "Object 104" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 105"; + title = Windows; + }; + "Object 105" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 106"; + title = Windows; + }; + "Object 106" = { + elements = ("Object 107", "Object 108", "Object 109"); + isa = NSMutableArray; + }; + "Object 107" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Arrange in Front"; + }; + "Object 108" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = m; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Miniaturize Window"; + }; + "Object 109" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = w; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = "Close Window"; + }; + "Object 110" = { + action = "submenuAction:"; + image = "Object 14"; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = ""; + representedObject = nil; + state = 0; + tag = 0; + target = "Object 111"; + title = Services; + }; + "Object 111" = { + autoenablesItems = YES; + isa = NSMenu; + itemArray = "Object 7"; + title = Services; + }; + "Object 112" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = h; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Hide; + }; + "Object 113" = { + action = nil; + image = nil; + isEnabled = YES; + isa = NSMenuItem; + keyEquivalent = q; + representedObject = nil; + state = 0; + tag = 0; + target = nil; + title = Quit; + }; + "Object 114" = {className = PCInfoController; isa = IMCustomObject; }; + "Object 115" = {className = PCFindController; isa = IMCustomObject; }; + "Object 116" = {className = NSFontManager; isa = IMCustomObject; }; + "Object 117" = {className = PCLogController; isa = IMCustomObject; }; + "Object 118" = {className = PCPrefController; isa = IMCustomObject; }; + "Object 119" = {className = PCProjectManager; isa = IMCustomObject; }; + "Object 120" = {className = PCAppController; isa = IMCustomObject; }; + "Object 121" = {className = PCMenuController; isa = IMCustomObject; }; + "Object 122" = {className = PCFileManager; isa = IMCustomObject; }; + "Object 123" = { + elements = ( + "Object 124", + "Object 126", + "Object 128", + "Object 130", + "Object 132", + "Object 134", + "Object 136", + "Object 138", + "Object 140", + "Object 142", + "Object 144", + "Object 146", + "Object 148", + "Object 150", + "Object 152", + "Object 154", + "Object 156", + "Object 158", + "Object 160", + "Object 162", + "Object 164", + "Object 166", + "Object 168", + "Object 170", + "Object 172", + "Object 173", + "Object 175", + "Object 177", + "Object 179", + "Object 181", + "Object 183", + "Object 185", + "Object 187", + "Object 189", + "Object 191", + "Object 193", + "Object 195", + "Object 197", + "Object 199", + "Object 201", + "Object 203", + "Object 205", + "Object 207", + "Object 209", + "Object 210", + "Object 212", + "Object 214", + "Object 215", + "Object 216", + "Object 218", + "Object 219", + "Object 221", + "Object 223", + "Object 225", + "Object 227", + "Object 229", + "Object 231", + "Object 233", + "Object 235", + "Object 236", + "Object 238", + "Object 240", + "Object 242", + "Object 244", + "Object 246", + "Object 248", + "Object 249", + "Object 251" + ); + isa = NSMutableArray; + }; + "Object 124" = { + destination = nil; + isa = IMControlConnector; + label = "Object 125"; + source = "Object 49"; + }; + "Object 125" = {isa = NSString; string = "cut:"; }; + "Object 126" = { + destination = nil; + isa = IMControlConnector; + label = "Object 127"; + source = "Object 50"; + }; + "Object 127" = {isa = NSString; string = "copy:"; }; + "Object 128" = { + destination = nil; + isa = IMControlConnector; + label = "Object 129"; + source = "Object 51"; + }; + "Object 129" = {isa = NSString; string = "paste:"; }; + "Object 130" = { + destination = nil; + isa = IMControlConnector; + label = "Object 131"; + source = "Object 52"; + }; + "Object 131" = {isa = NSString; string = "selectAll:"; }; + "Object 132" = { + destination = "Object 2"; + isa = IMControlConnector; + label = "Object 133"; + source = "Object 113"; + }; + "Object 133" = {isa = NSString; string = "terminate:"; }; + "Object 134" = { + destination = "Object 2"; + isa = IMControlConnector; + label = "Object 135"; + source = "Object 112"; + }; + "Object 135" = {isa = NSString; string = "hide:"; }; + "Object 136" = { + destination = nil; + isa = IMControlConnector; + label = "Object 137"; + source = "Object 108"; + }; + "Object 137" = {isa = NSString; string = "performMiniaturize:"; }; + "Object 138" = { + destination = nil; + isa = IMControlConnector; + label = "Object 139"; + source = "Object 109"; + }; + "Object 139" = {isa = NSString; string = "performClose:"; }; + "Object 140" = { + destination = nil; + isa = IMControlConnector; + label = "Object 141"; + source = "Object 107"; + }; + "Object 141" = {isa = NSString; string = "arrangeInFront:"; }; + "Object 142" = { + destination = "Object 120"; + isa = IMOutletConnector; + label = "Object 143"; + source = "Object 2"; + }; + "Object 143" = {isa = NSString; string = delegate; }; + "Object 144" = { + destination = nil; + isa = IMControlConnector; + label = "Object 145"; + source = "Object 84"; + }; + "Object 145" = {isa = NSString; string = "orderFrontColorPanel:"; }; + "Object 146" = { + destination = nil; + isa = IMControlConnector; + label = "Object 147"; + source = "Object 79"; + }; + "Object 147" = {isa = NSString; string = "unscript:"; }; + "Object 148" = { + destination = nil; + isa = IMControlConnector; + label = "Object 149"; + source = "Object 80"; + }; + "Object 149" = {isa = NSString; string = "superscript:"; }; + "Object 150" = { + destination = nil; + isa = IMControlConnector; + label = "Object 151"; + source = "Object 81"; + }; + "Object 151" = {isa = NSString; string = "subscript:"; }; + "Object 152" = { + destination = nil; + isa = IMControlConnector; + label = "Object 153"; + source = "Object 82"; + }; + "Object 153" = {isa = NSString; string = "raiseBaseline:"; }; + "Object 154" = { + destination = nil; + isa = IMControlConnector; + label = "Object 155"; + source = "Object 83"; + }; + "Object 155" = {isa = NSString; string = "lowerBaseline:"; }; + "Object 156" = { + destination = nil; + isa = IMControlConnector; + label = "Object 157"; + source = "Object 75"; + }; + "Object 157" = {isa = NSString; string = "useAllLigatures:"; }; + "Object 158" = { + destination = nil; + isa = IMControlConnector; + label = "Object 159"; + source = "Object 74"; + }; + "Object 159" = {isa = NSString; string = "turnOffLigatures:"; }; + "Object 160" = { + destination = nil; + isa = IMControlConnector; + label = "Object 161"; + source = "Object 73"; + }; + "Object 161" = {isa = NSString; string = "useStandardLigatures:"; }; + "Object 162" = { + destination = nil; + isa = IMControlConnector; + label = "Object 163"; + source = "Object 66"; + }; + "Object 163" = {isa = NSString; string = "useStandardKerning:"; }; + "Object 164" = { + destination = nil; + isa = IMControlConnector; + label = "Object 165"; + source = "Object 67"; + }; + "Object 165" = {isa = NSString; string = "turnOffKerning:"; }; + "Object 166" = { + destination = nil; + isa = IMControlConnector; + label = "Object 167"; + source = "Object 68"; + }; + "Object 167" = {isa = NSString; string = "tightenKerning:"; }; + "Object 168" = { + destination = nil; + isa = IMControlConnector; + label = "Object 169"; + source = "Object 69"; + }; + "Object 169" = {isa = NSString; string = "loosenKerning:"; }; + "Object 170" = { + destination = "Object 116"; + isa = IMControlConnector; + label = "Object 171"; + source = "Object 61"; + }; + "Object 171" = {isa = NSString; string = "addFontTrait:"; }; + "Object 172" = { + destination = "Object 116"; + isa = IMControlConnector; + label = "Object 171"; + source = "Object 60"; + }; + "Object 173" = { + destination = nil; + isa = IMControlConnector; + label = "Object 174"; + source = "Object 62"; + }; + "Object 174" = {isa = NSString; string = "underline:"; }; + "Object 175" = { + destination = nil; + isa = IMControlConnector; + label = "Object 176"; + source = "Object 86"; + }; + "Object 176" = {isa = NSString; string = "pasteFont:"; }; + "Object 177" = { + destination = nil; + isa = IMControlConnector; + label = "Object 178"; + source = "Object 85"; + }; + "Object 178" = {isa = NSString; string = "copyFont:"; }; + "Object 179" = { + destination = "Object 116"; + isa = IMControlConnector; + label = "Object 180"; + source = "Object 59"; + }; + "Object 180" = {isa = NSString; string = "orderFrontFontPanel:"; }; + "Object 181" = { + destination = nil; + isa = IMControlConnector; + label = "Object 182"; + source = "Object 97"; + }; + "Object 182" = {isa = NSString; string = "runPageLayout:"; }; + "Object 183" = { + destination = nil; + isa = IMControlConnector; + label = "Object 184"; + source = "Object 94"; + }; + "Object 184" = {isa = NSString; string = "toggleRuler:"; }; + "Object 185" = { + destination = nil; + isa = IMControlConnector; + label = "Object 186"; + source = "Object 96"; + }; + "Object 186" = {isa = NSString; string = "pasteRuler:"; }; + "Object 187" = { + destination = nil; + isa = IMControlConnector; + label = "Object 188"; + source = "Object 95"; + }; + "Object 188" = {isa = NSString; string = "copyRuler:"; }; + "Object 189" = { + destination = nil; + isa = IMControlConnector; + label = "Object 190"; + source = "Object 93"; + }; + "Object 190" = {isa = NSString; string = "alignRight:"; }; + "Object 191" = { + destination = nil; + isa = IMControlConnector; + label = "Object 192"; + source = "Object 91"; + }; + "Object 192" = {isa = NSString; string = "alignCenter:"; }; + "Object 193" = { + destination = nil; + isa = IMControlConnector; + label = "Object 194"; + source = "Object 90"; + }; + "Object 194" = {isa = NSString; string = "alignLeft:"; }; + "Object 195" = { + destination = nil; + isa = IMControlConnector; + label = "Object 196"; + source = "Object 92"; + }; + "Object 196" = {isa = NSString; string = "alignJustified:"; }; + "Object 197" = { + destination = "Object 118"; + isa = IMOutletConnector; + label = "Object 198"; + source = "Object 120"; + }; + "Object 198" = {isa = NSString; string = prefController; }; + "Object 199" = { + destination = "Object 115"; + isa = IMOutletConnector; + label = "Object 200"; + source = "Object 120"; + }; + "Object 200" = {isa = NSString; string = finder; }; + "Object 201" = { + destination = "Object 114"; + isa = IMOutletConnector; + label = "Object 202"; + source = "Object 120"; + }; + "Object 202" = {isa = NSString; string = infoController; }; + "Object 203" = { + destination = "Object 117"; + isa = IMOutletConnector; + label = "Object 204"; + source = "Object 120"; + }; + "Object 204" = {isa = NSString; string = logger; }; + "Object 205" = { + destination = "Object 114"; + isa = IMControlConnector; + label = "Object 206"; + source = "Object 17"; + }; + "Object 206" = {isa = NSString; string = "showInfoWindow:"; }; + "Object 207" = { + destination = "Object 118"; + isa = IMControlConnector; + label = "Object 208"; + source = "Object 18"; + }; + "Object 208" = {isa = NSString; string = "showPrefWindow:"; }; + "Object 209" = { + destination = "Object 120"; + isa = IMOutletConnector; + label = "Object 143"; + source = "Object 119"; + }; + "Object 210" = { + destination = "Object 119"; + isa = IMOutletConnector; + label = "Object 211"; + source = "Object 120"; + }; + "Object 211" = {isa = NSString; string = projectManager; }; + "Object 212" = { + destination = "Object 122"; + isa = IMOutletConnector; + label = "Object 213"; + source = "Object 119"; + }; + "Object 213" = {isa = NSString; string = fileManager; }; + "Object 214" = { + destination = "Object 119"; + isa = IMOutletConnector; + label = "Object 143"; + source = "Object 122"; + }; + "Object 215" = { + destination = "Object 122"; + isa = IMOutletConnector; + label = "Object 213"; + source = "Object 120"; + }; + "Object 216" = { + destination = "Object 121"; + isa = IMOutletConnector; + label = "Object 217"; + source = "Object 120"; + }; + "Object 217" = {isa = NSString; string = menuController; }; + "Object 218" = { + destination = "Object 119"; + isa = IMOutletConnector; + label = "Object 211"; + source = "Object 121"; + }; + "Object 219" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 220"; + source = "Object 23"; + }; + "Object 220" = {isa = NSString; string = "openProject:"; }; + "Object 221" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 222"; + source = "Object 24"; + }; + "Object 222" = {isa = NSString; string = "newProject:"; }; + "Object 223" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 224"; + source = "Object 25"; + }; + "Object 224" = {isa = NSString; string = "saveProject:"; }; + "Object 225" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 226"; + source = "Object 26"; + }; + "Object 226" = {isa = NSString; string = "saveProjectAs:"; }; + "Object 227" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 228"; + source = "Object 28"; + }; + "Object 228" = {isa = NSString; string = "revertToSaved:"; }; + "Object 229" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 230"; + source = "Object 29"; + }; + "Object 230" = {isa = NSString; string = "closeProject:"; }; + "Object 231" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 232"; + source = "Object 33"; + }; + "Object 232" = {isa = NSString; string = "addSubproject:"; }; + "Object 233" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 234"; + source = "Object 34"; + }; + "Object 234" = {isa = NSString; string = "newSubproject:"; }; + "Object 235" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 234"; + source = "Object 35"; + }; + "Object 236" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 237"; + source = "Object 39"; + }; + "Object 237" = {isa = NSString; string = "openFile:"; }; + "Object 238" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 239"; + source = "Object 40"; + }; + "Object 239" = {isa = NSString; string = "addFile:"; }; + "Object 240" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 241"; + source = "Object 42"; + }; + "Object 241" = {isa = NSString; string = "removeFile:"; }; + "Object 242" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 243"; + source = "Object 43"; + }; + "Object 243" = {isa = NSString; string = "saveFile:"; }; + "Object 244" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 245"; + source = "Object 44"; + }; + "Object 245" = {isa = NSString; string = "saveFileAs:"; }; + "Object 246" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 247"; + source = "Object 45"; + }; + "Object 247" = {isa = NSString; string = "revertFile:"; }; + "Object 248" = { + destination = "Object 122"; + isa = IMOutletConnector; + label = "Object 213"; + source = "Object 121"; + }; + "Object 249" = { + destination = "Object 121"; + isa = IMControlConnector; + label = "Object 250"; + source = "Object 41"; + }; + "Object 250" = {isa = NSString; string = "newFile:"; }; + "Object 251" = { + destination = "Object 120"; + isa = IMOutletConnector; + label = "Object 252"; + source = "Object 121"; + }; + "Object 252" = {isa = NSString; string = appController; }; + RootObject = {Connections = "Object 123"; Objects = "Object 1"; isa = GMModel; }; + TopLevelObjects = (RootObject); + Version = 1; +} + + + diff --git a/ProjectCenter/FileIcon_.c.tiff b/ProjectCenter/FileIcon_.c.tiff new file mode 100644 index 0000000..296c425 Binary files /dev/null and b/ProjectCenter/FileIcon_.c.tiff differ diff --git a/ProjectCenter/FileIcon_.h.tiff b/ProjectCenter/FileIcon_.h.tiff new file mode 100644 index 0000000..0f920b1 Binary files /dev/null and b/ProjectCenter/FileIcon_.h.tiff differ diff --git a/ProjectCenter/FileIcon_.m.tiff b/ProjectCenter/FileIcon_.m.tiff new file mode 100644 index 0000000..1e79538 Binary files /dev/null and b/ProjectCenter/FileIcon_.m.tiff differ diff --git a/ProjectCenter/FileIcon_rtf.tiff b/ProjectCenter/FileIcon_rtf.tiff new file mode 100644 index 0000000..8176b03 Binary files /dev/null and b/ProjectCenter/FileIcon_rtf.tiff differ diff --git a/ProjectCenter/GNUmakefile b/ProjectCenter/GNUmakefile new file mode 100644 index 0000000..36fe6b4 --- /dev/null +++ b/ProjectCenter/GNUmakefile @@ -0,0 +1,85 @@ +# +# GNUmakefile - Generated by the ProjectCenter +# Written by Philippe C.D. Robert +# +# NOTE: Do NOT change this file -- ProjectCenter maintains it! +# +# Put all of your customisations in GNUmakefile.preamble and +# GNUmakefile.postamble +# + +include $(GNUSTEP_MAKEFILES)/common.make +# +# Subprojects +# + +# +# Main application +# + +APP_NAME=ProjectCenter + +ProjectCenter_LDFLAGS = -lPC +ProjectCenter_MAIN_MODEL_FILE = ProjectCenter.gmodel +ProjectCenter_APPLICATION_ICON = ProjectCenter.tiff + +ProjectCenter_RESOURCE_FILES= \ + English.lproj/ProjectCenter.gmodel \ + ProjectCenter.tiff \ + ProjectCenter.app.tiff \ + ProjectCentre_add.tiff \ + ProjectCentre_build.tiff \ + ProjectCentre_clean.tiff \ + ProjectCentre_cvs.tiff \ + ProjectCentre_documentation.tiff \ + ProjectCentre_files.tiff \ + ProjectCentre_find.tiff \ + ProjectCentre_prefs.tiff \ + ProjectCentre_run.tiff \ + ProjectCentre_uml.tiff \ + FileIcon_.c.tiff \ + FileIcon_.h.tiff \ + FileIcon_.m.tiff \ + FileIcon_rtf.tiff \ + Info-project.plist + +# Header files +# + +ProjectCenter_HEADERS= \ + PCAppController.h \ + PCFindController.h \ + PCInfoController.h \ + PCLogController.h \ + PCMenuController.h \ + PCPrefController.h + +# +# Class files +# + +ProjectCenter_OBJC_FILES= \ + PCAppController.m \ + PCFindController.m \ + PCInfoController.m \ + PCLogController.m \ + PCMenuController.m \ + PCPrefController.m \ + ProjectCenter_main.m + +# +# C files +# + +ProjectCenter_C_FILES= + +-include GNUmakefile.preamble +-include GNUmakefile.local +include $(GNUSTEP_MAKEFILES)/application.make +-include GNUmakefile.postamble + + + + + + diff --git a/ProjectCenter/GNUmakefile.postamble b/ProjectCenter/GNUmakefile.postamble new file mode 100644 index 0000000..a205b9c --- /dev/null +++ b/ProjectCenter/GNUmakefile.postamble @@ -0,0 +1,26 @@ +# +# Makefile.postamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/ProjectCenter/GNUmakefile.preamble b/ProjectCenter/GNUmakefile.preamble new file mode 100644 index 0000000..4126b8a --- /dev/null +++ b/ProjectCenter/GNUmakefile.preamble @@ -0,0 +1,73 @@ +# +# Makefile.preamble +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Original Author: Scott Christley +# +# This file is part of the GNUstep ProjectCenter. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# If you are interested in a warranty or support for this source code, +# contact Scott Christley at scottc@net-community.com +# +# You should have received a copy of the GNU Library General Public +# License along with this library; see the file COPYING.LIB. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# Makefile.preamble +# +# Project specific makefile variables, and additional +# +# Do not put any Makefile rules in this file, instead they should +# be put into Makefile.postamble. +# + +# +# Flags dealing with compiling and linking +# + +# Additional flags to pass to the preprocessor +ADDITIONAL_CPPFLAGS += + +# Additional flags to pass to the Objective-C compiler +ADDITIONAL_OBJCFLAGS += + +# Additional flags to pass to the C compiler +ADDITIONAL_CFLAGS += +#ADDITIONAL_CFLAGS += + +# Additional include directories the compiler should search +ADDITIONAL_INCLUDE_DIRS += + +# Additional LDFLAGS to pass to the linker +ADDITIONAL_LDFLAGS += -lPC + +# Additional library directories the linker should search +ADDITIONAL_LIB_DIRS += + +ADDITIONAL_TOOL_LIBS += + +# +# Flags dealing with installing and uninstalling +# + +# Additional directories to be created during installation +ADDITIONAL_INSTALL_DIRS += + +# +# Local configuration +# + + diff --git a/ProjectCenter/Info-project.plist b/ProjectCenter/Info-project.plist new file mode 100755 index 0000000..752e4b5 --- /dev/null +++ b/ProjectCenter/Info-project.plist @@ -0,0 +1,12 @@ +{ + NOTE = "Automatically generated, do not edit!"; + ApplicationName = "ProjectCenter"; + ApplicationDescription = "GNUstep IDE"; + ApplicationIcon = "ProjectCenter.tiff"; + ApplicationRelease = "ProjectCenter 0.1"; + FullVersionID = "0.1 pre pre pre pre epsilon"; + Authors = ("Philippe C.D. Robert "); + URL = "http://www.projectcenter.ch"; + Copyright = "Copyright (C) 2000 Philippe C.D. Robert"; + CopyrightDescription = "Released under the GNU General Public License 2.0"; +} diff --git a/ProjectCenter/Makefile b/ProjectCenter/Makefile new file mode 100755 index 0000000..a3d8274 --- /dev/null +++ b/ProjectCenter/Makefile @@ -0,0 +1,67 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = ProjectCenter + +PROJECTVERSION = 2.6 +PROJECT_TYPE = Application +LANGUAGE = English + +NEXTSTEP_APPICON = ProjectCenter.app.tiff +ICONSECTIONS = -sectcreate __ICON app ProjectCenter.app.tiff + +LOCAL_RESOURCES = FileCreation.nib Info.nib Inspector.nib\ + NEXTSTEP_ProjectCenter.nib Preferences.nib Project.nib\ + TypePopup.nib + +GLOBAL_RESOURCES = FileIcon_.c.tiff FileIcon_.h.tiff FileIcon_.m.tiff\ + FileIcon_rtf.tiff ProjectCenter.app.tiff\ + ProjectCenter.tiff ProjectCentre_add.tiff\ + ProjectCentre_build.tiff ProjectCentre_clean.tiff\ + ProjectCentre_cvs.tiff\ + ProjectCentre_documentation.tiff\ + ProjectCentre_files.tiff ProjectCentre_find.tiff\ + ProjectCentre_prefs.tiff ProjectCentre_run.tiff\ + ProjectCentre_uml.tiff + +CLASSES = PCAppController.m PCPrefController.m PCInfoController.m\ + PCFindController.m PCLogController.m PCMenuController.m + +HFILES = PCAppController.h PCPrefController.h PCInfoController.h\ + PCFindController.h PCLogController.h PCMenuController.h + +MFILES = ProjectCenter_main.m + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template + + +MAKEFILEDIR = $(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = app.make +NEXTSTEP_INSTALLDIR = $(HOME)/Apps +WINDOWS_INSTALLDIR = /MyApps +LIBS = -lPCLib +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) + + +HEADER_PATHS = -I/LocalDeveloper/Headers/PCLib +FRAMEWORKS = -framework AppKit -framework Foundation + + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/ProjectCenter/Makefile.postamble b/ProjectCenter/Makefile.postamble new file mode 100755 index 0000000..36381d4 --- /dev/null +++ b/ProjectCenter/Makefile.postamble @@ -0,0 +1,122 @@ +############################################################################### +# NeXT Makefile.postamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project, sub-project, bundle, or +# palette. Each node in the project's tree of sub-projects and bundles +# should have it's own Makefile.preamble and Makefile.postamble. Additional +# rules (e.g., after_install) that are defined by the developer should be +# defined in this file. +# +############################################################################### +# +# Here are the variables exported by the common "app" makefiles that can be +# used in any customizations you make to the template below: +# +# PRODUCT_ROOT - Name of the directory to which resources are copied. +# OFILE_DIR - Directory into which .o object files are generated. +# (Note that this name is calculated based on the target +# architectures specified in Project Builder). +# DERIVED_SRC_DIR - Directory used for all other derived files +# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations +# +# NAME - name of application, bundle, subproject, palette, etc. +# LANGUAGE - langage in which the project is written (default "English") +# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES - non-localized resources of project +# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0) +# ICONSECTIONS - Specifies icon sections when linking executable +# +# CLASSES - Class implementation files in project. +# HFILES - Header files in project. +# MFILES - Other Objective-C source files in project. +# CFILES - Other C source files in project. +# PSWFILES - .psw files in the project +# PSWMFILES - .pswm files in the project +# SUBPROJECTS - Subprojects of this project +# BUNDLES - Bundle subprojects of this project +# OTHERSRCS - Other miscellaneous sources of this project +# OTHERLINKED - Source files not matching a standard source extention +# +# LIBS - Libraries to link with when making app target +# DEBUG_LIBS - Libraries to link with when making debug target +# PROF_LIBS - Libraries to link with when making profile target +# OTHERLINKEDOFILES - Other relocatable files to (always) link in. +# +# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles +# MAKEFILEDIR - Directory in which to find $(MAKEFILE) +# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make) +# INSTALLDIR - Directory app will be installed into by 'install' target +# +############################################################################### + + +# Change defaults assumed by the standard makefiles here. Edit the +# following default values as appropriate. (Note that if no Makefile.postamble +# exists, these values will have defaults set in common.make). + +# Versioning of frameworks, libraries, bundles, and palettes: +#CURRENTLY_ACTIVE_VERSION = YES + # Set to "NO" to produce a compatibility binary +#DEPLOY_WITH_VERSION_NAME = A + # This should be incremented as your API changes. +#COMPATIBILITY_PROJECT_VERSION = 1 + # This should be incremented as your API grows. +#CURRENT_PROJECT_VERSION = 1 + # Defaults to using the "vers_string" hack. + +# Some compiler flags can be easily overridden here, but onlytake effect at +# the top-level: +#OPTIMIZATION_CFLAG = -O +#DEBUG_SYMBOLS_CFLAG = -g +#WARNING_CFLAGS = -Wmost +#DEBUG_BUILD_CFLAGS = -DDEBUG +#PROFILE_BUILD_CFLAGS = -pg -DPROFILE + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO + +# Flags passed to yacc +#YFLAGS = -d + +# Library and Framework projects only: +# 1. If you want something other than the default .dylib name, override it here +#DYLIB_INSTALL_NAME = lib$(NAME).dylib + +# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all. +#DYLIB_INSTALL_DIR = $(INSTALLDIR) + +# Ownership and permissions of files installed by 'install' target +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + +# Options to strip for various project types. Note: -S strips debugging symbols +# (executables can be stripped down further with -x or, if they load no bundles, with no +# options at all). +#APP_STRIP_OPTS = -S +#TOOL_STRIP_OPTS = -S +#LIBRARY_STRIP_OPTS = -S + # for .a archives +#DYNAMIC_STRIP_OPTS = -S + # for bundles and shared libraries + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. "Official" +# user-defined rules are: +# * before_install +# * after_install +# * after_installhdrs +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# +# Note: on MS Windows, executables, have an extension, so rules and dependencies +# for generated tools should use $(EXECUTABLE_EXT) on the end. diff --git a/ProjectCenter/Makefile.preamble b/ProjectCenter/Makefile.preamble new file mode 100755 index 0000000..5c0a25a --- /dev/null +++ b/ProjectCenter/Makefile.preamble @@ -0,0 +1,130 @@ +############################################################################### +# NeXT Makefile.preamble +# Copyright 1996, NeXT Software, Inc. +# +# This Makefile is used for configuring the standard app makefiles associated +# with ProjectBuilder. +# +# Use this template to set attributes for a project. Each node in a project +# tree of sub-projects, tools, etc. should have its own Makefile.preamble and +# Makefile.postamble. +# +############################################################################### +## Configure the flags passed to $(CC) here. These flags will also be +## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and +## -L flags in ProjectBuilder's Build Options inspector if at all possible. +## To change the default flags that get passed to ${CC} +## (e.g. change -O to -O2), see Makefile.postamble. + +# Flags passed to compiler (in addition to -g, -O, etc) +OTHER_CFLAGS = +# Flags passed to ld (in addition to -ObjC, etc.) +OTHER_LDFLAGS = +# Flags passed to libtool when building libraries +OTHER_LIBTOOL_FLAGS = +# For ordering named sections on NEXTSTEP (see ld(1)) +SECTORDER_FLAGS = + +# If you do not want any headers exported before compilations begin, +# uncomment the following line. This can be a big time saver. +#SKIP_EXPORTING_HEADERS = YES + +# Stuff related to exporting headers from this project that isn't already +# handled by PB. +OTHER_PUBLIC_HEADERS = +OTHER_PROJECT_HEADERS = +OTHER_PRIVATE_HEADERS = + +# Set these two macros if you want a precomp to be built as part of +# installation. The cc -precomp will be run in the public header directory +# on the specified public header files with the specified additional flags. +PUBLIC_PRECOMPILED_HEADERS = +PUBLIC_PRECOMPILED_HEADERS_CFLAGS = + +# Set this for library projects if you want to publish header files. If your +# app or tool project exports headers Don't +# include $(DSTROOT); this is added for you automatically. +PUBLIC_HEADER_DIR = +PRIVATE_HEADER_DIR = + +# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR# +# (say, to add a subdirectory like "/sys"), you can use: +PUBLIC_HEADER_DIR_SUFFIX = +PRIVATE_HEADER_DIR_SUFFIX = + +# Set this for dynamic library projects on platforms where code which references +# a dynamic library must link against an import library (i.e., Windows NT) +# Don't include $(DSTROOT); this is added for you automatically. +IMPORT_LIBRARY_DIR = + +# Additional (non-localized) resources for this project, which can be generated +OTHER_RESOURCES = + +# Uncomment this to produce a static archive-style (.a) library +#LIBRARY_STYLE = STATIC + +# Set this to YES if you don't want a final libtool call for a library/framework. +BUILD_OFILES_LIST_ONLY = + +# Additional relocatables to be linked into this project +OTHER_OFILES = +# Additional libraries to link against +OTHER_LIBS = +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +## Configure how things get built here. Additional dependencies, source files, +## derived files, and build order should be specified here. + +# Other dependencies of this project +OTHER_PRODUCT_DEPENDS = +# Built *before* building subprojects/bundles +OTHER_INITIAL_TARGETS = +# Other source files maintained by .pre/postamble +OTHER_SOURCEFILES = +# Additional files to be removed by `make clean' +OTHER_GARBAGE = + +# Targets to build before installation +OTHER_INSTALL_DEPENDS = + +# More obscure flags you might want to set for pswrap, yacc, lex, etc. +PSWFLAGS = +YFLAGS = +LFLAGS = + +## Delete this line if you want fast and loose cleans that will not remove +## things like precomps and user-defined OTHER_GARBAGE in subprojects. +CLEAN_ALL_SUBPROJECTS = YES + +## Add more obscure source files here to cause them to be automatically +## processed by the appropriate tool. Note that these files should also be +## added to "Supporting Files" in ProjectBuilder. The desired .o files that +## result from these files should also be added to OTHER_OFILES above so they +## will be linked in. + +# .msg files that should have msgwrap run on them +MSGFILES = +# .defs files that should have mig run on them +DEFSFILES = +# .mig files (no .defs files) that should have mig run on them +MIGFILES = +# .x files that should have rpcgen run on them +RPCFILES = + +## Add additional Help directories here (add them to the project as "Other +## Resources" in Project Builder) so that they will be compressed into .store +## files and copied into the app wrapper. If the help directories themselves +## need to also be in the app wrapper, then a cp command will need to be added +## in an after_install target. +OTHER_HELP_DIRS = + +# After you have saved your project using the 4.0 PB, you will automatically +# start using the makefiles in /NextDeveloper/Makefiles/project. If you should +# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to +# be /NextDeveloper/Makefiles/app. + +# Don't add more rules here unless you want the first one to be the default +# target for make! Put all your targets in Makefile.postamble. + diff --git a/ProjectCenter/PB.project b/ProjectCenter/PB.project new file mode 100755 index 0000000..53c28b4 --- /dev/null +++ b/ProjectCenter/PB.project @@ -0,0 +1,77 @@ +{ + APPCLASS = NSApplication; + DYNAMIC_CODE_GEN = YES; + FILESTABLE = { + CLASSES = ( + PCAppController.m, + PCPrefController.m, + PCInfoController.m, + PCFindController.m, + PCLogController.m, + PCMenuController.m + ); + FRAMEWORKS = (AppKit.framework, Foundation.framework); + HEADERSEARCH = (/LocalDeveloper/Headers/PCLib); + H_FILES = ( + PCAppController.h, + PCPrefController.h, + PCInfoController.h, + PCFindController.h, + PCLogController.h, + PCMenuController.h + ); + IMAGES = ( + FileIcon_.c.tiff, + FileIcon_.h.tiff, + FileIcon_.m.tiff, + FileIcon_rtf.tiff, + ProjectCenter.app.tiff, + ProjectCenter.tiff, + ProjectCentre_add.tiff, + ProjectCentre_build.tiff, + ProjectCentre_clean.tiff, + ProjectCentre_cvs.tiff, + ProjectCentre_documentation.tiff, + ProjectCentre_files.tiff, + ProjectCentre_find.tiff, + ProjectCentre_prefs.tiff, + ProjectCentre_run.tiff, + ProjectCentre_uml.tiff + ); + INTERFACES = ( + FileCreation.nib, + Info.nib, + Inspector.nib, + NEXTSTEP_ProjectCenter.nib, + Preferences.nib, + Project.nib, + TypePopup.nib + ); + OTHER_LIBS = (PCLib); + OTHER_LINKED = (ProjectCenter_main.m); + OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template); + }; + LANGUAGE = English; + LOCALIZABLE_FILES = { + FileCreation.nib = FileCreation.nib; + Info.nib = Info.nib; + Inspector.nib = Inspector.nib; + NEXTSTEP_ProjectCenter.nib = NEXTSTEP_ProjectCenter.nib; + Preferences.nib = Preferences.nib; + Project.nib = Project.nib; + TypePopup.nib = TypePopup.nib; + }; + MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles"; + NEXTSTEP_APPICON = ProjectCenter.app.tiff; + NEXTSTEP_BUILDTOOL = /bin/gnumake; + NEXTSTEP_DOCUMENTEXTENSIONS = (); + NEXTSTEP_INSTALLDIR = "$(HOME)/Apps"; + NEXTSTEP_MAINNIB = NEXTSTEP_ProjectCenter.nib; + PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make; + PROJECTNAME = ProjectCenter; + PROJECTTYPE = Application; + PROJECTVERSION = 2.6; + WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make; + WINDOWS_INSTALLDIR = /MyApps; + WINDOWS_MAINNIB = WINDOWS_ProjectCenter.nib; +} diff --git a/ProjectCenter/PC.project b/ProjectCenter/PC.project new file mode 100644 index 0000000..5080dcc --- /dev/null +++ b/ProjectCenter/PC.project @@ -0,0 +1,71 @@ +{ + APPCLASS = NSApplication; + APPKIT = "GNUSTEP-GUI"; + APPLICATIONICON = ""; + BUILDTOOL = gnumake; + "CLASS_FILES" = ( + "PCAppController.m", + "PCFindController.m", + "PCInfoController.m", + "PCLogController.m", + "PCMenuController.m", + "ProjectCenter_main.m" + ); + COMPILEROPTIONS = ""; + "CREATION_DATE" = ""; + "DOCU_FILES" = ( + ); + FOUNDATION = "GNUSTEP-BASE"; + FRAMEWORKS = ( + ); + "HEADER_FILES" = ( + "PCAppController.h", + "PCFindController.h", + "PCInfoController.h", + "PCLogController.h", + "PCMenuController.h", + "PCPrefController.h" + ); + IMAGES = ( + "build.tiff" + ); + INSTALLDIR = "$(HOME)/Apps"; + INTERFACES = ( + "main.gmodel", + "FileCreation.gmodel", + "Info.gmodel", + "Preferences.gmodel", + "Project.gmodel", + "ProjectCenter.gmodel", + "PCPrefController.m" + ); + LANGUAGE = English; + "LAST_EDITING" = ""; + LIBRARIES = ( + "gnustep-base", + "gnustep-gui" + ); + MAININTERFACE = "main.gmodel"; + MAKEFILEDIR = "/usr/GNUstep/Makefiles"; + "OTHER_FILES" = ( + ); + "OTHER_RESOURCES" = ( + ); + "OTHER_SOURCES" = ( + ); + "PRINCIPAL_CLASS" = "ProjectCenter_main.m"; + "PROJECT_BUILDER" = PCAppProj; + "PROJECT_CREATOR" = ""; + "PROJECT_DESCRIPTION" = "No description avaliable!"; + "PROJECT_MAINTAINER" = ""; + "PROJECT_NAME" = PC; + "PROJECT_TYPE" = PCAppProject; + "PROJECT_VERSION" = "1.0"; + SUBPROJECTS = ( + ); + "SUPPORTING_FILES" = ( + "GNUmakefile.preamble", + GNUmakefile, + "GNUmakefile.postamble" + ); +} \ No newline at end of file diff --git a/ProjectCenter/PCAppController.h b/ProjectCenter/PCAppController.h new file mode 100644 index 0000000..4ec7dfa --- /dev/null +++ b/ProjectCenter/PCAppController.h @@ -0,0 +1,111 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#import "PCPrefController.h" +#import "PCFindController.h" +#import "PCInfoController.h" +#import "PCLogController.h" + +@class PCBundleLoader; +@class PCServer; +@class PCProjectManager; +@class PCFileManager; +@class PCMenuController; + +@interface PCAppController : NSObject +{ + IBOutlet PCPrefController *prefController; + IBOutlet PCFindController *finder; + IBOutlet PCInfoController *infoController; + IBOutlet PCLogController *logger; + IBOutlet PCProjectManager *projectManager; + IBOutlet PCFileManager *fileManager; + IBOutlet PCMenuController *menuController; + + PCBundleLoader *bundleLoader; + PCServer *doServer; + NSConnection *doConnection; + + id delegate; + + NSMutableDictionary *projectTypes; +} + +//============================================================================ +//==== Intialization & deallocation +//============================================================================ + ++ (void)initialize; + +- (id)init; +- (void)dealloc; + +//============================================================================ +//==== Delegate +//============================================================================ + +- (id)delegate; +- (void)setDelegate:(id)aDelegate; + +//============================================================================ +//==== Bundle Management +//============================================================================ + +- (PCBundleLoader *)bundleLoader; +- (PCProjectManager *)projectManager; +- (PCPrefController *)prefController; +- (PCServer *)doServer; +- (PCFindController *)finder; +- (PCLogController *)logger; + +- (NSDictionary *)projectTypes; + +//============================================================================ +//==== Misc... +//============================================================================ + +- (void)applicationDidFinishLaunching:(NSNotification *)notification; +- (BOOL)applicationShouldTerminate:(id)sender; +- (void)applicationWillTerminate:(NSNotification *)notification; + +//============================================================================ +//==== Delegate stuff +//============================================================================ + +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename; + +- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle; + +@end + +@interface PCAppController (ProjectRegistration) + +- (BOOL)registerProjectCreator:(NSString *)className forKey:(NSString *)aKey; +// Returns YES upon successfully registering a new projecttype. + +@end \ No newline at end of file diff --git a/ProjectCenter/PCAppController.m b/ProjectCenter/PCAppController.m new file mode 100644 index 0000000..8ca8f02 --- /dev/null +++ b/ProjectCenter/PCAppController.m @@ -0,0 +1,269 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCAppController.h" +#import "PCMenuController.h" + +#import + +@implementation PCAppController + +//============================================================================ +//==== Intialization & deallocation +//============================================================================ + ++ (void)initialize +{ + NSMutableDictionary *defaults = [NSMutableDictionary dictionary]; + +#if defined(GNUSTEP) + NSString *_bundlePath = @"/usr/GNUstep/Local/Library/ProjectCenter"; +#else + NSString *_bundlePath = @"/LocalLibrary/ProjectCenter"; +#endif + + [defaults setObject:_bundlePath forKey:BundlePaths]; + + [defaults setObject:@"/usr/bin/emacs" forKey:Editor]; + [defaults setObject:@"/usr/bin/gdb" forKey:Debugger]; + [defaults setObject:@"/usr/bin/gcc" forKey:Compiler]; + + [defaults setObject:[NSString stringWithFormat:@"%@/ProjectCenterBuildDir",NSTemporaryDirectory()] forKey:RootBuildDirectory]; + + /* + [defaults setBool:YES forKey:PromtOnClean]; + [defaults setBool:YES forKey:PromtOnQuit]; + [defaults setBool:YES forKey:AutoSave]; + [defaults setBool:NO forKey:RemoveBackup]; + [defaults setInteger:60 forKey:AutoSavePeriod]; + [defaults setBool:NO forKey:DeleteCacheWhenQuitting]; + */ + + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; + [[NSUserDefaults standardUserDefaults] synchronize]; +} + +- (id)init +{ + if ((self = [super init])) { + // The bundle loader + bundleLoader = [[PCBundleLoader alloc] init]; + [bundleLoader setDelegate:self]; + + // They are registered by the bundleLoader + projectTypes = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (void)dealloc +{ + if (doConnection) { + [doConnection invalidate]; + [doConnection release]; + } + + [projectManager release]; + [bundleLoader release]; + [doServer release]; + [projectTypes release]; + + [super dealloc]; +} + +//============================================================================ +//==== Delegate +//============================================================================ + +- (id)delegate +{ + return delegate; +} + +- (void)setDelegate:(id)aDelegate +{ + delegate = aDelegate; +} + +//============================================================================ +//==== Bundle Management +//============================================================================ + +- (PCBundleLoader *)bundleLoader +{ + return bundleLoader; +} + +- (PCProjectManager *)projectManager +{ + return projectManager; +} + +- (PCPrefController *)prefController +{ + return prefController; +} + +- (PCServer *)doServer +{ + return doServer; +} + +- (PCFindController *)finder +{ + return finder; +} + +- (PCLogController *)logger +{ + return logger; +} + +- (NSDictionary *)projectTypes +{ + return projectTypes; +} + +//============================================================================ +//==== Misc... +//============================================================================ + +- (void)applicationDidFinishLaunching:(NSNotification *)notification +{ + [logger logMessage:@"Loading additional subsystems..." tag:INFORMATION]; + + [bundleLoader loadBundles]; + + // The DO server + doServer = [[PCServer alloc] init]; + +#if defined(GNUSTEP) + NS_DURING + doConnection = [NSConnection newRegisteringAtName:@"ProjectCenter" withRootObject:doServer]; + [logger logMessage:@"Successful initialisation of the DO connection 'ProjectCenter'." tag:INFORMATION]; + NS_HANDLER + [logger logMessage:@"Could not initialise the DO connection 'ProjectCenter'!" tag:WARNING]; + NSRunAlertPanel(@"Warning!",@"Could not register the DO connection 'ProjectCenter'",@"OK",nil,nil,nil); + NS_ENDHANDLER +#else + doConnection = [NSConnection defaultConnection]; + [doConnection setRootObject:doServer]; + if (![doConnection registerName:@"ProjectCenter"]) { + [logger logMessage:@"Could not initialise the DO connection 'ProjectCenter'!" tag:WARNING]; + } + else { + [logger logMessage:@"Successful initialisation of the DO connection 'ProjectCenter'." tag:INFORMATION]; + } +#endif + [[NSNotificationCenter defaultCenter] addObserver:doServer selector:@selector(connectionDidDie:) name:NSConnectionDidDieNotification object:doConnection]; + [doConnection setDelegate:doServer]; + + [[NSNotificationCenter defaultCenter] postNotificationName:PCAppDidInitNotification object:nil]; +} + +- (BOOL)applicationShouldTerminate:(id)sender +{ +// This should be queried per project! +/* + if ([projectManager hasEditedDocuments]) { + if (NSRunAlertPanel(@"Unsaved projects!", @"Do you want to save them?", @"Yes", @"No", nil)) { + [projectManager saveAllProjects]; + } + } +*/ + [[NSNotificationCenter defaultCenter] postNotificationName:PCAppWillTerminateNotification object:nil]; + + return YES; +} + +- (void)applicationWillTerminate:(NSNotification *)notification +{ + // [[PCLogController sharedController] logMessageWithTag:INFORMATION object:self format:@"ProjectCenter is going down..."]; + + if ([[[NSUserDefaults standardUserDefaults] stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"]) { + [[NSFileManager defaultManager] removeFileAtPath:[projectManager rootBuildPath] handler:nil]; + } + [[NSUserDefaults standardUserDefaults] synchronize]; +} + +//============================================================================ +//==== Delegate stuff +//============================================================================ + +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + BOOL success = NO; + + if (([[filename lastPathComponent] isEqualToString:@"PC.proj"])) { + [projectManager openProjectAt:filename]; + success = YES; + } + + return success; +} + +- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle +{ + Class principalClass; + + NSAssert(aBundle,@"No valid bundle!"); + + principalClass = [aBundle principalClass]; + if ([principalClass conformsToProtocol:@protocol(ProjectType)]) { + NSString *name = [[principalClass sharedCreator] projectTypeName]; + + [logger logMessage:[NSString stringWithFormat:@"Project type %@ successfully loaded!",name] tag:INFORMATION]; + + if ([self registerProjectCreator:NSStringFromClass(principalClass) forKey:name]) { + [menuController addProjectTypeNamed:name]; + + [logger logMessage:[NSString stringWithFormat:@"Project type %@ successfully registered!",name] tag:INFORMATION]; + } + } + else if ([principalClass conformsToProtocol:@protocol(FileCreator)]) { + [fileManager registerCreatorsWithObjectsAndKeys:[[principalClass sharedCreator] creatorDictionary]]; + + // In objc.h there is already th like (char *)name... + // [logger logMessage:[NSString stringWithFormat:@"FileCreator %@ successfully loaded!",(NSString *)[[principalClass sharedCreator] name]] tag:INFORMATION]; +} +} + +@end + +@implementation PCAppController (ProjectRegistration) + +- (BOOL)registerProjectCreator:(NSString *)className forKey:(NSString *)aKey +{ + if ([projectTypes objectForKey:aKey]) { + return NO; + } + + [projectTypes setObject:className forKey:aKey]; + + return YES; +} + +@end diff --git a/ProjectCenter/PCFindController.h b/ProjectCenter/PCFindController.h new file mode 100644 index 0000000..2c734f7 --- /dev/null +++ b/ProjectCenter/PCFindController.h @@ -0,0 +1,34 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@interface PCFindController : NSObject +{ + +} + +@end diff --git a/ProjectCenter/PCFindController.m b/ProjectCenter/PCFindController.m new file mode 100644 index 0000000..00fc095 --- /dev/null +++ b/ProjectCenter/PCFindController.m @@ -0,0 +1,31 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCFindController.h" + +@implementation PCFindController + +@end diff --git a/ProjectCenter/PCInfoController.h b/ProjectCenter/PCInfoController.h new file mode 100644 index 0000000..3fc7c0e --- /dev/null +++ b/ProjectCenter/PCInfoController.h @@ -0,0 +1,40 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@interface PCInfoController : NSObject +{ + id infoWindow; + NSDictionary *infoDict; +} + +- (id)init; +- (void)dealloc; + +- (void)showInfoWindow:(id)sender; + +@end diff --git a/ProjectCenter/PCInfoController.m b/ProjectCenter/PCInfoController.m new file mode 100644 index 0000000..3fdce26 --- /dev/null +++ b/ProjectCenter/PCInfoController.m @@ -0,0 +1,73 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCInfoController.h" +#import + +#if defined(GNUSTEP) +#import +#endif + +@implementation PCInfoController + +- (id)init +{ + if ((self = [super init])) { + NSString *file; + + file = [[NSBundle mainBundle] pathForResource:@"Info-project" ofType:@"plist"]; + infoDict = [NSDictionary dictionaryWithContentsOfFile:file]; + [infoDict retain]; + } + return self; +} + +- (void)dealloc +{ + [infoDict release]; + + if (infoWindow) { + [infoWindow release]; + } + + [super dealloc]; +} + +- (void)showInfoWindow:(id)sender +{ +#if defined(GNUSTEP) + if (!infoWindow) { + infoWindow = [[GSInfoPanel alloc] initWithDictionary:infoDict]; + } + + [infoWindow center]; + [infoWindow makeKeyAndOrderFront:self]; +#else + NSRunAlertPanel(@"Info",@"OPENSTEP has no support for GSInfoPanel",@"OK".nil.nil.nil); +#endif +} + +@end diff --git a/ProjectCenter/PCLogController.h b/ProjectCenter/PCLogController.h new file mode 100644 index 0000000..b79fa16 --- /dev/null +++ b/ProjectCenter/PCLogController.h @@ -0,0 +1,39 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +#define INFORMATION 0 +#define WARNING 1 + +@interface PCLogController : NSObject +{ + +} + +- (void)logMessage:(NSString *)message tag:(int)tag; + +@end diff --git a/ProjectCenter/PCLogController.m b/ProjectCenter/PCLogController.m new file mode 100644 index 0000000..63d5321 --- /dev/null +++ b/ProjectCenter/PCLogController.m @@ -0,0 +1,49 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCLogController.h" + +@implementation PCLogController + +- (void)logMessage:(NSString *)message tag:(int)tag; +{ + NSString *_log; + + switch (tag) { + case 0: + _log = [NSString stringWithFormat:@"Information from <%@: %x - %x>: %@",[self class],self,[NSThread currentThread],message]; + break; + case 1: + _log = [NSString stringWithFormat:@"Warning from <%@: %x - %x>: %@",[self class],self,[NSThread currentThread],message]; + break; + default: + break; + } + + NSLog(message); +} + +@end diff --git a/ProjectCenter/PCMenuController.h b/ProjectCenter/PCMenuController.h new file mode 100644 index 0000000..53b6439 --- /dev/null +++ b/ProjectCenter/PCMenuController.h @@ -0,0 +1,81 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@class PCProjectManager; +@class PCFileManager; +@class PCAppController; + +@interface PCMenuController : NSObject +{ + IBOutlet PCProjectManager *projectManager; + IBOutlet PCFileManager *fileManager; + IBOutlet PCAppController *appController; + + NSBox *projectTypeAccessaryView; + id projectTypePopup; +} + +- (id)init; +- (void)dealloc; + +//============================================================================ +//==== Menu stuff +//============================================================================ + +- (void)addProjectTypeNamed:(NSString *)name; + +- (void)openProject:(id)sender; +- (void)newProject:(id)sender; +- (void)saveProject:(id)sender; +- (void)saveProjectAs:(id)sender; +- (void)showLoadedProjects:(id)sender; +- (void)saveFiles:(id)sender; +- (void)revertToSaved:(id)sender; + +- (void)newSubproject:(id)sender; +- (void)addSubproject:(id)sender; +- (void)removeSubproject:(id)sender; + +- (void)closeProject:(id)sender; + +- (void)newFile:(id)sender; +- (void)addFile:(id)sender; +- (void)openFile:(id)sender; +- (void)saveFile:(id)sender; +- (void)saveFileAs:(id)sender; +- (void)revertFile:(id)sender; +- (void)renameFile:(id)sender; +- (void)removeFile:(id)sender; + +//============================================================================ +//==== Delegate stuff +//============================================================================ + +- (BOOL)validateMenuItem:(id )menuItem; + +@end diff --git a/ProjectCenter/PCMenuController.m b/ProjectCenter/PCMenuController.m new file mode 100644 index 0000000..bda1b5a --- /dev/null +++ b/ProjectCenter/PCMenuController.m @@ -0,0 +1,277 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCMenuController.h" + +#import +#import "PCAppController.h" + +#if defined(GNUSTEP) +#import +#endif + +@implementation PCMenuController + +- (id)init +{ + if ((self = [super init])) { + // The accessory view + projectTypeAccessaryView = [[NSBox alloc] init]; + projectTypePopup = [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(20,30,160,20) pullsDown:NO] autorelease]; + [projectTypePopup addItemWithTitle:@"No type available!"]; + + [projectTypeAccessaryView setTitle:@"Project Types"]; + [projectTypeAccessaryView setTitlePosition:NSAtTop]; + [projectTypeAccessaryView setBorderType:NSGrooveBorder]; + [projectTypeAccessaryView addSubview:projectTypePopup]; + [projectTypeAccessaryView sizeToFit]; + [projectTypeAccessaryView setAutoresizingMask: NSViewWidthSizable]; + } + return self; +} + +- (void)dealloc +{ + [projectTypeAccessaryView release]; + [super dealloc]; +} + +- (void)addProjectTypeNamed:(NSString *)name +{ + static BOOL _firstItem = YES; + + if (_firstItem) { + _firstItem = NO; + [projectTypePopup removeItemWithTitle:@"No type available!"]; + } + + [projectTypePopup addItemWithTitle:name]; +} + +//============================================================================ +//==== Menu stuff +//============================================================================ + +- (void)openProject:(id)sender +{ + NSString *projectPath; + NSOpenPanel *openPanel; + int retval; + + openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:NO]; + [openPanel setCanChooseDirectories:NO]; + [openPanel setCanChooseFiles:YES]; + + retval = [openPanel runModalForDirectory:[[NSUserDefaults standardUserDefaults] objectForKey:@"LastOpenDirectory"] file:nil types:[NSArray arrayWithObjects:@"project",nil]]; + + if (retval == NSOKButton) { + BOOL isDir; + + [[NSUserDefaults standardUserDefaults] setObject:[openPanel directory] forKey:@"LastOpenDirectory"]; + projectPath = [[openPanel filenames] objectAtIndex:0]; + + if ([[NSFileManager defaultManager] fileExistsAtPath:projectPath isDirectory:&isDir] && !isDir) { + if (![projectManager openProjectAt:projectPath]) { + NSRunAlertPanel(@"Attention!",@"Couldn't open %@!",@"OK",nil,nil,[projectPath stringByDeletingLastPathComponent]); + } + } + } +} + +- (void)newProject:(id)sender +{ + NSSavePanel *sp; + int runResult; + + sp = [NSSavePanel savePanel]; + + [sp setTitle:@"Create new project..."]; + [sp setAccessoryView:projectTypeAccessaryView]; + + runResult = [sp runModalForDirectory:NSHomeDirectory() file:@""]; + if (runResult == NSOKButton) { + NSString *projectType = [projectTypePopup titleOfSelectedItem]; + NSString *className = [[appController projectTypes] objectForKey:projectType]; + + if (![projectManager createProjectOfType:className path:[sp filename]]) { + NSRunAlertPanel(@"Attention!",@"Failed to create %@!",@"OK",nil,nil,[sp filename]); + } + } +} + +- (void)saveProject:(id)sender +{ + [projectManager saveProject]; +} + +- (void)saveProjectAs:(id)sender +{ + NSString *proj; + +// Show save panel + + [projectManager saveProjectAs:proj]; +} + +- (void)showLoadedProjects:(id)sender +{ + [projectManager showLoadedProjects]; +} + +- (void)saveFiles:(id)sender +{ + [projectManager saveFiles]; +} + +- (void)revertToSaved:(id)sender +{ + [projectManager revertToSaved]; +} + +- (void)newSubproject:(id)sender +{ + [projectManager newSubproject]; +} + +- (void)addSubproject:(id)sender +{ + NSString *proj; + +// Show open panel + + [projectManager addSubprojectAt:proj]; +} + +- (void)removeSubproject:(id)sender +{ + [projectManager removeSubproject]; +} + +- (void)closeProject:(id)sender +{ + [projectManager closeProject]; +} + +- (void)newFile:(id)sender +{ + [fileManager showNewFileWindow]; +} + +- (void)openFile:(id)sender +{ + NSString *filePath; + NSOpenPanel *openPanel; + int retval; + + openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:NO]; + [openPanel setCanChooseDirectories:NO]; + [openPanel setCanChooseFiles:YES]; + + retval = [openPanel runModalForDirectory:[[NSUserDefaults standardUserDefaults] objectForKey:@"LastOpenDirectory"] file:nil types:nil]; + + if (retval == NSOKButton) { + BOOL isDir; + + [[NSUserDefaults standardUserDefaults] setObject:[openPanel directory] forKey:@"LastOpenDirectory"]; + filePath = [[openPanel filenames] objectAtIndex:0]; + + if ([[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDir] && !isDir) { + if (![projectManager openFile:filePath]) { + NSRunAlertPanel(@"Attention!",@"Couldn't open %@!",@"OK",nil,nil,filePath); + } + } + } +} + +- (void)addFile:(id)sender +{ + [fileManager showAddFileWindow]; +} + +- (void)saveFile:(id)sender +{ + [projectManager saveFile]; +} + +- (void)saveFileAs:(id)sender +{ + NSString *proj; + +// Show open panel + + [projectManager saveFileAs:proj]; +} + +- (void)revertFile:(id)sender +{ + [projectManager revertFile]; +} + +- (void)renameFile:(id)sender +{ + NSString *proj; + +// Show open panel + + [projectManager renameFileTo:proj]; +} + +- (void)removeFile:(id)sender +{ + NSString *file = nil; + PCProject *proj = [projectManager activeProject]; + + if ((file = [[proj browserController] nameOfSelectedFile])) { + int ret; + + ret = NSRunAlertPanel(@"Remove File!",@"Really remove %@ in project %@?",@"Cancel",@"...from Project only",@"...from Project and Disk",file,[proj projectName]); + + if (ret == NSAlertAlternateReturn || ret == NSAlertOtherReturn) { + BOOL flag = (ret == NSAlertOtherReturn) ? YES : NO; + + [projectManager removeFilePermanently:flag]; + } + } +} + +//============================================================================ +//==== Delegate stuff +//============================================================================ + +- (BOOL)validateMenuItem:(id )menuItem +{ + if (![[projectManager loadedProjects] count]) { + if ([menuItem title] == @"New in Project") return NO; + if ([menuItem title] == @"Add File") return NO; + if ([menuItem title] == @"Remove File") return NO; + } + + return YES; +} + +@end diff --git a/ProjectCenter/PCPrefController.h b/ProjectCenter/PCPrefController.h new file mode 100644 index 0000000..834f8ab --- /dev/null +++ b/ProjectCenter/PCPrefController.h @@ -0,0 +1,79 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +@interface PCPrefController : NSObject +{ + id prefWindow; + id prefPopup; + + id prefEmptyView; + id prefBuildingView; + id prefMiscView; + id prefSavingView; + + id successField; + id failureField; + + id autoSaveField;; + + id editorField; + id debuggerField; + id compilerField; + id bundlePathField; + + NSMutableDictionary *preferencesDict; + + @private + BOOL _needsReleasing; +} + +- (id)init; +- (void)dealloc; + +- (void)showPrefWindow:(id)sender; +- (void)popupChanged:(id)sender; + +- (void)setSuccessSound:(id)sender; +- (void)setFailureSound:(id)sender; +- (void)setPromptOnClean:(id)sender; + +- (void)setSaveAutomatically:(id)sender; +- (void)setRemoveBackup:(id)sender; +- (void)setSavePeriod:(id)sender; + +- (void)setEditor:(id)sender; +- (void)setCompiler:(id)sender; +- (void)setDebugger:(id)sender; +- (void)setBundlePath:(id)sender; +- (void)promptWhenQuitting:(id)sender; + +- (NSDictionary *)preferencesDict; + +- (NSString *)selectFileWithTypes:(NSArray *)types; + +@end diff --git a/ProjectCenter/PCPrefController.m b/ProjectCenter/PCPrefController.m new file mode 100644 index 0000000..4c9edee --- /dev/null +++ b/ProjectCenter/PCPrefController.m @@ -0,0 +1,391 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import "PCPrefController.h" +#import + +#if defined(GNUSTEP) +#import +#endif + +@interface PCPrefController (CreateUI) + +- (void)_initUI; + +@end + +@implementation PCPrefController (CreateUI) + +- (void)_initUI +{ + NSView *_c_view; + unsigned int style = NSTitledWindowMask | NSClosableWindowMask | + NSResizableWindowMask; + NSRect _w_frame; + NSBox *line; + NSBox *v; + NSButton *b; + + /* + * Pref Window + * + */ + + _w_frame = NSMakeRect(200,300,268,365); + prefWindow = [[NSWindow alloc] initWithContentRect:_w_frame + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; + [prefWindow setMinSize:NSMakeSize(268,365)]; + [prefWindow setTitle:@"Preferences"]; + [prefWindow setDelegate:self]; + _c_view = [prefWindow contentView]; + + prefPopup = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(72,328,120,20)]; + [prefPopup addItemWithTitle:@"None"]; + [prefPopup setTarget:self]; + [prefPopup setAction:@selector(popupChanged:)]; + [_c_view addSubview:prefPopup]; + + line = [[[NSBox alloc] init] autorelease]; + [line setTitlePosition:NSNoTitle]; + [line setFrameFromContentFrame:NSMakeRect(0,312,272,2)]; + [_c_view addSubview:line]; + + prefEmptyView = [[NSBox alloc] init]; + [prefEmptyView setTitlePosition:NSNoTitle]; + [prefEmptyView setFrameFromContentFrame:NSMakeRect(-1,1,270,310)]; + [prefEmptyView setBorderType:NSNoBorder]; + [_c_view addSubview:prefEmptyView]; + + /* + * Building view + * + */ + + prefBuildingView = [[NSBox alloc] init]; + [prefBuildingView setTitlePosition:NSNoTitle]; + [prefBuildingView setFrameFromContentFrame:NSMakeRect(1,1,260,308)]; + [prefBuildingView setBorderType:NSNoBorder]; + + v = [[[NSBox alloc] init] autorelease]; + [v setTitle:@"Sound"]; + [v setFrameFromContentFrame:NSMakeRect(16,208,228,72)]; + [prefBuildingView addSubview:v]; + + b = [[[NSButton alloc] initWithFrame:NSMakeRect(72,176,108,15)] autorelease]; + [b setTitle:@"Prompt on clean"]; + [b setButtonType:NSSwitchButton]; + [b setBordered:NO]; + [b setTarget:self]; + [b setAction:@selector(setPromptOnClean:)]; + [b setContinuous:NO]; + [prefBuildingView addSubview:b]; + + /* + * Misc view + * + */ + + prefMiscView = [[NSBox alloc] init]; + [prefMiscView setTitlePosition:NSNoTitle]; + [prefMiscView setFrameFromContentFrame:NSMakeRect(1,1,260,308)]; + [prefMiscView setBorderType:NSNoBorder]; + + v = [[[NSBox alloc] init] autorelease]; + [v setTitle:@"External"]; + [v setFrameFromContentFrame:NSMakeRect(16,184,228,96)]; + [prefMiscView addSubview:v]; + + v = [[[NSBox alloc] init] autorelease]; + [v setTitle:@"Bundles"]; + [v setFrameFromContentFrame:NSMakeRect(16,120,228,48)]; + [prefMiscView addSubview:v]; + + b = [[[NSButton alloc] initWithFrame:NSMakeRect(32,80,144,15)] autorelease]; + [b setTitle:@"Prompt when quitting"]; + [b setButtonType:NSSwitchButton]; + [b setBordered:NO]; + [b setTarget:self]; + // [b setAction:@selector(setPromptOnClean:)]; + [b setContinuous:NO]; + [prefMiscView addSubview:b]; + + /* + * Saving view + * + */ + + prefSavingView = [[NSBox alloc] init]; + [prefSavingView setTitlePosition:NSNoTitle]; + [prefSavingView setFrameFromContentFrame:NSMakeRect(1,1,260,308)]; + [prefSavingView setBorderType:NSNoBorder]; + + v = [[[NSBox alloc] init] autorelease]; + [v setTitle:@"Saving"]; + [v setFrameFromContentFrame:NSMakeRect(16,208,228,72)]; + [prefSavingView addSubview:v]; + + b = [[[NSButton alloc] initWithFrame:NSMakeRect(13,32,124,15)] autorelease]; + [b setTitle:@"Save Automatically"]; + [b setButtonType:NSSwitchButton]; + [b setBordered:NO]; + [b setTarget:self]; + [b setAction:@selector(setSaveAutomatically:)]; + [b setContinuous:NO]; + [v addSubview:b]; + + b = [[[NSButton alloc] initWithFrame:NSMakeRect(13,13,124,15)] autorelease]; + [b setTitle:@"Remoe Backup"]; + [b setButtonType:NSSwitchButton]; + [b setBordered:NO]; + [b setTarget:self]; + [b setAction:@selector(setRemoveBackup:)]; + [b setContinuous:NO]; + [v addSubview:b]; + + v = [[[NSBox alloc] init] autorelease]; + [v setTitle:@"Auto-Save"]; + [v setFrameFromContentFrame:NSMakeRect(16,104,228,80)]; + [prefSavingView addSubview:v]; + + _needsReleasing = YES; +} + +@end + +@implementation PCPrefController + +- (id)init +{ + if ((self = [super init])) { + NSDictionary *prefs; + + // The prefs from the defaults + prefs = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]; + preferencesDict = [[NSMutableDictionary alloc] initWithDictionary:prefs]; + } + return self; +} + +- (void)dealloc +{ + [preferencesDict release]; + + if (_needsReleasing) { + [prefWindow release]; + [prefPopup release]; + + [prefEmptyView release]; + [prefBuildingView release]; + [prefMiscView release]; + [prefSavingView release]; + } + + [super dealloc]; +} + +- (void)showPrefWindow:(id)sender +{ + if (!prefWindow) { + id view; + NSString *val; + +#if defined(GNUSTEP) + [self _initUI]; +#else + if(![NSBundle loadNibNamed:@"Preferences.nib" owner:self]) { + [[NSException exceptionWithName:NIB_NOT_FOUND_EXCEPTION reason:@"Could not load Preferences.gmodel" userInfo:nil] raise]; + return; + } +#endif + + // Fill in the defaults + [compilerField setStringValue:(val=[preferencesDict objectForKey:Compiler]) ? val : @""]; + [debuggerField setStringValue:(val=[preferencesDict objectForKey:Debugger]) ? val : @""]; + [editorField setStringValue:(val=[preferencesDict objectForKey:Editor]) ? val : @""]; + [bundlePathField setStringValue:(val=[preferencesDict objectForKey:BundlePaths]) ? val : @""]; + + // The popup and selected view + [prefPopup removeAllItems]; + [prefPopup addItemWithTitle:@"Building"]; + [prefPopup addItemWithTitle:@"Saving"]; + [prefPopup addItemWithTitle:@"Miscellaneous"]; + + [prefPopup selectItemWithTitle:@"Building"]; + + view = [prefBuildingView retain]; + [(NSBox *)prefEmptyView setContentView:view]; + [prefEmptyView display]; + } + + [prefWindow center]; + [prefWindow makeKeyAndOrderFront:self]; +} + +- (void)popupChanged:(id)sender +{ + NSView *view = nil; + + switch([sender indexOfSelectedItem]) { + case 0: + view = [prefBuildingView retain]; + break; + case 1: + view = [prefSavingView retain]; + break; + case 2: + view = [prefMiscView retain]; + break; + } + [(NSBox *)prefEmptyView setContentView:view]; + [prefEmptyView display]; +} + +- (void)setSuccessSound:(id)sender +{ + NSString *path = [self selectFileWithTypes:[NSArray arrayWithObjects:@"snd",@"au",nil]]; + + if (path) { + [successField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:SuccessSound]; + [preferencesDict setObject:path forKey:SuccessSound]; + } +} + +- (void)setFailureSound:(id)sender +{ + NSString *path = [self selectFileWithTypes:[NSArray arrayWithObjects:@"snd",@"au",nil]]; + + if (path) { + [failureField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:FailureSound]; + [preferencesDict setObject:path forKey:FailureSound]; + } +} + +- (void)setPromptOnClean:(id)sender +{ +} + +- (void)setSaveAutomatically:(id)sender +{ +} + +- (void)setRemoveBackup:(id)sender +{ +} + +- (void)setSavePeriod:(id)sender +{ +} + +- (void)setEditor:(id)sender +{ + NSString *path = [self selectFileWithTypes:[NSArray arrayWithObjects:@"app",nil]]; + + if (path) { + [editorField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:Editor]; + [preferencesDict setObject:path forKey:Editor]; + } +} + +- (void)setCompiler:(id)sender +{ + NSString *path = [self selectFileWithTypes:nil]; + + if (path) { + [compilerField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:Compiler]; + [preferencesDict setObject:path forKey:Compiler]; + } +} + +- (void)setDebugger:(id)sender +{ + NSString *path = [self selectFileWithTypes:nil]; + + if (path) { + [debuggerField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:Debugger]; + [preferencesDict setObject:path forKey:Debugger]; + } +} + +- (void)setBundlePath:(id)sender +{ + NSString *path = [self selectFileWithTypes:[NSArray arrayWithObjects:@"bundle",nil]]; + + if (path) { + [bundlePathField setStringValue:path]; + + [[NSUserDefaults standardUserDefaults] setObject:path forKey:BundlePaths]; + [preferencesDict setObject:path forKey:BundlePaths]; + } +} + +- (void)promptWhenQuitting:(id)sender +{ +} + +- (NSDictionary *)preferencesDict +{ + return preferencesDict; +} + +- (NSString *)selectFileWithTypes:(NSArray *)types +{ + NSString *file = nil; + NSOpenPanel *openPanel; + int retval; + + openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:NO]; + [openPanel setCanChooseDirectories:YES]; + [openPanel setCanChooseFiles:YES]; + + retval = [openPanel runModalForDirectory:[[NSUserDefaults standardUserDefaults] objectForKey:@"LastOpenDirectory"] file:nil types:types]; + + if (retval == NSOKButton) { + [[NSUserDefaults standardUserDefaults] setObject:[openPanel directory] forKey:@"LastOpenDirectory"]; + file = [[openPanel filenames] objectAtIndex:0]; + + } + return file; +} + +@end + + + + + diff --git a/ProjectCenter/ProjectCenter.app.tiff b/ProjectCenter/ProjectCenter.app.tiff new file mode 100644 index 0000000..cdec5d7 Binary files /dev/null and b/ProjectCenter/ProjectCenter.app.tiff differ diff --git a/ProjectCenter/ProjectCenter.tiff b/ProjectCenter/ProjectCenter.tiff new file mode 100644 index 0000000..cdec5d7 Binary files /dev/null and b/ProjectCenter/ProjectCenter.tiff differ diff --git a/ProjectCenter/ProjectCenter_main.m b/ProjectCenter/ProjectCenter_main.m new file mode 100644 index 0000000..e6d6e80 --- /dev/null +++ b/ProjectCenter/ProjectCenter_main.m @@ -0,0 +1,31 @@ +/* + GNUstep ProjectCenter - http://www.projectcenter.ch + + Copyright (C) 2000 Philippe C.D. Robert + + Author: Philippe C.D. Robert + + This file is part of ProjectCenter. + + This application is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $Id$ +*/ + +#import + +int main(int argc, const char *argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/ProjectCenter/ProjectCentre_add.tiff b/ProjectCenter/ProjectCentre_add.tiff new file mode 100644 index 0000000..92b48e0 Binary files /dev/null and b/ProjectCenter/ProjectCentre_add.tiff differ diff --git a/ProjectCenter/ProjectCentre_build.tiff b/ProjectCenter/ProjectCentre_build.tiff new file mode 100644 index 0000000..5ab5b20 Binary files /dev/null and b/ProjectCenter/ProjectCentre_build.tiff differ diff --git a/ProjectCenter/ProjectCentre_clean.tiff b/ProjectCenter/ProjectCentre_clean.tiff new file mode 100644 index 0000000..d5f59cf Binary files /dev/null and b/ProjectCenter/ProjectCentre_clean.tiff differ diff --git a/ProjectCenter/ProjectCentre_cvs.tiff b/ProjectCenter/ProjectCentre_cvs.tiff new file mode 100644 index 0000000..7c2b39d Binary files /dev/null and b/ProjectCenter/ProjectCentre_cvs.tiff differ diff --git a/ProjectCenter/ProjectCentre_documentation.tiff b/ProjectCenter/ProjectCentre_documentation.tiff new file mode 100644 index 0000000..7bfe475 Binary files /dev/null and b/ProjectCenter/ProjectCentre_documentation.tiff differ diff --git a/ProjectCenter/ProjectCentre_files.tiff b/ProjectCenter/ProjectCentre_files.tiff new file mode 100644 index 0000000..ca312b9 Binary files /dev/null and b/ProjectCenter/ProjectCentre_files.tiff differ diff --git a/ProjectCenter/ProjectCentre_find.tiff b/ProjectCenter/ProjectCentre_find.tiff new file mode 100644 index 0000000..c6e7e1c Binary files /dev/null and b/ProjectCenter/ProjectCentre_find.tiff differ diff --git a/ProjectCenter/ProjectCentre_prefs.tiff b/ProjectCenter/ProjectCentre_prefs.tiff new file mode 100644 index 0000000..5a4ddcb Binary files /dev/null and b/ProjectCenter/ProjectCentre_prefs.tiff differ diff --git a/ProjectCenter/ProjectCentre_run.tiff b/ProjectCenter/ProjectCentre_run.tiff new file mode 100644 index 0000000..ea655ba Binary files /dev/null and b/ProjectCenter/ProjectCentre_run.tiff differ diff --git a/ProjectCenter/ProjectCentre_uml.tiff b/ProjectCenter/ProjectCentre_uml.tiff new file mode 100644 index 0000000..42304dd Binary files /dev/null and b/ProjectCenter/ProjectCentre_uml.tiff differ diff --git a/ProjectCenter/h.template b/ProjectCenter/h.template new file mode 100644 index 0000000..7b523c7 --- /dev/null +++ b/ProjectCenter/h.template @@ -0,0 +1,11 @@ +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import + +@interface $FILENAMESANSEXTENSION$ : NSObject +{ + +} + +@end diff --git a/ProjectCenter/m.template b/ProjectCenter/m.template new file mode 100644 index 0000000..1216fe5 --- /dev/null +++ b/ProjectCenter/m.template @@ -0,0 +1,18 @@ +$$ Lines starting with $$ are not inserted into newly created files +$$ The following substitutions are made: +$$ +$$ $FILENAME$ e.g. foo.m +$$ $FILENAMESANSEXTENSION$ e.g. foo +$$ $DIRECTORY$ e.g. /tmp/MyNewApp +$$ $PROJECTNAME$ e.g. MyNewApp +$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj +$$ $USERNAME$ e.g. mwagner +$$ $DATE$ e.g. Jan-1-1994 +$$ +/* $FILENAME$ created by $USERNAME$ on $DATE$ */ + +#import "$FILENAMESANSEXTENSION$.h" + +@implementation $FILENAMESANSEXTENSION$ + +@end diff --git a/README b/README new file mode 100644 index 0000000..e60cc0e --- /dev/null +++ b/README @@ -0,0 +1,23 @@ +README +****** + + THIS IS A DEVELOPER 'PRE RELEASE RELEASE' ONLY! It is meant to give a + sneak peak for those who want to help, it is not meant as a usable + application right now! + + If you want to volunteer, please contact me! + +TODOs +***** + + Code editing/external editor support + Debugging + UI handling + Project Building + Code 'wizards' + UML case tool?! + Overall code improvements + ... and a lot more! + +Philippe C.D. Robert, 21.3.2000 + \ No newline at end of file diff --git a/Version b/Version new file mode 100644 index 0000000..d8df70a --- /dev/null +++ b/Version @@ -0,0 +1,12 @@ +# This file is included in various Makefile's to get version information. +# Compatible with Bourne shell syntax, so it can included there too. + +# The gcc version required to compile the library. +GCC_VERSION=2.8.0 + +# The version number of this release. +MAJOR_VERSION=0 +MINOR_VERSION=0 +SUBMINOR_VERSION=1 +PC_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION} +VERSION=${PC_VERSION}