#!/bin/bash

ARCH=$(uname -m)

export LD_LIBRARY_PATH="$REPERTOIRE/plugins/Script Creator/lib"
cd "$REPERTOIRE/plugins/Script Creator/bin"

echo "Arch : $ARCH"
if [ "$ARCH" == "x86_64" ]; then
	./POLSC-x86_64
else
	./POLSC-i686
fi

if [ ! $? -eq 0 ]; then
	if [ "$PLAYONLINUX" = "" ]; then
		exit 1
	fi
	source "$PLAYONLINUX/lib/sources" 
	
	POL_SetupWindow_Init "" ""
	POL_SetupWindow_message "Error : Can't launch Script Creator !" "Script Creator error" 
	POL_SetupWindow_Close 
fi

exit 0
