Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Icon for Rocksndiamonds #955
Conversation
| @@ -56,6 +56,9 @@ BUILD() | |||
|
|
|||
| INSTALL() | |||
| { | |||
| addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \ | |||
| $binDir/rocksndiamonds | |||
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
I haven't tested it yet, but it looks like you need to move these two lines:
addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \
$binDir/rocksndiamonds
to the end of the INSTALL function (or at least after the call to cp) and replace, in the second line, the $binDir by $destdir:
addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \
$destdir/rocksndiamonds
BTW, you also need to add
ADDITIONAL_FILES="
rocksndiamonds.iom
rocksndiamonds.rdef
"
after the PATCHES line.
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
$binDir/rocksndiamonds isn't correct here, it should be:
$appsDir/"Rocks'n'Diamonds"/rocksndiamonds
PS @fbrosson does the iom file need to go into the ADDITIONEL_FILES? as it's not needed for the build ...
| resource app_version { | ||
| major = 0, | ||
| middle = 0, | ||
| minor = 0, |
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
It might be a good idea to replace
major = 0,
middle = 0,
minor = 0,
by
major = 3,
middle = 3,
minor = 1,
but that's not very important.
BTW, in a few of our recipes, e.g. media-video/vlc/vlc-2.2.1.recipe or net-p2p/qbittorrent/qbittorrent-3.3.4.recipe, we have added a few extra steps to replace the hard-coded values (in major, middle and minor) by a pattern which we edit on the fly when we create a copy of rdef with these patterns replaced by the correct values.
It is not worth doing that for programs that do not get new releases, but it might be usefull the programs gets frequent updates.
I'm suggesting this in case other contributors think it could be a good idea.
Oops, wait, the game did not change since 2013, so using hard-coded values will be perfect. No need to use patterns. Sorry for the noise. (Keeping the message as you might find it usefull for other recipes ;-)
Hmm, Rocks'n'Diamonds 4.0.0.0 was released two days ago ;-)
So I guess it can be a good idea to use avoid hard-coded values.
This way, when we update the game, we won't need to edit the rdef file.
BTW, if you wish to update the game, you can do it in this task, or in a new task that we can create.
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
looks like I needed to submit my comments before they are shown ;)
PS, I took some time to create one for the 4.0.0.0.rc3 a while back, maybe that could be used as a base? IIRC there were some isseus with that one, hence why I didn't creat a pr back then :)
https://github.com/Begasus/haikuports/tree/rocksndiamonds
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
Yep, I was a little bit puzzled, because I could not find your comments ;-)
BTW, when I started writing my review your message on GCI was not there yet; And I only saw it after I submitted my message about my review. So this was a big coincidence!
@dash102; as you can see, we are all happy mentors!
@Begasus, how come did I forget about #745 !
Maybe we could create a task for providing feedback to your PR and make it build 4.0.0.0 or fixing the remaining issues in your recipe and updating it to 4.0.0.0.
Well, this is just a suggestion. I'll let you create the task if you wish ;-)
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
@fbrosson looks like I did file a reques for it then, but yes, it seems like a task in the making :-)
| internal = 0; | ||
|
|
||
| short_info = "", | ||
| long_info = "" |
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
You might wish to replace
short_info = "",
long_info = ""
by
short_info = "Rocks'n'Diamonds",
long_info = "An arcade style game by Artsoft Entertainment"
I'm not sure if the string I'm suggesting for long_info is consistent with what is expected.
Maybe it should be "Copyright 2013, Artsoft Entertainment". Any ideas?
This comment has been minimized.
This comment has been minimized.
dash102
Dec 25, 2016
Author
Contributor
That seems to be what is wanted, based on what I've seen in other rdef files :)
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
It looks like some rdefs have short descriptions, some others have short copyright notices.
What about:
short_info = "Rocks'n'Diamonds",
long_info = "Rocks'n'Diamonds, an arcade style game.\n©2001-2013 Artsoft Entertainment"
| major = 0, | ||
| middle = 0, | ||
| minor = 0, | ||
|
|
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
You could add the version for rocksndiamonds here, check out other files like for instance scummvm, tuxmmath
| @@ -56,6 +56,9 @@ BUILD() | |||
|
|
|||
| INSTALL() | |||
| { | |||
| addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \ | |||
| $binDir/rocksndiamonds | |||
|
|
|||
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
Move this section just before addAppDeskbarSymlink, and add ADDITIONAL_FILES="" to the recipe for the rdef file, check the generic app file in haikuporters tree to see where they should go to
| @@ -0,0 +1,39 @@ | |||
| // Rocks 'n' Diamonds icon by Stephanie Fu | |||
|
|
|||
| resource app_signature "application/x-vnd.rocksndiamonds"; | |||
This comment has been minimized.
This comment has been minimized.
humdingerb
Dec 25, 2016
Member
To be 100% totally correct, the app sig should be in the format: application/x-vnd.vendor-appname.
| minor = 0, | ||
|
|
||
| variety = B_APPV_DEVELOPMENT, | ||
| internal = 0; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
(I'm replying here because GitHub is not showing the "Reply" button on your next comment for some unknown reason to me.)
$binDir/rocksndiamonds isn't correct here, it should be:
$appsDir/"Rocks'n'Diamonds"/rocksndiamonds
Yep, I know. That's why I suggested using this in my review:
addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \
$destdir/rocksndiamonds
PS @fbrosson does the iom file need to go into the ADDITIONEL_FILES? as it's not needed for the build ...
Exact. If it's not needed for the build (or install), then we don't need it in ADDITIONEL_FILES.
But wait, where is that file used, if it's not required in the recipe?
Should it be part of the package? If yes then we need to add steps for it (and keep it in ADDITIONEL_FILES, of course.)
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
ah ok, so $destdir can be used also :) (overlooked that one)
the iom file isn't used by haikuporter, but could be handy if someone else in the future would try to enhance or change it (if needed) :)
| @@ -56,6 +56,9 @@ BUILD() | |||
|
|
|||
| INSTALL() | |||
| { | |||
| addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \ | |||
| $binDir/rocksndiamonds | |||
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
$binDir/rocksndiamonds isn't correct here, it should be:
$appsDir/"Rocks'n'Diamonds"/rocksndiamonds
PS @fbrosson does the iom file need to go into the ADDITIONEL_FILES? as it's not needed for the build ...
|
PS, the original recipe also needs a new patch for gcc5, I already linked Stephanie yesterday on IRC to the sollution, it just needs to be added :) |
|
@dash102 the icon looks nice +1 |
|
Wow, thanks for all the feedback! Glad you liked the icon :D |
|
@fbrosson I guess this is where you best step in, probably needs to revert some changes :) (as I did in the past) :) |
| @@ -59,5 +62,9 @@ INSTALL() | |||
| destdir=$appsDir/"Rocks'n'Diamonds" | |||
| mkdir -p $destdir | |||
| cp -r rocksndiamonds sounds graphics levels music $destdir | |||
|
|
|||
| addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \ | |||
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
You need to replace
addResourcesToBinaries $portDir/additional-files/rocksndiamonds.rdef \
$destdir/rocksndiamonds
by
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/rocksndiamonds.rdef > rocksndiamonds.rdef
addResourcesToBinaries rocksndiamonds.rdef $destdir/rocksndiamonds
|
|
||
| variety = B_APPV_DEVELOPMENT, | ||
| internal = 0, | ||
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
@Begasus, there's something strange about internal. Why do we put it after variety and not after minor in the rdef file?
In other words, are you sure we can use it the way you suggest?
| resource app_signature "application/x-vnd.Artsoft-rocksndiamonds"; | ||
|
|
||
| resource app_flags B_EXCLUSIVE_LAUNCH; | ||
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
I would say that if the game is already running (but got minimized or is not visible) then it would be nice to switch to it instead of launching a new instance.
| @@ -59,5 +62,9 @@ INSTALL() | |||
| destdir=$appsDir/"Rocks'n'Diamonds" | |||
| mkdir -p $destdir | |||
| cp -r rocksndiamonds sounds graphics levels music $destdir | |||
|
|
|||
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 25, 2016
Contributor
You should add the versioning info here, this should do the trick:
local MAJOR="echo "$portVersion" | cut -d. -f1"
local MIDDLE="echo "$portVersion" | cut -d. -f2"
local MINOR="echo "$portVersion" | cut -d. -f3"
local INTERNAL="echo "$portVersion" | cut -d. -f4"
sed
-e "s|@major@|$MAJOR|"
-e "s|@middle@|$MIDDLE|"
-e "s|@minor@|$MINOR|"
-e "s|@Internal@|$INTERNAL|"
$portDir/additional-files/rocksndiamonds.rdef > rocksndiamonds.rdef
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
Hmm, I did not know that internal could be used like this.
That's a good idea!
This comment has been minimized.
This comment has been minimized.
Begasus
Dec 26, 2016
Contributor
I first tried it by adding "2" in the rdef file, then checked it against FileTypes afterwords to see it worked, then I changed the line according to the previous lines that you handed to us in the past
|
Maybe it could be nice to:
and do the changes suggested in this small review? |
| @@ -15,6 +15,9 @@ REVISION="2" | |||
| SOURCE_URI="http://www.artsoft.org/RELEASES/unix/rocksndiamonds/rocksndiamonds-3.3.1.2.tar.gz" | |||
| CHECKSUM_SHA256="c117c20026299c6c935bd531ef9b0dc767731f600881d12ceb80c831483755f3" | |||
| PATCHES="rocksndiamonds-$portVersion.patchset" | |||
| ADDITIONAL_FILES=" | |||
| rocksndiamonds.rdef | |||
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
Shall we replace
ADDITIONAL_FILES="
rocksndiamonds.rdef
"
by
ADDITIONAL_FILES="
rocksndiamonds.rdef.in
"
| -e "s|@MIDDLE@|$MIDDLE|" \ | ||
| -e "s|@MINOR@|$MINOR|" \ | ||
| -e "s|@INTERNAL@|$INTERNAL|" \ | ||
| $portDir/additional-files/rocksndiamonds.rdef > rocksndiamonds.rdef |
This comment has been minimized.
This comment has been minimized.
fbrosson
Dec 25, 2016
Member
Shall we replace
$portDir/additional-files/rocksndiamonds.rdef > rocksndiamonds.rdef
by
$portDir/additional-files/rocksndiamonds.rdef.in > rocksndiamonds.rdef
(I had attached this comment to the wrong line in my previous review, so I removed it and added a single message, on the right line.)
|
@waddlesplash, something strange happened with this PR. The merge does not correspond to what we were reviewing. And when I look at the commits in branch "b2" that was being used for this PR, https://github.com/dash102/haikuports/commits/b2 I don't see anything about rocksndiamonds recipe or rdef. @waddlesplash, could it be that you clicked merge just when @dash102 was updating the PR? @dash102, please do not delete you local branch, as it seems all your work about rocksndiamonds has disappeared on GitHub. I get "No changes to show." and "This commit has no content." whenever I try to browse any of the commits of this PR. |
|
Thanks to @Begasus I got my local changes back, ready to push when this pr is reopened :) |
|
I really don't know what happened. I don't even know if @waddlesplash really tried to merge this PR. BTW, @waddlesplash, I think this is the first time I see so many PRs being merged so quickly ;-) |
|
On irc @waddlesplash said he didn't merge the pr, github did something weird. He also said it could be reopened, if I understood correctly. Should I wait for that, or should I open a new pr? |
|
That's funny, did you notice the message next to the purple "Merged" above? So I think the merge took place just after GitHub removed the previous top commit (in your remote branch), and before it could receive the new top commit from your local branch. The good news is that the repo is perfectly OK. |
|
I would wait. That will be fun to see if GitHub can allow us to reopen this PR ;-) |
Nope, I didn't do anything. |
No, @dash102 needs to push first and then reopen the PR. |
|
Pushed :D how can I reopen? |
|
Looks like GitHub is confused :/. Just make a new PR. |
dash102 commentedDec 25, 2016
No description provided.