View | Details | Raw Unified | Return to issue 111500
Collapse All | Expand All

(-)a/pyuno/source/loader/makefile.mk (+6 lines)
Lines 99-109 Link Here
99
	$(DLLDEST)$/pyuno_services.rdb
99
	$(DLLDEST)$/pyuno_services.rdb
100
.ENDIF # L10N_framework
100
.ENDIF # L10N_framework
101
101
102
ALLTAR: $(eq,$(OS),MACOSX $(MISC)/installname_loader $(NULL))
103
102
.INCLUDE :  target.mk
104
.INCLUDE :  target.mk
103
.IF "$(L10N_framework)"==""
105
.IF "$(L10N_framework)"==""
104
$(DLLDEST)$/%.py: %.py
106
$(DLLDEST)$/%.py: %.py
105
	cp $? $@
107
	cp $? $@
106
108
109
$(MISC)/installname_loader : $(LB)/$(TARGET)$(DLLPOST)
110
	install_name_tool -change $(PYTHON_MAKEINSTALLDIR)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/OOoPython @loader_path/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/OOoPython $<
111
	touch $@
112
107
$(DLLDEST)$/pyuno_services.rdb : makefile.mk $(DLLDEST)$/$(DLLPRE)$(TARGET)$(DLLPOST)
113
$(DLLDEST)$/pyuno_services.rdb : makefile.mk $(DLLDEST)$/$(DLLPRE)$(TARGET)$(DLLPOST)
108
	-rm -f $@ $(DLLDEST)$/pyuno_services.tmp $(DLLDEST)$/pyuno_services.rdb
114
	-rm -f $@ $(DLLDEST)$/pyuno_services.tmp $(DLLDEST)$/pyuno_services.rdb
109
	cd $(DLLDEST) && $(REGCOMP) -register -r pyuno_services.tmp -wop $(foreach,i,$(COMPONENTS) -c $(i))
115
	cd $(DLLDEST) && $(REGCOMP) -register -r pyuno_services.tmp -wop $(foreach,i,$(COMPONENTS) -c $(i))
(-)a/pyuno/source/module/makefile.mk (-1 / +6 lines)
Lines 120-126 Link Here
120
$(LB)$/lib$(TARGET).a: $(MISC)$/$(TARGET).def
120
$(LB)$/lib$(TARGET).a: $(MISC)$/$(TARGET).def
121
	dlltool --dllname $(TARGET)$(DLLPOST) --input-def=$(MISC)$/$(TARGET).def --kill-at --output-lib=$(LB)$/lib$(TARGET).a
121
	dlltool --dllname $(TARGET)$(DLLPOST) --input-def=$(MISC)$/$(TARGET).def --kill-at --output-lib=$(LB)$/lib$(TARGET).a
122
.ELSE
122
.ELSE
123
ALLTAR : \
123
ALLTAR : $(eq,$(OS),MACOSX $(MISC)/installname_module $(NULL)) \
124
	$(DLLDEST)$/uno.py 		\
124
	$(DLLDEST)$/uno.py 		\
125
	$(DLLDEST)$/unohelper.py	\
125
	$(DLLDEST)$/unohelper.py	\
126
	$(PYUNO_MODULE)			\
126
	$(PYUNO_MODULE)			\
Lines 153-158 Link Here
153
	@+source $(MISC)$/$(@:b).cmd
153
	@+source $(MISC)$/$(@:b).cmd
154
.ENDIF
154
.ENDIF
155
155
156
$(MISC)/installname_module : $(LB)/$(DLLPRE)$(TARGET)$(DLLPOST)
157
	install_name_tool -change $(PYTHON_MAKEINSTALLDIR)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/OOoPython @loader_path/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/OOoPython $<
158
	# hack to make checkdll happy
159
	ln -sf $(SOLARLIBDIR)/OOoPython.framework $(LB)/OOoPython.framework
160
	touch $@
156
161
157
$(MISC)$/$(PYUNORC) : pyuno
162
$(MISC)$/$(PYUNORC) : pyuno
158
	-rm -f $@
163
	-rm -f $@
(-)a/pyuno/zipcore/makefile.mk (-8 / +5 lines)
Lines 37-43 Link Here
37
37
38
.IF "$(SYSTEM_PYTHON)" == "YES" || "$(GUI)" == "OS2"
38
.IF "$(SYSTEM_PYTHON)" == "YES" || "$(GUI)" == "OS2"
39
systempython:
39
systempython:
40
        @echo "Not building python-core because system python is being used"
40
	@echo "Not building python-core because system python is being used"
41
.ELSE
41
.ELSE
42
42
43
.INCLUDE : pyversion.mk
43
.INCLUDE : pyversion.mk
Lines 54-59 Link Here
54
.ENDIF
54
.ENDIF
55
.ENDIF
55
.ENDIF
56
56
57
.IF "$(OS)" != "MACOSX"
57
FINDLIBFILES_TMP:=$(subst,/,$/ \
58
FINDLIBFILES_TMP:=$(subst,/,$/ \
58
	$(shell @$(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc |$(GREP) -v .py\~ |$(GREP) -v .orig ))
59
	$(shell @$(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc |$(GREP) -v .py\~ |$(GREP) -v .orig ))
59
FINDLIBFILES=$(subst,$(SOLARLIBDIR)$/python, $(FINDLIBFILES_TMP))
60
FINDLIBFILES=$(subst,$(SOLARLIBDIR)$/python, $(FINDLIBFILES_TMP))
Lines 75-88 Link Here
75
76
76
ALLTAR: \
77
ALLTAR: \
77
	$(BIN)$/$(PYDIRNAME).zip
78
	$(BIN)$/$(PYDIRNAME).zip
79
.ENDIF
78
80
79
.IF "$(GUI)" == "UNX"
81
.IF "$(GUI)" == "UNX"
80
ALLTAR : $(BIN)$/python.sh
82
ALLTAR : $(BIN)$/python.sh
81
$(BIN)$/python.sh : python.sh
83
$(BIN)$/python.sh : python$(eq,$(OS),MACOSX _mac $(NULL)).sh
82
	-rm -f $@
84
	sed 's/%%PYVERSION%%/$(eq,$(OS),MACOSX $(PYMAJOR).$(PYMINOR) $(PYVERSION))/g' < $? > $@
83
	cat $? > $@
84
	sed 's/%%PYVERSION%%/$(PYVERSION)/g' < $@ > $@.new
85
	mv $@.new $@
86
	chmod +x $@
85
	chmod +x $@
87
.ENDIF
86
.ENDIF
88
87
Lines 93-102 Link Here
93
92
94
$(BIN)$/$(PYDIRNAME).zip : $(FILES)
93
$(BIN)$/$(PYDIRNAME).zip : $(FILES)
95
.IF "$(GUI)" == "UNX"
94
.IF "$(GUI)" == "UNX"
96
.IF "$(OS)" != "MACOSX"
97
	cd $(DESTROOT) && find . -name '*$(DLLPOST)' | xargs strip
95
	cd $(DESTROOT) && find . -name '*$(DLLPOST)' | xargs strip
98
.ENDIF
96
.ENDIF
99
.ENDIF
100
	-rm -f $@
97
	-rm -f $@
101
	cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
98
	cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
102
99
(-)201e3ca7c48f (+67 lines)
Added Link Here
1
#!/bin/sh
2
#*************************************************************************
3
#
4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# 
6
# Copyright 2000, 2010 Oracle and/or its affiliates.
7
#
8
# OpenOffice.org - a multi-platform office productivity suite
9
#
10
# This file is part of OpenOffice.org.
11
#
12
# OpenOffice.org is free software: you can redistribute it and/or modify
13
# it under the terms of the GNU Lesser General Public License version 3
14
# only, as published by the Free Software Foundation.
15
#
16
# OpenOffice.org is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
# GNU Lesser General Public License version 3 for more details
20
# (a copy is included in the LICENSE file that accompanied this code).
21
#
22
# You should have received a copy of the GNU Lesser General Public License
23
# version 3 along with OpenOffice.org.  If not, see
24
# <http://www.openoffice.org/license.html>
25
# for a copy of the LGPLv3 License.
26
#
27
#*************************************************************************
28
29
# resolve installation directory
30
sd_cwd="`pwd`"
31
if [ -h "$0" ] ; then
32
	sd_basename=`basename "$0"`
33
 	sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` 
34
    cd "`dirname "$0"`"
35
    cd "`dirname "$sd_script"`"
36
else
37
    cd "`dirname "$0"`"
38
fi
39
sd_prog=`pwd`
40
cd "$sd_cwd"
41
42
# Set PATH so that crash_report is found:
43
PATH=$sd_prog${PATH+:$PATH}
44
export PATH
45
46
# Set LD_LIBRARY_PATH so that "import pyuno" finds libpyuno.so:
47
DYLD_LIBRARY_PATH=$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
48
export DYLD_LIBRARY_PATH
49
50
# Set UNO_PATH so that "officehelper.bootstrap()" can find soffice executable:
51
: ${UNO_PATH=$sd_prog}
52
export UNO_PATH
53
54
# Set URE_BOOTSTRAP so that "uno.getComponentContext()" bootstraps a complete
55
# OOo UNO environment:
56
: ${URE_BOOTSTRAP=vnd.sun.star.pathname:$sd_prog/fundamentalrc}
57
export URE_BOOTSTRAP
58
59
PYTHONHOME=$sd_prog/../basis-link/program/OOoPython.framework
60
export PYTHONHOME
61
62
pybasislibdir=$PYTHONHOME/Versions/%%PYVERSION%%/lib/python%%PYVERSION%%
63
PYTHONPATH=$sd_prog/../basis-link/program:$pybasislibdir:$pybasislibdir/lib-dynload:$pybasislibdir/lib-tk:$pybasislibdir/site-packages${PYTHONPATH+:$PYTHONPATH}
64
export PYTHONPATH
65
66
# execute binary
67
exec "$PYTHONHOME/Versions/%%PYVERSION%%/Resources/Python.app/Contents/MacOS/OOoPython" "$@"

Return to issue 111500