A testing repository
Go to file
daleclack bd8eb3d8b5 Fix Gtkmm4 builds 2022-10-14 11:14:15 +08:00
GCR_CMake@b5a7fe5719 Update gtk128 2022-04-16 16:10:51 +08:00
Gtk2 Move test.c 2021-01-31 13:53:08 +08:00
Gtk3 Update gtk136 2022-07-23 10:29:02 +08:00
Gtk4 Add gtk121 2022-01-11 12:36:37 +08:00
Gtkmm3 Update gtk141 2022-10-14 10:57:36 +08:00
Gtkmm4 Fix Gtkmm4 builds 2022-10-14 11:14:15 +08:00
Linux64 Update README.linux64 2020-09-16 08:18:24 +08:00
OpenCV_test Add patcher file 2022-08-21 13:24:45 +08:00
Qt5/simplebrowser Add simplebrowser from official example 2022-05-07 13:46:25 +08:00
Rust_tests Update dependances 2022-07-05 11:45:38 +08:00
c Add Tree and Update for gtk119 2021-12-26 13:31:00 +08:00
cargo_local_registry Add cargo_local_registry helper 2022-02-24 13:07:28 +08:00
codeblocks Update filename-test 2021-01-02 22:39:59 +08:00
cpp Add glib version of xeinit 2022-08-31 19:51:26 +08:00
ege Add ege5.cpp 2020-09-24 07:35:28 +08:00
gtk4-rs Add gtk125 2022-02-26 11:17:55 +08:00
icon-install Update icon install script 2022-09-03 13:57:34 +08:00
json_nlohmann Add json library from nlohmann's github repository 2022-07-22 12:43:34 +08:00
public_res Update gtk128 2022-04-16 16:10:51 +08:00
public_src delete repeated files 2021-04-18 16:31:54 +08:00
termux Add unuseful script 2021-09-12 21:13:41 +08:00
win32 Add xerelease7 and add win32 exe files 2020-10-23 22:29:11 +08:00
.gitignore Update gtk131 2022-06-22 19:54:24 +08:00
.gitmodules Add submodule 2021-10-21 20:49:20 +08:00
LICENSE Add LICENSE 2021-06-11 14:27:50 +08:00
README.Gtkmm3 Add README.Gtkmm3 2021-05-19 22:36:58 +08:00
README.md Update README 2022-08-07 14:46:36 +08:00
README.xerelease Update README 2020-12-09 21:56:30 +08:00
README.xerelease-gtk3 Update README 2020-12-09 21:56:30 +08:00
cairo_scale.py Add image Scale for gtk119 2021-12-27 23:06:00 +08:00
clean_cache.cmd Add gtk140 2022-08-30 14:42:34 +08:00
clean_cache.sh Update clean script 2022-08-28 16:25:27 +08:00
csv_to_xls.py Add Config File Test 2021-08-10 12:32:02 +08:00
gtk3.6.4-runtime_win32.7z Add runtime for win32 2020-10-23 22:54:24 +08:00
run_code_as_root.sh Add script for vscode 2021-11-17 21:58:48 +08:00
vscode-background.sh Add vscode scripts 2021-09-13 18:31:25 +08:00
vscode_rust.desktop Add desktop file and rust timer test 2022-02-12 19:49:40 +08:00

README.md

testing-repository

A testing repository

Experimental]:  1. The rust programming language is imported for some codes

2. A test of building Xe Release with Rust is going on.

\[News]: After gtk112 and gtk113, the submodule GCR_CMake is imported

Thanks for the project author https://github.com/Makman2/GCR_CMake

and the author of json: https://github.com/nlohmann/json[GitHub - nlohmann/json: JSON for Modern C++](https://github.com/nlohmann/json)

The test for Qt5 is starting, and some example from the Qt opensource example.

(Actually, I forked the project for convenience)

### These contents are outdated:

Note: To minimize the repeated files,I put the same files as public resource

The file name is above:

public\_res\<filename\>\_\<file extension\> or public\_res\<filename\>\_\<file extension\>

Please compile with g++ or gcc (Clang is also supported)

(Visual Studio may have issues)

Ege dircitory need ege 19.01 and above to complie

C/C++ code using gtk2 needs gtk 2.24.10

#### For Gtk3 codes:

before gtk17 supports Gtk3.6.4

gtk17 and above removed support for gtk3.18 and below

Win32 exe supports WinXP and above

The Sample Code to get current dir

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(int argc,char ** argv){
    //argv[0] for full application running path
    const char * src = *argv;

    //Get Size and store the content
    int len = strlen(src); 
    char * tmp = malloc(len);

    //The Name of application is "args.exe" for windows
    //And named "args" for linux
#ifdef _WIN32
    strncpy(tmp,src,len-8);
    tmp[len-8]='\0';
#else
    strncpy(tmp,src,len-4);
    tmp[len-4]='\0';
#endif

    printf("%s\n",tmp);
    free(tmp);
    return 0;
}
```

Java version

```java
public class Args{
    public static void main(String[] args){ 
        System.out.println(System.getProperty("user.dir"));
    }
}
```

Rust Version

```rust
use std::env;

fn main() {
    // Get executive path
    let args: Vec<String> = env::args().collect();
    let execpath: String = args[0].clone();

    // Handle the path string
    let exec_len: usize = 13;
    let length: usize;
    if cfg!(target_os = "windows") {
        length = execpath.len() - exec_len - 4;
    } else {
        length = execpath.len() - exec_len;
    }
    let path: &str = &execpath[0..length];

    // Print the path of executive
    println!("{}", path);
}
```

### Thanks:

Json lib for C++: https://github.com/nlohmann/json