Code Monkey home page Code Monkey logo

Comments (13)

flxzt avatar flxzt commented on May 23, 2024 3

Should have mentioned this here too, I already experimented with a windows build and documented my steps here.

from rnote.

gloopsies avatar gloopsies commented on May 23, 2024 2

To not show the cmd window on windows when app launches you have to mark app as gui adding cli flag '-mwindows' should do the trick. More info: http://users.wfu.edu/cottrell/cross-gtk/

from rnote.

flxzt avatar flxzt commented on May 23, 2024 1

There is this docker image that could be used to cross-compile to windows, if anyone wants to have a go at it. https://github.com/MGlolenstine/gtk4-cross

from rnote.

iwoithe avatar iwoithe commented on May 23, 2024 1

Today I was able to get rnote building on Windows (wasn't too hard in the end). I'll do my best to explain the process here.

  1. Follow these instructions to install Rust
  2. Follow the instructions to setting up MSYS2
  3. Run the following command in either a MSYS2 MSYS terminal or in a MSYS2 Mingw64 terminal
pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-pkg-config mingw-w64-x86_64-meson mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita mingw-w64-x86_64-poppler
  1. Run meson setup --prefix={INSTALL_PREFIX} _mesonbuild
    You can set {INSTALL_PREFIX} to any directory you like.
  2. Run meson compile -C _mesonbuild
  3. If you wish to install it, run meson install -C _mesonbuild. If using C:/Program\ Files/rnote or similar as the install directory you MUST elevate permissions to admin level. I use gsudo for this (further steps will also require admin rights).
  4. The step above will fail. Unfortunately (at the time of writing) some manual work is required to fix this.
  5. In the _mesonbuild directory, you will see an executable called rnote.exe. Copy, paste and rename to rnote
  6. Rerun meson install -C _mesonbuild
  7. Rename to {INSTALL_PREFIX}/bin/rnote to {INSTALL_PREFIX}/bin/rnote.exe
  8. Open a terminal in {INSTALL_PREFIX}/share/glib-2.0/schemas and run this command glib-compile-schemas.exe .
  9. Double click on rnote.exe in File Explorer and rnote will run. 🙂

Optional

  1. To create a start menu shortcut, right click on rnote.exe in File Explorer and select Create shortcut. Windows will then ask if you want it created on the desktop. Click "Yes". Then move/copy (depending whether you would like a desktop shortcut as well) the shortcut to C:\ProgramData\Microsoft\Windows\Start Menu\Programs

Screenshot

rnote

Additional Notes

  • Unfortunately there is no app icon for rnote
  • A console appears (although this may be my fault based on the commands I used to build rnote)
  • The system colors button does not work (in screenshot I had to set it to dark even though the system theme is set to dark)
  • Not sure why the install step fails (unfortunately I don't have the time to get the specific error messages right this moment, sorry). But once this is resolved I am happy to create a GitHub Action script to build a Windows version of rnote
  • If you wish I can open a PR that adds the building on Windows information to CONTRIBUTING.md
  • If there is anything that you feel needs fine tuning (or that I've missed key information), let me know so I can update the instructions 🙂

from rnote.

flxzt avatar flxzt commented on May 23, 2024 1

@iwoithe If you would be willing to create a script, that would be very nice. On my machine I am getting a lot of UTF8 validation errors though, resulting in a lot of blank labels in the app, did you experience that too?

from rnote.

flxzt avatar flxzt commented on May 23, 2024 1

For windows a python script might be better. It could then be extended to create a installer at some point I think? If somebody has expertise with that and would like to help, I would really appreciate it!

from rnote.

flxzt avatar flxzt commented on May 23, 2024 1

Whatever works best for you! I read that Inno is most pleasant to write and the only real downside is that it can only produce .exe files, not MSI. But I don't really think we need to worry about this at the moment.

from rnote.

flxzt avatar flxzt commented on May 23, 2024 1

I think this should be solved, there are (currently) up to date and tested instruction how to build on windows available here: https://github.com/flxzt/rnote/blob/main/misc/building/rnote-windows-build.md

from rnote.

flxzt avatar flxzt commented on May 23, 2024

I think you're refering to what is now in BUILDING.md, but there never were any build instructions for windows.
But if someone manages to do it, please report back so I can add them, maybe we could even ship a installer (although linux / flatpk will probably stay the target I am focusing on the most)

from rnote.

avacadox21 avatar avacadox21 commented on May 23, 2024

Can I build it with cargo?

from rnote.

flxzt avatar flxzt commented on May 23, 2024

No, rnote uses meson as its build system

from rnote.

iwoithe avatar iwoithe commented on May 23, 2024

On my machine I am getting a lot of UTF8 validation errors though, resulting in a lot of blank labels in the app, did you experience that too?

I haven't actually re-built it in a few weeks but I will check if this occurs for me within the next few days (this was not an issue when I built rnote the first time).

@iwoithe If you would be willing to create a script, that would be very nice.

I am happy to do this. Would you like it to be a Bash or Python script?

from rnote.

iwoithe avatar iwoithe commented on May 23, 2024

For windows a python script might be better.

I'll start working on it.

It could then be extended to create a installer at some point I think?

Yeah, this would be good. I am happy to do this. I'd prefer using Inno Setup as that is what I've had experience in but I am fine to use another setup installer creator if you wish.

from rnote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.