ComputerBas

Tips, tricks and manuals

Je bent niet ingelogd.

#1 2022-03-29 00:49:26

Bas
Administrator
Geregistreerd: 2019-11-10
Posts: 96

How to compile?

For Windows:

It all starts with a good environment with the correct variables in PATH.

examples of PATH:

C:\Windows\
C:\Windows\system32\
C:\Program Files\Python310\
C:\Program Files\Python310\Scripts\
C:\Python39\
C:\Python39\Scripts\
C:\Program Files\CMake\bin\
C:\Program Files\Git\cmd\
C:\Boost\
C:\MSYS2\

add some new paths:

C:\bin\

(for binaries)

C:\lib\

(for libraries)

C:\dep\

(for dependencies)


you get it..


Make easy directories like:

C:\source\

(for source code)

C:\build\

(for application builds)

C:\installer\

(for installers)


you get it..


Install the newest must haves in default location:

Git 2.3x

https://git-scm.com/downloads

Python 3.10 and 3.9

https://www.python.org/downloads/

Visual Studio 2022 and 2019

https://visualstudio.microsoft.com/downloads/

CMake 3.2x

https://cmake.org/download/

Nuget 6.x

https://www.nuget.org/downloads

Qt 6 and 5

https://www.qt.io/download

MSYS2 newest

https://www.msys2.org/

NodeJS newest

https://nodejs.org/dist/v17.9.0/node-v17.9.0-x64.msi

Boost newest

https://www.boost.org/users/download/

Inno Setup Compiler

https://jrsoftware.org/isdl.php


Basic steps:

1: Download repository

Download repository with Git (bash or gui)

2: Configure

Configure build with CMake (gui)

3: Generate

Generate code with CMake

4: Build

Build release with Visual Studio

5: Install

Make installer with Inno Setup Compiler

_____________________________________________________________________________________________


For Linux:

Install compiler dependencies:

Copy/Paste in Terminal/Console:

sudo apt install -y build-essential

Basic steps:

Use GIT to download repositories, submodules and dependencies:

Download code and submodules and go to the repository directory:

$ git clone --recursive https://github.com/repository/repository.git && cd repository

To update your git source code go to repository directory and do this:

git pull
git submodule update --init --recursive

To download and install build dependencies do this:

sudo apt build-dep yourappname

Configure using CMake:

$ mkdir build && cd build
$ cmake ..

Build using CMake:

$ make -j4 (number of processor cores)

Install using CMake:

$ sudo make install

_____________________________________________________________________________________________

A few examples:


Notepad++

In Windows:

in git bash:

git clone https://github.com/notepad-plus-plus/notepad-plus-plus.git

Doubleclick PowerEditor\visual.net\notepadPlus.sln
Select solution configuration (Release) and solution platform (x64)
Build Notepad++ solution.

_____________________________________________________________________________________________


Audacity

In Windows:

In Git Bash:

python get-pip.py
pip install conan
git clone https://github.com/audacity/audacity.git

in CMake gui:

source: c:\source\audacity
destination: c:\build\audacity

configure
configure again
generate
open project

In Visual Studio:

Select solution configuration (Release) and solution platform (x64)
Build Audacity solution.

copy \audacity\win\Inno_Setup_Wizard\

to

\installer\

and

go to installer folder

rename audacity.iss.in to audacity.iss
rename audacity_InnoWizard_InfoBefore.rtf.in to audacity_InnoWizard_InfoBefore.rtf

make directory Package

copy build\audacity\bin\release\ content to the installer\Package folder

make directory Additional

copy README.TXT, LICENSE.txt from \Audacity\src\ to \installer\Additional\
copy Audacity.ico from \yourbuild\bin\ to \installer\Additional\


All done?

Run and edit on error:

edit the following line from the audacity.iss file:

AppName=ComputerBas

remove the following lines from the audacity.iss file:

@INSTALLER_X64_MODE@
@SIGN_TOOL@
@MANUAL@


Compile the installer.

All good? You're good!!

_____________________________________________________________________________________________


Hydrogen Drum Machine

In Windows:

In Git Bash:

git clone https://github.com/hydrogen-music/hydrogen.git && cd hydrogen
cd windows

In PowerShell (windows directory)

./Build-WinNative.ps1 -installdeps

Build Hydrogen:

./Build-WinNative.ps1 -build

Deploy an installer:

./Build-WinNative.ps1 -deploy

_____________________________________________________________________________________________


OBS Studio

In Windows:

In Git Bash:

git clone --recursive https://github.com/obsproject/obs-studio.git && cd obs-studio

In PowerShell (obs-studio directory)

CI/build-windows.ps1

again
again
again
again

doubleclick \obs-studio\build64\obs-studio.sln

Select solution configuration (Release) and solution platform (x64)

Build OBS Studio solution.

_____________________________________________________________________________________________


Clementine Music Player

In Linux:

git clone https://github.com/clementine-player/Clementine.git && cd Clementine
cd bin
cmake ..
make -j6 (number of processor cores)
sudo make install

More to come here!

Laatst bewerkt door Bas (2022-05-05 17:59:04)

Offline

Forum footer

Powered by FluxBB 1.5.11