
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()


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.

  
  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()
+ parent_dir = os.path.dirname(__file__)
  
+ ModelCompiler(os.path.join(parent_dir, "src/"), plugin).compile()
+ 
Allow the plugin to be compiled from anywhere
## Code Before:

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()

## Instruction:
Allow the plugin to be compiled from anywhere
## Code After:

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()
