Giter Site home page Giter Site logo

lodr's Introduction

Lodr is a hot-loader for lovr. It restarts Lovr with updated code without Lovr itself having to quit and reopen.

How to use

On Oculus Quest

Go to the releases page for Lodr and download the newest org.lovr.hotswap APK. This has Lodr prebuilt in it.

You will need your Quest in developer mode. You will also need the adb command line tool. For example, on Macintosh, you can get adb by installing Homebrew and running brew cask install android-platform-tools; or, you can install Android Studio, install "Android SDK Platform-Tools" during the first-run setup, and then run export PATH="~/Library/Android/sdk/platform-tools:$PATH" in your Terminal.app window before running the following commands. On Windows, to run adb, you can run these instructions (but you will also need to install the special Quest ADB driver for Windows).

After downloading org.lovr.hotswap.apk, cd to your download folder and run:

adb install -r org.lovr.hotswap.apk

You only have to do this once.

Now, whenever you have new software to upload, cd to the directory containing your files and run:

adb push --sync . /sdcard/Android/data/org.lovr.hotswap/files/.lodr

You can run this while Lodr is running.

If your program contains print statements, you can view them with:

adb logcat | grep -i lovr

On a desktop computer

Clone or download this repo. Stick the lovr-lodr directory in your command line after the executable name.

If lovr.exe is the LÖVR command line on your system and your-game is your project directory, run

lovr.exe lovr-lodr your-game

If files change in your-game while it is running, lodr will automatically relaunch it.

Configuration options

Lodr checks for a "lodr" table in the configuration table from conf.lua. You can set options like:

function lovr.conf(t)
    t.lodr = {
        checksPerFrame = 1   -- How many files maximum lovr checks for changes every frame (default 10)
        watch = {"main.lua"} -- Watch only these files (by default watches every file in directory tree)
    }
end

License

(c) 2018 Andi McClure

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

lodr's People

Contributors

bjornbytes avatar mcclure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lodr's Issues

Editing main.lua on Quest 2 using TurboEditor or VIM results in corrupted file and parser errors

I've been trying to figure out a dev / test loop entirely on the Quest 2.

Seems that editing main.lua in TurboEditor or VIM on the Quest 2 using a bluetooth keyboard, resulting in a slightly smaller file, saving it, then switching to Lodr, or starting Lodr after killing it, always fails.

Reason seems to be parser errors on main.lua (the edited file). When I look at the contents of the file, it's as if the edited version was saved over top of the previous version without unlinking the previous version first. Such that the contents are correct but the file length is longer than it should be - as long as the original version of the file instead of the edited version - and the difference is made up of bytes from the original version.

Not sure exactly what's going on. Seems like a buffer or file IO ordering issue. Advice welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.