Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux 64bit #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ vpk_list.txt
## vpk packing
cleantf2/
dev/current_options.txt
*.vpk
*.vpk
## linux
venv/
2 changes: 1 addition & 1 deletion dev/generators/models_null.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for line in $(cat $1); do
;;
*)
mkdir -p $line > /dev/null 2>&1
$2 l $3 | grep "$line" | grep ".vtx" | grep -v ".sw.vtx" > vpk_list.txt
$2 -l $3 | grep "$line" | grep ".vtx" | grep -v ".sw.vtx" > vpk_list.txt

echo removing models in $line
for file in $(cat vpk_list.txt); do
Expand Down
4 changes: 0 additions & 4 deletions dev/linux/vpk.sh

This file was deleted.

39 changes: 31 additions & 8 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,34 @@ if ! test -f "../../../hl2/hl2_textures_dir.vpk"; then
echo Error: unable to find hl2 vpk\'s. Make sure you\'re not using symbolic links that prevent access to the hl2 folder, and that CleanTF2plus is inside the custom folder.
exit 1
fi
if ! test -f "../../../bin/vpk_linux32"; then
echo Error: unable to find bin/vpk_linux32. Make sure you\'re not using symbolic links that prevent access to the bin folder, and that CleanTF2plus is inside the custom folder.
exit 1

# system dependencies

if ! wine --version > /dev/null; then
echo Error: unable to find wine. Make sure you installed it with your system\'s package manager.
exit 1
fi
if ! convert --version > /dev/null; then
echo Error: unable to find imagemagick. Make sure you installed it with your system\'s package manager.
exit 1
fi
if ! python3 --version > /dev/null; then
echo Error: unable to find python3. Make sure you installed it with your system\'s package manager.
exit 1
fi

# SETUP

# create python venv and install vpk
echo Setting up python dependencies
python3 -m venv ./venv
source ./venv/bin/activate
pip install vpk

if ! vpk --version > /dev/null; then
echo Error: unable to install vpk. Correct any python errors or submit an issue.
exit 1
fi

# DATA

Expand Down Expand Up @@ -249,33 +272,33 @@ elif [ $flat == 2 ]; then
fi
if [ $nohats == 1 ]; then
echo removing hats
dev/generators/models_null.sh dev/lists/linux/nohats.txt "dev/linux/vpk.sh" "../../tf2_misc_dir.vpk"
dev/generators/models_null.sh dev/lists/linux/nohats.txt "vpk" "../../tf2_misc_dir.vpk"
dev/generators/remove.sh dev/lists/linux/nohats_weapons.txt
echo nohats >> dev/current_options.txt
echo done
elif [ $nohats == 2 ]; then
echo removing hats headsfeet
dev/generators/models_null.sh dev/lists/linux/nohats.txt "dev/linux/vpk.sh" "../../tf2_misc_dir.vpk"
dev/generators/models_null.sh dev/lists/linux/nohats.txt "vpk" "../../tf2_misc_dir.vpk"
dev/generators/remove.sh dev/lists/linux/nohats_headsfeet.txt
dev/generators/remove.sh dev/lists/linux/nohats_weapons.txt
echo nohats headsfeet >> dev/current_options.txt
echo done
fi
if [ $playergibs == 1 ]; then
echo removing player gibs
dev/generators/models_null.sh dev/lists/linux/model_removal_gibs_player.txt "dev/linux/vpk.sh" "../../tf2_misc_dir.vpk"
dev/generators/models_null.sh dev/lists/linux/model_removal_gibs_player.txt "vpk" "../../tf2_misc_dir.vpk"
echo no player gibs >> dev/current_options.txt
echo done
fi
if [ $shells == 1 ]; then
echo removing shell models
dev/generators/models_null.sh dev/lists/linux/model_removal_shells.txt "dev/linux/vpk.sh" "../../tf2_misc_dir.vpk"
dev/generators/models_null.sh dev/lists/linux/model_removal_shells.txt "vpk" "../../tf2_misc_dir.vpk"
echo no shells >> dev/current_options.txt
echo done
fi
if [ $weapongibs == 1 ]; then
echo removing weapon gibs
dev/generators/models_null.sh dev/lists/linux/model_removal_gibs_weapons.txt "dev/linux/vpk.sh" "../../tf2_misc_dir.vpk"
dev/generators/models_null.sh dev/lists/linux/model_removal_gibs_weapons.txt "vpk" "../../tf2_misc_dir.vpk"
echo no weapon gibs >> dev/current_options.txt
echo done
fi
Expand Down
4 changes: 3 additions & 1 deletion pack_vpk.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

source venv/bin/activate

# starting
echo preparing folder structure
mkdir cleantf2 > /dev/null 2>&1
Expand All @@ -13,7 +15,7 @@ cat dev/current_options.txt >> cleantf2/readme.txt

# creating vpk
echo creating vpk
dev/linux/vpk.sh -M cleantf2 > /dev/null 2>&1
vpk -c cleantf2 cleantf2_dir.vpk > /dev/null 2>&1

# moving vpk files
echo moving vpk files
Expand Down