mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 07:52:51 +02:00
- also move glestuser.ini from previous version during install
This commit is contained in:
@@ -43,11 +43,11 @@ Setup.Package
|
|||||||
preinstall = function(package)
|
preinstall = function(package)
|
||||||
local previousPath = ''
|
local previousPath = ''
|
||||||
if MojoSetup.platform.exists(MojoSetup.info.homedir .. '/megaglest/mydata/') then
|
if MojoSetup.platform.exists(MojoSetup.info.homedir .. '/megaglest/mydata/') then
|
||||||
previousPath = MojoSetup.info.homedir .. '/megaglest/mydata/'
|
previousPath = MojoSetup.info.homedir .. '/megaglest/'
|
||||||
elseif MojoSetup.platform.exists('/opt/games/megaglest/mydata/') then
|
elseif MojoSetup.platform.exists('/opt/games/megaglest/mydata/') then
|
||||||
previousPath = '/opt/games/megaglest/mydata/'
|
previousPath = '/opt/games/megaglest/'
|
||||||
elseif MojoSetup.platform.exists('/usr/local/games/megaglest/mydata/') then
|
elseif MojoSetup.platform.exists('/usr/local/games/megaglest/mydata/') then
|
||||||
previousPath = '/usr/local/games/megaglest/mydata/'
|
previousPath = '/usr/local/games/megaglest/'
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Move mod data folder to new location if we find it
|
-- Move mod data folder to new location if we find it
|
||||||
@@ -57,12 +57,13 @@ Setup.Package
|
|||||||
-- MojoSetup.msgbox('Moving mod folder','About to move mod folder from [' .. previousPath .. '] to [' .. instPath .. ']')
|
-- MojoSetup.msgbox('Moving mod folder','About to move mod folder from [' .. previousPath .. '] to [' .. instPath .. ']')
|
||||||
|
|
||||||
os.execute('mkdir ' .. instPathData)
|
os.execute('mkdir ' .. instPathData)
|
||||||
os.execute('mv ' .. previousPath .. '* ' .. instPath)
|
os.execute('mv ' .. previousPath .. 'mydata/* ' .. instPath)
|
||||||
|
os.execute('mv ' .. previousPath .. 'glestuser.ini ' .. instPath .. 'glestuser.ini')
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
postinstall = function(package)
|
postinstall = function(package)
|
||||||
MojoSetup.launchbrowser("http://www.megaglest.org")
|
MojoSetup.launchbrowser("http://megaglest.org/get-started.html")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
Setup.Eula
|
Setup.Eula
|
||||||
|
Reference in New Issue
Block a user