Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 5451753

Browse files
committed
Codebase Update + update docs (refer #16 for update)
1 parent 435f6db commit 5451753

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+730
-353
lines changed

Diff for: AppSettings.cfg

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# macOS: /Users/Username/Library/net.bc100dev/osintgram4j
55

66
# Honest Edition
7-
# Like a piece of software being honest, and replace any message with
8-
# humor-related content?
7+
# Like a piece of software being honest, and replace any message with humor-related content?
98
# If yes, enable it.
109
HonestyEdition = false
1110

Diff for: NewREADME.md

+11-22
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,21 @@ With Privacy Policy in mind, you acknowledge:
2929
See the [full Privacy Policy](PrivacyPolicy.md) to review. Don't forget, use
3030
Osintgram4j responsibly, respect privacy of others, and always act ethically.
3131

32-
## Potential Takedown
33-
The original developer has every right to request the project to be taken down. Since
34-
I originally was contacting the developer, I am proceeding cautiously to avoid
35-
Takedown notices, while strictly following licensing guidelines.
36-
37-
Understandably, I don't want to see this project being shut down. If forced, you'll
38-
know the reason, why.
39-
40-
## Reasoning on Development
41-
The motivation for starting this project is to bring back stability back to the
42-
Osintgram project. The updates of the Instagram API was constantly breaking the
43-
project apart, and me, as a community-based person, I wasn't letting it slide,
44-
without someone stepping in, and finally fixing it. I've also switched to Java for
45-
the advantages that it also has, which one of them include Performance. Compiled
46-
Java code is faster than interpreted Python code.
47-
4832
## Build Process
33+
Prepare a Linux environment, with either one of these options:
34+
- Host (main OS / Dual Boot)
35+
- VM (Virtual Machine)
36+
- Cloud Shell / Servers (Google Cloud, Linode)
37+
- Containers (Docker)
38+
- WSL (Windows-only)
39+
4940
This project is mainly focused and optimized for **the Linux platform**. Simple
5041
setup with the Shell scripts:
5142

43+
1. **_Download dependencies_**:
44+
- Debian/Ubuntu based: `sudo apt install build-essential cmake tar wget`
45+
- Arch/Manjaro based: `sudo pacman -Sy base-devel cmake tar wget`
46+
5247
1. **_Clone the repo_**: `git clone https://github.com/BeChris100/osintgram4j`
5348
2. **_Set permissions_**: `chmod +x setup.sh build.sh`
5449
3. **_Set up environment_**: `./setup.sh --force-download`
@@ -58,12 +53,6 @@ The `--force-download` is an optional parameter. If given, it will always downlo
5853
the JDK and the libraries, no matter its state. Otherwise, it will try to detect
5954
JDK 21, and get the latest `org.json` library.
6055

61-
Workaround for other platforms (Android, Windows, macOS, …):
62-
- Virtual Machines
63-
- Cloud Shell/Servers
64-
- Windows Subsystem for Linux (WSL)
65-
- Linux Containers (e.g. Docker)
66-
6756
## Client Mods
6857
Osintgram4j introduces a Modding API, which is something that I like. Having the
6958
ability to modify the client directly instead of creating separate forks for each

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ writing.
191191
---
192192

193193
## Usage
194-
Refer to [the Usage file](docs/USAGE.md) for this project.
194+
Refer to [the Usage file](docs/Usage) for this project.

Diff for: build.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ if [ "$#" -ne 0 ]; then
6464
if [ "$1" == "--uninstall" ]; then
6565
echo "Uninstalling osintgram4j"
6666
"$PREFIX" rm -rf /usr/bin/osintgram4j
67+
"$PREFIX" rm -rf /usr/bin/og4j-editor
6768

6869
if [ -d "/usr/share/osintgram4j" ]; then
6970
"$PREFIX" rm -rf /usr/share/osintgram4j
@@ -98,7 +99,7 @@ else
9899
echo "* Compiling CXX code for Windows x86_64"
99100

100101
cd "$CURRENT_WORKDIR/cxx"
101-
mkdir win
102+
mkdir -p win
102103
cd win
103104
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$MINGW_C" -DCMAKE_CXX_COMPILER="$MINGW_CPP" ..
104105
make "-j$(nproc)"
@@ -147,14 +148,15 @@ fi
147148

148149
"$JPACKAGE_CMD" -t app-image -n "$BUILD_NAME" --app-version "$BUILD_VERSION-$BUILD_VERSION_CODE" \
149150
-i out/project/input --main-jar core.jar --main-class net.bc100dev.osintgram4j.MainClass -d out/pkg --icon "extres/icon.png" \
150-
--java-options "-Xmx256m" --java-options "-Xms256m" --java-options '-Dog4j.location.app_dir=$APPDIR' \
151+
--java-options "-Xmx256m" --java-options "-Xms128m" --java-options '-Dog4j.location.app_dir=$APPDIR' \
151152
--java-options '-Dog4j.location.bin_dir=$BINDIR' --java-options '-Dog4j.location.root_dir=$ROOTDIR' --verbose
152153

154+
cp cxx/out/og4j-editor out/pkg/osintgram4j/bin/og4j-editor
155+
153156
echo ""
154157
echo "## Build Complete"
155158

156-
mkdir -p bin
157-
ln -s "${PWD}"/out/pkg/osintgram4j/bin/osintgram4j "${PWD}"/bin/osintgram4j
159+
ln -s "${PWD}"/out/pkg/osintgram4j/bin "${PWD}"/
158160

159161
read -p "Do you want to install Osintgram (requires sudo privileges)? (Y/N): " INSTALL_CHOICE
160162
if [[ "$INSTALL_CHOICE" =~ ^[Yy]$ ]]; then
@@ -174,6 +176,7 @@ if [[ "$INSTALL_CHOICE" =~ ^[Yy]$ ]]; then
174176
"$PREFIX" mkdir -p /usr/share/bc100dev/osintgram4j/
175177
"$PREFIX" cp -r out/pkg/osintgram4j/* /usr/share/bc100dev/osintgram4j
176178
"$PREFIX" ln -s /usr/share/bc100dev/osintgram4j/bin/osintgram4j /usr/bin/osintgram4j
179+
"$PREFIX" ln -s /usr/share/bc100dev/osintgram4j/bin/og4j-editor /usr/bin/og4j-editor
177180

178181
read -p "Do you wish to create an Application Launcher (start from the Start Menu)? (Y/N): " LAUNCHER_CHOICE
179182
if [[ "$LAUNCHER_CHOICE" =~ ^[Yy]$ ]]; then

Diff for: commons/src/net/bc100dev/commons/Tools.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
public class Tools {
77

88
/**
9+
* Sorry StackOverflow that I borrowed yer code. Credits still is required, so here ya go.
10+
* <a href="https://stackoverflow.com/questions/3259143/split-a-string-containing-command-line-parameters-into-a-string-in-java">damn link</a>
11+
* <br/>
912
* [code borrowed from ant.jar]
1013
* Crack a command line.
1114
* @param cmdLine the command line to process.
1215
* @return the command line broken into strings.
1316
* An empty or null toProcess parameter results in a zero sized array.
1417
*/
1518
public static String[] translateCmdLine(String cmdLine) {
16-
if (cmdLine == null || cmdLine.isEmpty()) {
19+
if (cmdLine == null || cmdLine.trim().isEmpty()) {
1720
//no command? no string
1821
return new String[0];
1922
}

Diff for: commons/src/net/bc100dev/commons/process/ProcessData.java

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public class ProcessData {
1111

1212
public static ProcessInfo getCurrentProcessInfo() {
1313
ProcessHandle handle = ProcessHandle.current();
14+
// ... .... . / -- .- -.. . / -- . / - .... .. ... / .-- .- -.--
1415

1516
return new ProcessInfo(handle.pid(),
1617
handle.info().user().orElse("-"),

Diff for: commons/src/net/bc100dev/commons/utils/HelpPage.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
public class HelpPage {
88

9-
private int spaceWidth, startSpaceWidth = 0;
9+
private int spaceWidth, startSpaceWidth;
1010

1111
private final List<Item> argItemList = new ArrayList<>();
1212

1313
public HelpPage() {
14-
this.spaceWidth = 2;
14+
this.spaceWidth = 5;
15+
this.startSpaceWidth = 0;
1516
}
1617

1718
public void setSpaceWidth(int spaceWidth) {

Diff for: commons/src/net/bc100dev/commons/utils/io/FFileUtil.java

-191
This file was deleted.

Diff for: cxx/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
linux_out
2-
win_out
2+
win_out
3+
out

Diff for: cxx/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ add_library(osintgram4j SHARED
2020
src/ExceptionHandle.cpp
2121
src/MemoryInfo.cpp)
2222

23+
add_executable(og4j-editor
24+
src/ProjectFileEditor.cpp)
25+
2326
# Windows on Linux compilation
2427
if (${CMAKE_CXX_COMPILER} MATCHES "mingw" OR ${CMAKE_SYSTEM_NAME} MATCHES "win")
2528
set_target_properties(osintgram4j PROPERTIES PREFIX "")

0 commit comments

Comments
 (0)