2020-09-14 21:23:20 +08:00
|
|
|
# testing-repository
|
2021-11-28 14:04:17 +08:00
|
|
|
|
2021-11-28 21:02:17 +08:00
|
|
|
## A testing repository
|
2020-09-14 21:24:13 +08:00
|
|
|
|
2022-02-13 20:53:38 +08:00
|
|
|
\[Experimental]: 1. The rust programming language is imported for some codes
|
2021-11-28 21:02:17 +08:00
|
|
|
|
2022-02-13 20:53:38 +08:00
|
|
|
2. A test of building Xe Release with Rust is going on.
|
|
|
|
|
|
|
|
\[News]: After gtk112 and gtk113, the submodule GCR_CMake is imported
|
2021-04-18 16:37:38 +08:00
|
|
|
|
2021-10-22 18:46:49 +08:00
|
|
|
Thanks for the project author https://github.com/Makman2/GCR_CMake
|
2021-04-18 16:37:38 +08:00
|
|
|
|
2021-10-22 18:45:59 +08:00
|
|
|
(Actually, I forked the project for convenience)
|
2021-10-22 18:42:04 +08:00
|
|
|
|
2021-11-28 21:02:17 +08:00
|
|
|
### These contents are outdated:
|
|
|
|
|
2021-10-22 18:42:04 +08:00
|
|
|
Note: To minimize the repeated files,I put the same files as public resource
|
|
|
|
|
2021-11-28 21:02:17 +08:00
|
|
|
The file name is above:
|
|
|
|
|
|
|
|
public\_res\<filename\>\_\<file extension\> or public\_res\<filename\>\_\<file extension\>
|
|
|
|
|
2021-12-01 16:07:28 +08:00
|
|
|
Please compile with g++ or gcc (Clang is also supported)
|
2021-10-22 18:42:04 +08:00
|
|
|
|
2020-09-14 21:23:20 +08:00
|
|
|
(Visual Studio may have issues)
|
2020-09-29 19:43:13 +08:00
|
|
|
|
2020-09-15 11:49:20 +08:00
|
|
|
Ege dircitory need ege 19.01 and above to complie
|
2020-09-29 19:43:13 +08:00
|
|
|
|
2020-09-29 19:42:50 +08:00
|
|
|
C/C++ code using gtk2 needs gtk 2.24.10
|
2020-11-22 22:25:29 +08:00
|
|
|
|
2021-11-28 21:02:17 +08:00
|
|
|
#### For Gtk3 codes:
|
2020-11-22 22:25:29 +08:00
|
|
|
|
|
|
|
before gtk17 supports Gtk3.6.4
|
|
|
|
|
2020-11-20 22:00:57 +08:00
|
|
|
gtk17 and above removed support for gtk3.18 and below
|
2020-09-16 08:19:28 +08:00
|
|
|
|
2021-11-28 21:02:17 +08:00
|
|
|
Win32 exe supports WinXP and above
|
2021-12-01 16:07:28 +08:00
|
|
|
|
|
|
|
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
|
2022-02-13 20:53:38 +08:00
|
|
|
|
2021-12-01 16:07:28 +08:00
|
|
|
```java
|
|
|
|
public class Args{
|
|
|
|
public static void main(String[] args){
|
|
|
|
System.out.println(System.getProperty("user.dir"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Rust Version
|
2022-02-13 20:53:38 +08:00
|
|
|
|
2021-12-01 16:07:28 +08:00
|
|
|
```rust
|
|
|
|
fn main(){
|
2022-02-13 20:53:38 +08:00
|
|
|
|
2021-12-01 16:07:28 +08:00
|
|
|
}
|
|
|
|
```
|