osStr = love.system.getOS()
if osStr == "Windows" then
os.execute("copy effects\\DontRemove\\default.png effects\\created")
os.execute("rename effects\\created\\default.png "..tostring(_name)..".png")
elseif osStr == "Linux" then
os.execute("mkdir -p effects/created/")
os.execute("cp effects/DontRemove/default.png effects/created/default.png")
-- below command not only change the name it also change path to root folder of project
-- if want to just rename .png file then use 'mv effects/created/default.png effects/created/"..tostring(_name)..".png'
os.execute("mv effects/created/default.png "..tostring(_name)..".png")
end
file_ = io.open("effects/created/"..tostring(_name)..".lua", "w")
file_:write(a)
file_:close()
feel free to ping me if there is issue regarding Linux.
janglee wrote: ↑Thu Feb 07, 2019 5:17 am
I tried on Linux and got error because file is not created due to wrong path. here is changes i made in fileCreator.lua for Linux.
osStr = love.system.getOS()
if osStr == "Windows" then
os.execute("copy effects\\DontRemove\\default.png effects\\created")
os.execute("rename effects\\created\\default.png "..tostring(_name)..".png")
elseif osStr == "Linux" then
os.execute("mkdir -p effects/created/")
os.execute("cp effects/DontRemove/default.png effects/created/default.png")
-- below command not only change the name it also change path to root folder of project
-- if want to just rename .png file then use 'mv effects/created/default.png effects/created/"..tostring(_name)..".png'
os.execute("mv effects/created/default.png "..tostring(_name)..".png")
end
file_ = io.open("effects/created/"..tostring(_name)..".lua", "w")
file_:write(a)
file_:close()
feel free to ping me if there is issue regarding Linux.
thank you so much i'll go put and upload
i put credits in this part for you
It is so humbleness of you.
But one more thing is that os.execute not able to get archive files. You have to put dontRemove folder inside effects folder in rar file you published. I take look at LOVE.zip.
by the way I am thinking about how i gonna use it for love game jam submission.
janglee wrote: ↑Sun Feb 10, 2019 7:22 pm
It is so humbleness of you.
But one more thing is that os.execute not able to get archive files. You have to put dontRemove folder inside effects folder in rar file you published. I take look at LOVE.zip.
by the way I am thinking about how i gonna use it for love game jam submission.
i'll take a look in this
Thank you, for the message i'l correct this
good lucky in the game jam