Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging to fork #1

Merged
merged 4 commits into from
Feb 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Documentation can be found on [leksah.org](http://leksah.org/).

## Getting Leksah
### Installation
Leksah requires: **[Haskell Platform](https://www.haskell.org/platform/) [>= 8.0.1](https://www.haskell.org/platform/contents.html)** OR **[ghc >= 7.10.3](https://www.haskell.org/ghc/download)**, **[cabal-install >= 1.24](https://www.haskell.org/cabal/download.html)**.
Leksah requires `ghc --version` >=7.10.3 and `cabal --version` >=1.24. To get them go to **[haskell.og/download](https://www.haskell.org/downloads)** and choose the **Minimal GHC** or **Haskell Platform**.

* **Windows** and **OS X**: [official binaries](https://github.com/leksah/leksah/wiki/download)
* **Windows** [latest github version built with AppVeyor](https://ci.appveyor.com/project/hamishmack/leksah/build/artifacts)
* **OS X**: [official binaries](https://github.com/leksah/leksah/wiki/download)
* **Linux**: [build from source](https://github.com/leksah/leksah#building-from-source)

### Building from source
We have just completed a port of Leksah from Gtk2Hs to haskell-gi. Not all of the code is in Hackage yet so to build it you can either use [Xobl](xobl/Readme.md) or follow the instructions below.
We have completed a port of Leksah from Gtk2Hs to haskell-gi. Not all of the code is in Hackage yet so to build it you can either use [Xobl](xobl/Readme.md) or follow the instructions below.

#### Step 1: Install C libraries

Expand Down Expand Up @@ -64,6 +65,14 @@ choco install ghc
pacman -S mingw64/mingw-w64-x86_64-pkg-config mingw64/mingw-w64-x86_64-gobject-introspection mingw64/mingw-w64-x86_64-gtksourceview3 mingw64/mingw-w64-x86_64-webkitgtk3
```

Set the following environment variables:
```shell
SET PATH=%APPDATA%\cabal\bin;C:\msys64\mingw64\bin;C:\msys64\usr\bin;C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.0.2\bin;C:\ProgramData\chocolatey\lib\cabal\tools;%PATH%
SET PKG_CONFIG_PATH=C:\msys64\mingw64\lib\pkgconfig
SET XDG_DATA_DIRS=C:\msys64\mingw64\share
```
(change `C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.0.2\bin` if a newer version is installed)

#### Step 2: Clone repository and its submodules
```shell
git clone --recursive https://github.com/leksah/leksah.git
Expand All @@ -78,7 +87,7 @@ cabal install alex happy
cabal install haskell-gi
echo 'PATH: '"$PATH"
```
Make sure `~/.cabal/bin` is present in PATH.
Make sure `~/.cabal/bin` is present in PATH (*Windows:* Make sure `%APPDATA%\cabal\bin` is present in PATH).

##### Step 3.a.2: Build and run Leksah
###### OS X using MacPorts
Expand Down
3 changes: 3 additions & 0 deletions leksah.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ data-files:
pics/ide_error.png
pics/ide_warning.png
pics/ide_suggestion.png
pics/ide_doc_build.png
pics/ide_bench_build.png
pics/ide_test_build.png
scripts/clean.sh
scripts/stage.sh
osx/bundle.sh
Expand Down
Binary file added pics/ide_bench_build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/ide_doc_build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/ide_test_build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/IDE/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,11 @@ mkActions =

,AD "BackgroundBuildToggled" (__ "_Build in the background") (Just (__ "Build in the background and report errors")) (Just "ide_build")
backgroundBuildToggled [] True
,AD "MakeDocsToggled" (__ "Build with _documentation") (Just (__ "Make documentation when building")) (Just "gtk-apply") -- TODO change icon
,AD "MakeDocsToggled" (__ "Build with _documentation") (Just (__ "Make documentation when building")) (Just "ide_doc_build")
makeDocsToggled [] True
,AD "RunUnitTestsToggled" (__ "Run _unit tests when building") (Just (__ "Run unit tests when building")) (Just "gtk-apply") -- TODO change icon
,AD "RunUnitTestsToggled" (__ "Run _unit tests when building") (Just (__ "Run unit tests when building")) (Just "ide_test_build")
runUnitTestsToggled [] True
,AD "RunBenchmarksToggled" (__ "_Run benchmarks when building") (Just (__ "Run benchmarks when building")) (Just "gtk-apply") -- TODO change icon
,AD "RunBenchmarksToggled" (__ "_Run benchmarks when building") (Just (__ "Run benchmarks when building")) (Just "ide_bench_build")
runBenchmarksToggled [] True
,AD "MakeModeToggled" (__ "_MakeMode") (Just (__ "Make dependent packages")) (Just "ide_make")
makeModeToggled [] True
Expand Down Expand Up @@ -603,7 +603,7 @@ getMenuAndToolbars uiManager = do
menu <- uIManagerGetWidget uiManager "/ui/menubar" >>= liftIO . unsafeCastTo MenuBar
toolbar <- uIManagerGetWidget uiManager "/ui/toolbar" >>= liftIO . unsafeCastTo Toolbar
toolbarSetStyle toolbar ToolbarStyleIcons
toolbarSetIconSize toolbar IconSizeSmallToolbar
toolbarSetIconSize toolbar IconSizeLargeToolbar
widgetSetSizeRequest toolbar 700 (-1)
return (accGroup,menu,toolbar)

Expand Down Expand Up @@ -725,7 +725,7 @@ newIcons = catch (do
"ide_debug", "ide_step", "ide_local", "ide_module", "ide_continue", "ide_rebuild_meta",
"ide_empty","ide_source_local", "ide_js", "ide_folder", "ide_source_folder",
"ide_cabal_file", "ide_package", "ide_component", "ide_source_dependency", "ide_error",
"ide_warning", "ide_suggestion", "ide_git" ]
"ide_warning", "ide_suggestion", "ide_git", "ide_test_build", "ide_bench_build", "ide_doc_build" ]
iconFactoryAddDefault iconFactory)
(\(e :: SomeException) -> getDataDir >>= \dataDir -> throwIDE (T.pack $ printf (__ "Can't load icons from %s %s") dataDir (show e)))
where
Expand Down