-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Vidminas/master
Fixed hdpi scaling and more warnings
- Loading branch information
Showing
51 changed files
with
305 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
jar cmf mainclass.txt Mars.jar PseudoOps.txt Config.properties Syscall.properties Settings.properties MARSlicense.txt mainclass.txt MipsXRayOpcode.xml registerDatapath.xml controlDatapath.xml ALUcontrolDatapath.xml CreateMarsJar.bat CreateMarsJar.sh Mars.java Mars.class docs help images mars | ||
@echo off | ||
setlocal | ||
|
||
rem We use the value the JAVACMD environment variable, if defined | ||
rem and then try JAVA_HOME | ||
set "_JAVACMD=%JAVACMD%" | ||
if "%_JAVACMD"=="" ( | ||
if not "%JAVA_HOME%"=="" ( | ||
if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe" | ||
) | ||
) | ||
if "%_JAVACMD%"=="" set _JAVACMD=java | ||
|
||
rem Parses x out of 1.x; for example 8 out of java version 1.8.0_xx | ||
rem Otherwise, parses the major version; 9 out of java version 9-ea | ||
set JAVA_VERSION=0 | ||
for /f "tokens=3" %%g in ('%_JAVACMD% -Xms32M -Xmx32M -version 2^>^&1 ^| findstr /i "version"') do ( | ||
set JAVA_VERSION=%%g | ||
) | ||
set JAVA_VERSION=%JAVA_VERSION:"=% | ||
for /f "delims=.-_ tokens=1-2" %%v in ("%JAVA_VERSION%") do ( | ||
if /I "%%v" EQU "1" ( | ||
set JAVA_VERSION=%%w | ||
) else ( | ||
set JAVA_VERSION=%%v | ||
) | ||
) | ||
|
||
if %JAVA_VERSION% > 9 ( | ||
echo "Compiling Mars with default javac" | ||
dir /s /B *.java > sources.txt | ||
javac @sources.txt | ||
jar cfm Mars.jar META-INF/MANIFEST.MF README.md LICENSE.md PseudoOps.txt Config.properties Syscall.properties Settings.properties MipsXRayOpcode.xml registerDatapath.xml controlDatapath.xml ALUcontrolDatapath.xml CreateMarsJar.bat CreateMarsJar.sh Mars.java Mars.class docs help images mars | ||
) else ( | ||
echo "Could not find an appropriate Java installation" | ||
) | ||
|
||
@echo "CreateMarsJar finished" | ||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
#!/usr/bin/env bash | ||
# If you can't generate due of permissions, do a "chmod +x CreateMarsJar.sh". | ||
jar cmf mainclass.txt Mars.jar PseudoOps.txt Config.properties Syscall.properties Settings.properties MARSlicense.txt mainclass.txt MipsXRayOpcode.xml registerDatapath.xml controlDatapath.xml ALUcontrolDatapath.xml CreateMarsJar.bat CreateMarsJar.sh Mars.java Mars.class docs help images mars | ||
|
||
if type -p java; then | ||
echo "Found Java executable in PATH" | ||
_java=java | ||
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then | ||
echo "Found Java executable in JAVA_HOME" | ||
_java="$JAVA_HOME/bin/java" | ||
else | ||
echo "Could not find an installation of Java" | ||
fi | ||
|
||
if [[ "$_java" ]]; then | ||
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}') | ||
echo "version $version" | ||
|
||
IFS=. read major minor extra <<< "$version"; | ||
|
||
if ((major > 9 || (major == 1 && minor > 9))); then | ||
echo "Compiling Mars with default javac" | ||
find . -name "*.java" | xargs javac | ||
else | ||
echo "Attempting to compile Mars with java-10" | ||
find . -name "*.java" | xargs /usr/lib/jvm/java-10/bin/javac | ||
fi | ||
fi | ||
|
||
jar cfm Mars.jar META-INF/MANIFEST.MF README.md LICENSE.md PseudoOps.txt Config.properties Syscall.properties Settings.properties MipsXRayOpcode.xml registerDatapath.xml controlDatapath.xml ALUcontrolDatapath.xml CreateMarsJar.bat CreateMarsJar.sh Mars.java Mars.class docs help images mars | ||
|
||
echo "CreateMarsJar finished" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
Manifest-Version: 1.0 | ||
Created-By: 1.8.0_181 (Oracle Corporation) | ||
Class-Path: . | ||
Created-By: 1.6.0_33 (Sun Microsystems Inc.) | ||
Main-Class: Mars | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
if type -p java; then | ||
echo "Found Java executable in PATH" | ||
_java=java | ||
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then | ||
echo "Found Java executable in JAVA_HOME" | ||
_java="$JAVA_HOME/bin/java" | ||
else | ||
echo "Could not find an installation of Java" | ||
fi | ||
|
||
if [[ "$_java" ]]; then | ||
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}') | ||
echo "version $version" | ||
|
||
IFS=. read major minor extra <<< "$version"; | ||
|
||
if ((major > 9 || (major == 1 && minor > 9))); then | ||
echo "Running Mars with default JRE" | ||
java -jar Mars.jar | ||
else | ||
echo "Attempting to run Mars with java-10" | ||
/usr/lib/jvm/java-10/bin/java -jar Mars.jar | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.