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

Last change on this file since 66648 was 66648, checked in by ryandesign@…, 10 years ago

Myst Online ports: add note about water issues in Er'cana on NVIDIA

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