source: trunk/dports/games/mystonline-wine/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: 6.3 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-wine
7set my_name                 mystonline
8version                     2010
9revision                    4
10platforms                   darwin
11categories                  games x11
12maintainers                 ryandesign
13homepage                    http://mystonline.com/
14dist_subdir                 ${my_name}
15distfiles
16extract.mkdir               yes
17
18description                 Myst Online: URU Live Again
19
20long_description            ${description} (MO:ULagain) running via Wine
21
22depends_build               port:winetricks
23
24depends_run                 path:bin/wine:wine \
25                            port:mystonline-bootstrap
26
27depends_skip_archcheck      wine wine-crossover wine-devel
28
29set libexec_dir             ${prefix}/libexec/${name}
30set share_dir               ${prefix}/share/${my_name}
31set bootstrap_dir           ${share_dir}/bootstrap
32set assets_dir              ${share_dir}/data
33set wineprefix              ${share_dir}/wine
34set app_name                "Myst Online (Wine)"
35set app_package             ${applications_dir}/${app_name}.app
36
37post-extract {
38    xinstall -m 644 -W ${filespath} MOUL.sh chown-data.c ${worksrcpath}
39}
40
41post-patch {
42    reinplace "s|@BOOTSTRAP_LAUNCHER@|${bootstrap_dir}/UruLauncher.exe|g" ${worksrcpath}/MOUL.sh
43    reinplace "s|@LAUNCHER@|${assets_dir}/UruLauncher.exe|g" ${worksrcpath}/MOUL.sh
44    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/MOUL.sh
45    reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/MOUL.sh
46    reinplace "s|@LIBEXEC@|${libexec_dir}|g" ${worksrcpath}/MOUL.sh
47    reinplace -W ${worksrcpath} "s|@WINEPREFIX@|${wineprefix}|g" MOUL.sh chown-data.c
48    reinplace -W ${worksrcpath} "s|@ASSETS@|${assets_dir}|g" MOUL.sh chown-data.c
49}
50
51use_configure               no
52
53build {
54    # If winetricks needs to download any files, put them where the other distfiles are
55    if {![file exists ${distpath}/winetrickscache]} {
56        ln -s . ${distpath}/winetrickscache
57    }
58   
59    # Create the wine prefix and enable font antialiasing
60    system "WINEPREFIX=${worksrcpath}/wineprefix HOME=${distpath} ${prefix}/bin/winetricks -q fontsmooth-rgb"
61   
62    # Delete any temporary directory definitions; use the default C:\windows\temp
63    reinplace -E {/^"TE?MP"=/d} ${worksrcpath}/wineprefix/user.reg
64   
65    # Map C:\windows\temp to /tmp so any temp files that get created
66    # (e.g. by the PhysX installer) get cleaned up by Mac OS X as usual
67    delete ${worksrcpath}/wineprefix/drive_c/windows/temp
68    ln -s /tmp ${worksrcpath}/wineprefix/drive_c/windows/temp
69   
70    # Delete dosdevices -- it might contain references to transient disks
71    # the user happens to have mounted, and wine will recreate it anyway
72    delete ${worksrcpath}/wineprefix/dosdevices
73   
74    # Link "Uru Live" to our assets dir
75    set program_files "${worksrcpath}/wineprefix/drive_c/Program Files"
76    file mkdir ${program_files}
77    ln -s ${assets_dir} "${program_files}/Uru Live"
78   
79    # Build the chown wrapper program
80    system -W ${worksrcpath} "${configure.cc} ${configure.cc_archflags} chown-data.c -o chown-data"
81}
82
83destroot {
84    xinstall -d ${destroot}${libexec_dir} \
85                ${destroot}${share_dir} \
86                ${destroot}${app_package}/Contents/MacOS
87   
88    xinstall -m 4755 -W ${worksrcpath} chown-data ${destroot}${libexec_dir}
89   
90    xinstall -W ${worksrcpath} MOUL.sh ${destroot}${app_package}/Contents/MacOS/${app_name}
91   
92    copy ${worksrcpath}/wineprefix ${destroot}${wineprefix}
93}
94
95notes "
96Welcome to Myst Online: Uru Live Again (MO:ULagain)
97
98* To play Myst Online, you need an account, which you can create for free by visiting\
99${homepage} and clicking Play.
100* Myst Online automatically updates itself.\
101The first time you open Myst Online, it will download several gigabytes of game data.\
102Be patient\; this will take some time.\
103If you already have the game data from a non-MacPorts installation of Myst Online,\
104you can save time by copying or moving it into ${assets_dir}
105
106This version of Myst Online runs via Wine.\
107Peculiarities of this method of running Myst Online include:
108
109* Don't click anywhere in the updater window.\
110If you do, the window will follow the mouse cursor and will not go away.\
111If you need to cancel the updater, press the Escape key.
112* The first time you log into Myst Online, you will be prompted to install PhysX.
113* The mouse cursor image is wrong.
114* To be able to look around by holding down the Command key while dragging,\
115enable the \"Emulate three button mouse\" option in X11 preferences.
116* The menubar cannot be hidden.
117* The dock does not hide automatically. It can be hidden using the normal ways\
118(e.g. Apple menu > Dock > Turn hiding on) but you may also want to move the dock\
119to the side of the screen as otherwise it gets in the way of game play.
120* The game's dock icon keeps bouncing longer than it should, doesn't show that\
121it's running even when it is, and doesn't bring the game to the front if you click it.
122* Accessing the dock icon's context menu doesn't let you quit the game normally,\
123though it does let you force-quit it.
124* The application has a generic icon.
125* The game starts in fullscreen mode. If in fullscreen mode you access the game's\
126graphics settings, you cannot return to the game\; you must force-quit.
127* To switch between fullscreen and windowed mode, use the checkbox in the graphics settings.
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 Cider version in the mystonline-cider port,\
137and running the game in Windows via VMware, Parallels or Boot Camp.
138
139To play Myst Online, open ${app_package}.
140"
141
142universal_variant           no
143
144livecheck.type              none
Note: See TracBrowser for help on using the repository browser.