mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 05:41:24 -05:00
Merge pull request #2797 from defnax/improve-macosdoc
Improved macos guide
This commit is contained in:
commit
d27616f28b
@ -30,13 +30,36 @@ In GitHub Desktop -> Clone Repository -> URL
|
|||||||
|
|
||||||
Add Repository URL: https://github.com/RetroShare/RetroShare.git and Clone
|
Add Repository URL: https://github.com/RetroShare/RetroShare.git and Clone
|
||||||
|
|
||||||
|
## ***Get XCode & MacOSX SDK***
|
||||||
|
|
||||||
|
Install XCode following this guide: [XCode](http://guide.macports.org/#installing.xcode)
|
||||||
|
|
||||||
|
To identify the correct version of Xcode to install, you need to know which OS you are running. Go to the [x] menu -> "About This Mac" and read the macOS version number.
|
||||||
|
|
||||||
|
If you are running the macOS Catalina >= 10.15, you can install Xcode directly from App Store using the instructions below.
|
||||||
|
|
||||||
|
You can find older versions of Xcode at [Apple Developer Downloads](https://developer.apple.com/downloads/). Find the appropriate .xip file for your macOS version
|
||||||
|
|
||||||
|
To install from App Store:
|
||||||
|
|
||||||
|
Select [x] menu - > "App Store…".
|
||||||
|
Search for Xcode. Download and install.
|
||||||
|
|
||||||
|
Once Xcode has installed, you must drag the XCode icon into your Applications folder. After you have done this, open Xcode from the Applications folder by double-clicking on the icon and then follow the remaining instructions below.
|
||||||
|
|
||||||
|
Install XCode command line developer tools:
|
||||||
|
|
||||||
|
$xcode-select --install
|
||||||
|
|
||||||
|
Start XCode to get it updated and to able C compiler to create executables.
|
||||||
|
|
||||||
|
Get Your MacOSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||||
|
|
||||||
## ***Choose if you use MacPort or HomeBrew***
|
## ***Choose if you use MacPort or HomeBrew***
|
||||||
|
|
||||||
### MacPort Installation
|
### MacPort Installation
|
||||||
|
|
||||||
Install MacPort and XCode following this guide: [MacPort and XCode](http://guide.macports.org/#installing.xcode)
|
Install MacPort following this guide: [MacPort](http://guide.macports.org/#installing.xcode)
|
||||||
|
|
||||||
Start XCode to get it updated and to able C compiler to create executables.
|
|
||||||
|
|
||||||
#### Install libraries
|
#### Install libraries
|
||||||
|
|
||||||
@ -51,18 +74,11 @@ For VOIP Plugin:
|
|||||||
$ sudo port install opencv
|
$ sudo port install opencv
|
||||||
$ sudo port install ffmpeg
|
$ sudo port install ffmpeg
|
||||||
|
|
||||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
|
||||||
|
|
||||||
### HOMEBREW Installation
|
### HOMEBREW Installation
|
||||||
|
|
||||||
Install HomeBrew following this guide: [HomeBrew](http://brew.sh/)
|
Install HomeBrew following this guide: [HomeBrew](http://brew.sh/)
|
||||||
|
|
||||||
Install XCode command line developer tools:
|
|
||||||
|
|
||||||
$xcode-select --install
|
|
||||||
|
|
||||||
Start XCode to get it updated and to able C compiler to create executables.
|
|
||||||
|
|
||||||
#### Install libraries
|
#### Install libraries
|
||||||
|
|
||||||
$ brew install openssl
|
$ brew install openssl
|
||||||
@ -86,7 +102,6 @@ For FeedReader Plugin:
|
|||||||
|
|
||||||
$ brew install libxslt
|
$ brew install libxslt
|
||||||
|
|
||||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
|
||||||
|
|
||||||
## Last Settings
|
## Last Settings
|
||||||
|
|
||||||
@ -104,11 +119,8 @@ In QtCreator Projects -> Build -> Build Settings -> Build Steps -> Add Additiona
|
|||||||
|
|
||||||
## Set your Mac OS SDK version
|
## Set your Mac OS SDK version
|
||||||
|
|
||||||
Edit RetroShare.pro
|
|
||||||
|
|
||||||
CONFIG += c++14 rs_macos11.1
|
Edit retroshare.pri and set your installed sdk version example for 11.1 -> rs_macos11.1 (line 135:)
|
||||||
|
|
||||||
and then retroshare.pri
|
|
||||||
|
|
||||||
macx:CONFIG *= rs_macos11.1
|
macx:CONFIG *= rs_macos11.1
|
||||||
rs_macos10.8:CONFIG -= rs_macos11.1
|
rs_macos10.8:CONFIG -= rs_macos11.1
|
||||||
@ -122,7 +134,7 @@ and then retroshare.pri
|
|||||||
|
|
||||||
## Link Include & Libraries
|
## Link Include & Libraries
|
||||||
|
|
||||||
Edit your retroshare.pri and add to macx-* section
|
When required edit your retroshare.pri macx-* section, check if the Include and Lib path are correct (macx-* section)
|
||||||
|
|
||||||
INCLUDEPATH += "/usr/local/opt/openssl/include"
|
INCLUDEPATH += "/usr/local/opt/openssl/include"
|
||||||
QMAKE_LIBDIR += "/usr/local/opt/openssl/lib"
|
QMAKE_LIBDIR += "/usr/local/opt/openssl/lib"
|
||||||
@ -131,13 +143,18 @@ Edit your retroshare.pri and add to macx-* section
|
|||||||
|
|
||||||
alternative via Terminal
|
alternative via Terminal
|
||||||
|
|
||||||
$ qmake INCLUDEPATH+="/usr/local/opt/openssl/include" QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" QMAKE_LIBDIR+="/usr/local/opt/sqlcipher/lib" QMAKE_LIBDIR+="/usr/local/opt/miniupnpc/lib"
|
$ qmake
|
||||||
|
INCLUDEPATH+="/usr/local/opt/openssl/include" \
|
||||||
|
QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" \
|
||||||
|
QMAKE_LIBDIR+="/usr/local/opt/sqlcipher/lib" \
|
||||||
|
QMAKE_LIBDIR+="/usr/local/opt/miniupnpc/lib" \
|
||||||
|
CONFIG+=rs_autologin \
|
||||||
|
CONFIG+=rs_use_native_dialogs \
|
||||||
|
CONFIG+=release \
|
||||||
|
..
|
||||||
|
|
||||||
For FeedReader Plugin:
|
|
||||||
|
|
||||||
INCLUDEPATH += "/usr/local/opt/libxml2/include/libxml2"
|
With plugins:
|
||||||
|
|
||||||
For building RetroShare with plugins:
|
|
||||||
|
|
||||||
$ qmake \
|
$ qmake \
|
||||||
INCLUDEPATH+="/usr/local/opt/openssl/include" QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" \
|
INCLUDEPATH+="/usr/local/opt/openssl/include" QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" \
|
||||||
@ -159,13 +176,30 @@ For building RetroShare with plugins:
|
|||||||
|
|
||||||
You can now compile RetroShare into Qt Creator or with Terminal
|
You can now compile RetroShare into Qt Creator or with Terminal
|
||||||
|
|
||||||
cd retroshare
|
$ cd /path/to/retroshare
|
||||||
qmake; make
|
$ qmake ..
|
||||||
|
$ make
|
||||||
|
|
||||||
You can change Target and SDK in *./retroshare.pri:82* changing value of QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK
|
You can change Target and SDK in *./retroshare.pri:82* changing value of QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK
|
||||||
|
|
||||||
You can find the compiled application at *./retroshare/retroshare-gui/src/retroshare.app*
|
You can find the compiled application at *./retroshare/retroshare-gui/src/retroshare.app*
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
If you have issues with openssl (Undefined symbols for architecture x86_64) try to add to *~/.profile* file this or via Terminal
|
||||||
|
|
||||||
|
export PATH="/usr/local/opt/openssl/bin:$PATH"
|
||||||
|
export LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||||
|
export CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||||
|
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
|
||||||
|
|
||||||
|
For Qt Creator -> QtCreator Projects -> Build -> Build Settings -> Build Steps -> Add Additional arguments:
|
||||||
|
|
||||||
|
LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||||
|
CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Copy Plugins
|
## Copy Plugins
|
||||||
|
|
||||||
$ cp \
|
$ cp \
|
||||||
|
50
build_scripts/OSX/makeOSXPackage.sh
Normal file
50
build_scripts/OSX/makeOSXPackage.sh
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
APP="RetroShare"
|
||||||
|
RSVERSION="0.6.7a"
|
||||||
|
QTVERSION="Qt-5.14.1"
|
||||||
|
|
||||||
|
# Install the 7z to create dmg archives.
|
||||||
|
#brew list p7zip || brew install p7zip
|
||||||
|
|
||||||
|
# Package your app
|
||||||
|
echo "Packaging retroshare..."
|
||||||
|
#cd ${project_dir}/build/macOS/clang/x86_64/release/
|
||||||
|
cd retroshare-gui/src/
|
||||||
|
|
||||||
|
# Remove build directories that you don't want to deploy
|
||||||
|
rm -rf moc
|
||||||
|
rm -rf obj
|
||||||
|
rm -rf qrc
|
||||||
|
|
||||||
|
# This sets the CFBundleVersion & CFBundleShortVersionString string
|
||||||
|
#/usr/libexec/PlistBuddy -c "Delete :CFBundleGetInfoString" retroshare.app/Contents/Info.plist
|
||||||
|
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||||
|
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||||
|
|
||||||
|
# This automatically creates retroshare.dmg
|
||||||
|
|
||||||
|
echo "Creating dmg archive..."
|
||||||
|
macdeployqt retroshare.app -dmg
|
||||||
|
|
||||||
|
DATE=`date +"%m-%d-%Y"`
|
||||||
|
MACVERSION=`sw_vers -productVersion`
|
||||||
|
#RSVERSION=`git describe --abbrev=0 --tags`
|
||||||
|
GITHEAD=`git rev-parse --short HEAD`
|
||||||
|
|
||||||
|
mv $APP.dmg "$APP-$RSVERSION-$GITHEAD-$DATE-MacOS-$MACVERSION-$QTVERSION.dmg"
|
||||||
|
|
||||||
|
# You can use the appdmg command line app to create your dmg file if
|
||||||
|
# you want to use a custom background and icon arrangement. I'm still
|
||||||
|
# working on this for my apps, myself. If you want to do this, you'll
|
||||||
|
# remove the -dmg option above.
|
||||||
|
# appdmg json-path YourApp_${TRAVIS_TAG}.dmg
|
||||||
|
|
||||||
|
# Copy other project files
|
||||||
|
cp "../../libbitdht/src/bitdht/bdboot.txt" "retroshare.app/Contents/Resources/"
|
||||||
|
cp "../../plugins/FeedReader/lib/libFeedReader.dylib" "retroshare.app/Contents/Resources/"
|
||||||
|
cp -R "sounds" "retroshare.app/Contents/Resources/sounds"
|
||||||
|
|
||||||
|
# cp "${project_dir}/README.md" "README.md"
|
||||||
|
# cp "${project_dir}/LICENSE" "LICENSE"
|
||||||
|
# cp "${project_dir}/Qt License" "Qt License"
|
Loading…
Reference in New Issue
Block a user