source: trunk/dports/games/mystonline-cider/Portfile

Last change on this file was 128381, checked in by ryandesign@…, 3 years ago

mystonline-cider, mystonline-wine: have launcher delete some files, which will be redownloaded automatically, that apparently cause launch failure for some users when present

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 128381 2014-11-20 14:47:42Z ryandesign@macports.org $
3
4PortSystem                  1.0
5
6name                        mystonline-cider
7set my_name                 mystonline
8version                     2010
9revision                    4
10platforms                   darwin
11categories                  games x11
12maintainers                 ryandesign
13homepage                    http://mystonline.com/
14dist_subdir                 ${my_name}
15master_sites                http://archives.gametap.com/static/uru-client/mac/
16set installer_dmg           mac_myst_setup.dmg
17set launcher_exe            UruLauncher.exe
18distfiles                   ${installer_dmg}
19extract.mkdir               yes
20extract.only
21
22description                 Myst Online: URU Live Again
23
24long_description            ${description} (MO:ULagain) running via the Cider wrapper from GameTap
25
26checksums                   md5     3b3b5af000b32a4415e6aa7d944083fb \
27                            sha1    253e14987a9375d66f92373b11e2dda43872b2a8 \
28                            rmd160  c156b0edd20a691248269f6e3ab9996fddae74c8
29
30depends_run                 port:mystonline-bootstrap
31
32set libexec_dir             ${prefix}/libexec/${name}
33set share_dir               ${prefix}/share/${my_name}
34set bootstrap_dir           ${share_dir}/bootstrap
35set assets_dir              ${share_dir}/data
36set wineprefix              ${share_dir}/cider
37set app_name                "Myst Online (Cider)"
38set app_package             ${applications_dir}/${app_name}.app
39
40post-extract {
41    set my_dmg_mount [my_attach_disk_image ${distpath}/${installer_dmg}]
42    copy "${my_dmg_mount}/Myst Online.app" ${worksrcpath}/app
43    my_detach_disk_image ${my_dmg_mount}
44   
45    xinstall -m 644 -W ${filespath} MOUL.sh chown-data.c ${worksrcpath}
46}
47
48post-patch {
49    reinplace "s|@BOOTSTRAP_LAUNCHER@|${bootstrap_dir}/${launcher_exe}|g" ${worksrcpath}/MOUL.sh
50    reinplace "s|@LAUNCHER@|${assets_dir}/${launcher_exe}|g" ${worksrcpath}/MOUL.sh
51    reinplace "s|@LIBEXEC@|${libexec_dir}|g" ${worksrcpath}/MOUL.sh
52    reinplace -W ${worksrcpath} "s|@WINEPREFIX@|${wineprefix}|g" MOUL.sh chown-data.c
53    reinplace -W ${worksrcpath} "s|@ASSETS@|${assets_dir}|g" MOUL.sh chown-data.c
54    reinplace "s|@APP_PACKAGE@|${app_package}|g" ${worksrcpath}/chown-data.c
55}
56
57use_configure               no
58
59build {
60    # Delete the main app executable (which does nothing but launch the child app)
61    # and replace it with our script (which does that and more)
62    delete "${worksrcpath}/app/Contents/MacOS/Uru Live"
63    xinstall -W ${worksrcpath} MOUL.sh "${worksrcpath}/app/Contents/MacOS/Uru Live"
64   
65    # Move the wine prefix and symlink it back to where the app expects it
66    set transgaming_dir "${worksrcpath}/app/Contents/Resources/Myst Online.app/Contents/Resources/transgaming"
67    move ${transgaming_dir} ${worksrcpath}/wineprefix
68    ln -s ${wineprefix} ${transgaming_dir}
69   
70    # Link "Uru Live" to our assets dir
71    set program_files "${worksrcpath}/wineprefix/c_drive/Program Files"
72    delete "${program_files}/Uru Live"
73    ln -s ${assets_dir} "${program_files}/Uru Live"
74   
75    file mkdir ${worksrcpath}/assets
76    ln -s "${app_package}/Contents/Resources/Myst Online.app/Contents/Resources" ${worksrcpath}/assets/Cider
77   
78    # Update the URL from which server status messages are obtained
79    foreach a {Login Updater} {
80        reinplace "s|support.mystonline.com/serverstatus/urulivelive.php|support.cyanworlds.com/serverstatus/moullive.php|g" \
81            "${worksrcpath}/app/Contents/Resources/Myst Online.app/Contents/Resources/URU Live ${a}.app/Contents/Info.plist"
82    }
83   
84    # Make sure we show the updated terms and conditions
85    set tos "${worksrcpath}/app/Contents/Resources/Myst Online.app/Contents/Resources/URU Live EULA.app/Contents/Resources/TOS.txt"
86    delete ${tos}
87    ln -s ${assets_dir}/TOS.txt ${tos}
88   
89    # Build the chown wrapper program
90    system -W ${worksrcpath} "${configure.cc} ${configure.cc_archflags} chown-data.c -o chown-data"
91}
92
93destroot {
94    xinstall -d ${destroot}${libexec_dir} \
95                ${destroot}${share_dir} \
96                ${destroot}${applications_dir}
97   
98    xinstall -m 4755 -W ${worksrcpath} chown-data ${destroot}${libexec_dir}
99   
100    copy ${worksrcpath}/app ${destroot}${app_package}
101   
102    copy ${worksrcpath}/assets ${destroot}${assets_dir}
103   
104    copy ${worksrcpath}/wineprefix ${destroot}${wineprefix}
105}
106
107notes "
108Welcome to Myst Online: Uru Live Again (MO:ULagain)
109
110* To play Myst Online, you need an account, which you can create for free by visiting\
111${homepage} and clicking Play.
112* Myst Online automatically updates itself.\
113The first time you open Myst Online, it will download several gigabytes of game data.\
114Be patient\; this will take some time.\
115If you already have the game data from a non-MacPorts installation of Myst Online,\
116you can save time by copying or moving it into ${assets_dir}
117
118This version of Myst Online runs via the Cider wrapper\
119developed for the GameTap version of Myst Online which ran from 2007 to 2008.\
120Peculiarities of this method of running Myst Online include:
121
122* Several icons appear and disappear in the dock while the game is starting.
123* The game may crash (unexpectedly quit) when you quit it.
124* If you need to force-quit the game while in fullscreen mode, press Command-Option-Escape.
125* The game starts in fullscreen mode at 800x600 resolution.\
126To switch to a higher resolution, use the in-game graphics settings.
127* To switch between fullscreen and windowed mode, press Command-Return.
128* Intel GMA 950 integrated graphics cards are not supported.\
129Some graphics including your avatar will not display correctly.
130* If sounds are distorted or nonexistent, install the sounddecompress port and follow the instructions.
131* The microphone cannot be used to talk to other players, though you can hear other players talking to you.
132* On Macs with NVIDIA graphics cards, water does not show up properly in Er'cana.
133* On Macs with NVIDIA graphics cards that have not upgraded to Mac OS X 10.6.3,\
134Eder Kemo has severe performance problems.
135
136Other methods of running Myst Online on a Mac include the Wine version in the mystonline-wine port,\
137and running the game in Windows via VMware, Parallels or Boot Camp.
138
139To play Myst Online, open ${app_package}.
140"
141
142supported_archs             i386
143universal_variant           no
144
145# Mounts a disk image.
146proc my_attach_disk_image {disk_image} {
147    global workpath
148    set tmp_disk_image_dir [mkdtemp "${workpath}/.tmp/disk_image.XXXXXXXX"]
149    set tmp_disk_image ${tmp_disk_image_dir}/[file tail ${disk_image}].cdr
150    system "hdiutil convert -quiet -ov -format UDTO -o '${tmp_disk_image}' '${disk_image}'"
151    set mountpoint [mkdtemp "${workpath}/.tmp/mountpoint.XXXXXXXX"]
152    system "hdiutil attach -quiet '${tmp_disk_image}' -mountpoint '${mountpoint}' -private -nobrowse -noautoopen -noautofsck -noverify -readonly"
153    return ${mountpoint}
154}
155
156# Unmounts a disk image.
157proc my_detach_disk_image {mountpoint} {
158    system "hdiutil detach '${mountpoint}' -force"
159    file delete -force ${mountpoint}
160}
161
162livecheck.type              none
Note: See TracBrowser for help on using the repository browser.