-
Notifications
You must be signed in to change notification settings - Fork 13
Windows Compatibility #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DarkFleetOne
wants to merge
1
commit into
CestDiego:master
Choose a base branch
from
DarkFleetOne:windows-compatibility
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -59,32 +59,62 @@ | |
| (defcustom nand2tetris-hardware-simulator nil | ||
| "Hardware Simulator Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-hardware-simulator () (or nand2tetris-hardware-simulator (expand-file-name "HardwareSimulator.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-hardware-simulator () (or nand2tetris-hardware-simulator | ||
| (expand-file-name (concat "HardwareSimulator" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defcustom nand2tetris-assembler nil | ||
| "Assembler Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-assembler nil () (or nand2tetris-assembler nil (expand-file-name "HardwareSimulator.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-assembler nil () (or nand2tetris-assembler nil | ||
| (expand-file-name (concat "HardwareSimulator" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defcustom nand2tetris-cpu-emulator nil | ||
| "CPU Emulator Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-cpu-emulator () (or nand2tetris-cpu-emulator (expand-file-name "CPUEmulator.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-cpu-emulator () (or nand2tetris-cpu-emulator | ||
| (expand-file-name (concat "CPUEmulator" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defcustom nand2tetris-jack-compiler nil | ||
| "Jack Compiler Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-jack-compiler () (or nand2tetris-jack-compiler (expand-file-name "JackCompiler.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-jack-compiler () (or nand2tetris-jack-compiler | ||
| (expand-file-name (concat "JackCompiler" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defcustom nand2tetris-text-comparer nil | ||
| "Text Comparer Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-text-comparer () (or nand2tetris-text-comparer (expand-file-name "TextComparer.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-text-comparer () (or nand2tetris-text-comparer | ||
| (expand-file-name (concat "TextComparer" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defcustom nand2tetris-vm-emulator nil | ||
| "VM Emulator Launcher." | ||
| :group 'nand2tetris) | ||
| (defun nand2tetris-vm-emulator () (or nand2tetris-vm-emulator (expand-file-name "VMEmulator.sh" (nand2tetris-tools-dir)))) | ||
| (defun nand2tetris-vm-emulator () (or nand2tetris-vm-emulator | ||
| (expand-file-name (concat "VMEmulator" | ||
| (if (eq system-type 'windows-nt) | ||
| ".bat" | ||
| ".sh")) | ||
| (nand2tetris-tools-dir)))) | ||
|
|
||
| (defun nand2tetris/hardware-simulator () | ||
| "Start Hardware Simulator. | ||
|
|
@@ -161,13 +191,13 @@ See URL `http://www.nand2tetris.org/software.php'." | |
| (nand2tetris//get-compare-file (current-buffer)))) | ||
|
|
||
| (defun nand2tetris/tests-current-hdl () | ||
| "Run `HardwareSimulator.sh' on current tst file." | ||
| "Run `HardwareSimulator.bat' on current tst file." | ||
| (interactive) | ||
| (save-buffer) | ||
| (shell-command (concat (nand2tetris-hardware-simulator) " " (nand2tetris//get-current-test-file)))) | ||
|
|
||
| (defun nand2tetris/tests-current-hdl-elsewhere () | ||
| "Run `HardwareSimulator.sh' on current tst file, but on another locaion. | ||
| "Run `HardwareSimulator.bat' on current tst file, but in another location. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of the extension name. Can we use this wording instead? |
||
| So it can use the builtin chips." | ||
| (interactive) | ||
| (let* ((filename (file-name-base (buffer-file-name))) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you consider making a function for this following the naming conventions of this package?