Advertisement
joebodo

ui.install.lua

Mar 11th, 2019
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.76 KB | None | 0 0
  1. install = {
  2.   title       = 'Opus UI',
  3.   version     = '1.0',
  4.   author      = 'kepler155c',
  5.   description = [[
  6. A UI framework.
  7. ]],
  8.   license = [[
  9. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  10.  
  11. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  12.  
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.]],
  14.   copyrightYear = 2019,
  15.   copyrightHolders = 'kepler155c',
  16.  
  17.   -- either list files
  18.   files = {
  19.     [ 'example.lua' ] = 'https://pastebin.com/raw/pf51FFAH',
  20.     [ 'class.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/class.lua',
  21.     [ 'event.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/event.lua',
  22.     [ 'entry.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/entry.lua',
  23.     [ 'input.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/input.lua',
  24.     [ 'util.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/util.lua',
  25.     [ 'ui/init.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui.lua',
  26.     [ 'ui/canvas.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/canvas.lua',
  27.     [ 'ui/region.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/region.lua',
  28.     [ 'ui/transition.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/transition.lua',
  29.     [ 'ui/tween.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/tween.lua',
  30.     [ 'ui/components/ActiveLayer.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/ActiveLayer.lua',
  31.     [ 'ui/components/Button.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Button.lua',
  32.     [ 'ui/components/Checkbox.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Checkbox.lua',
  33.     [ 'ui/components/Chooser.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Chooser.lua',
  34.     [ 'ui/components/Dialog.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Dialog.lua',
  35.     [ 'ui/components/DropMenuItem.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/DropMenuItem.lua',
  36.     [ 'ui/components/DropMenu.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/DropMenu.lua',
  37.     [ 'ui/components/Embedded.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Embedded.lua',
  38.     [ 'ui/components/Form.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Form.lua',
  39.     [ 'ui/components/Grid.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Grid.lua',
  40.     [ 'ui/components/Image.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Image.lua',
  41.     [ 'ui/components/MenuBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/MenuBar.lua',
  42.     [ 'ui/components/MenuItem.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/MenuItem.lua',
  43.     [ 'ui/components/Menu.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Menu.lua',
  44.     [ 'ui/components/NftImage.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/NftImage.lua',
  45.     [ 'ui/components/Notification.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Notification.lua',
  46.     [ 'ui/components/ProgressBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/ProgressBar.lua',
  47.     [ 'ui/components/ScrollBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/ScrollBar.lua',
  48.     [ 'ui/components/ScrollingGrid.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/ScrollingGrid.lua',
  49.     [ 'ui/components/SlideOut.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/SlideOut.lua',
  50.     [ 'ui/components/StatusBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/StatusBar.lua',
  51.     [ 'ui/components/TabBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TabBar.lua',
  52.     [ 'ui/components/TabBarMenuItem.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TabBarMenuItem.lua',
  53.     [ 'ui/components/Tab.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Tab.lua',
  54.     [ 'ui/components/Tabs.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Tabs.lua',
  55.     [ 'ui/components/TextArea.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TextArea.lua',
  56.     [ 'ui/components/TextEntry.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TextEntry.lua',
  57.     [ 'ui/components/Text.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Text.lua',
  58.     [ 'ui/components/Throttle.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Throttle.lua',
  59.     [ 'ui/components/TitleBar.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TitleBar.lua',
  60.     [ 'ui/components/VerticalMeter.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/VerticalMeter.lua',
  61.     [ 'ui/components/Viewport.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Viewport.lua',
  62.     [ 'ui/components/Wizard.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/Wizard.lua',
  63.     [ 'ui/components/WizardPage.lua' ] = 'https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/WizardPage.lua',
  64.   },
  65.   steps = {  -- the screens that will be displayed during install
  66.     install = { -- configure entries as desired
  67.       'splash',
  68.       'license',
  69.       'files',
  70.       'review',
  71.       'install', -- must be last
  72.     },
  73.     update = {
  74.       'review',
  75.       'install', -- must be last
  76.     },
  77.     automatic = {    -- no user interaction - can only contain 1 entry
  78.       'install',
  79.     },
  80.     uninstall = {
  81.       'review',
  82.       'uninstall', -- must be last
  83.     },
  84.   },
  85.  
  86.   -- all following are optional
  87.   directory   = 'sys/modules/opus',-- install into specific directory
  88.   rebootAfter = false,     -- If a reboot is required after installation
  89.   diskspace   = 40000,     -- approximate disk space required
  90.   preInstall  = function() -- called before install screen is displayed
  91.   end,
  92.   postInstall = function() -- called after the install is complete
  93.   end,
  94. }
  95.  
  96. print('Downloading Installer...')
  97.  
  98. local url ='https://raw.githubusercontent.com/kepler155c/opus-installer/master/sys/apps/Installer.lua'
  99. local h = _G.http.get(url)
  100. if not h then
  101.   error('Failed to download installer')
  102. end
  103.  
  104. local contents = h.readAll()
  105. if not contents then
  106.   error('Failed to download installer')
  107. end
  108.  
  109. local fn, msg = load(contents, 'Installer.lua', nil, _ENV)
  110. if not fn then
  111.   _G.printError(msg)
  112. else
  113.   local args = { ... }
  114.   fn(args[1])
  115. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement