Jump to content


Photo

Blackbox from Sources

sources compile development

  • Please log in to reply
22 replies to this topic

#1 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 26 January 2014 - 06:30 PM

[color=#ff0000;](work in progress)[/color]

 

Warning:

This how-to describes build process of 1.17.2 only.

The main difference is that 1.17.2 uses cmake as project/makefile generator, while 1.17.1 uses system of makefiles.

 

Prerequisities:

 

For building blackbox from sources you'd need:

  • git

http://git-scm.com/

  • cmake

http://www.cmake.org/

  • working compiler (mingw, mingw64, visual studio 20xx)
    • if you want target windows xp with 2012 you have to update it to the latest
  • sources of blackbox

https://github.com/x...bclean-xzero450

 

Quick instructions:

  • get sources
  • run generator with cmake-gui
    • select source directory
    • select build directory. do not build it in the sources.
    • click on configure
    • click on generate
  • open solution
  • compile solution
  • compile project install

Note:

  • i included run_generator_vs2012.bat in the root of BlackBoxZero
  • more details on cmake

        docs/build_with_cmake.txt

 

Slow instructions:

 

1. Get the sources from github:

git clone https://github.com/xzero450/bbclean-xzero450.git bb

There are two branches right now (as of january 2014):

  • master

contains 1.17.1 as commited by Jonathan "xzero450".

  • devel

contains development version of 1.17.2 that was branched from master in november 2013

 

Switch to branch devel:

cd bbgit checkout devel

then init submodules:

git submodule initgit submodule syncgit submodule update --recursive

and that's all folks!

 

 

Note: good git guide can be found on wine headquaters:

http://wiki.winehq.org/GitWine

 

2. cmake

 

Run cmake-gui.

 

As mentioned before, the cmake consists of four steps:

  • select source directory
  • select build directory.
  • click on configure
  • click on generate

Note: i recommend to have separate dir for sources and projects.

 

Attached File  build_with_cmake.png   18.93KB   9 downloads

 

Note: installation dir can be specified via command line or by modifying  BlackBoxZero/CMakeLists.txt

 

3. open solution in visual studio

 

select Debug or RelWithDebugInfo configuration depending on which one you want

 

 

[color=#ff0000;]KNOWN ISSUES[/color]

 

  • i do not think the "do not overwrite config files" during building INSTALL target works correctly

so BACKUP YOUR CONFIGS

  • some doc files seems to be missing in install dir

 

Development environment / compilers notes:

 

Eclipse + mingw64

 

i used these, but if you think there are better versions to use, just tell me.

 

  • jre (32 bit):

http://www.oracle.co...ds-1880261.html

  • eclipse (at least 3.6 i.e. Helios) or newer Kepler

https://www.eclipse....opers/heliossr2
 

  • migw64:

http://cznic.dl.sour...six-seh-rev2.7z

 

Then run cmake-gui for example.

 

if you want to have a control over compiler you may select the second radio button:

Attached File  cmake_eclipse_1.png   6.38KB   6 downloads

Attached File  cmake_eclipse_2.png   4.38KB   5 downloads


  • pitkon, diabol, matteo and 1 other like this

#2 diabol

diabol

    Lazyass

  • Moderators
  • 235 posts

Posted 01 February 2014 - 11:57 AM

have my babies, have them now!



#3 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 02 February 2014 - 11:26 AM

:D okay just slice or two.. i am not that hungry :D


  • diabol likes this

#4 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 17 February 2014 - 11:48 AM

i added the possibility to create NSIS installer of blackbox.

the installer is located in directory BlackBoxZero/installer

 

for this to run, you need two things:

  • NSIS installer from WinAmp people.

i used the unicode version, if you use another you need to modify the .bat file

http://www.scratchpaper.com/

  • robocopy.exe

should be present on modern windows in c:/Windows/system32

 

Now you can create the install easily by running the batch in the root dir

build_installer.bat

the build paths are bit hardcoded right now, sorry for that.

 

The installer itself has few pages:

  • windows version autodetection + gui for confirmation
  • license
  • components
  • install dir
  • no shell / as shell page

Components go like this for now, but it will probably change a bit

  • core files (like blackbox itself)
  • optional styles (basic clean styles)
  • optional extended styles (advanced or crazy styles)
  • optional configuration (i do not like this, will be removed soon)
  • optional core plugins (must have plugins like bbKeys)
  • optional extended set 1 (most of plugins)
  • optional extended set 2 (mostly toys)

KNOWN ISSUES:

 

- need an auto installation of microsoft redistributables

- optional configurations do not work. this option does not include configs in plugins so it has not much sense and it would be complicated to do it properly. a checkbox for "do not overwrite configurations" will be better for this.

- as shell / no shell does not work yet.. both branches do nothing



#5 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 17 February 2014 - 11:55 AM

i must say big 'thank you' to NullSoft people (winamp) who helped me with the hardest part, i.e. the selection which build will be installed.

 

http://forums.winamp...976#post2985976


  • pitkon likes this

#6 technorati

technorati

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 10 March 2014 - 08:37 PM

Didnt AOL buy winamp a few months back? Nullsoft no longer own winamp



#7 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,210 posts
  • LocationAthens & Nafplio, Greece

Posted 17 August 2014 - 09:02 AM

Some more sources I found. (Please disregard if posted elsewhere):

Sources - CVS

http://bb4win.cvs.sourceforge.net

Sources - SVN

http://bb4win.svn.sourceforge.net/

API exports

http://bb4win.sourceforge.net/api.html



#8 KillingSpree

KillingSpree

    Member

  • Members
  • PipPip
  • 18 posts

Posted 04 October 2014 - 04:04 PM

Hey guys so I downloaded everything and after using cmake it makes a new build with tons of .vcxproj , I started all_build and when running debug I get only 1 error from bbleanskin 

Spoiler

I am using VS 2013 Update 3



#9 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 04 October 2014 - 04:10 PM

you have no right to install to c:program files...

 

for normal builds (i.e. no release build) i use something like

set(CMAKE_INSTALL_PREFIX "c:/bbZero_devel")

to avoid installation to program files



#10 KillingSpree

KillingSpree

    Member

  • Members
  • PipPip
  • 18 posts

Posted 04 October 2014 - 04:12 PM

Thank you for a quick reply! I am extremely new to building things from source, could you explain how to do that? Also the steps after to actually build the programs?

 

Edit: There is a cmake_install in every folder, which one do I edit? I tried editing the one in the main directory as well as the bbleanskinRun32-prefix to no avail. It still gives the same errors as above.

Edit 2: Running the program as an administrator fixed the issue.



#11 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 04 October 2014 - 05:05 PM

another part is here:

http://blackbox4wind...gging-blackbox/


  • KillingSpree likes this

#12 aar0nism

aar0nism

    JoATMoN

  • Members
  • Pip
  • 7 posts

Posted 02 January 2015 - 07:42 AM

So far I have been unsuccessful with mingw and eclipse. I have something wrong since cmake complains. I will check into it more tomorrow morning :



#13 mojmir

mojmir

    BB Developer

  • Moderators
  • 254 posts

Posted 06 January 2015 - 11:23 AM

yeah, i kinda gave up on this... but it should be doable in reasonable time.



#14 diabol

diabol

    Lazyass

  • Moderators
  • 235 posts

Posted 28 October 2015 - 09:48 AM

I've converted the guide to markdown and added it to bb's GitHub wiki
  • pitkon and Paz like this

#15 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,210 posts
  • LocationAthens & Nafplio, Greece

Posted 28 October 2015 - 10:33 AM

I've converted the guide to markdown and added it to bb's GitHub wiki

Good work, diabol! And so good to see you again! Hope you are well.


  • Paz likes this

#16 Ynthno

Ynthno

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 October 2015 - 01:54 AM

So... are bblib.lib and blackbox.lib the same thing?

 

I'm getting some errors that blackbox.lib can't be found so should it be pointing to bblib.lib instead?



#17 diabol

diabol

    Lazyass

  • Moderators
  • 235 posts

Posted 14 December 2015 - 04:50 PM

So... are bblib.lib and blackbox.lib the same thing?

 

I'm getting some errors that blackbox.lib can't be found so should it be pointing to bblib.lib instead?

 

Nope, they are not the same.

bblib.dll contains support-code for blackbox and bblib.lib is used to statically link that stuff into blackbox.exe

Last time I checked, bblib contained a LinkedList implementation, some memory management code, color conversion functions and such stuff.

 

blackbox.lib on the other hand is an import library or something.

IIRC it's required to compile plugins so the linker known how to link bbapi function calls

either that or it's a rubbish compile time artifact :D

 

Some more detailed errors and a description of what you are trying to do would be good to find out how to resolve the errors 


  • pitkon likes this

#18 diabol

diabol

    Lazyass

  • Moderators
  • 235 posts

Posted 14 December 2015 - 04:51 PM

Good work, diabol! And so good to see you again! Hope you are well.

I'm doing fine, just a lot of work and laziness as usual :)



#19 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,210 posts
  • LocationAthens & Nafplio, Greece

Posted 15 December 2015 - 08:51 AM

I'm doing fine, just a lot of work and laziness as usual :)

Lol... Laziness is fine, as long as you are OK. Have you done any work on BB? Just asking :)



#20 Ynthno

Ynthno

    Member

  • Members
  • PipPip
  • 18 posts

Posted 29 September 2016 - 07:46 PM

What is the bare minimum of files for a working project?* I mean to have to have the ability to build blackbox itself, plugins, and tools.

 

The repo seems to have a lot of non-vital junk that has slowly accumulated over the years.

 

* Excluding compiler, cmake, etc






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users