SharpDevelop 3.2+ Dark GDK.net

Hello everyone,

I’m here to tell I was trying to make DLL files for Dark GDK.net and put them on Dark Dasic and Pro version.

I will give here a code snippet for example. BTY I got the project successful. I will give my code template for C# here as a community driven.

The project must be upgraded from 2008. For instance I will show on 2015 Community Edtion too.

Every time everyone needs to create a new code template, you should call references inside c# vesion.

For instance DarkGDK, DGDKLib. You must make to get the code done and built.

I’m here to help. So, any doubt I will try to give an answer soon as possible.

 

Code Snippet Cllass1.cs:
/* Criado por SharpDevelop.
* Utilizador: astro
* Data: 19/02/2017
* Hora: 16:52
*
* Para alterar este modelo usar Ferramentas | Opções | Código | Alterar Cabeçalhos Standard
*/
using System;

namespace GDKCs.Properties
{
/// <summary>
/// Description of Class1.
/// </summary>
public class Class1
{
//variables
private static Boolean LeftMouseDown;
private static Boolean[] KeyDown = new Boolean[104];
private static int lastScanCode;

public static void SetupKeyEvents() // Must be called once before any of the following functions
{

for (int i = 0; i <= KeyDown.Length; i++)
KeyDown[i] = false;
}
public static Boolean SingleKeyPress(DarkGDK.IO.Keys kKey)
{

if (DarkGDK.IO.Keyboard.State(kKey) && !KeyDown[DarkGDK.IO.Keyboard.ScanCode])
{
KeyDown[DarkGDK.IO.Keyboard.ScanCode] = true;
lastScanCode = DarkGDK.IO.Keyboard.ScanCode;
return true;
}
else if (DarkGDK.IO.Keyboard.ScanCode == 0) // Means we aren’t pressing any key 🙂
{
KeyDown[lastScanCode] = false;
return false;
}
else
return false;
}

public static Boolean SingleLeftClick()
{
if (DarkGDK.IO.Mouse.LeftClick && !LeftMouseDown)
{
LeftMouseDown = true;
return true;
}
else if (!DarkGDK.IO.Mouse.LeftClick)
{
LeftMouseDown = false;
return false;
}
return false;
}

public void NGame(){

}

public void LGame()
{

}

public void OGame()
{
}
public void OptGame()
{
}
public void qGame(){
System.Environment.Exit(1);
}

public void Menu()
{
do
{
int c = 1;
switch(c){
case ‘1’: Console.Write(“New Game\n”);
break;
case ‘2’: Console.Write(“Load Game\n”);
break;
case ‘3’: Console.Write(“Online Game\n”);
break;
case ‘4’: Console.Write(“Options\n”);
break;
case ‘5’: qGame();
break;
default: Console.Write(“Error… Quitting\n”);
break;
}

}while(true);

}

public Class1()
{
}
}
}

example

example_referenceT

 

Thank you so much.

Ubuntu on Windows – apache2 with nodejs

apple-touch-icon-144x144-precomposed

 

I made a WIP, I wanted to interact apache2 with nodejs.

 

I made a few steps before apache2 configurations.

 

  • apt install nodejs-legacy npm apache2
  • npm install –upgrade npm
  • npm install -g bower grunt express node-php
  • service apache2 stop

Then I need to make a personal configuration inside /etc/apache2/sites-enabled/ with the 000-default.conf

Inside this conf file I added with nano /etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:8080>
    ServerAdmin admin@crawl.com #or your email
    ServerName crawl
    ServerAlias www.crawl.com 

    ProxyRequests off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    <Location />
        ProxyPass http://localhost:8000/
        ProxyPassReverse http://localhost:8000/
    </Location>
</VirtualHost>

Then I restart the apache2 service through this command: service apache2 restart.

Then I got this configuration working with Bash on Ubuntu on Windows:

 

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request’s Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName http://www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, …, trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with “a2disconf”.
#Include conf-available/serve-cgi-bin.conf

ProxyPreserveHost on

ProxyRequests on

<Proxy *>
Order deny,allow
Allow from all

</Proxy>
#<Location />
ProxyPass /node http://localhost:8000/
ProxyPassReverse /node http://localhost:8000/
#</Location>

ServerName localhost

</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

But I had issues, fixing them. I couldn’t figure out yet which issues are in these configures. Now fixed it I think.

 

capturar_4

Besides it’s needed to install XMing for GUI, apt install apache2, libxml2-dev libapr1 libapr1-dev.

 

Thank you. I will keep this updated.

Bash on Ubuntu on Windows – First tests

Hi!

I’m been using Bash on Ubuntu on Windows in the last days. I think as a thought this software is like an Unix-like userland.

 

I got successful running ubuntu-sdk, now I’m testing npm and nodejs also python.

First of all I got an account with my name through these steps:

  • adduser pedro
  • adduser pedro sudo
  • su – pedro

Then in the bash I ran apt install nodejs npm

  • node -v
  • npm install -g node-red cordova

Besides I typify  nano /etc/apt/sources.list and change trusty for xenial

  • apt update
  • apt upgrade

Everyone can test to run XMing export DISPLAY=localhost:0.0 and run for instance ubuntu-sdk & or other app like xeyes &

By the way I think chromium browser works too.

I’l update my tests.

 

Thanx

 

 

 

Ubuntu bash on Windows – ubuntu-sdk

Hi !

 

After install Ubuntu bash on windows, I tried to install ubuntu-sdk.

 

My procedures were apt install update && apt install ubntu-sdk but before that I install from sourceforge xming for windows with shortcuts on the system.

In the end I ran export DISPLAY=localhost:0.0 , ubuntu-sdk & in the bash on windows.

 

You’ll see a pic like this one:

capturar

 

I will give a tutorial more detailed about this, I wanted to show the ide inside windows 10 x64.

 

Thanx

Arch Linux Ubuntu-phone attempt compiling

Hi there everyone since a long time!

 

A new attempt here.

 

I tried this at home in the last days.

 

mkdir -p ~/bin

mkdir -p ~/android/omni

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
 chmod a+x ~/bin/repo

echo "export PATH=~/bin:$PATH" >> ~/.bashrc

git config --global user.email "your@email.address"
 git config --global user.name "Your Name"
repo init -u https://code-review.phablet.ubuntu.com/aosp/platform/manifest -b personal/w-ondra/xperia-5.1.1_r36 -g all,-darwin,-qcom_msm8x26,-qcom_msm8x27,-qcom_msm8x74,-x86,-omap3,-omap4,-omap4-aah,-manta,-grouper

repo sync -j4 -f

source build/envsetup.sh

lunch - choose c6833

make

this is optional step, if you want to use specific channel to build ubuntu root from, for example . ubuntu/prebuilts/prepare-ubuntu-packages-for-build -d generic -c rc-proposed/ubuntu-pd

make ubunturootfsimage  -j8 -> build will downloads ubuntu rootfs and custom packages for default channel rc-proposed/ubuntu channel




 

I tried it in Arch Linux and I couldn’t go further, for instance at the start I got an error in -lgcc

It’s odd. Keep trying.

 

Thank you.

Sony Z Ultra build compilation

Hi there everyone!

 

To get this source code you will to follow as this has been written.

1.) git clone https://github.com/vic3t3chn0/ubuntu_sony_installer.git ubuntu

2.) cd ubuntu

3.) chmod a+x sony.sh && ./sony.sh

4.) try to make source build/envsetup.sh

5.) lunch aosp_6833-userdebug

6.)  But instead wait for my device/sony patch to be released today I think

7.) ls vendor/sony

8.) make -j2 (-j X depends on the number of cpus and threads)

9.) git clone https://github.com/vic3t3chn0/sony_msm8974_ubuntu.git kernel/sony/msm8974

10.) cd kernel/sony/msm8974

11.) make mrproper and then chmod a+x build_kernel.sh

12.) ./build_kernel.sh

13.) finally connect to Ubuntu, the z Ultra and make sudo adb reboot bootloader

14.) sudo fastboot flash boot boot.img

15.) vol – + power to get download mode and flash system.img and vivid.tar.gz file.

But before 15 step I will give a flasher. Then you can use for this purpose only.

I hope this tutorial an idiot-proof.

 

Best Regards.