Skip to content

Instantly share code, notes, and snippets.

@nmlgc
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmlgc/3a260e4a50836d4f11a8 to your computer and use it in GitHub Desktop.
Save nmlgc/3a260e4a50836d4f11a8 to your computer and use it in GitHub Desktop.
Engine strings
--------------
(These are only visible in the log file. You can translate them, but you don't need to.)
./thcrap_update/src/update.c:429: log_printf("Deleting %s...\n", key);
./thcrap_update/src/update.c:434: log_printf("%s (locally changed, skipping deletion)\n", key);
./thcrap_update/src/self.c:100: "Retrieving public key from the signer certificate of %s... ", self_fn_utf8
./thcrap_update/src/self.c:183: log_printf("invalid Base64 string\n");
./thcrap_update/src/self.c:195: log_printf("couldn't create hash object\n");
./thcrap_update/src/self.c:200: log_printf("couldn't hash the file data?!?)\n");
./thcrap_update/src/self.c:206: log_printf(ret ? "invalid\n" : "valid\n");
./thcrap_update/src/self.c:240: log_printf("Verifying archive signature... ");
./thcrap_update/src/self.c:242: log_func_printf("Unsupported hash algorithm ('%s')!\n", sig_alg);
./thcrap_update/src/self.c:257: log_func_printf("Invalid public key!\n");
./thcrap_update/src/self.c:298: log_printf("Replacing engine...\n");
./thcrap_tsa/src/png_ex.c:108: log_func_printf("Error writing %s (%s).", fn, image->img.message);
./thcrap_tsa/src/png_ex.c:114: "Couldn't open %s for writing (%s)\n",
./thcrap_tsa/src/layout.c:61: log_func_printf("invalid TSA font block format\n");
./thcrap_tsa/src/layout.c:71: "index out of bounds (min: %d, max: %d, given: %d)\n",
./thcrap_tsa/src/layout.c:124: "Missing \"font_dialog\" or \"font_ruby\" parameter, skipping..."
./thcrap/src/binhack.c:178: log_printf("different sizes for expected and new code, skipping verification... ");
./thcrap/src/binhack.c:186: : "expected bytes not matched, skipping...\n"
./thcrap/src/zip.c:342: log_func_printf("Unsupported compression method (%d)\n", file->compression);
./thcrap/src/zip.c:432: log_func_printf("Multi-part archives are unsupported\n");
./thcrap/src/zip.c:468: "End of central directory record could not be located\n"
./thcrap/src/zip.c:476: "Invalid ZIP directory entry at offset 0x%08x\n",
./thcrap/src/zip.c:558: log_printf("(Zip) Preparing %s...\n", fn);
./thcrap/src/repatch.c:102: log_printf("Repatching...\n");
./thcrap/src/repatch.c:169: "Shutting down repatch watcher thread.\n"
./thcrap/src/repatch.c:170: "Statistics:\n"
./thcrap/src/repatch.c:171: "----\n"
./thcrap/src/repatch.c:172: "• Last error codes: %d (queue), %d (changes)\n"
./thcrap/src/repatch.c:173: "• Total number of file changes parsed: %d\n"
./thcrap/src/repatch.c:174: "• Maximum buffer fill state: %d/%d bytes\n"
./thcrap/src/repatch.c:175: "----\n",
./thcrap/src/init.c:55: log_printf("(JSON) Resolving configuration for %s... ", fn);
readme.md
---------
Les scripts du dossier `scripts` sont écrits en [Python 3] (http://python.org/). Some of them require further third-party libraries:
* [PyCrypto] (https://www.dlitz.net/software/pycrypto/) is required by `release_sign.py`.
release_sign.py
---------------
'arc',
help='Archive to sign. For the signature file name, .sig is appended.'
'-a', '--alg',
help='Hash algorithm to use, out of the ones supported by thcrap.',
'-k', '--key',
help='Private key file.',
User-facing strings
-------------------
./thcrap_configure/src/configure.c:353: "Want a more user-friendly graphical configuration tool?\n"
./thcrap_configure/src/configure.c:354: "Draw us some custom artwork, and we'll get to it - we might even pay you!\n"
./thcrap_configure/src/configure.c:355: "For details, see\n"
./thcrap_configure/src/configure.c:356: "\thttp://thpatch.net/wiki/Touhou_Patch_Center:Artwork\n"
./thcrap_configure/src/configure_search.c:119: bi.lpszTitle = L"Root path for game search (cancel to search entire system):";
./thcrap_configure/src/configure_search.c:133: "Searching games in %s... this may take a while...\n\n",
./thcrap_configure/src/configure_search.c:133: "Searching games on the entire system... this may take a while...\n\n",
./thcrap_configure/src/configure_search.c:161: log_printf("No new game locations found.\n");
./thcrap_configure/src/configure_search.c:163: log_printf("No game locations found.\n");
./thcrap_configure/src/configure_search.c:165: repeat = Ask("Search in a different directory?");
./thcrap_configure/src/configure_search.c:169: "No patch shortcuts will be created.\n"
./thcrap_configure/src/configure_search.c:170: "Please re-run this configuration tool after you have acquired some games\n"
./thcrap_configure/src/configure_search.c:171: "supported by the patches.\n"
Self-updating message boxes
---------------------------
(The variables in the ${} blocks can be placed anywhere and in any order.)
static const char *self_header_failure =
"A new version (${build}) of the ${project} is available.\n"
"\n";
static const char *self_body[] = {
// SELF_OK
"The ${project} has been successfully updated to version ${build}.\n"
"\n"
"For further information about this new release, visit\n"
"\n"
"\t${desc_url}",
// SELF_NO_PUBLIC_KEY
"Due to the lack of a digital signature on the currently running "
"patcher build, an automatic update was not attempted.\n"
"\n"
"You can manually download the update archive from\n"
"\n"
"\t${desc_url}\n"
"\n"
"However, we can't prove its authenticity. Be careful!",
// SELF_SERVER_ERROR
"An automatic update was attempted, but none of the download servers "
"could be reached.\n"
"\n"
"The new version can be found at\n"
"\n"
"\t${desc_url}\n"
"\n"
"However, instead of manually downloading the archive, we recommend "
"to repeat this automatic update later, as this process also checks "
"the digital signature on the archive for authenticity.",
// SELF_DISK_ERROR
"An automatic update was attempted, but the update archive could not "
"be saved to disk, possibly due to a lack of writing permissions in "
"the ${project_short} directory (${thcrap_dir}).\n"
"\n"
"You can manually download the update archive from\n"
"\n"
"\t${desc_url}",
// SELF_NO_SIG
"An automatic update was attempted, but the server did not provide a "
"digital signature to prove the authenticity of the update archive.\n"
"\n"
"Thus, it may have been maliciously altered.",
// SELF_SIG_FAIL
"An automatic update was attempted, but the digital signature of the "
"update archive could not be verified against the public key on the "
"currently running patcher build.\n"
"\n"
"This means that the update has been maliciously altered.",
// SELF_REPLACE_ERROR
"An automatic update was attempted, but the current build could not "
"be replaced with the new one, possibly due to a lack of writing "
"permissions.\n"
"\n"
"Please manually extract the new version from the update archive that "
"has been saved to your ${project_short} directory "
"(${thcrap_dir}${arc_fn}). "
"Its digital signature has already been verified to be authentic.\n"
"\n"
"For further information about this new release, visit\n"
"\n"
"\t${desc_url}"
};
const char *self_sig_error =
"\n"
"We advise against downloading it from the originating website until "
"this problem has been resolved.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment