@@ -6,19 +6,19 @@ This is just a script which helps you to setup your program to automatically ins
66Here is a very basic one which just installs basalt.lua if don't exist:
77``` lua
88-- Basalt configurated installer
9- local filePath = " basalt" -- here you can change the file path default: basalt
9+ local filePath = " basalt.lua " -- here you can change the file path default: basalt
1010if not (fs .exists (filePath ))then
11- shell .run (" pastebin run ESs1mg7P packed true " .. filePath ) -- this is an alternative to the wget command
11+ shell .run (" pastebin run ESs1mg7P packed true " .. filePath : gsub ( " .lua " , " " ) ) -- this is an alternative to the wget command
1212end
13- local basalt = require (filePath ) -- here you can change the variablename in any variablename you want default: basalt
13+ local basalt = require (filePath : gsub ( " .lua " , " " ) ) -- here you can change the variablename in any variablename you want default: basalt
1414```
1515
1616## Advanced Installer
1717This is a visual version, it asks the user if he wants to install basalt.lua (if not found)<br >
1818![ ] ( https://raw.githubusercontent.com/Pyroxenium/Basalt/master/docs/_media/installer.png )
1919``` lua
2020-- Basalt configurated installer
21- local filePath = " basalt" -- here you can change the file path default: basalt
21+ local filePath = " basalt.lua " -- here you can change the file path default: basalt
2222if not (fs .exists (filePath ))then
2323 local w ,h = term .getSize ()
2424 term .clear ()
@@ -51,7 +51,7 @@ if not(fs.exists(filePath))then
5151 local event , p1 ,p2 ,p3 ,p4 = os .pullEvent ()
5252 if (event == " mouse_click" )then
5353 if (p3 == math.floor (h / 2 + 2 ))and (p2 >= w / 2 - 8 )and (p2 <= w / 2 - 2 )then
54- shell .run (" pastebin run ESs1mg7P packed true " .. filePath )
54+ shell .run (" pastebin run ESs1mg7P packed true " .. filePath : gsub ( " .lua " , " " ) )
5555 _installerWindow .setVisible (false )
5656 term .clear ()
5757 break
@@ -69,6 +69,6 @@ if not(fs.exists(filePath))then
6969 term .clear ()
7070end
7171
72- local basalt = require (filePath ) -- here you can change the variablename in any variablename you want default: basalt
72+ local basalt = require (filePath : gsub ( " .lua " , " " ) ) -- here you can change the variablename in any variablename you want default: basalt
7373---- --------------------------
7474```
0 commit comments