Commit Graph

297 Commits

Author SHA1 Message Date
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
Sergio Ahumada
647f3b87bd Documentation: Update BuildInstructions.md
Add missing `cmake ..' line before compiling with make
2020-08-25 09:36:56 +02:00
Ben Wiederhake
1176865276 Meta: Explain how to build with ninja
Inspired by #3047, and my struggles to understand how cmake is supposed to work ^^

Thanks to @bgianfo, who made me realize that ninja can be used just like make.
No idea why I didn't notice that earlier.
2020-08-17 23:05:55 +02:00
Andreas Kling
b6e18133ae LibWeb: Rename WebContentView => OutOfProcessWebView 2020-08-17 18:05:35 +02:00
Ben Wiederhake
7a8c72d136 Meta: Document QtCreator auto-format and compiler kits 2020-08-15 20:48:52 +02:00
Peter Nelson
e36fce9cfc Docs: explain how to enable QEMU hardware acceleration on Windows
Describes how to enable QEMU hardware acceleration on Windows using the
Windows Hypervisor Platform feature.
2020-08-14 15:09:59 +02:00
Peter Nelson
d00df4e721 Docs: clarify steps to use Windows-native QEMU when building under WSL
This now descibes how to get the regular `make run` workflow to work
under Windows using native QEMU. It describes how to override the QEMU
binary path, as well as overriding the SerenityOS disk image file
location with a native Windows path.

Also fixes some minor spelling and punctuation issues.
2020-08-14 15:09:59 +02:00
Andrew Mbugua
1f7190d3bd
Meta: Fix typo in NotesOnWSL.md (#3086) 2020-08-11 14:27:00 +02:00
Valtteri Koskivuori
c1f633e1ee Documentation: Add a mention of the recent requirement for a newer
host compiler. On macOS this might have to be specified explicitly.
2020-08-07 09:07:10 +02:00
Valtteri Koskivuori
b4a29113e4 Documentation: Add a guide for setting up Qt Creator
This was already in video form, but I figured it might be nice to
have this here as well, to make it easier to discover.
2020-08-06 10:22:14 +02:00
Luke
f71b112530 Documentation: Add an installation guide for VirtualBox
Now that Serenity can run on VirtualBox, it's time for the documentation.
2020-08-05 10:52:48 +02:00
Paul Scharnofske
fbc54a2dba Documentation: Only install missing packages for Arch Linux.
By default `pacman -S` will reinstall all the packages that are already installed on the system.
2020-07-26 17:48:24 +02:00
Dominik M. Kwiatek
782cd93c01
Meta: Add openSUSE dependencies to build documentation (#2801) 2020-07-15 00:06:16 +02:00
Andreas Kling
1037a24076 Documentation: Add note about DNS lookups to browser architecture docs 2020-07-06 18:41:41 +02:00
Andreas Kling
d897940e02 Documentation: Add a document about the Browser process architecture 2020-07-06 16:17:43 +02:00
Petr Akhlamov
188c83328f
Meta: Add ALT Linux packages to BuildInstructions.md (#2688) 2020-07-04 10:51:16 +02:00
Andrew Kaster
4f71bd54a7 Documentation: Add filesystem note to WSL2 notes
WSL2 is now available in non-insider builds of Windows, starting
with version 2004.

Add a filesystem note regarding use of /mnt/c et al from WSL2 for
compiling serenity. Namely, recommend against it as the performance
across the 9p file system protocol is terrible for IO heavy jobs.
2020-06-28 00:06:27 +02:00
Emanuele Torre
e42f4abd61 Meta: tweak build-image-grub.sh to allow running make grub-image..
without sudo.
2020-06-21 10:13:04 +02:00
Érico Nogueira Rolim
fef9ad520b
Toolchain: Use curl instead of wget (#2574)
- For Linux: curl is already listed as a dependency;
- For macOS: curl is pre-installed;
- For OpenBSD and FreeBSD: curl is a dependecy of git.
2020-06-18 16:31:12 +02:00
Ewan
0609a85166 Docs: Correct wording on CMake downloads 2020-06-17 15:08:47 +02:00
Ewan
92eed96265 Docs: Spell CMake correctly in BuildInstructions 2020-06-17 15:08:47 +02:00
Ewan
6a567e1191 Docs: Add comment about required cmake version
Toolchain/BuiltIt.sh expected a version of cmake which
apt did not provide for my system. Added note of the
expected version and where to find a newer version.
2020-06-16 13:54:47 +02:00
Dominik Madarász
7e2cf4be4b
Docs: Update FreeBSD instructions (#2510)
ginstall should not be symlinked to install globally. The actual issue
of having GNU coreutils prefixed with `g` and not being picked up by
CMake can be fixed on CMake level as noted here:
https://github.com/SerenityOS/serenity/issues/2234#issuecomment-629754194
2020-06-16 13:31:11 +02:00
Andreas Kling
68177fd9a1 Meta: Move INSTALL.md into Documentation/ 2020-05-28 13:09:43 +02:00
Yonatan Goldschmidt
00c0650f96 Build: Add Dockerfile 2020-05-22 01:19:15 +02:00
Andreas Kling
59c3b3b702 Revert "Meta: Restore instructions to create build directory for CMake"
This reverts commit 83137f76de.
2020-05-20 16:24:26 +02:00
Andrew Kaster
83137f76de Meta: Restore instructions to create build directory for CMake
We eliminated the need to pre-build LibC for libstdc++ by eliminating
libstdc++ itself, so users need to create their own build directories
again.
2020-05-20 08:37:50 +02:00
Devashish
e4f7080bbd Meta: Update CLion and WSL configuration documentations
This commit updates CLionConfiguration.md and NotesOnWSL.md so that
they comply with new build system. In addition to that, the WSL doc
is updated to include instructions to run qemu (and serenity) natively
on Windows, without needing an X-window server.
2020-05-17 23:07:35 +02:00
Dominik Madarasz
4e27c58be7 Build: FreeBSD support 2020-05-16 11:01:14 +02:00
DexesTTP
5386508119 Meta: Updated BuildInstructions.md for the cmake update
List of changes:
- The cmake command has been moved away from the main build instructions since
  the BuildIt script executes it automatically
- The ninja install has been clarified to take the BuildIt script into account
  and explain that the folder needs to be cleaned before executing cmake
- The ports instructions have been updated to use the make commands
- "brew install bash" has been added to the macOS prerequisites as per #2132
- The build instructions headers have been indented to group the prerequisites
  together
- The build instructions code snippets have been standardized into code blocks
- Fixed a typo
2020-05-15 09:48:14 +02:00
DexesTTP
c715b13ffc Meta: Updated CodingStyle.md clang-format requirement from 8 to 10
Fixes #2213
2020-05-15 09:48:14 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Andreas Kling
cf3b58fbe8 Services: Renamed from Servers
It didn't feel right to have a "DHCPClient" in a "Servers" directory.
Rename this to Services to better reflect the type of programs we'll
be putting in there.
2020-05-08 21:57:44 +02:00
Yonatan Goldschmidt
3df3ab4598 Build: Support building in Docker
Add missing installations to instructions, and use genext2fs instead
of mounting.
2020-05-07 10:23:26 +02:00
Andreas Kling
eabb7b563a Documentation: Add note about /dev/kvm to BuildInstructions.md 2020-05-06 17:12:49 +02:00
Devashish
f22c973ba3 Meta: Add configuration for setting up project in CLion
This commit adds a CMakeLists.txt file that will be used by CLion to
configure the project and documentation explaining the steps to follow.
Configuring CLion this way enables important features like code
completion and file search. The configuration isn't perfect. There are
source files for which CLion cannot pick up the headers and asks to
manually include them from certain directories. But for the most part,
it works all right.
2020-05-04 09:50:45 +02:00
Andreas Kling
2b7fc08db3 Documentation: Add section about structs vs. classes to CodingStyle.md 2020-04-18 11:14:05 +02:00
Andres Vieira
e9c65b6566 Meta: Add Arch Linux (and derivatives) build instructions
This patch adds a one liner to install all the dependency packages
needed to compile and run Serenity on Arch Linux, Manjaro, etc
2020-04-13 17:38:27 +02:00
Ed Rochenski
551cafe4d3 Documentation: added additional info about moving to wsl2 2020-04-09 11:35:43 +02:00
Ed Rochenski
932de565b1 Documentation: added note to prevent script failure in build section 2020-04-09 11:35:43 +02:00
Andreas Kling
ec91d2eb9f Documentation: Inform people that anon can su to root by default
\0 pointed out that this is not mentioned anywhere, technically making
it a "local privilege escalation" bug.

This patch adds it to the documentation, and I've also paid out the
first $5 bounty to the "Kiwis for Kiwi" charity as per \0's request!

http://serenityos.org/bounty/kiwis4kiwi.png
2020-03-30 11:35:39 +02:00
Linus Groh
c5cf740830 Documentation: Add build dependencies for Fedora 2020-03-28 22:12:20 +01:00
Andreas Kling
2176a3dd18 Documentation: Tweak document about smart pointers a bit
Add notes about assigning between FooPtr / NonnullFooPtr.
2020-03-20 14:41:02 +01:00
Alexander F. Rødseth
cdb58cdfd2
Build: Use ccache if it's available (#1315) 2020-02-27 11:44:29 +01:00
Oliver Kraitschy
aab59eaaab Documentation: Explain compilation of small changes and ports 2020-02-01 20:16:24 +01:00
Andreas Kling
3de5439579 AK: Let's call decrementing reference counts "unref" instead of "deref"
It always bothered me that we're using the overloaded "dereference"
term for this. Let's call it "unreference" instead. :^)
2020-01-23 15:14:21 +01:00
Elisée Maurer
9e22b83343 Documentation: Suggest gcc-9 on Ubuntu since PPA doesn't have 8 anymore 2020-01-05 08:57:43 +01:00
joshua stein
5e430e4eb4 Build: add support for building on OpenBSD
This requires gcc8 from ports to build the Toolchain.
2020-01-02 21:03:53 +01:00
Andreas Kling
fd14795f9d Meta: Update ReadMe and move build instructions to a separate document 2019-12-29 16:23:50 +01:00
Andreas Kling
1133acabb2 Meta: Move "Notes on WSL" to a separate file in Documentation/
Since this is not relevant to the majority of people, let's move it
out of the way.
2019-11-06 21:03:18 +01:00
Andreas Kling
af840af1ce Documentation: Let's have a coding style document
This is only meant to be about higher-level coding style, not the small
things like brace placement, indentation, etc. For all of that we just
obey clang-format.
2019-08-21 17:01:29 +02:00
Andreas Kling
f4bae8971c Documentation: Add a paragraph about NonnullOwnPtr to SmartPointers.md 2019-08-01 14:35:50 +02:00
Andreas Kling
e97d714bbc Documentation: Update SmartPointers.md with new pointer names. 2019-06-21 18:42:17 +02:00
Robin Burchell
faafaf9b43 Documentation: RIP the short-lived coding style
Let's just use clang-format. It's easier than explaining the rules.
2019-05-28 17:31:20 +02:00
Andreas Kling
854598bc46 Documentation: Remove some irrelevant things from the coding style.
This was adapted from the WebKit coding style docs, but some parts of it
don't make sense for Serenity.
2019-05-28 11:43:28 +02:00
Andreas Kling
fc3732759d Documentation: Import an attempt at describing the project coding style. 2019-05-28 11:40:44 +02:00
Andreas Kling
3cd1db09d4 Documentation: Add a brief description of Serenity's smart pointer types. 2019-05-15 14:07:14 +02:00