[Deprecated] Building Sources (Linux, Windows, MacOS)

Description: Outdated discussions about PGE Project and related stuff

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube
  • 2

Post #1by Wohlstand » 30 Mar 2014, 12:47

This manual is deprecated!
Read actual manual on the PGE Wiki.



First of all, you will need to download all sources:
https://github.com/Wohlhabend-Networks/PlatGEnWohl
(use the link "Download Zip" for getting the sources from GitHub)
How to Download ZIP from GitHub
Image
Or try to clone the repository by this command:

Code: Select all

git clone https://github.com/Wohlhabend-Networks/PlatGEnWohl.git


And to download the Configuration package which contains graphics, music and sounds:
http://wohlsoft.ru/docs/_configs/A2MBXT/Raocow_talkhaus_full.zip (also you can get another config pack here)

Note: Don't forget place configs, languages (after built *.qm files) and data (with included graphics and music) dirs with compiled executable file!

Build on Linux :tux:
Moved to the Wiki page

Build on Windows :windows:
Moved to the Wiki page

Build on MacOS :apple:
MANUAL DEPRECATED
You will need to first install the following developer tools:
- Homebrew
- qt >=5
- SDL2
- SDL2_mixer

Install Developer Tools :beach
1. You must install Homebrew (go to this link, then copy and paste the script at the bottom of the page into Terminal):
http://brew.sh

2. Once installed, open a new window in Terminal, and type:

Code: Select all

brew install qt5 sdl2 sdl2_mixer


3. Wait for the install to finish, it may take a little while.

Preparing for build :download:
4. Next:
  • Extract the source code to a folder where you can find it easily, like your desktop,
  • Extract the graphics from Raocow_talkhaus_full.zip into their proper folder too. (into /path/to/your/source/Content/configs)

You must have this tree:
configs/<ConfigPackDir>/data folder tree
-configs/ConfigPackDir/data
--music
--sound
--graphics
----common
----characters
------mario
------peach
------luigi
------toad
------link
----level
------background
------background2
------block
------npc
------effect
----worldmap
------level
------player
------tiles
------scene
------tile

Build code: :drilling:
5. In Terminal, navigate to the folder where you extracted the source code, or type "cd", press space, and then drag the folder with the code onto Terminal and hit enter.
6. Type "chmod u+x build.sh", and hit enter.
7. Type "./build.sh" and hit enter.

If everything is successfully built, you will see the file "pge_editor" in the bin folder. Exec this file for starting the editor.



Also you can build manually:

Code: Select all

qmake
cd Editor
lrelease pge_editor.pro
cd ..
make
make install

And you can run pge_editor from a bin directory

Thanks to CaptainSwag101 for these instructions.

How to correctly place media and graphics files with application:
Data structure
pge_editor (or pge_editor.exe for Windows systems)
pge_editor.ini
configs/
----<ConfigPackDir>/First of all, you will need to download all sources:
https://github.com/Wohlhabend-Networks/PlatGEnWohl
(use the link "Download Zip" for getting the sources from GitHub)
How to Download ZIP from GitHub
Image
Or try to clone the repository by this command:

Code: Select all

git clone https://github.com/Wohlhabend-Networks/PlatGEnWohl.git


And to download the Configuration package which contains graphics, music and sounds:
http://wohlsoft.ru/docs/_configs/A2MBXT/Raocow_talkhaus_full.zip (also you can get another config pack here)

Note: Don't forget place configs, languages (after built *.qm files) and data (with included graphics and music) dirs with compiled executable file!

Build on Linux :tux:
Moved to the Wiki page

Build on Windows :windows:
Moved to the Wiki page

Build on MacOS :apple:
MANUAL DEPRECATED
You will need to first install the following developer tools:
- Homebrew
- qt >=5
- SDL2
- SDL2_mixer

Install Developer Tools :beach
1. You must install Homebrew (go to this link, then copy and paste the script at the bottom of the page into Terminal):
http://brew.sh

2. Once installed, open a new window in Terminal, and type:

Code: Select all

brew install qt5 sdl2 sdl2_mixer


3. Wait for the install to finish, it may take a little while.

Preparing for build :download:
4. Next:
  • Extract the source code to a folder where you can find it easily, like your desktop,
  • Extract the graphics from Raocow_talkhaus_full.zip into their proper folder too. (into /path/to/your/source/Content/configs)

You must have this tree:
configs/<ConfigPackDir>/data folder tree
-configs/ConfigPackDir/data
--music
--sound
--graphics
----common
----characters
------mario
------peach
------luigi
------toad
------link
----level
------background
------background2
------block
------npc
------effect
----worldmap
------level
------player
------tiles
------scene
------tile

Build code: :drilling:
5. In Terminal, navigate to the folder where you extracted the source code, or type "cd", press space, and then drag the folder with the code onto Terminal and hit enter.
6. Type "chmod u+x build.sh", and hit enter.
7. Type "./build.sh" and hit enter.

If everything is successfully built, you will see the file "pge_editor" in the bin folder. Exec this file for starting the editor.



Also you can build manually:

Code: Select all

qmake
cd Editor
lrelease pge_editor.pro
cd ..
make
make install

And you can run pge_editor from a bin directory

Thanks to CaptainSwag101 for these instructions.

How to correctly place media and graphics files with application:
Data structure
pge_editor (or pge_editor.exe for Windows systems)
pge_editor.ini
configs/
----<ConfigPackDir>/
--------/*.ini
--------data/
------------/*.png
------------/*.gif
------------graphics/
----------------/[graphics files tree]
------------music/
----------------/*.ogg,mp3,wav,etc...
------------sound/
----------------/*.ogg,wav
languages/
------/*.qm
------/*.png

--------/*.ini
--------data/
------------/*.png
------------/*.gif
------------graphics/
----------------/[graphics files tree]
------------music/
----------------/*.ogg,mp3,wav,etc...
------------sound/
----------------/*.ogg,wav
languages/
------/*.qm
------/*.png


Veudekato M
Viscount
Viscount
Avatar
Veudekato M
Viscount
Viscount
Reputation: 57
Posts: 369
Joined: 19 Feb 2014
Location: Russia

Post #2by Veudekato » 31 Mar 2014, 8:25

I remind everyone that this code on c++.
Good gob
My channel (PlatGEnWohl news and tutorials , smbx tests):
http://www.youtube.com/channel/UC6h-42umT14iR1wa3VkOs3Q

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #3by Wohlstand » 9 Apr 2014, 17:43

Fixed menus and tollbars actions for Mac OS. Thanks to CaptainSwag101

Veudekato M
Viscount
Viscount
Avatar
Veudekato M
Viscount
Viscount
Reputation: 57
Posts: 369
Joined: 19 Feb 2014
Location: Russia

Post #4by Veudekato » 9 Apr 2014, 19:23

CaptainSwag101 make a programm code ?
My channel (PlatGEnWohl news and tutorials , smbx tests):
http://www.youtube.com/channel/UC6h-42umT14iR1wa3VkOs3Q

CaptainSwag101 M
Moderator
Moderator
Avatar
CaptainSwag101 M
Moderator
Moderator
Age: 20
Reputation: 20
Posts: 113
Joined: 2 Apr 2014
Location: California, United States
YouTube
  • 0

Post #5by CaptainSwag101 » 9 Apr 2014, 19:58

Veudekato wrote:CaptainSwag101 make a programm code ?
I have a Mac at home, and I found that some of the menus don't work on Mac, so I provided a small bugfix to make it work.
Image
--The Captain of Swag

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube
  • 1

Post #6by Wohlstand » 9 Apr 2014, 21:32

Warning! :warning:
I made experimental transfer from Qt 4.8 to Qt 5.2, I made in GitHub repository new folder, named Editor_Qt5. It contents transfered sources to Qt5. This is a new, more perfect, Qt version, I will work with it in future.
Later I will update instructions for build.

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

New Building rules

Post #7by Wohlstand » 29 Aug 2014, 16:47

Hello there!
Some updates have been made, and building the sources are now much easier!

Notice that all executables will now be stored in the ./bin directory of the source repo!
(for example when you build the editor the target executable will be stored in the ../bin directory)

Here are the updated steps:
1) Open your repository root in the command line
2) run qmake
3) run make
4) cd Editor/
5) lrelease pge_editor.pro
6) cd ..
7) run make install
And viola, all the existing components of PGE have been built!

All you have to do now, is open the newly created "bin" directory and enjoy ;-)
I plan to update the main page soon


EDIT: If you already have our sources: after updating from the repo, please remove the "Makefile" from the root and Editor, PlayableCalibrator, GIFs2PNG, PNG2GIFs and LazyFixTool directories to apply the new build rules

Luigifan2010 M
Contributor
Contributor
Avatar
Luigifan2010 M
Contributor
Contributor
Reputation: 5
Posts: 31
Joined: 29 Mar 2014

Post #8by Luigifan2010 » 11 Oct 2014, 19:07

Something's broken again I guess

Code: Select all

mike@mike-Lenovo ~/build/platgenwohl-master/PlatGEnWohl-master $ make
cd Editor/ && ( test -e Makefile.pge_editor || /usr/bin/qmake /home/mike/build/platgenwohl-master/PlatGEnWohl-master/Editor/pge_editor.pro -o Makefile.pge_editor ) && make -f Makefile.pge_editor
make[1]: Entering directory `/home/mike/build/platgenwohl-master/PlatGEnWohl-master/Editor'
g++ -c -pipe -O2 -D_REENTRANT -std=c++0x -Wall -W -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../Qt/5.3/gcc_64/mkspecs/linux-g++ -I. -I../../../../Qt/5.3/gcc_64/include -I../../../../Qt/5.3/gcc_64/include/QtWidgets -I../../../../Qt/5.3/gcc_64/include/QtNetwork -I../../../../Qt/5.3/gcc_64/include/QtGui -I../../../../Qt/5.3/gcc_64/include/QtCore -I. -I. -o main.o main.cpp
In file included from main.cpp:39:0:
/usr/local/include/SDL2/SDL_mixer.h:27:24: fatal error: SDL_stdinc.h: No such file or directory
 #include "SDL_stdinc.h"
                        ^
compilation terminated.
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/mike/build/platgenwohl-master/PlatGEnWohl-master/Editor'
make: *** [sub-Editor-pge_editor-pro-make_first] Error 2


So i tried to compile all the SDL libs and crap and I can't seem to get libmad compiled, might be what's messing this up.

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #9by Wohlstand » 11 Oct 2014, 19:13

Luigifan2010 wrote:So i tried to compile all the SDL libs and crap and I can't seem to get libmad compiled, might be what's messing this up.
Check of buildable of:

Code: Select all

#open libmad's fodler
cd libmad-0.15.1b
#this removing buggy line from "./configure" which preventing to build library
patch -Np1 < ../libmad-0.15.1b-mingw-w64.patch
#run configure
./configure --prefix=/usr/
make
sudo make install


You should to build SDL2_mixer correctly, if some library is not building, try to play with someone settings of ./configure, etc.
you will can build SDL2_mixer only if you was built libmad, ogg, vorbis, flac, mikmod.

Also, don't forget to put SDL2, mixer's and mikmod's SO files into archive just in case

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #10by Wohlstand » 20 Oct 2014, 1:55

Hello. I'm publishing this in relation to release package structures, if you plan to build the editor for your distro.
Remember I am open to publishing the builds in GitHub, as long as they get the package structure correct.

Structures of Releases:

Editor package:
-configs/ (leave empty dir)
-themes/ (directory for themes)
----/Super Mario [copy from windows build archive]
-data/ (directory for internal editor's data)
----*.png
-languages/ (Here are placing editor's locales)
----*.qm (translation files)
----*.png (flags icons)
-help/ (help documents. To reduce size of downloadable package, put alone .html-file which will be a redirect to online help guide)
----manual_editor.html (Redirect to online guilde, create new with alone line, see below)
-pge_editor[.exe][.app] (Editor's binary file)
-changelog.editor.txt (changelog of editor)
-license.txt (GNU GPLv3 license)

manual_editor.html contents:

Code: Select all

<meta http-equiv="refresh" content="0; url=http://help.wohlsoft.ru/manual_editor.html" />



Standalone Help package
-simply pack Contents/help folder from sources

Tools package
-calibrator/ (Sprite Settings data of Playable character calibration tool)
----spriteconf/
--------*.ini
----templates/ (leave empty)
-GIFs2PNG[.exe][.app] (Masked GIFs to PNG converter)
-PNG2GIFs[.exe][.app] (PNG to masked GIFs converter)
-LazyFixTool[.exe][.app] (Lazily-made masks fix tool)
-pge_calibrator[.exe][.app] (Playable character calibration tool)
-GIFs2PNG_Readme.txt (readme files for tools)
-LazyFixTool_Readme.txt
-PNG2GIFs_Readme.txt
-license.txt -( GNU GPLv3 License)



If you're building dynamic (shared libraries), you should pack the dependent .so, .dylib, .dll of Qt, SDL2, SDL2_mixer too!

Wohlstand M
Topic author, Lead Developer
Lead Developer
Avatar
Wohlstand M
Topic author, Lead Developer
Lead Developer
Age: 25
Reputation: 317
Posts: 1292
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #11by Wohlstand » 9 Aug 2016, 22:01

I closing this thread since it's VERY outdated.


Return to “PGE Project”