Commit graph

106 commits

Author SHA1 Message Date
thislooksfun
20ca1acdbf Documentation: Update macOS build path in BuildInstructions.md
This is a follow-up to d0427b610c.
2021-04-02 23:08:05 +02:00
Linus Groh
d0427b610c Documentation: Update build path in BuildInstructions.md
Build/ is now /Build/i686/. No need to mention other targets just yet.
2021-03-11 21:01:29 +01:00
Linus Groh
07f25ca6be Documentation: Clean up BuildInstructions.md a bit
- Fix headings
- Consistent & more accurate code block language specifiers
- Add some newlines where appropriate
- Remove the strange "run ninja but actually you don't have to run ninja
  as ninja install takes care of that" part
- Don't repeat specific build commands in "Ports" section
- Reword "Keymap" section to more generic "Customize disk image"
2021-03-11 21:01:29 +01:00
Brendan Coles
0e18c7ffda Documentation: Add Serenity installation guide for VMware 2021-03-10 11:59:32 +01:00
Emanuele Torre
1f81bc6879 Everywhere: Remove unnecessary whitespace at the end of some lines. 2021-03-08 09:20:53 +01:00
Dan MacDonald
9547846a18 Documentation: Re-arrange Linux prerequisites in build instructions 2021-03-04 15:42:29 +01:00
Elliot Maisl
95b49691c5 Documentation: Add instruction about entitlements in BuildInstructions
The QEMU's `--accel hvf` command was recently enabled in the `run.sh`
script, but it sadly doesn't work on macOS Big Sur: you need to first
sign your code by adding an `entitlements.xml` file and running a
simple command.
2021-03-03 23:08:25 +01:00
Paweł Łukasik
f66adbdd95
Meta: Use ninja instead of make in the WSL docs (#5575)
Co-authored-by: Paweł Łukasik <lukasik.pawel@gmail.com>
2021-03-01 11:10:50 +01:00
Andrew Kaster
87a47de613 Documentation: Add RunningTests document
This page explains how to run host tests with Lagom and on-target tests
with run-tests-and-shutdown.sh
2021-02-28 18:19:37 +01:00
Itamar
780e84f2e1 Documentation: Update CLion configuration documentation
Closes #5512
2021-02-26 14:43:26 +01:00
Jorropo
7b156a7add
Documentation: Combine two "cd" commands in build instructions (#5457) 2021-02-21 23:49:56 +01:00
Ben Wiederhake
44649517e4 Documentation: QtCreator likes BOMs, our linter doesn't 2021-02-21 22:34:09 +01:00
joshua stein
ca35776e78 Documentation: Update build dependencies on OpenBSD 2021-02-14 09:29:22 +01:00
Ben Wiederhake
71219b8a1d Documentation: QtCreator and <syscall.h> 2021-02-08 18:03:57 +01:00
Ben Wiederhake
897d3d78b9 Documentation: Update QtCreator includes for Debug.h
Including 'Build/' is unfortunate, but this seems to be what everyone does,
short of creating a symlink/hardlink from /AK/Debug.h to /Build/AK/Debug.h.

This feels like a crutch, but it's a better crutch than having a workaround
that could easily break or corrupt commits (i.e., the symlinks).
2021-02-08 18:03:57 +01:00
jarhill0
ff3ae331f7 Documentation: Clarify macOS build instructions
I just ran through successfully building and running SerenityOS under
macOS. I ran into two main things that I struggled with, which were
- properly enabling osxfuse (through System Preferences)
- running the suggested command about compiler versions in such a way
  that would be compatible with Ninja (as it turns out, I just needed
  to add `-G Ninja` to the command)
This commit clarifies those things for anyone who may follow
2021-02-06 08:51:45 +01:00
Ben Wiederhake
52fff644d5 Documentation: Keymaps are nice, document them!
fixup! Meta+Documentation: Fix sync-local.sh support, document keymaps
2021-02-01 09:54:32 +01:00
Dexter
d697d33fa6
Documentation: Fix typo in CodingStyle.md (#5121) 2021-01-26 12:26:27 +01:00
Jean-Baptiste Boric
59396ab1c6 Documentation: Add instructions for network booting 2021-01-25 22:25:58 +01:00
Linus Groh
421587c15c Everywhere: Fix typos 2021-01-22 18:41:29 +01:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Ben Wiederhake
7980268b7b Meta: Document QtCreator 'lic' auto-complete 2021-01-22 11:28:07 +01:00
Nico Weber
98637bd549 WindowServer: In HighDPI mode, load high-res window buttons and high-res cursors
Bitmap::load_from_file("foo.png", 2) will now look for "foo-2x.png" and
try load that as a bitmap with scale factor 2 if it exists. If it
doesn't, it falls back to the 1x bitmap as normal.
Only places that know that they'll draw the bitmap to a 2x painter
should pass "2" for the second argument.

Use this new API in WindowServer for loading window buttons and
cursors.

As a testing aid, ctrl-shift-super-i can force HighDPI icons off in
HighDPI mode. Toggling between low-res and high-res icons makes it easy
to see if the high-res version of an icon looks right: It should look
like the low-res version, just less jaggy.

We'll likely have to grow a better API for loading scaled resources, but
for now this suffices.

Things to check:
- `chres 640 480` followed by `chres 640 480 2` followed by
  `chres 640 480`
- window buttons in window context menu (in task bar and on title bar)
  still have low-res icons
- ctrl-shift-super-i in high-res mode toggles sharpness of window
  buttons and of arrow cursorf
- arrow cursor hotspot is still where you'd expect
2021-01-20 10:28:27 +01:00
Nico Weber
5f9c42c404 LibGfx: Give Bitmap a scale factor
Gfx::Bitmap can now store its scale factor. Normally it's 1, but
in high dpi mode it can be 2.

If a Bitmap with a scale factor of 2 is blitted to a Painter with
scale factor of 2, the pixels can be copied over without any resampling.
(When blitting a Bitmap with a scale factor of 1 to a Painter with scale
factor of 2, the Bitmap is painted at twice its width and height at
paint time. Blitting a Bitmap with a scale factor of 2 to a Painter with
scale factor 1 is not supported.)

A Bitmap with scale factor of 2 reports the same width() and height() as
one with scale factor 1. That's important because many places in the
codebase use a bitmap's width() and height() to layout Widgets, and all
widget coordinates are in logical coordinates as well, per
Documentation/HighDPI.md.

Bitmap grows physical_width() / physical_height() to access the actual
pixel size. Update a few callers that work with pixels to call this
instead.

Make Painter's constructor take its scale factor from the target bitmap
that's passed in, and update its various blit() methods to handle
blitting a 2x bitmap to a 2x painter. This allows removing some gnarly
code in Compositor. (In return, put some new gnarly code in
LibGfxScaleDemo to preserve behavior there.)

No intended behavior change.
2021-01-20 10:28:27 +01:00
Nico Weber
b1c640a956 Docs: Start outlining options for highdpi resource handling 2021-01-19 16:48:21 +01:00
Andrew Thurman
6d20b54b09
Documentation: Add patch to fedora build deps (#4968) 2021-01-17 08:08:11 +01:00
Nico Weber
f37f281f89 DisplaySettings: Add UI for switching the scale factor
For now, only support 1x and 2x scale.

I tried doing something "smarter" first where the UI would try
to keep the physical resolution constant when toggling between
1x and 2x, but many of the smaller 1x resolutions map to 2x
logical resolutions that Compositor rejects (e.g. 1024x768 becomes
512x384, which is less than the minimum 640x480 that Compositor
wants) and it felt complicated and overly magical.

So this instead just gives you a 1x/2x toggle and a dropdown
with logical (!) resolutions. That is, 800x600 @ 2x gives you
a physical resolution of 1600x1200.

If we don't like this after trying it for a while, we can change
the UI then.
2021-01-17 08:06:12 +01:00
Ben Wiederhake
b3d04b3a3c Documentation: Make serenity.includes more easily copyable 2021-01-15 21:51:19 +01:00
Ben Wiederhake
7562cf5157 Documentation: Recommend ninja by default 2021-01-15 21:51:19 +01:00
Nico Weber
e87b8a79ed WindowServer: Make HighDPI aware
Almost all logic stays in "logical" (unscaled coordinates), which
means the patch is small and things like DnD, window moving and
resizing, menu handling, menuapplets, etc all work without changes.

Screen knows about phyiscal coordinates and mouse handling internally is
in physical coordinates (so that two 1 pixel movements in succession can
translate to one 1 logical coordinate mouse movement -- only a single
event is sent in this case, on the 2nd moved pixel).

Compositor also knows about physical pixels for its backbuffers. This is
a temporary state -- in a follow-up, I'll try to let Bitmaps know about
their intrinsic scale, then Compositor won't have to know about pixels
any longer. Most of Compositor's logic stays in view units, just
blitting to and from back buffers and the cursor save buffer has to be
done in pixels. The back buffer Painter gets a scale applied which
transparently handles all drawing. (But since the backbuffer and cursor
save buffer are also HighDPI, they currently need to be drawn using a
hack temporary unscaled Painter object. This will also go away once
Bitmaps know about their intrinsic scale.)

With this, editing WindowServer.ini to say

  Width=800
  Height=600
  ScaleFactor=2

and booting brings up a fully-functional HighDPI UI.
(Except for minimizing windows, which will crash the window server
until #4932 is merged. And I didn't test the window switcher since the
win-tab shortcut doesn't work on my system.) It's all pixel-scaled,
but it looks pretty decent :^)
2021-01-15 19:10:16 +01:00
bcoles
8e6c320af1 Documentation: UsingQtCreator: Include Userland in includes paths 2021-01-14 16:19:53 +01:00
Nico Weber
d551263b11 LibGfx: Make it possible to apply an (integer) scale to a Painter
This adds a scale factor to Painter, which will be used for HighDPI
support. It's also a step towards general affine transforms on Painters.

All of Painter's public API takes logical coordinates, while some
internals deal with physical coordinates now. If scale == 1, logical
and physical coordinates are the same. For scale == 2, a 200x100 bitmap
would be covered by a logical {0, 0, 100, 50} rect, while its physical
size would be {0, 0, 200, 100}.

Most of Painter's functions just assert that scale() == 1 is for now,
but most functions called by WindowServer are updated to handle
arbitrary (integer) scale.

Also add a new Demo "LibGfxScaleDemo" that covers the converted
functions and that can be used to iteratively add scaling support
to more functions.

To make Painter's interface deal with logical coordinates only,
make translation() and clip_rect() non-public.
2021-01-12 23:32:54 +01:00
Nico Weber
dc34ecf394 Docs: Add design doc and implementation plan for highdpi
I have a local branch that gets us past implementation stage 1
in this doc, and it seems like a useful enough checkpoint to
upstream it and then iterate in tree.
2021-01-12 20:44:42 +01:00
Linus Groh
fb220d5678 Meta+Docs+CI: Require clang-format >= 11 2020-12-31 21:51:00 +01:00
Peter Nelson
d014277973 Docs: Update WSL notes with some workarounds for known issues 2020-12-30 20:31:30 +01:00
meme
23b23cee5a Build: Support non-i686 toolchains
* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
2020-12-29 17:42:04 +01:00
Nathan Lanza
33834090bb
Documentation: Update macOS build instructions cask invocation (#4561)
brew deprecated `brew cask` and requires `brew install --cask` instead
2020-12-27 01:18:15 +01:00
Dan MacDonald
277c44c2dc Meta: Update install guide with link to hardware compatibility list 2020-12-24 11:02:43 +01:00
Dan MacDonald
00dc615d53 Meta: Add Hardware Compatbility List 2020-12-16 17:30:09 +01:00
Dan MacDonald
0e8702c310 Meta: Update bare metal installation guide 2020-12-11 09:35:24 +01:00
Linus Groh
2c9e6585f8 Documentation: Update required GCC version to >= 10
I initially thought as long as Lagom is not built >= 9 would be fine,
but LagomCore is always built for the code generators.
2020-11-07 18:22:18 +01:00
Andreas Kling
69a015cd9a Documentation: Remove outdated comment about global git identity
This was used by the toolchain build script at one point but is now
only used when running BuildIt.sh with --dev.
2020-10-18 20:33:02 +02:00
Andreas Kling
57c2da1f86 Documentation: Remove "flock" from dependencies
The build system no longer uses "flock", so stop telling people they
need to install it.
2020-10-18 20:33:02 +02:00
Andreas Kling
75d5f436bc Toolchain: Upgrade to GCC 10.2.0 2020-10-12 19:53:25 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
zilrich
a2ffe95a8c
Meta: Update OpenSUSE build dependencies (#3655) 2020-10-02 13:08:06 +02:00
Robbe De Greef
fd7a2278b9 Documentation: Debian gcc-9 installation instructions
We already have installation instructions for ubuntu but not yet for
Debian. Gcc-9 is not available on Debian stable so instructions for
switching to and from Debian testing are added.
2020-09-26 17:16:53 +02:00
Robbe De Greef
926fb3ff48 Documentation: Serenity requires GCC 9 or higher
Gcc 8.3.0 (which is the current version in debian 10 stable) seems to
fail at building AK. New people might get stuck when they try to run
make inside the ./Build folder and fail at building serenity.
2020-09-26 17:16:53 +02:00
Jakob-Niklas See
86d230ab5f Documentation: Fixed minor typo in UsingQtCreator 2020-09-07 16:53:29 +02:00
Luke
9b9c752dbe Documentation: Add Windows section in build instructions
It seems that new people go to the build instructions from the main
README, don't see Windows and are then stuck.

We do have instructions for Windows, but they aren't noted in the build
instructions, so new people get stuck thinking there's no way to build
on Windows.
2020-09-03 11:03:34 +02:00