Skip to content

Getting started with editing the source

Rory Fewell edited this page Oct 3, 2024 · 1 revision

A good starting point would be to literally just make a simple visible change, and then produce a build to see that things work. Do not worry about diving into issues and finding something in particular to work on immediately.

So what should I edit?

I would recommend a .ui file of some sort. These files are XML that define the GTK widget structure for a UI, a bit like how you would write HTML for a web page.

In this project, these UI files are typically compiled into the programs as 'resources', so they live under the /src/res sub-directory inside components (this will be explained in more detail in a later chapter).

For this example, I suggest making a change to Explorer's UI, which can be found here: /shell/explorer/src/res/explorer.ui

Make a change to the File menu item text - you want to find and replace %CTL_FILEMENU% with some text of your choosing, then save and close the file.

Now for the build

You may be aware of /packaging/buildall.sh - the script responsible for compiling and packaging every component in the repo. Obviously you want to now only compile and package Explorer, here's how:

  • In a terminal, navigate to the /packaging directory
  • Run ./build.sh shell/explorer
  • Assuming that was successful, now run ./package.sh shell/explorer
    • You should now see a new sub-directory called local-out
  • Inside this sub-directory is your newly built and packaged component
    • For instance, on Debian (or derivatives) you should see /packaging/local-out/wintc-explorer.deb
  • You can now install this package the same way you would any other local package (eg. sudo dpkg -i local-out/wintc-explorer.deb)
  • Run explorer and see that the File menu item has its text changed to whatever you put

Hopefully this all went smoothly and that you get the gist. To build and package a specific component, you want to specify the relative path to the component's root. In this case it was shell/explorer, if you were to make changes to the Luna Blue theme, you would specify themes/luna/blue.

Play around?

It might be useful for you to just have a play around like this to get a feel for the project. Make various changes to things, build and package, see your changes working etc.