adding method to check system and force import if different
This commit is contained in:
parent
6997b3752a
commit
57691888ac
8 changed files with 84 additions and 20 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -3,6 +3,8 @@
|
|||
Godot.zip
|
||||
Godot_v4*linux.64.zip
|
||||
Godot_v4*linux.64
|
||||
Godot_v4*x86_64
|
||||
Godot_v4*x86_64.zip
|
||||
*.old
|
||||
|
||||
# Changes to version imported subfolder of .godot (commented upward)
|
||||
|
@ -10,3 +12,7 @@ Godot_v4*linux.64
|
|||
.godot/shader*/
|
||||
.godot/*.bin
|
||||
.godot/\.*
|
||||
|
||||
# Ignore file to detect curretn config (hardware/GPU)
|
||||
.current_version
|
||||
.current_version.tmp
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
35
precheck.gd
Normal file
35
precheck.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends MainLoop
|
||||
#extends Node
|
||||
|
||||
# print("Example")
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#func _ready():
|
||||
# print("Example _ready")
|
||||
# # print( get_user_data_dir() )
|
||||
# # print(Performance.get_monitor(Performance.TIME_FPS))
|
||||
# pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# print("Example _process")
|
||||
# pass
|
||||
func _process(delta):
|
||||
return true
|
||||
|
||||
func _init():
|
||||
var info:String = ""
|
||||
#info = get_base_script()
|
||||
var processName:String = OS.get_processor_name()
|
||||
var modelName:String = OS.get_model_name()
|
||||
var osName:String = OS.get_name()
|
||||
var version:String = OS.get_version()
|
||||
var detailCardGraphics: PackedStringArray = OS.get_video_adapter_driver_info()
|
||||
#for i in range(OS.get_screen_cound()):
|
||||
# print(i)
|
||||
var data = " - ".join(detailCardGraphics)
|
||||
print( processName + ":" + modelName + ":" + osName + ":" + version + ":" + data )
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ declare GODOT_SRC="https://downloads.tuxfamily.org/godotengine/4.0/beta3/Godot_v
|
|||
declare OUTZIP="$WORKDIR/$(basename $GODOT_SRC)"
|
||||
declare OPTION=""
|
||||
declare NEWPRG=0
|
||||
declare DISABLEAUTODETECTCARD=0
|
||||
|
||||
function msg_debug()
|
||||
{
|
||||
|
@ -99,6 +100,7 @@ do
|
|||
f) FORCE=1;;
|
||||
i) IMPORT=1;;
|
||||
x) ERASEIMPORT=1;;
|
||||
y) DISABLEAUTODETECTCARD=1;;
|
||||
*) HELP=1;;
|
||||
esac
|
||||
done
|
||||
|
@ -114,6 +116,7 @@ $(basename $0) [Option] : Donwload Launch Godot
|
|||
-f : force download & uncompress
|
||||
-i : force import data
|
||||
-x : erase import data
|
||||
-y : Disable auto detect host (OS/CPU/GPU)
|
||||
-o <File> : target godot file (downloaded)
|
||||
-s <Url> : Url to download a specific godot version
|
||||
EOF
|
||||
|
@ -130,6 +133,26 @@ if [ $NEWPRG -ne 0 ]
|
|||
then
|
||||
ERASEIMPORT=1
|
||||
IMPORT=1
|
||||
elif [ $DISABLEAUTODETECTCARD -eq 0 ]
|
||||
then
|
||||
echo "Check host"
|
||||
$WORKDIR/$EXE --script precheck.gd > $WORKDIR/.current_version.tmp
|
||||
if [ -f $WORKDIR/.current_version ]
|
||||
then
|
||||
diff $WORKDIR/.current_version.tmp $WORKDIR/.current_version >/dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
ERASEIMPORT=1
|
||||
IMPORT=1
|
||||
mv $WORKDIR/.current_version.tmp $WORKDIR/.current_version
|
||||
else
|
||||
rm $WORKDIR/.current_version.tmp
|
||||
fi
|
||||
else
|
||||
ERASEIMPORT=1
|
||||
IMPORT=1
|
||||
mv $WORKDIR/.current_version.tmp $WORKDIR/.current_version
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ERASEIMPORT -ne 0 ]
|
||||
|
|
Loading…
Reference in a new issue