Merge pull request #402 from hackgrid/fix-make-4
require gameui/closecaption files for Makefile, fix typo, update Readme
This commit is contained in:
commit
bdf4393845
4
Makefile
4
Makefile
|
@ -523,7 +523,7 @@ SUBTITLE_LANGUAGES = brazilian \
|
|||
SUBTITLE_SOURCES = $(SUBTITLE_LANGUAGES:%=build/src/audio/subtitles_%.c)
|
||||
SUBTITLE_OBJECTS = $(SUBTITLE_LANGUAGES:%=build/src/audio/subtitles_%.o)
|
||||
|
||||
build/src/audio/subtitles.h build/src/audio/subtitles.c build/subtitles.ld $(SUBTITLE_SOURCES): tools/level_scripts/subtitle_generate.py
|
||||
build/src/audio/subtitles.h build/src/audio/subtitles.c build/subtitles.ld $(SUBTITLE_SOURCES): vpk/Portal/portal/resource/closecaption_english.txt vpk/Portal/hl2/resource/gameui_english.txt tools/level_scripts/subtitle_generate.py
|
||||
python3 tools/level_scripts/subtitle_generate.py $(SUBTITLE_LANGUAGES)
|
||||
|
||||
####################
|
||||
|
@ -609,4 +609,4 @@ clean-assets:
|
|||
fix:
|
||||
wine tools/romfix64.exe build/portal.z64
|
||||
|
||||
.SECONDARY:
|
||||
.SECONDARY:
|
||||
|
|
21
README.md
21
README.md
|
@ -96,15 +96,8 @@ sudo apt install nodejs
|
|||
|
||||
<br />
|
||||
|
||||
You will need to add at least one of the following files from where Portal is installed to the folder `resource/`. You can add multiple languages if desired.
|
||||
|
||||
```
|
||||
portal/resource/closecaption_english.txt
|
||||
portal/resource/closecaption_<your desired language 1>.txt
|
||||
portal/resource/closecaption_<your desired language 2>.txt
|
||||
```
|
||||
|
||||
You then need to add the following files from where Portal is installed to the folder `vpk/` OR create a symbolic link to the `Portal` folder there. (see [vpk/add_vpk_here.md](./vpk/add_vpk_here.md) for more details!)
|
||||
You then need to add the following files from where Portal is installed to the folder `vpk/` OR create a symbolic link to the `Portal` folder there (see [vpk/add_vpk_here.md](./vpk/add_vpk_here.md) for more details!).
|
||||
You can add multiple languages if desired.
|
||||
|
||||
```
|
||||
Portal/portal/portal_pak_000.vpk
|
||||
|
@ -127,6 +120,14 @@ Portal/hl2/hl2_misc_003.vpk
|
|||
Portal/hl2/hl2_misc_dir.vpk
|
||||
|
||||
Portal/hl2/media/valve.bik
|
||||
|
||||
Portal/hl2/resource/gameui_english.txt
|
||||
Portal/hl2/resource/gameui_<your desired language 1>.txt
|
||||
Portal/hl2/resource/gameui_<your desired language 2>.txt
|
||||
|
||||
Portal/portal/resource/closecaption_english.txt
|
||||
Portal/portal/resource/closecaption_<your desired language 1>.txt
|
||||
Portal/portal/resource/closecaption_<your desired language 2>.txt
|
||||
```
|
||||
|
||||
Finally, run `make` to build the project.
|
||||
|
@ -160,7 +161,7 @@ Also you can build with all audio languages integrated with this shortcut:
|
|||
make all_languages
|
||||
```
|
||||
|
||||
This requires additional *.vpk files copied to the folder `vpk/`:
|
||||
This requires additional *.vpk files copied to the root of folder `vpk/` (since the original Portal keeps only one language at the same time, you have to copy these files!):
|
||||
|
||||
- German:
|
||||
```
|
||||
|
|
|
@ -281,19 +281,19 @@ def process_all_closecaption_files(dir, language_names):
|
|||
key_order = None
|
||||
default_values = None
|
||||
|
||||
for langauge_name in language_names:
|
||||
filename = f"closecaption_{langauge_name}.txt"
|
||||
for language_name in language_names:
|
||||
filename = f"closecaption_{language_name}.txt"
|
||||
|
||||
try:
|
||||
filepath = os.path.join(dir, filename)
|
||||
|
||||
k,v,l = read_translation_file(filepath)
|
||||
|
||||
gamepad_k, gamepad_v, _ = read_translation_file(f"vpk/Portal/hl2/resource/gameui_{langauge_name}.txt")
|
||||
gamepad_k, gamepad_v, _ = read_translation_file(f"vpk/Portal/hl2/resource/gameui_{language_name}.txt")
|
||||
|
||||
gamepad_k, gamepad_v = filter_whitelist(gamepad_k, gamepad_v, hl_gameui_whitelist)
|
||||
|
||||
extra_k, extra_v, _ = read_translation_file(f"assets/translations/extra_{langauge_name}.txt")
|
||||
extra_k, extra_v, _ = read_translation_file(f"assets/translations/extra_{language_name}.txt")
|
||||
|
||||
k = k + gamepad_k + extra_k
|
||||
v = v + gamepad_v + extra_v
|
||||
|
@ -355,4 +355,4 @@ def process_all_closecaption_files(dir, language_names):
|
|||
|
||||
|
||||
|
||||
process_all_closecaption_files("vpk/Portal/portal/resource", sys.argv[1:])
|
||||
process_all_closecaption_files("vpk/Portal/portal/resource", sys.argv[1:])
|
||||
|
|
Loading…
Reference in a new issue