# The source code is compiled into a Roblox Model right into the plugins folder.
#
# Simply run `python build.py` and everything will be taken care of. You can
# then load up any game and test out the plugin.

import os
import os.path

from elixir.compilers import ModelCompiler

local_app_data = os.environ["LocalAppData"]
plugins_folder = os.path.join(local_app_data, "Roblox/Plugins")
plugin = os.path.join(plugins_folder, "StudioBridge.rbxmx")

ModelCompiler("src/", plugin).compile()

# The source code is compiled into a Roblox Model right into the plugins folder.
#
# Simply run `python build.py` and everything will be taken care of. You can
# then load up any game and test out the plugin.

import os
import os.path

from elixir.compilers import ModelCompiler

local_app_data = os.environ["LocalAppData"]
plugins_folder = os.path.join(local_app_data, "Roblox/Plugins")
plugin = os.path.join(plugins_folder, "StudioBridge.rbxmx")

parent_dir = os.path.dirname(__file__)

ModelCompiler(os.path.join(parent_dir, "src/"), plugin).compile()

Allow the plugin to be compiled from anywhere
Allow the plugin to be compiled from anywhere

Because we were only using "src/" as the path, running build.py from anywhere but the 'plugin' would cause it to fail to locate the directory.

We're now using a path relative to the file, so it isn't dependant on where the file is called from.
