From 5176b4670ee2b0810bec6cd256757caef54a3852 Mon Sep 17 00:00:00 2001 From: Daniel Llewellyn Date: Thu, 5 Nov 2020 23:00:39 +0000 Subject: [PATCH 1/5] Mark Snap as grade: stable Snap packages marked as `grade: devel` are not permitted to be released to the `candidate` or `stable` channels in the Snap Store. This commit changes the grade to `stable` now that everything seems to be working well. Snaps build from this commit forward will be releasable to the `candidate` and/or `stable` channels in the Snap Store :-) Signed-off-by: Daniel Llewellyn --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6e496d43..c46d16e8 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: opendronemap adopt-info: odm -grade: devel +grade: stable confinement: strict base: core18 From 601ee670dec0870c9fad4f03262b2032783edccb Mon Sep 17 00:00:00 2001 From: Daniel Llewellyn Date: Thu, 5 Nov 2020 23:19:23 +0000 Subject: [PATCH 2/5] Update test-build-prs GitHub Workflow Incorrect name `on.pull-request` should be `on.pull_request`. Signed-off-by: Daniel Llewellyn --- .github/workflows/test-build-prs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-build-prs.yaml b/.github/workflows/test-build-prs.yaml index 3db3982d..0976d01c 100644 --- a/.github/workflows/test-build-prs.yaml +++ b/.github/workflows/test-build-prs.yaml @@ -1,7 +1,7 @@ name: Build PRs on: - pull-request: + pull_request: jobs: docker: From 26f31118e9b3ed027f55185cf12ef6a367538cc9 Mon Sep 17 00:00:00 2001 From: Daniel Llewellyn Date: Fri, 6 Nov 2020 00:03:13 +0000 Subject: [PATCH 3/5] Update README.md for WSL instructions * Add details on how to import the `rootfs.tar.gz` file into WSL * Add instructions to update the WSL rootfs * Add uninstallation instructions Signed-off-by: Daniel Llewellyn --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8200e8b3..9525b2b6 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,55 @@ See http://docs.opendronemap.org for tutorials and more guides. We have a vibrant [community forum](https://community.opendronemap.org/). You can [search it](https://community.opendronemap.org/search?expanded=true) for issues you might be having with ODM and you can post questions there. We encourage users of ODM to partecipate in the forum and to engage with fellow drone mapping users. -## Native Install (Ubuntu 18.04) +## WSL or WSL2 Install -You can run ODM natively on Ubuntu 18.04 LTS (although we don't recommend it): +Note: This requires that you have installed WSL already by following the instructions on Microsoft's Website. + +You can run ODM via WSL or WSL2 by downloading the `rootfs.tar.gz` file from [the releases page on GitHub](https://github.com/OpenDroneMap/ODM/releases). Once you have the file saved to your `Downloads` folder in Windows, open a PowerShell or CMD window by right-clicking the Flag Menu (bottom left by default) and selecting "Windows PowerShell", or alternatively by using the [Windows Terminal from the Windows Store](https://www.microsoft.com/store/productId/9N0DX20HK701). + +Inside a PowerShell window, or Windows Terminal running PowerShell, type the following: + +```powershell +# PowerShell +wsl.exe --import ODM $env:APPDATA\ODM C:\path\to\your\Downloads\rootfs.tar.gz +``` + +Alternatively if you're using `CMD.exe` or the `CMD` support in Windows Terminal type: + +```cmd +# CMD +wsl.exe --import ODM %APPDATA%\ODM C:\path\to\your\Downloads\rootfs.tar.gz +``` + +In either case, make sure you replace `C:\path\to\your\Downloads\rootfs.tar.gz` with the actual path to your `rootfs.tar.gz` file. + +This will save a new Hard Disk image to your Windows `AppData` folder at `C:\Users\username\AppData\roaming\ODM` (where `username` is your Username in Windows), and will set-up a new WSL "distro" called `ODM`. + +You may start the ODM distro by using the relevant option in the Windows Terminal (from the Windows Store) or by executing `wsl.exe -d ODM` in a PowerShell or CMD window. + +ODM is installed to the distro's `/code` directory. You may execute it with: + +```bash +/code/run.sh +``` + +### Updating ODM in WSL + +The easiest way to update the installation of ODM is to download the new `rootfs.tar.gz` file and import it as another distro. You may then unregister the original instance the same way you delete ODM from WSL (see next heading). + +### Deleting an ODM in WSL instance + +```cmd +wsl.exe --unregister ODM +``` + +Finally you'll want to delete the files by using your Windows File Manager (Explorer) to navigate to `%APPDATA%`, find the `ODM` directory, and delete it by dragging it to the recycle bin. To permanently delete it empty the recycle bin. + +If you have installed to a different directory by changing the `--import` command you ran to install you must use that directory name to delete the correct files. This is likely the case if you have multiple ODM installations or are updating an already-installed installation. + +## Native Install (Ubuntu 20.04) + +You can run ODM natively on Ubuntu 20.04 LTS (although we don't recommend it): 1. Download the source from [here](https://github.com/OpenDroneMap/ODM/archive/master.zip) 2. Run `bash configure.sh install` From c626fb014a664ac59a8de1fce55af6920375e331 Mon Sep 17 00:00:00 2001 From: Daniel Llewellyn Date: Fri, 6 Nov 2020 00:09:52 +0000 Subject: [PATCH 4/5] Update README.md * Add link to official Microsoft instructions for installing WSL Signed-off-by: Daniel Llewellyn --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9525b2b6..271ac7e8 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ We have a vibrant [community forum](https://community.opendronemap.org/). You ca ## WSL or WSL2 Install -Note: This requires that you have installed WSL already by following the instructions on Microsoft's Website. +Note: This requires that you have installed WSL already by following [the instructions on Microsoft's Website](https://docs.microsoft.com/en-us/windows/wsl/install-win10). You can run ODM via WSL or WSL2 by downloading the `rootfs.tar.gz` file from [the releases page on GitHub](https://github.com/OpenDroneMap/ODM/releases). Once you have the file saved to your `Downloads` folder in Windows, open a PowerShell or CMD window by right-clicking the Flag Menu (bottom left by default) and selecting "Windows PowerShell", or alternatively by using the [Windows Terminal from the Windows Store](https://www.microsoft.com/store/productId/9N0DX20HK701). From 923c80c6e352edfc83e75846f95074465711d840 Mon Sep 17 00:00:00 2001 From: Daniel Llewellyn Date: Thu, 5 Nov 2020 23:14:08 +0000 Subject: [PATCH 5/5] Hopefully fix GitHub Actions (again) The GitHub Actions YAML parser doesn't like the `if:` constructs, which means I probably got them wrong. This is an attempt to fix that. --- .github/workflows/snapcraftbuild.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapcraftbuild.yml b/.github/workflows/snapcraftbuild.yml index d8eb3f57..c2302e41 100644 --- a/.github/workflows/snapcraftbuild.yml +++ b/.github/workflows/snapcraftbuild.yml @@ -30,7 +30,7 @@ jobs: snap: ${{ steps.build.outputs.snap }} isClassic: 'false' - name: Publish unstable builds to Edge - if: ${{ github.ref == "refs/heads/master" }} + if: github.ref == 'refs/heads/master' uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.STORE_LOGIN }} @@ -38,7 +38,7 @@ jobs: release: edge - name: Publish tagged prerelease builds to Beta # These are identified by having a hyphen in the tag name, e.g.: v1.0.0-beta1 - if: ${{ startsWith("refs/tags/v", github.ref) && contains("-", github.ref) }} + if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.STORE_LOGIN }} @@ -46,7 +46,7 @@ jobs: release: beta - name: Publish tagged stable or release-candidate builds to Candidate # These are identified by NOT having a hyphen in the tag name, OR having "-RC" or "-rc" in the tag name. - if: ${{ startsWith("refs/tags/v", github.ref) && ( ( ! contains("-", github.ref) ) || contains("-RC", github.ref) || contains("-rc", github.ref) ) }} + if: startsWith(github.ref, 'refs/tags/v1') && ( ( ! contains(github.ref, '-') ) || contains(github.ref, '-RC') || contains(github.ref, '-rc') ) uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.STORE_LOGIN }}