mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 14:40:52 +00:00
Initial revision
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@7258 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
commit
611d39e478
152 changed files with 13565 additions and 0 deletions
68
ANNOUNCE
Normal file
68
ANNOUNCE
Normal file
|
@ -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! <info@projectcenter.ch>
|
||||
|
||||
* Give us feedback! Tell us what you like; tell us what you think
|
||||
could be better. Send bug reports to <info@projectcenter.ch>.
|
||||
|
||||
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 <info@projectcenter.ch>.
|
||||
|
||||
Enjoy!
|
||||
Philippe C.D. Robert
|
||||
<phr@projectcenter.ch>
|
||||
|
||||
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:
|
||||
<gnu@gnu.org>
|
||||
|
||||
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.
|
||||
|
339
COPYING
Normal file
339
COPYING
Normal file
|
@ -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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
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.
|
||||
|
||||
<signature of Ty Coon>, 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.
|
54
GNUmakefile
Normal file
54
GNUmakefile
Normal file
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# Main Makefile for ProjectCenter
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Written by: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
26
GNUmakefile.postamble
Normal file
26
GNUmakefile.postamble
Normal file
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# GNUmakefile.postamble
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
|
65
GNUmakefile.preamble
Normal file
65
GNUmakefile.preamble
Normal file
|
@ -0,0 +1,65 @@
|
|||
#
|
||||
# GNUmakefile.preamble
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
#
|
||||
# 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
|
||||
#
|
26
INSTALL
Normal file
26
INSTALL
Normal file
|
@ -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!
|
22
PCAppProj/AppController.h
Normal file
22
PCAppProj/AppController.h
Normal file
|
@ -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 <Foundation/Foundation.h>
|
||||
|
||||
@interface AppController : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
- (id)init;
|
||||
- (void)dealloc;
|
||||
|
||||
- (void)awakeFromNib;
|
||||
|
||||
@end
|
31
PCAppProj/AppController.m
Normal file
31
PCAppProj/AppController.m
Normal file
|
@ -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
|
133
PCAppProj/AppProject.gmodel
Normal file
133
PCAppProj/AppProject.gmodel
Normal file
|
@ -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;
|
||||
}
|
56
PCAppProj/GNUmakefile
Normal file
56
PCAppProj/GNUmakefile
Normal file
|
@ -0,0 +1,56 @@
|
|||
# GNUmakefile
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
# 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
|
||||
|
30
PCAppProj/GNUmakefile.postamble
Normal file
30
PCAppProj/GNUmakefile.postamble
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Makefile.postamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
|
||||
|
74
PCAppProj/GNUmakefile.preamble
Normal file
74
PCAppProj/GNUmakefile.preamble
Normal file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# Makefile.preamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
|
||||
|
12
PCAppProj/Info-project.plist
Normal file
12
PCAppProj/Info-project.plist
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
NOTE = "Automatically generated, do not edit!";
|
||||
ApplicationName = "";
|
||||
ApplicationDescription = "";
|
||||
ApplicationIcon = "";
|
||||
ApplicationRelease = "";
|
||||
FullVersionID = "";
|
||||
Authors = ();
|
||||
URL = "";
|
||||
Copyright = "";
|
||||
CopyrightDescription = "";
|
||||
}
|
29
PCAppProj/Info.table
Normal file
29
PCAppProj/Info.table
Normal file
|
@ -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$"
|
||||
);
|
||||
}
|
436
PCAppProj/Main.gmodel
Normal file
436
PCAppProj/Main.gmodel
Normal file
|
@ -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;
|
||||
}
|
48
PCAppProj/Makefile
Normal file
48
PCAppProj/Makefile
Normal file
|
@ -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
|
122
PCAppProj/Makefile.postamble
Normal file
122
PCAppProj/Makefile.postamble
Normal file
|
@ -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.
|
130
PCAppProj/Makefile.preamble
Normal file
130
PCAppProj/Makefile.preamble
Normal file
|
@ -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.
|
||||
|
24
PCAppProj/PB.project
Normal file
24
PCAppProj/PB.project
Normal file
|
@ -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;
|
||||
}
|
34
PCAppProj/PC.proj
Normal file
34
PCAppProj/PC.proj
Normal file
|
@ -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");
|
||||
}
|
38
PCAppProj/PCAppMakefileFactory.h
Normal file
38
PCAppProj/PCAppMakefileFactory.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
|
||||
@interface PCAppMakefileFactory : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
+ (PCAppMakefileFactory *)sharedFactory;
|
||||
|
||||
- (NSData *)makefileForProject:(PCProject *)aProject;
|
||||
|
||||
@end
|
159
PCAppProj/PCAppMakefileFactory.m
Normal file
159
PCAppProj/PCAppMakefileFactory.m
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <phr@projectcenter.ch>\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
|
48
PCAppProj/PCAppProj.h
Normal file
48
PCAppProj/PCAppProj.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
#import <ProjectCenter/ProjectCenter.h>
|
||||
|
||||
@interface PCAppProj : NSObject <ProjectType>
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ProjectType
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+ (id)sharedCreator;
|
||||
|
||||
- (Class)projectClass;
|
||||
|
||||
- (NSString *)projectTypeName;
|
||||
- (NSDictionary *)typeTable;
|
||||
|
||||
- (PCProject *)createProjectAt:(NSString *)path;
|
||||
- (PCProject *)openProjectAt:(NSString *)path;
|
||||
|
||||
@end
|
146
PCAppProj/PCAppProj.m
Normal file
146
PCAppProj/PCAppProj.m
Normal file
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
66
PCAppProj/PCAppProject.h
Normal file
66
PCAppProj/PCAppProject.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
|
||||
@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
|
180
PCAppProj/PCAppProject.m
Normal file
180
PCAppProj/PCAppProject.m
Normal file
|
@ -0,0 +1,180 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <ProjectCenter/ProjectCenter.h>
|
||||
|
||||
#if defined(GNUSTEP)
|
||||
#import <AppKit/IMLoading.h>
|
||||
#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
|
11
PCAppProj/h.template
Normal file
11
PCAppProj/h.template
Normal file
|
@ -0,0 +1,11 @@
|
|||
$$
|
||||
/* $FILENAME$ created by $USERNAME$ on $DATE$ */
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface $FILENAMESANSEXTENSION$ : NSObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
18
PCAppProj/m.template
Normal file
18
PCAppProj/m.template
Normal file
|
@ -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
|
5
PCAppProj/main.m
Normal file
5
PCAppProj/main.m
Normal file
|
@ -0,0 +1,5 @@
|
|||
#import <AppKit/AppKit.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
BIN
PCBaseFileTypes/FileIcon_.c.tiff
Normal file
BIN
PCBaseFileTypes/FileIcon_.c.tiff
Normal file
Binary file not shown.
BIN
PCBaseFileTypes/FileIcon_.h.tiff
Normal file
BIN
PCBaseFileTypes/FileIcon_.h.tiff
Normal file
Binary file not shown.
BIN
PCBaseFileTypes/FileIcon_.m.tiff
Normal file
BIN
PCBaseFileTypes/FileIcon_.m.tiff
Normal file
Binary file not shown.
48
PCBaseFileTypes/GNUmakefile
Normal file
48
PCBaseFileTypes/GNUmakefile
Normal file
|
@ -0,0 +1,48 @@
|
|||
# GNUmakefile
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
# 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
|
||||
|
49
PCBaseFileTypes/Makefile
Executable file
49
PCBaseFileTypes/Makefile
Executable file
|
@ -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
|
122
PCBaseFileTypes/Makefile.postamble
Executable file
122
PCBaseFileTypes/Makefile.postamble
Executable file
|
@ -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.
|
130
PCBaseFileTypes/Makefile.preamble
Executable file
130
PCBaseFileTypes/Makefile.preamble
Executable file
|
@ -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.
|
||||
|
25
PCBaseFileTypes/PB.project
Executable file
25
PCBaseFileTypes/PB.project
Executable file
|
@ -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;
|
||||
}
|
49
PCBaseFileTypes/PCBaseFileType.h
Normal file
49
PCBaseFileTypes/PCBaseFileType.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
#import <ProjectCenter/FileCreator.h>
|
||||
|
||||
@class PCProject;
|
||||
|
||||
@interface PCBaseFileType : NSObject <FileCreator>
|
||||
{
|
||||
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
|
||||
|
||||
|
203
PCBaseFileTypes/PCBaseFileType.m
Normal file
203
PCBaseFileTypes/PCBaseFileType.m
Normal file
|
@ -0,0 +1,203 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <ProjectCenter/PCProject.h>
|
||||
|
||||
#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
|
||||
|
||||
|
11
PCBaseFileTypes/cfile.template
Normal file
11
PCBaseFileTypes/cfile.template
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* $FILENAME$ created by $USERNAME$ on $DATE$
|
||||
*
|
||||
* Project $PROJECTNAME$
|
||||
*
|
||||
* Created with ProjectCenter - http://www.projectcenter.ch
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "$FILENAMESANSEXTENSION$.h"
|
10
PCBaseFileTypes/cheader.template
Normal file
10
PCBaseFileTypes/cheader.template
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* $FILENAME$ created by $USERNAME$ on $DATE$
|
||||
*
|
||||
* Project $PROJECTNAME$
|
||||
*
|
||||
* Created with ProjectCenter - http://www.projectcenter.ch
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
15
PCBaseFileTypes/class.template
Normal file
15
PCBaseFileTypes/class.template
Normal file
|
@ -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
|
18
PCBaseFileTypes/header.template
Normal file
18
PCBaseFileTypes/header.template
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* $FILENAME$ created by $USERNAME$ on $DATE$
|
||||
*
|
||||
* Project $PROJECTNAME$
|
||||
*
|
||||
* Created with ProjectCenter - http://www.projectcenter.ch
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface $FILENAMESANSEXTENSION$ : NSObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
44
PCLib/FileCreator.h
Normal file
44
PCLib/FileCreator.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@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
|
||||
|
||||
|
97
PCLib/GNUmakefile
Normal file
97
PCLib/GNUmakefile
Normal file
|
@ -0,0 +1,97 @@
|
|||
#
|
||||
# src makefile for the PCLib
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Written by: Philippe C.D. Robert <robert@iam.unibe.ch>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
|
67
PCLib/GNUmakefile.preamble
Normal file
67
PCLib/GNUmakefile.preamble
Normal file
|
@ -0,0 +1,67 @@
|
|||
#
|
||||
# GNUmakefile.preamble
|
||||
#
|
||||
# Copyright (C) 1999 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <robert@iam.unibe.ch>
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
|
65
PCLib/Makefile
Executable file
65
PCLib/Makefile
Executable file
|
@ -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
|
122
PCLib/Makefile.postamble
Executable file
122
PCLib/Makefile.postamble
Executable file
|
@ -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.
|
130
PCLib/Makefile.preamble
Executable file
130
PCLib/Makefile.preamble
Executable file
|
@ -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.
|
||||
|
69
PCLib/PB.project
Executable file
69
PCLib/PB.project
Executable file
|
@ -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)";
|
||||
}
|
58
PCLib/PCBrowserController.h
Normal file
58
PCLib/PCBrowserController.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
@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
|
190
PCLib/PCBrowserController.m
Normal file
190
PCLib/PCBrowserController.m
Normal file
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
80
PCLib/PCBundleLoader.h
Normal file
80
PCLib/PCBundleLoader.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
#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<PreferenceController>)prefs;
|
||||
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor;
|
||||
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (BundleLoaderDelegates)
|
||||
|
||||
- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle;
|
||||
|
||||
@end
|
128
PCLib/PCBundleLoader.m
Normal file
128
PCLib/PCBundleLoader.m
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
58
PCLib/PCDataSource.h
Normal file
58
PCLib/PCDataSource.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
/*
|
||||
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
|
107
PCLib/PCDataSource.m
Normal file
107
PCLib/PCDataSource.m
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
90
PCLib/PCFileManager.h
Normal file
90
PCLib/PCFileManager.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@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
|
369
PCLib/PCFileManager.m
Normal file
369
PCLib/PCFileManager.m
Normal file
|
@ -0,0 +1,369 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/IMLoading.h>
|
||||
#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<FileCreator> 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
|
230
PCLib/PCProject.h
Normal file
230
PCLib/PCProject.h
Normal file
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
#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<ProjectBuilder>)aBuilder;
|
||||
- (id<ProjectBuilder>)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
|
800
PCLib/PCProject.m
Normal file
800
PCLib/PCProject.m
Normal file
|
@ -0,0 +1,800 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/IMLoading.h>
|
||||
#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<ProjectBuilder>)aBuilder
|
||||
{
|
||||
[projectBuilder autorelease];
|
||||
projectBuilder = [aBuilder retain];
|
||||
}
|
||||
|
||||
- (id<ProjectBuilder>)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
|
60
PCLib/PCProjectBuilder.h
Normal file
60
PCLib/PCProjectBuilder.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@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
|
228
PCLib/PCProjectBuilder.m
Normal file
228
PCLib/PCProjectBuilder.m
Normal file
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
@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
|
169
PCLib/PCProjectManager.h
Normal file
169
PCLib/PCProjectManager.h
Normal file
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
#import "PCProject.h"
|
||||
#import "ProjectBuilder.h"
|
||||
|
||||
@interface PCProjectManager : NSObject <ProjectBuilder>
|
||||
{
|
||||
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
|
462
PCLib/PCProjectManager.m
Normal file
462
PCLib/PCProjectManager.m
Normal file
|
@ -0,0 +1,462 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/IMLoading.h>
|
||||
#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<ProjectType> 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<ProjectEditor> 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
|
101
PCLib/PCServer.h
Normal file
101
PCLib/PCServer.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
#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 <Server>
|
||||
{
|
||||
NSMutableArray *clients;
|
||||
}
|
||||
|
||||
- (id)init;
|
||||
- (void)dealloc;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Server
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (BOOL)registerProjectSubmenu:(NSMenu *)menu;
|
||||
- (BOOL)registerFileSubmenu:(NSMenu *)menu;
|
||||
- (BOOL)registerToolsSubmenu:(NSMenu *)menu;
|
||||
- (BOOL)registerPrefController:(id<PreferenceController>)prefs;
|
||||
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor;
|
||||
- (BOOL)registerDebugger:(id<ProjectDebugger>)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
|
123
PCLib/PCServer.m
Normal file
123
PCLib/PCServer.m
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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<PreferenceController>)prefs
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)registerDebugger:(id<ProjectDebugger>)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
|
47
PCLib/PreferenceController.h
Normal file
47
PCLib/PreferenceController.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@protocol PreferenceController
|
||||
|
||||
- (NSString *)contentViewName;
|
||||
- (NSView *)contentView;
|
||||
- (void)revert;
|
||||
- (void)save;
|
||||
- (id)controller;
|
||||
|
||||
@end
|
37
PCLib/ProjectBuilder.h
Normal file
37
PCLib/ProjectBuilder.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@class PCProject;
|
||||
|
||||
@protocol ProjectBuilder
|
||||
|
||||
- (void)setActiveProject:(PCProject *)aProject;
|
||||
- (void)closeProject:(PCProject *)aProject;
|
||||
- (void)showInspectorForProject:(PCProject *)aProject;
|
||||
|
||||
@end
|
71
PCLib/ProjectCenter.h
Normal file
71
PCLib/ProjectCenter.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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"
|
41
PCLib/ProjectDebugger.h
Normal file
41
PCLib/ProjectDebugger.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@protocol ProjectDebugger
|
||||
|
||||
@end
|
56
PCLib/ProjectEditor.h
Normal file
56
PCLib/ProjectEditor.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@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<ProjectEditor>)editor didOpenFile:(NSString *)path;
|
||||
- (void)editor:(id<ProjectEditor>)editor didModifyFile:(NSString *)path;
|
||||
- (void)editor:(id<ProjectEditor>)editor didSaveFile:(NSString *)path;
|
||||
- (void)editor:(id<ProjectEditor>)editor didCloseFile:(NSString *)path;
|
||||
- (void)editorWillTerminate:(id<ProjectEditor>)editor;
|
||||
|
||||
@end
|
53
PCLib/ProjectType.h
Normal file
53
PCLib/ProjectType.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@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
|
59
PCLib/Server.h
Normal file
59
PCLib/Server.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
|
||||
#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<PreferenceController>)prefs;
|
||||
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor;
|
||||
- (BOOL)registerDebugger:(id<ProjectDebugger>)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
|
34
PCLib/h.template
Normal file
34
PCLib/h.template
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
|
||||
@interface $FILENAMESANSEXTENSION$ : NSObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
31
PCLib/m.template
Normal file
31
PCLib/m.template
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
54
PCLibProj/GNUmakefile
Normal file
54
PCLibProj/GNUmakefile
Normal file
|
@ -0,0 +1,54 @@
|
|||
# GNUmakefile
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
# 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
|
||||
|
26
PCLibProj/GNUmakefile.postamble
Normal file
26
PCLibProj/GNUmakefile.postamble
Normal file
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Makefile.postamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
71
PCLibProj/GNUmakefile.preamble
Normal file
71
PCLibProj/GNUmakefile.preamble
Normal file
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Makefile.preamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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
|
||||
#
|
29
PCLibProj/Info.table
Normal file
29
PCLibProj/Info.table
Normal file
|
@ -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$"
|
||||
);
|
||||
}
|
133
PCLibProj/LibProject.gmodel
Normal file
133
PCLibProj/LibProject.gmodel
Normal file
|
@ -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;
|
||||
}
|
49
PCLibProj/Makefile
Executable file
49
PCLibProj/Makefile
Executable file
|
@ -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
|
122
PCLibProj/Makefile.postamble
Executable file
122
PCLibProj/Makefile.postamble
Executable file
|
@ -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.
|
130
PCLibProj/Makefile.preamble
Executable file
130
PCLibProj/Makefile.preamble
Executable file
|
@ -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.
|
||||
|
30
PCLibProj/PB.project
Executable file
30
PCLibProj/PB.project
Executable file
|
@ -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;
|
||||
}
|
28
PCLibProj/PC.proj
Normal file
28
PCLibProj/PC.proj
Normal file
|
@ -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");
|
||||
}
|
38
PCLibProj/PCLibMakefileFactory.h
Normal file
38
PCLibProj/PCLibMakefileFactory.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <Foundation/Foundation.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
|
||||
@interface PCLibMakefileFactory : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
+ (PCLibMakefileFactory *)sharedFactory;
|
||||
|
||||
- (NSData *)makefileForProject:(PCProject *)aProject;
|
||||
|
||||
@end
|
148
PCLibProj/PCLibMakefileFactory.m
Normal file
148
PCLibProj/PCLibMakefileFactory.m
Normal file
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <phr@projectcenter.ch>\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
|
48
PCLibProj/PCLibProj.h
Normal file
48
PCLibProj/PCLibProj.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
#import <ProjectCenter/ProjectCenter.h>
|
||||
|
||||
@interface PCLibProj : NSObject <ProjectType>
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ProjectType
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+ (id)sharedCreator;
|
||||
|
||||
- (Class)projectClass;
|
||||
|
||||
- (NSString *)projectTypeName;
|
||||
- (NSDictionary *)typeTable;
|
||||
|
||||
- (PCProject *)createProjectAt:(NSString *)path;
|
||||
- (PCProject *)openProjectAt:(NSString *)path;
|
||||
|
||||
@end
|
134
PCLibProj/PCLibProj.m
Normal file
134
PCLibProj/PCLibProj.m
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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
|
65
PCLibProj/PCLibProject.h
Normal file
65
PCLibProj/PCLibProject.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <AppKit/AppKit.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
|
||||
@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
|
172
PCLibProj/PCLibProject.m
Normal file
172
PCLibProj/PCLibProject.m
Normal file
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.projectcenter.ch
|
||||
|
||||
Copyright (C) 2000 Philippe C.D. Robert
|
||||
|
||||
Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
|
||||
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 <ProjectCenter/ProjectCenter.h>
|
||||
|
||||
#if defined(GNUSTEP)
|
||||
#import <AppKit/IMLoading.h>
|
||||
#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
|
12
PCLibProj/Version
Normal file
12
PCLibProj/Version
Normal file
|
@ -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}
|
11
PCLibProj/h.template
Normal file
11
PCLibProj/h.template
Normal file
|
@ -0,0 +1,11 @@
|
|||
$$
|
||||
/* $FILENAME$ created by $USERNAME$ on $DATE$ */
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface $FILENAMESANSEXTENSION$ : NSObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
18
PCLibProj/m.template
Normal file
18
PCLibProj/m.template
Normal file
|
@ -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
|
52
PCToolProj/GNUmakefile
Normal file
52
PCToolProj/GNUmakefile
Normal file
|
@ -0,0 +1,52 @@
|
|||
# GNUmakefile
|
||||
#
|
||||
# Copyright (C) 2000 Philippe C.D. Robert
|
||||
#
|
||||
# Author: Philippe C.D. Robert <phr@projectcenter.ch>
|
||||
# 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
|
||||
|
30
PCToolProj/GNUmakefile.postamble
Normal file
30
PCToolProj/GNUmakefile.postamble
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Makefile.postamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
|
||||
|
74
PCToolProj/GNUmakefile.preamble
Normal file
74
PCToolProj/GNUmakefile.preamble
Normal file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# Makefile.preamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
|
||||
|
12
PCToolProj/Info-project.plist
Normal file
12
PCToolProj/Info-project.plist
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
NOTE = "Automatically generated, do not edit!";
|
||||
ToolName = "";
|
||||
ToolDescription = "";
|
||||
ToolIcon = "";
|
||||
ToolRelease = "";
|
||||
FullVersionID = "";
|
||||
Authors = ();
|
||||
URL = "";
|
||||
Copyright = "";
|
||||
CopyrightDescription = "";
|
||||
}
|
29
PCToolProj/Info.table
Normal file
29
PCToolProj/Info.table
Normal file
|
@ -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$"
|
||||
);
|
||||
}
|
30
PCToolProj/PC.proj
Normal file
30
PCToolProj/PC.proj
Normal file
|
@ -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");
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue