A testing repository
Go to file
daleclack 9401f2a3b4 Slightly adjust style for gtk160 2024-03-22 09:17:10 +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 Add qemu scripts 2023-10-24 09:17:57 +08:00
Gtk4 Slightly adjust style for gtk160 2024-03-22 09:17:10 +08:00
Gtkmm3 Add qemu scripts 2023-10-24 09:17:57 +08:00
Gtkmm4 Update gtk157 2024-01-16 14:16:55 +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 Add qemu scripts 2023-10-24 09:17:57 +08:00
Rust_tests Fix the scores window of gtk142 2023-01-03 20:33:09 +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 qemu scripts 2023-10-24 09:17:57 +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 install scripts for fuse-ext2 2022-11-20 03:07:05 -08:00
public_res Add qemu scripts 2023-10-24 09:17:57 +08:00
public_src delete repeated files 2021-04-18 16:31:54 +08:00
termux Add qemu scripts 2023-12-19 22:39:47 +08:00
toml Add toml library by marzer 2023-01-30 16:58:59 +08:00
tools Add qemu scripts 2023-10-24 09:17:57 +08:00
win32 Add xerelease7 and add win32 exe files 2020-10-23 22:29:11 +08:00
.gitignore Update .gitignore 2024-01-24 22:17:58 +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
gtk3.6.4-runtime_win32.7z Add runtime for win32 2020-10-23 22:54:24 +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