Log in
Development
-
Contribute
Contribute
Requirements
OpenJDK
You need OpenJDK ( minimum jdk 11 ) which can be obtained from here
if you use the .zip version of jdk then you will need to extract the archive on your computer (eg.C:\jdk
) and add the path tojava.exe
(eg.C:\jdk\bin
) to your environment var PATH.
It's easier to use the .msi installer.
To check if you have Java in your path, open a command prompt and typejava -version
:openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
When updating versions of Microsoft's JDK it does not remove the older version. You will need to use the Add/remove programs function of windows to remove the pre-existing version.
Apache Ant
Apache Ant is used with the OpenJDK to build and package the portapp.
You need at least Apache Ant 1.10.5 that you can download on the Apache website.
Extract the archive on your computer (eg.C:\apache-ant
) and add the path toant.bat
(eg.C:\apache-ant\bin
) to your environment var PATH.
To check if you have Apache Ant in your path, open a command prompt and typeant -version
:Apache Ant(TM) version 1.10.5 compiled on July 10 2018
Configuration
- Fork and clone the module of your choice.
- Clone dev in the parent folder of the module.
- Create a new pull request with your work.
For example :
cd C:\work\ git clone --recursive https://github.com/bearsampp/module-adminer.git git clone --recursive https://github.com/bearsampp/dev.git cd module-adminer\
Directory structure example :
[-] dev | [-] build | | | build-commons.xml [-] bearsampp-{bin|app|tool}-{name} | | build.xml
If you are not familiar with creating a pull request, you can create a new module like this :
- Increment the
build.release
in thebuild.properties
file using a YYYY.mm.dd format. Such as 2022.07.24 - If you want you can change the
build.path
(defaultC:\bearsampp-build
). - Open a command prompt in your module folder and call the Ant target
release
:ant release
. - Upload your release on a file hosting system like Sendspace.
- Create an issue on Bearsampp repository to integrate your release.
-
Do you have any documentation for winbinder?
Winbinder documentation can be found at https://crispy-computing-machine.github.io/Winbinder-Docs/
-
How can I use one database with multiple versions of mysql/mariadb?
To use a single database irregardless of the db version follow this video. The risk to doing this is if the db changes how data is handled/stored it could break our db.
-
How do you change the about window?
The about window is a 450 x 250 window created by
class.action.about.php
styling is inclass.windbinder.php
specifically line 150public function drawRect($parent, $xPos, $yPos, $width, $height, $color = 15790320, $filled = true) { return $this->callWinBinder('wb_draw_rect', array($parent, $xPos, $yPos, $width, $height, $color, $filled)); }
You must use decimal when working with colors such as https://convertingcolors.com/decimal-color-15790320.html
The hex value for the background is #f0f0f0 -
How do you change the bar color in left menu?
The bar color is controlled by
Bearsampp\core\classes\tpls\class.tpl.aestan.php
lines 275-276'BarGradientEnd=$00c07840' . PHP_EOL . 'BarGradientStart=$00c07840' . PHP_EOL .
The first 2 digits must always be '00' and the next 6 are in BBGGRR format
-
How do you replace the icon in the menu tray?
-
How do you setup Bearsampp QuickPick service?
-
How do you use sandbox?
Sandbox is our in-house R&D system
While your welcome, and infact encouraged, to use it for development of the Bearsampp program is it NOT for use as your daily driver! It's strictly a R&D system.
There are a few things that are very unique to Sandbox and require important consideration.
ANY branch other then main should be considered alpha and highly likely to break everything. Using sandbox requires patience and understanding how things function.
I'll attempt to explain things but nothing will replace experience. Even Jacob and Bear have been slapped by sandbox more then once!How to setup sandbox
Setting up sandbox is not difficult but the steps are exacting.
Using Sandbox is alot like any other repo in that you do a git clone and your on your way... EXCEPT there is a requirement that you do these steps in the following order.
- your expected to be familiar with how to use a git aware IDE. Your welcome to use the cli but these instructions are designed for an IDE.
- clone the branch "main" into your working directory
- switch to the branch "release"
- rename the branch "main" to anything
- using the "remote" branch feature merge the remote "main" branch on top of the local "release" branch
- rename the local "release" branch to "main"
- delete the branch you renamed main to
- you should now have a single local branch named "main" In this branch is a full working version of the "Sandbox" version of bearsampp including all unique iconography.
- start up Sandbox and test that everything works. If so you're ready to do R&D
Firing off a bombing run
Doing a bombing run is fun and scary at the same time. This is a large commitment of drive space so if your on anything smaller then a 64gb drive, and not at least usb 3.0 you should probably not do this!!!
So now that your worried, lets put our bomber jacket on and punch that pickle.- This couldn't be simpler. Make sure your on the "main" branch.
- if this is a fresh install of Sandbox then remove all branches from your local except "main"
- go to the sandbox repo release for bomber payloads and download all the files there.
- use the extract.bat and unzip all the files
- put the bin in the root of sandbox and do NOT overwrite
Why bother with Sandbox?
Jacob and Bear had several "discussions" over the merits of sandbox. It was conceived and matured by Bear as a safe environment to test the numerous changes that were upcoming without endangering our "core".
Bear had nuked his installation of core that was his daily driver more then once and with dozens and dozens of fixes coming it was important that there was some simple way for things to be done.
You have to understand that when Bear thinks something is "simple' you should probably be scared! LOLHe's put a lot of thought and effort into what is maturing to be a great system, in his mind, for R&D. When everything is fully matured making a merge on sandbox will auto create a pr & merge onto core. This will facilitate the ability to roll out a new version of core very quickly, with the comfort in knowing everything has been tested thoroughly. There will still be a final test of the "build" of course but it should always be painless.
Breaking something in sandbox is as trivial a fix as deleting, or fixing, that branch and starting fresh from main. None of the day-to-day file changes that happen in core while testing effect Sandbox. It's completely isolated from the runtime(s). This is one of its major strengths. Your commits are completely and intentionally restricted to the "core" system.What's it been like using Sandbox?
While Jacob has struggled with Sandbox, ALOT, Bear has been able to make it shine!
He uses it daily when making the changes that make Bearsampp mature. PR's are created from those changes, tested, most of the time by Jacob, and then merged into main when they have been successfully tested.
It's a tool that if/when more developers come onboard they will have a reliable and fully tested method of doing things to further the program along.Can't I just use normal Bearsampp?
Yep! BUT, DON'T COME COMPLAINING TO BEAR WHEN YOU BOMB YOUR INSTALL! Don't think it can't happen to you, or "meh, easy to fix if it happens". You couldn't be further from the truth. Just recently Jacob bombed EVERY version of Bearsampp on his computer during testing of an encryption system. The hours of effort and frustration he spent trying to figure it out was not for the faint of heart. Jacob, to his merits, stuck with the battle and after many HOURS found out the real issue and its original cause. Bear had to admit to Jacob he would've never figured it out and that's not the first time or even second or third that something like this has happened. Jacob's tenacity, experience in IT has been instrumental in the growth of Bearsampp.
Furthermore using our main repo for R&D actually endangers our main repo because the rollbacks WILL happen! It takes a minimum of one to two hours to roll out a new version of Bearsampp WITHOUT anything going wrong so the lower the chances of something failing the better.How long does it take to restore Sandbox when it bombs
Ideally? 30 seconds. IT SHOULD be as simple as destroying the branch and moving forward. But in the chance you have to nuke and start over, given a decent net connection, its a 15 min fix.
How exactly do I use Sandbox?
So, just like any other project you develop, you've created a branch, you've done some kind of an improvement to Bearsampp and your ready to fire it off. Great, one thing you'll notice is the iconography for Sandbox is different then for Bearsampp. This is by design. The color is a warning to you that your using a system designed for things to go wrong.
Run through the appropriate steps to test the changes you've made. Assuming those work then check EVERY function in Sandbox. The more thorough you are in this step the less work on everyone else who has to do the same thing to test your "fix". Lastly fire up localhost and make sure everything there works. Check the links, iconography, spinners, everything!
If everything looks ok, then commit, and create a pr. If you are part of the "Qodo" team, which you most likely are, there's no need for anything other then a title for the PR. PR-Agent Pro will do all the heavy lifting. Then just sit back and wait for the merge of your effort. Remove your local branch once your pr has been merged and start on the next issue. Don't be like Bear and forget to switch to main & creating a new branch before starting on the next thing. If you need some documentation on how the api works, then check out our API docs.