Skip to content

Commit

Permalink
v0.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dail8859 committed Apr 27, 2020
2 parents 7c00421 + bb083e1 commit 1b3e70c
Show file tree
Hide file tree
Showing 310 changed files with 14,886 additions and 3,492 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

A cross-platform, reimplementation of Notepad++.

Though the application overall is stable and usable, it should not be considered for daily use and is missing most features.
Though the application overall is stable and usable, it should not be considered safe for critically important work.

There are numerous bugs and half working implementations. Pull requests are greatly appreciated.

![screenshot](/doc/screenshot.png)

# Development
Current development has been done using Visual Studio 2017 and Qt v5.13. Other platforms/compilers have not been tested but should be usable.
Current development has been done using Visual Studio 2017 and Qt v5.14. Other platforms/compilers have not been tested but should be usable.

1. Install Visual Studio 2017 (Community Edition is fine)
1. Download the [Qt Installer](https://www.qt.io/download-qt-installer)
1. Use the Qt Installer to install `Qt 5.13.X` (MSVC 2017 64-bit) and `Qt Creator`
1. Use the Qt Installer to install `Qt 5.14.X` (MSVC 2017 64-bit) and `Qt Creator`
1. Open `src/NotepadNext.pro`
1. Build/Run the project

Expand Down
21 changes: 14 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 0.1.0.{build}
version: 0.2.0.{build}
image: Visual Studio 2017

init:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
- set PATH=C:\Qt\5.13.2\msvc2017_64\bin\;C:\Qt\Tools\QtCreator\bin\;%PATH%
- set PATH=C:\Qt\5.13\msvc2017_64\bin\;C:\Qt\Tools\QtCreator\bin\;%PATH%
- qmake -v

before_build:
Expand All @@ -24,9 +24,16 @@ after_build:
- cd build_installer
- qmake ..\installer\installer.pro
- jom
- cd %APPVEYOR_BUILD_FOLDER%
- appveyor PushArtifact NotepadNext.zip -FileName NotepadNext-v%APPVEYOR_BUILD_VERSION%.zip
- appveyor PushArtifact build_installer\NotepadNext-v0.2.exe -FileName NotepadNext-v%APPVEYOR_BUILD_VERSION%-setup.exe

artifacts:
- path: NotepadNext.zip
name: NotepadNext-v$(appveyor_build_version).zip
- path: build_installer\NotepadNext-v0.1.exe
name: NotepadNext-v$(appveyor_build_version)-setup.exe
deploy:
provider: GitHub
auth_token:
secure: qrw+nu8dQKFLG+lNmky6buHsvHFwlibAai0r0aJ3MYbyBniONVxvgnmyx37bPh44
artifact: NotepadNext-v$(appveyor_build_version).zip, NotepadNext-v$(appveyor_build_version)-setup.exe
draft: true
force_update: true
on:
APPVEYOR_REPO_TAG: true
8 changes: 4 additions & 4 deletions installer/config/config.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>Notepad Next</Name>
<Version>0.1</Version>
<Title>Notepad Next v0.1</Title>
<Version>0.2</Version>
<Title>Notepad Next v0.2</Title>
<Publisher>Notepad Next</Publisher>
<StartMenuDir>Notepad Next</StartMenuDir>

<AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>
<SupportsModify>true</SupportsModify>
<TargetDir>@ApplicationsDirX64@/Notepad Next</TargetDir>
<SupportsModify>false</SupportsModify>
<TargetDir>@ApplicationsDirX64@\Notepad Next</TargetDir>

<!--<StyleSheet>style.qss</StyleSheet>-->
<!--<TitleColor>#88FF33</TitleColor>-->
Expand Down
23 changes: 23 additions & 0 deletions installer/packages/app/data/scripts/auto_uninstall.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Controller script to pass to the uninstaller to get it to run automatically.
// It's passed to the maintenance tool during installation if there is already an
// installation present with: <target dir>/maintenancetool.exe --script=<target dir>/scripts/auto_uninstall.qs.
// This is required so that the user doesn't have to see/deal with the uninstaller in the middle of
// an installation.

function Controller()
{
gui.clickButton(buttons.NextButton);
gui.clickButton(buttons.NextButton);

installer.uninstallationFinished.connect(this, this.uninstallationFinished);
}

Controller.prototype.uninstallationFinished = function()
{
gui.clickButton(buttons.NextButton);
}

Controller.prototype.FinishedPageCallback = function()
{
gui.clickButton(buttons.FinishButton);
}
55 changes: 0 additions & 55 deletions installer/packages/app/meta/installoptions.ui

This file was deleted.

61 changes: 51 additions & 10 deletions installer/packages/app/meta/installscript.qs
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@
// You should have received a copy of the GNU General Public License
// along with Notepad Next. If not, see <https://www.gnu.org/licenses/>.

var targetDirectoryPage = null;

function Component()
{
component.loaded.connect(this, function() {
if (installer.isInstaller()) {
if (systemInfo.productType === "windows") {
installer.addWizardPageItem(component, "InstallOptionsForm", QInstaller.TargetDirectory);
}
}
});
component.loaded.connect(this, this.installerLoaded);
}

Component.prototype.createOperations = function()
{
// call default implementation to actually install the registeredfile
component.createOperations();

var isContextMenuChecked = component.userInterface("InstallOptionsForm").addContextMenu.checked;
var isDesktopShortcutChecked = component.userInterface("InstallOptionsForm").addDesktopShortcut.checked;
var isStartMenuShortcutChecked = component.userInterface("InstallOptionsForm").addStartMenuShortcut.checked;
var isContextMenuChecked = component.userInterface("TargetWidget").addContextMenu.checked;
var isDesktopShortcutChecked = component.userInterface("TargetWidget").addDesktopShortcut.checked;
var isStartMenuShortcutChecked = component.userInterface("TargetWidget").addStartMenuShortcut.checked;
if (systemInfo.productType === "windows") {
// Right-click context menu
if (isContextMenuChecked) {
Expand Down Expand Up @@ -71,3 +66,49 @@ Component.prototype.createOperations = function()
}
}
}

Component.prototype.installerLoaded = function()
{
installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory);

targetDirectoryPage = gui.pageWidgetByObjectName("DynamicTargetWidget");
targetDirectoryPage.windowTitle = "Choose Installation Directory";
targetDirectoryPage.targetDirectory.textChanged.connect(this, this.targetDirectoryChanged);
targetDirectoryPage.targetDirectory.setText(installer.value("TargetDir"));
targetDirectoryPage.targetChooser.released.connect(this, this.targetChooserClicked);

gui.pageById(QInstaller.PerformInstallation).entered.connect(this, this.performInstallationPageEntered);
}

Component.prototype.targetChooserClicked = function()
{
var dir = QFileDialog.getExistingDirectory("", targetDirectoryPage.targetDirectory.text);
targetDirectoryPage.targetDirectory.setText(dir);
}

Component.prototype.targetDirectoryChanged = function()
{
var dir = targetDirectoryPage.targetDirectory.text;
if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) {
targetDirectoryPage.warning.setText("<p style=\"color: red\">Existing installation will be uninstalled.</p>");
}
else if (installer.fileExists(dir)) {
targetDirectoryPage.warning.setText("<p style=\"color: red\">Installing in existing directory. Its existing contents will be removed.</p>");
}
else {
targetDirectoryPage.warning.setText("");
}

installer.setValue("TargetDir", dir);
}

Component.prototype.performInstallationPageEntered = function()
{
var dir = installer.value("TargetDir");

if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) {
console.log("Running uninstaller: " + dir + "/maintenancetool.exe");
installer.execute(dir + "/maintenancetool.exe", new Array("--script", dir + "/scripts/auto_uninstall.qs"));
}
}
8 changes: 4 additions & 4 deletions installer/packages/app/meta/package.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<Package>
<DisplayName>Notepad Next</DisplayName>
<Description>Notepad Next v0.1</Description>
<Version>0.1</Version>
<Description>Notepad Next v0.2</Description>
<Version>0.2</Version>
<ForcedInstallation>true</ForcedInstallation>
<ReleaseDate>2019-03-19</ReleaseDate>
<ReleaseDate>2020-04-24</ReleaseDate>
<!-- <RequiresAdminRights>true</RequiresAdminRights> -->
<Script>installscript.qs</Script>
<UserInterfaces>
<UserInterface>installoptions.ui</UserInterface>
<UserInterface>targetwidget.ui</UserInterface>
</UserInterfaces>
</Package>
Loading

0 comments on commit 1b3e70c

Please sign in to comment.