Giter VIP home page Giter VIP logo

sfos-nim-template's Introduction

SailfishOS Nim Template Project

This is a template for SailfishOS app in Nim language.

How it works

This template makes use of nimqml module which is built on top of DOtherSide library.
This repository includes stripped version of DOtherSide sources (without dependency on QtWidgets so an app you build will be able to pass harbour validator). Actually, you also need to delete a part of nimqml (maybe I will include it to this repository because of that)

How to build

Prerequirements

git clone https://github.com/nim-lang/Nim.git
cd Nim
git clone --depth 1 git://github.com/nim-lang/csources
cd csources
sb2 -t SailfishOS-armv7hl -m sdk-install -R sh build.sh
cd ..
sb2 -t SailfishOS-armv7hl -m sdk-install -R bin/nim c koch
sb2 -t SailfishOS-armv7hl -m sdk-install -R ./koch boot -d:release
sb2 -t SailfishOS-armv7hl -m sdk-install -R ./koch install /usr/local/bin
cd csources
sb2 -t SailfishOS-i486 -m sdk-install -R sh build.sh
cd ..
sb2 -t SailfishOS-i486 -m sdk-install -R bin/nim c koch
sb2 -t SailfishOS-i486 -m sdk-install -R ./koch boot -d:release
sb2 -t SailfishOS-i486 -m sdk-install -R ./koch install /usr/local/bin
  • And for mersdk if you want a working nimble installation:
cd csources
sh build.sh
cd ..
bin/nim c koch
./koch boot -d:release
./koch install /usr/local/bin
  • Install nimble package manager:
cd
git clone https://github.com/nim-lang/nimble.git
cd nimble
nim c -r src/nimble install
echo 'PATH=$PATH:'$HOME'/.nimble/bin' >> ~/.bashrc
  • Install nimqml module:
nimble install nimqml

Building project

  • In build engine cd into project directory and launch build.sh with desired architecture and build mode like this:
sh build.sh i486 debug

This will produce an rpm package in ../build-projname-arch-mode/RPMS

Rename

To rename the project you'll need to change the following:

  • 'name' variable in build.sh
  • Name of rpm/.spec file
  • Name entry in .spec file
  • Name and contents of .desktop file
  • Names of .png icons (icons/resolution/*.png)

TODO

  • Consider including nimqml module into repository
  • Integrate with mapplauncherd for view caching (I'm neither sure if it's possible nor if it's useful so this entry is in question)

sfos-nim-template's People

Contributors

aldrog avatar

Watchers

James Cloos avatar  avatar

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.