[docs] Dedup and improve Getting Sources section #1551
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#1551
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "pastk-docs-dedup-sources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As per discussion https://github.com/organicmaps/organicmaps/discussions/1538
I'm not sure if we need a special case for Win10
bash ./configure.sh
?Also please check my thoughts on using shallow clone for submodules - do you think it'll work like that? (I'm using shallow submodules right now and builds are working fine).
@ -7,0 +17,4 @@
git config --global core.symlinks true
```
If you plan to contribute and propose pull requests then fork the repo https://github.com/organicmaps/organicmaps first.
Maybe move this to CONTRIBUTE and reference it here?
@ -7,0 +29,4 @@
git clone https://github.com/<your-github-name>/organicmaps.git
```
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
Move to contribute block. But is it really necessary? If you want to contribute, then cloning everything is the most reliable way.
s/form/from/
@ -7,0 +31,4 @@
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
And/or add a `--depth=1` option to make a _shallow copy_ (and possibly a `--no-single-branch` to have all branches not just `master`), i.e. omit history retaining current commits only - suitable for one-off builds.
Let's put it into the clone cmd together with --recurse-submodules.
The install doc should show the simplest and the fastest way to build and run. All dev details can be stored in contributing doc. What do you think?
@ -7,0 +38,4 @@
cd organicmaps
```
Clone git submodules (~3Gb):
It can be done in the clone command. Let's simplify it.
-r for release build, -d for debug one
This command builds for the desktop.
@ -7,0 +31,4 @@
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
And/or add a `--depth=1` option to make a _shallow copy_ (and possibly a `--no-single-branch` to have all branches not just `master`), i.e. omit history retaining current commits only - suitable for one-off builds.
I understand your idea of separating contribution and installation docs.
For the reference, at the moment
CONTRIBUTING.md
says:I think its possible to separate but it'll mean a lot of duplication, basically the bulk of current
INSTALL.md
would be moved toCONTRIBUTING.md
and thenINSTALL.md
simplified.How do we define a build/run-only env? For that case I think there is no need for Android Studio and actually the fastest way to get the repo would be shallow/partial clone as it reduces download times drastically.
I'd rather prefer the current approach with a detailed doc that gives a default/straightforward way of doing things alongside some options so the one following it can make decisions on the go.
A compromise would be to hide most of the optional things in e.g. footnotes or a separate subsection so that the "default way" is more clear.
Please let me know your further thoughts on this!
@ -7,0 +29,4 @@
git clone https://github.com/<your-github-name>/organicmaps.git
```
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
Its not necessary of course, its just a way to lower barriers for people with low-spec machines and limited/slow Internet.
E.g. my laptop's SSD is 120Gb, devoting 30+Gb to be able to contribute to OM is a lot.
Cloning the full repo took me an hour almost and I was lucky to have an unlimited wifi for that - usually I'm on a limited plan.
Though I agree those options could be moved somewhere in footnotes or a special subsection perhaps.
These options are present in the doc already, they're just not visible in the diff.
@ -7,0 +17,4 @@
git config --global core.symlinks true
```
If you plan to contribute and propose pull requests then fork the repo https://github.com/organicmaps/organicmaps first.
I don't see a way how to make it elegant and easy to read unless its duplicated...
E.g. imagine in INSTALL we'd have
And in the CONTRIB
Not good as people will forget to substitute their github name in the clone command.
or
Better, but requires a reader to jump back-and-forth between the two docs still.
And if we'll add e.g. options to reduce download size (from below) to CONTRIB and cross-reference them to INSTALL then it'll become more ugly even.
Maybe I just didn't get your idea right though.
@ -7,0 +31,4 @@
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
And/or add a `--depth=1` option to make a _shallow copy_ (and possibly a `--no-single-branch` to have all branches not just `master`), i.e. omit history retaining current commits only - suitable for one-off builds.
Current docs are hard for newcomers. It would be great if there will be an "easy and fast" way to compile and run the app on Android, iOS, and Desktops. Also, ideally, if someone wants to make a very simple code change/fix, it should also be very easy and clear. And in parallel, there could be a very detailed doc for those who want to get all details.
I don't know how to better organize it. Any ideas are welcome.
@ -7,0 +31,4 @@
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
And/or add a `--depth=1` option to make a _shallow copy_ (and possibly a `--no-single-branch` to have all branches not just `master`), i.e. omit history retaining current commits only - suitable for one-off builds.
Maybe make starting INSTALL sections simple, but move all details to sections below? And insert some links to them to avoid duplication?
@ -7,0 +17,4 @@
git config --global core.symlinks true
```
If you plan to contribute and propose pull requests then fork the repo https://github.com/organicmaps/organicmaps first.
To avoid duplication, we can write in INSTALL that use this
git clone …
if you just want to build it for yourself and save disk space, or thatgit clone…
if you want to contribute.@ -7,0 +17,4 @@
git config --global core.symlinks true
```
If you plan to contribute and propose pull requests then fork the repo https://github.com/organicmaps/organicmaps first.
And then start CONTRIBUTING with "Please follow INSTALL.md steps first".
@ -7,0 +29,4 @@
git clone https://github.com/<your-github-name>/organicmaps.git
```
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
Why 30+ GB? My full checked-out repo takes ~9GB (7GB .git folder). Every Android arch debug build takes an additional 4.5Gb. Building a desktop-only app takes also a few GBs, depending on the configuration.
Also adding default
desktop
target can help people.@ -7,0 +29,4 @@
git clone https://github.com/<your-github-name>/organicmaps.git
```
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
30+Gb is a minimum total that also includes android studio, sdk, ndk, etc.
On my system it looks like this:
There I have a small emulator image without Google services and a quite old low-mem emulated device (Nexus S) and just a 256Mb emulated SD. With a more conventional option it'll be a couple Gb more.
So actually if we expect someone to just follow default instructions and build for all 3 arches (which is by default) then it comes close to 40Gb...
@ -7,0 +31,4 @@
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
And/or add a `--depth=1` option to make a _shallow copy_ (and possibly a `--no-single-branch` to have all branches not just `master`), i.e. omit history retaining current commits only - suitable for one-off builds.
Yeap I agree it should be simple and newbie-friendly.
I'll try to re-arrange!
Thanks! I'll do it in next PR, my idea was to limit the current PR to deduplication and update of the Getting sources section.
@ -7,0 +29,4 @@
git clone https://github.com/<your-github-name>/organicmaps.git
```
Add a `--filter=blob:limit=128k` option to above command to make a _partial clone_ of just ~1.2Gb, i.e. blob files over 128k in size will be excluded form the history and downloaded on-demand - should be suitable for a generic development use.
Interesting. We probably need to document a "low space" options, e.g. installing only JDK without Android Studio (or reusing a system one), building release instead of debug to save some space, mounting a compressed NDK image :)
But let's start focusing on systems with enough free space first and make it an easy start for these environments.
We can merge it as is, the doc is already better than before.
Ok great, thanks!
And I'll continue re-arranging and improving from there as discussed above!
(please don't mind I'm quite slow with updates atm - have limited time - but I'm commited to continue to improve the docs)
Upd: a follow-up WIP PR organicmaps/organicmaps#1568