summaryrefslogtreecommitdiff
path: root/indra/newview/ViewerInstall.cmake
blob: cf82044fb802f9d2288f6451aa4bea13b31ddf8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
if (LINUX)
    add_custom_command(
        OUTPUT contributors.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^    .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sort
        ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND paste
        ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        COMMAND ${CMAKE_SYSROOT}/usr/bin/sed
        ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        )
else (LINUX)
    add_custom_command(
        OUTPUT contributors.txt
        COMMAND sed
        ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sed
        ARGS -i '' -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sed
        ARGS -i '' -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sed
        ARGS -i '' -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sed
        ARGS -i '' -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sed
        ARGS -i '' -e '/^    .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND sort
        ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
        COMMAND paste
        ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        COMMAND sed
        ARGS -i '' -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        )
endif (LINUX)

add_custom_target(contributors ALL
    DEPENDS contributors.txt
    )

if (DARWIN)

    configure_file(
        ${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/InfoPlist.strings
        ${VIEWER_APP_BUNDLE}/Contents/Resources/English.lproj/InfoPlist.strings
        )

    install(FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/language.txt
        DESTINATION English.lproj
        )

    install(DIRECTORY
        German.lproj
        Japanese.lproj
        Korean.lproj
        app_settings
        character
        cursors_mac
        da.lproj
        es.lproj
        fonts
        fr.lproj
        uk.lproj
        hu.lproj
        it.lproj
        nl.lproj
        pl.lproj
        pt.lproj
        ru.lproj
        skins
        tr.lproj
        zh-Hans.lproj
        DESTINATION .
        )

    install(FILES
        SecondLife.nib
        ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
        cube.dae
        featuretable_mac.txt
        DESTINATION .
        )

    if (NOT PACKAGE)
        install(FILES
            secondlife.icns
            RENAME ${VIEWER_CHANNEL}.icns
            DESTINATION .
            )
    endif (NOT PACKAGE)

    install(FILES
        licenses-mac.txt
        RENAME licenses.txt
        DESTINATION .
        )

    install(FILES
        ${SCRIPTS_DIR}/messages/message_template.msg
        ${SCRIPTS_DIR}/../etc/message.xml
        ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        DESTINATION app_settings
        )

    install(DIRECTORY
        "${AUTOBUILD_INSTALL_DIR}/lib/release/Chromium Embedded Framework.framework"
        DESTINATION ../Frameworks
        )

    install(DIRECTORY
        "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper.app"
        "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (GPU).app"
        "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Plugin).app"
        "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Renderer).app"
        DESTINATION SLPlugin.app/Contents/Frameworks
        )

    if (NDOF)
        install(FILES
            "${AUTOBUILD_INSTALL_DIR}/lib/release/libndofdev.dylib"
            DESTINATION .
            )
    endif ()

    if (PACKAGE)
        configure_file(
            ${CMAKE_CURRENT_SOURCE_DIR}/FixPackage.cmake.in
            ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
            )
    else (PACKAGE)
        configure_file(
            ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in
            ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
            )
    endif (PACKAGE)
    install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake)

else (DARWIN)

install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}
        DESTINATION bin
        )

install(PROGRAMS linux_tools/launch_url.sh
        DESTINATION libexec/${VIEWER_BINARY_NAME}
        )

if (LINUX)
        if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
                set(_LIB lib/${ARCH}-linux-gnu)
        elseif (EXISTS /lib64)
                set(_LIB lib64)
        else ()
                set(_LIB lib)
        endif ()
        install(FILES
                ${AUTOBUILD_INSTALL_DIR}/lib/release/libcef.so
                DESTINATION ${_LIB})
        if (USE_FMODSTUDIO)
            install(FILES
                ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so
                ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so.13
                ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so.13.22
            DESTINATION ${_LIB})
        endif (USE_FMODSTUDIO)
        install(PROGRAMS
                ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome-sandbox
                DESTINATION libexec/${VIEWER_BINARY_NAME}
                #PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE
                #GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
        )
        install(PROGRAMS
                ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host
                DESTINATION libexec/${VIEWER_BINARY_NAME})
        install(FILES
                ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin
                ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin
                DESTINATION ${_LIB})
        install(FILES
                ${AUTOBUILD_INSTALL_DIR}/resources/chrome_100_percent.pak
                ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak
                ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat
                ${AUTOBUILD_INSTALL_DIR}/resources/resources.pak
                DESTINATION ${_LIB})
        install(DIRECTORY
                ${AUTOBUILD_INSTALL_DIR}/resources/locales
                DESTINATION ${_LIB})
endif (LINUX)

install(DIRECTORY skins app_settings fonts
        DESTINATION share/${VIEWER_BINARY_NAME}
        PATTERN ".svn" EXCLUDE
        )

install(DIRECTORY icons/hicolor
        DESTINATION share/icons
        )

find_file(IS_ARTWORK_PRESENT NAMES have_artwork_bundle.marker
          PATHS ${VIEWER_DIR}/newview/res)

if (IS_ARTWORK_PRESENT)
  install(DIRECTORY res res-sdl character
          DESTINATION share/${VIEWER_BINARY_NAME}
          PATTERN ".svn" EXCLUDE
          )
else (IS_ARTWORK_PRESENT)
  message(STATUS "WARNING: Artwork is not present, and will not be installed")
endif (IS_ARTWORK_PRESENT)

    install(FILES
        ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
        featuretable_linux.txt
        #featuretable_solaris.txt
        DESTINATION share/${VIEWER_BINARY_NAME}
        )

    install(FILES
        licenses-linux.txt
        RENAME licenses.txt
        DESTINATION share/${VIEWER_BINARY_NAME}
        )

install(FILES ${SCRIPTS_DIR}/messages/message_template.msg
        ${SCRIPTS_DIR}/../etc/message.xml
        ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
        DESTINATION share/${VIEWER_BINARY_NAME}/app_settings
        )

    install(FILES linux_tools/${VIEWER_BINARY_NAME}.desktop
        DESTINATION share/applications
        )

endif (DARWIN)