Skip to content

Commit

Permalink
Fixed #536 and #530
Browse files Browse the repository at this point in the history
  • Loading branch information
cavearr committed Sep 3, 2021
1 parent d79d876 commit 22f8dd7
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main-aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Icestudio fot Linux ARM 64'
name: 'Icestudio for ARM 64'

# Controls when the action will run.
on:
Expand Down Expand Up @@ -62,12 +62,12 @@ jobs:
content=`tr '\n' ' ' < app/buildinfo.json`
echo "::set-output name=buildJson::$content"h
- name: 'Upload ZIP/linuxAarch64'
- name: 'Upload ZIP/Aarch64'
env:
ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
uses: 'actions/upload-artifact@v2'
with:
name: "linuxAarch64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-linuxAarch64.zip"
name: "Aarch64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-Aarch64.zip"
if-no-files-found: error
5 changes: 5 additions & 0 deletions app/scripts/controllers/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ angular

return;
}

var filepath = project.path;
if (filepath) {
project.save(filepath, function () {
Expand All @@ -261,6 +262,8 @@ angular
$scope.doSaveProjectAs = function (localCallback) {
utils.saveDialog("#input-save-project", ".ice", function (filepath) {
updateWorkingdir(filepath);


project.save(filepath, function () {
reloadCollectionsIfRequired(filepath);
});
Expand All @@ -271,6 +274,7 @@ angular
});
};


$scope.saveProjectAs = function (localCallback) {
if (
typeof common.isEditingSubmodule !== "undefined" &&
Expand Down Expand Up @@ -1398,6 +1402,7 @@ angular
utils.rootScopeSafeApply();
});


$scope.showMenu = function (newMenu) {
cancelTimeouts();
if (
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/services/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,15 @@ angular.module('icestudio')
var breadcrumbsLength = self.breadcrumbs.length;

$('body').addClass('waiting');
$rootScope.$broadcast('navigateProject', {
$rootScope.$broadcast('navigateProject', {
update: breadcrumbsLength === 1,
project: project,
submodule: type,
submoduleId: blockId
});
self.breadcrumbs.push({ name: project.package.name || '#', type: type });
utils.rootScopeSafeApply();
}
}
}

});
Expand Down
9 changes: 6 additions & 3 deletions app/scripts/services/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ angular.module('icestudio')
else {
alertify.error(gettextCatalog.getString('Wrong project format: {{name}}', { name: utils.bold(name) }), 30);
}
alertify.set('confirm', 'labels', {
alertify.set('confirm', 'labels', {
'ok': gettextCatalog.getString('OK'),
'cancel': gettextCatalog.getString('Cancel')
});
Expand Down Expand Up @@ -335,6 +335,7 @@ angular.module('icestudio')
this.save = function (filepath, callback) {
var backupProject = false;
var name = utils.basename(filepath);

if (subModuleActive) {
backupProject = utils.clone(project);

Expand Down Expand Up @@ -466,7 +467,9 @@ angular.module('icestudio')
alertify.confirm(gettextCatalog.getString('This import operation requires a project path. You need to save the current project. Do you want to continue?'),
function () {
$rootScope.$emit('saveProjectAs', function () {
// 3. Copy the included files

// 3. Copy the included files

copyIncludedFiles(files, origPath, destPath, function (success) {
if (success) {
// 4. Success: import block
Expand Down Expand Up @@ -499,7 +502,7 @@ angular.module('icestudio')
function copyIncludedFiles(files, origPath, destPath, callback) {
var success = true;
async.eachSeries(files, function (filename, next) {
if (origPath !== destPath) {
if (origPath !== destPath) {
if (nodeFs.existsSync(nodePath.join(destPath, filename))) {
alertify.confirm(gettextCatalog.getString('File {{file}} already exists in the project path. Do you want to replace it?', { file: utils.bold(filename) }),
function () {
Expand Down
20 changes: 10 additions & 10 deletions app/views/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!--
CALLBACK FUNCTIONS
i
Default callbacks:
* app/scripts/controllers/menu.js
Expand All @@ -17,18 +17,18 @@
<div id="menu" ondragstart="return false;" ondrop="return false;">

<input id="input-open-project" type="file" accept=".ice" class="hidden"/>
<input id="input-save-project" type="file" accept=".ice" class="hidden" nwsaveas="{{ workingdir + project.name }}.ice"/>
<input id="input-save-snapshot" type="file" accept=".png" class="hidden" nwsaveas="{{ (snapshotdir ? snapshotdir : workingdir) + project.name }}.png"/>
<input id="input-save-project" type="file" accept=".ice" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{project.name}}.ice"/>
<input id="input-save-snapshot" type="file" accept=".png" class="hidden" nwworkingdir="{{ snapshotdir ? snapshotdir : workingdir }}" nwsaveas="{{project.name }}.png"/>

<input id="input-add-as-block" type="file" accept=".ice,.iceb" class="hidden" multiple/>

<input id="input-export-verilog" type="file" accept=".v" class="hidden" nwsaveas="{{ workingdir + project.name }}.v"/>
<input id="input-export-pcf" type="file" accept=".pcf" class="hidden" nwsaveas="{{ workingdir + project.name }}.pcf"/>
<input id="input-export-testbench" type="file" accept=".v" class="hidden" nwsaveas="{{ workingdir + project.name }}_tb.v"/>
<input id="input-export-gtkwave" type="file" accept=".gtkw" class="hidden" nwsaveas="{{ workingdir + project.name }}_tb.gtkw"/>
<input id="input-export-blif" type="file" accept=".blif" class="hidden" nwsaveas="{{ workingdir + project.name }}.blif"/>
<input id="input-export-asc" type="file" accept=".asc" class="hidden" nwsaveas="{{ workingdir + project.name }}.asc"/>
<input id="input-export-bin" type="file" accept=".bin" class="hidden" nwsaveas="{{ workingdir + project.name }}.bin"/>
<input id="input-export-verilog" type="file" accept=".v" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}.v"/>
<input id="input-export-pcf" type="file" accept=".pcf" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}.pcf"/>
<input id="input-export-testbench" type="file" accept=".v" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}_tb.v"/>
<input id="input-export-gtkwave" type="file" accept=".gtkw" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}_tb.gtkw"/>
<input id="input-export-blif" type="file" accept=".blif" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}.blif"/>
<input id="input-export-asc" type="file" accept=".asc" class="hidden" nwworkingdir="{{workingdir}} "nwsaveas="{{ project.name }}.asc"/>
<input id="input-export-bin" type="file" accept=".bin" class="hidden" nwworkingdir="{{workingdir}}" nwsaveas="{{ project.name }}.bin"/>

<input id="input-add-collection" type="file" accept=".zip" class="hidden" multiple/>

Expand Down
8 changes: 4 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ module.exports = function (grunt) {
mode: true,
},
cwd: "dist/icestudio/linux64",
dest: "dist/icestudio/linuxaarch64",
dest: "dist/icestudio/aarch64",
src: ["**"],
},
],
Expand All @@ -211,7 +211,7 @@ module.exports = function (grunt) {
mode: true,
},
cwd: "cache/nwjsAarch64/nwjs-v0.54.2-linux-arm64",
dest: "dist/icestudio/linuxaarch64",
dest: "dist/icestudio/aarch64",
src: ["**"],
},
],
Expand Down Expand Up @@ -318,7 +318,7 @@ module.exports = function (grunt) {
},
Aarch64: {
options: {
archive: "dist/<%=pkg.name%>-<%=pkg.version%>-linuxAarch64.zip",
archive: "dist/<%=pkg.name%>-<%=pkg.version%>-Aarch64.zip",
},
files: [
{
Expand Down Expand Up @@ -527,4 +527,4 @@ module.exports = function (grunt) {
//-- Execute the tasks given in the distTasks list + the commands
distTasks.concat(distCommands)
);
};
};
2 changes: 1 addition & 1 deletion scripts/mergeAarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ brandingDir="$binaryBundleDir/nwjs-v0.54.2-linux-arm64"
distBundle="cache/nwjsAarch64/usr/docker/dist/nwjs-chromium-ffmpeg-branding/nwjs-v0.54.2-linux-arm64.tar.gz"
binaryBundleDirDocker="cache/nwjsAarch64/usr"
binaryBundle="cache/nwjsAarch64/nwjs.tar.gz"
icestudioBundle="dist/icestudio/linuxaarch64/"
icestudioBundle="dist/icestudio/aarch64/"
#-- Start repairing
if [ -d "$binaryBundleDirDocker" ]; then
echo "${RED}Clean old bundle dir... ${NC}"
Expand Down

0 comments on commit 22f8dd7

Please sign in to comment.