-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added git build version to the settings menu
- Loading branch information
Showing
6 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
/udp_debug_reader/GeckoLog.txt | ||
/installer/sd_loader.h | ||
/languages/*.pot | ||
/src/gitrev.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#! /bin/bash | ||
# | ||
rev_new=$(git rev-parse --short=7 HEAD) | ||
|
||
rev_old=$(cat ./src/gitrev.c 2>/dev/null | tr -d '\n' | awk -F"\"" '{print $2}' | awk -F"\"" '{print $1}') | ||
|
||
|
||
if [ "$rev_new" != "$rev_old" ] || [ ! -f ./src/gitrev.c ]; then | ||
|
||
if [ -n "$rev_new" ]; then | ||
echo "Changed Rev $rev_old to $rev_new" >&2 | ||
fi | ||
|
||
cat <<EOF > ./src/gitrev.c | ||
#define GIT_REV "$rev_new" | ||
const char *GetRev() | ||
{ | ||
return GIT_REV; | ||
} | ||
EOF | ||
|
||
rev_date=`date -u +%Y%m%d%H%M%S` | ||
|
||
cat <<EOF > ./meta/meta.xml | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<app version="1"> | ||
<name>Loadiine GX2</name> | ||
<coder>Dimok, Maschell, n1ghty, dibas</coder> | ||
<version>0.3 r$rev_new</version> | ||
<release_date>$rev_date</release_date> | ||
<short_description>WiiU game loader</short_description> | ||
<long_description>Loads games from SD card. | ||
Compatibility list: | ||
http://wiki.gbatemp.net/wiki/Loadiine_compatibility_list | ||
Sources: | ||
https://github.com/dimok789/loadiine_gx2 | ||
</long_description> | ||
</app> | ||
EOF | ||
|
||
fi | ||
|
||
echo $rev_new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef __GITREV_H_ | ||
#define __GITREV_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
const char *GetRev(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // __GITREV_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bfed87d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create a file to do this,see: roxas75/rxTools@81566b7 ( the CFLAGS can be not the same,since it's not the same console)
EDIT: Ah.ok it's for editing the XML file... But you can "short" it.