mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Let potomo assume msgfmt is on the path
There's no need to second-guess install locations.
This commit is contained in:
@@ -42,6 +42,7 @@ test_script:
|
||||
after_test:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- C:\Python27\Scripts\sphinx-build -b html docs build\docs\html
|
||||
- set PATH=%PATH%;C:\cygwin\bin\
|
||||
- node scripts\potomo.js
|
||||
- node scripts\archive.js
|
||||
# AppVeyor checks out a specific commit, but that means the archive script
|
||||
|
||||
+1
-20
@@ -7,25 +7,6 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const helpers = require('./helpers');
|
||||
|
||||
function getMsgfmtPath() {
|
||||
const paths = [
|
||||
path.join('C:\\', 'Program Files (x86)', 'Poedit', 'GettextTools', 'bin', 'msgfmt.exe'),
|
||||
path.join('C:\\', 'cygwin', 'bin', 'msgfmt.exe'),
|
||||
path.join('/', 'usr', 'bin', 'msgfmt'),
|
||||
];
|
||||
|
||||
for (let i = 0; i < paths.length; i += 1) {
|
||||
if (helpers.fileExists(paths[i])) {
|
||||
return paths[i];
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('No msgfmt.exe found!');
|
||||
}
|
||||
|
||||
/* This isn't portable to Linux but it doesn't (yet?) need to be. */
|
||||
const msgfmtPath = getMsgfmtPath();
|
||||
|
||||
let rootPath = '.';
|
||||
if (process.argv.length > 2) {
|
||||
rootPath = process.argv[2];
|
||||
@@ -40,7 +21,7 @@ fs.readdirSync(l10nPath).forEach((file) => {
|
||||
|
||||
fs.accessSync(poPath, fs.R_OK);
|
||||
|
||||
childProcess.execFileSync(msgfmtPath, [
|
||||
childProcess.execFileSync('msgfmt', [
|
||||
poPath,
|
||||
'-o',
|
||||
moPath,
|
||||
|
||||
Reference in New Issue
Block a user