Opened 5 years ago
Closed 5 years ago
#60402 closed defect (fixed)
2048.cpp should not require user to launch binary from within /opt/local/bin
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | chenguokai (Xim) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: | 2048.cpp |
Description
2048.cpp prints these notes:
$ port notes 2048.cpp 2048.cpp has the following notes: If you run 2048 binary from a directory other than /opt/local/bin, it is likely that this game fails to save scores. It is expected, since upstream code takes a relative path. Wait for any upstream updates.
It is undesirable to force the user to do this. Wouldn't it be simple to create a wrapper script that solves this problem? For example, move the real binary from /opt/local/bin/2048 to /opt/local/libexec/2048.cpp/2048 and put a new shell script at /opt/local/bin/2048 with the following contents:
#!/bin/sh cd "/opt/local/libexec/2048.cpp" exec ./2048 "$@"
and adjust the relative paths used in 2048 to have one extra ../
?
If there is already an upstream bug report for this problem, it would be useful to include it as a comment in the Portfile above the notes. If there isn't already an upstream bug report, one should be created.
Change History (2)
comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to chenguokai |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by Chen Guokai <chenguokai17@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
In 64a87a1a26651df670d275d162eea649277e05e2/macports-ports (master):