svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22668:22701
[blender.git] / source / darwin / Makefile
1 #
2 # $Id$
3 #
4 # ***** BEGIN GPL LICENSE BLOCK *****
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 #
20 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 # All rights reserved.
22 #
23 # The Original Code is: all of this file.
24 #
25 # Contributor(s): none yet.
26 #
27 # ***** END GPL LICENSE BLOCK *****
28 #
29
30 include nan_definitions.mk
31
32 DIR = $(OCGDIR)/$(DEBUG_DIR)
33
34 all:: 
35         @# set up directory structure for the OSX aplication bundle
36         @echo "---> creating directory structure for $(APPLICATION)"
37         @rm -rf $(DIR)/bin/$(APPLICATION).app
38         @cp -R $(APPLICATION).app $(DIR)/bin
39         @cat $(APPLICATION).app/Contents/Info.plist | sed s/VERSION/`cat ../../release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > $(DIR)/bin/$(APPLICATION).app/Contents/Info.plist
40         @echo "---> copying binary"
41         @cp $(DIR)/bin/$(APPLICATION) $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/
42         @echo "---> adding excutable attributes"
43         @chmod +x $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/$(APPLICATION)
44 ifeq ($(APPLICATION), blender)
45         @echo "---> copying message files"
46         @cp -R $(NANBLENDERHOME)/bin/.blender/locale $(DIR)/bin/$(APPLICATION).app/Contents/Resources
47         @echo "---> copying .Blanguages"
48         @cp $(NANBLENDERHOME)/bin/.blender/.Blanguages $(DIR)/bin/$(APPLICATION).app/Contents/Resources
49         @echo "---> copying .blender/ scripts"
50         @cp -R $(NANBLENDERHOME)/bin/.blender $(DIR)/bin/$(APPLICATION).app/Contents/MacOS
51         @cp -R $(NANBLENDERHOME)/release/scripts $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/
52         @echo "---> copying ui scripts"
53         @cp -R $(NANBLENDERHOME)/release/ui $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/
54         @echo "---> copying python modules"
55         @mkdir $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/python
56         @unzip -q $(LCGDIR)/release/python.zip -d $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/python/ 
57 endif
58         @echo "---> removing SVN directories and Mac hidden files from distribution"
59         @find $(DIR)/bin/$(APPLICATION).app -name CVS -prune -exec rm -rf {} \;
60         @find $(DIR)/bin/$(APPLICATION).app -name .DS_Store -exec rm -f {} \;
61         @find $(DIR)/bin/$(APPLICATION).app -name .svn -prune -exec rm -rf {} \;