mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
build: remove iconv wrapper for macOS (#992)
This commit is contained in:
parent
4f723327d8
commit
7c04b86492
@ -29,12 +29,7 @@ def exec_shell(command: List[str]) -> str:
|
||||
|
||||
def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str, extra_cppflags: str, extra_cflags: str, use_ccache: bool, shift: bool, debug: bool):
|
||||
# platform-specific
|
||||
if sys.platform == "darwin":
|
||||
iconv = "tools/iconv.py UTF-8 $encoding"
|
||||
elif sys.platform == "linux":
|
||||
iconv = "iconv --from UTF-8 --to $encoding"
|
||||
else:
|
||||
raise Exception(f"unsupported platform {sys.platform}")
|
||||
|
||||
ccache = ""
|
||||
|
||||
@ -418,7 +413,7 @@ class Configure:
|
||||
task = "cc_272"
|
||||
cflags = cflags.replace("gcc_272", "")
|
||||
|
||||
encoding = "SHIFT-JIS"
|
||||
encoding = "CP932" # similar to SHIFT-JIS, but includes backslash and tilde
|
||||
if version == "ique":
|
||||
encoding = "EUC-JP"
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
parser = argparse.ArgumentParser(description='Convert a file from one encoding to another')
|
||||
parser.add_argument("f")
|
||||
parser.add_argument("t")
|
||||
parser.add_argument('infile', nargs='?', type=argparse.FileType('r'), default=sys.stdin)
|
||||
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
def main(args):
|
||||
sys.stdin.reconfigure(encoding=args.f)
|
||||
in_data = args.infile.read()
|
||||
sys.stdout.reconfigure(encoding=args.t)
|
||||
args.outfile.write(in_data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(parser.parse_args())
|
Loading…
Reference in New Issue
Block a user