[HOME] [DOWNLOAD] [DOCS] [BLOG] [SUPPORT] [TIPS] [ISSUES] [Priority Support]

Windows Installer


#62

Haven’t looked into it yet.

Ego:

Maybe you could, after “finishing” the setup, automatically open a
local HTML-page bundled with the rest of the files which again shows
people how to import the necessary images. If that is possible, that
would be great.

I would really hope an import instructions can be avoided and would be
automated in the final version.


#63

Good day,

Ok, seems like we’ve talked a bit past eachother, as that was actually what I meant a few posts ago when saying that this implementation (one which only uses 7-zip while not using “vbox.me”) wouldn’t allow a real “automation” and require manual input. This is also the reason why I’m currently working on a solution programmed in C#, which allows exactley this, while not having to deal with any size limit.

Have a nice day,

Ego


#64

Would C# require some framework package to be installed first?


#65

Good day,

Well, .net Framework is needed, though this is true for almost every modern program, designed for Windows. The needed version has been included with every version of Windows, since Windows XP.

If that is a problem, I could of course look into C++ (something I wanted to do for some time now), though C++ seems to be far less comfortable (which is the main reason for C#'s existence, as far as I know).

Have a nice day,

Ego


#66

If the framework isn’t required, not even on Windows XP, then there should be no disadvantage.


#67

Good day,

sorry, need to be a “smartypants”, the framework is in fact required, it’s just included out of the box. The conclusion (i.e. no disadvantage) is of course the same though.

Have a nice day,

Ego


#68

Alright.


#69

You are free to use any means to create the self-extracting archive, of course. We are not depending on the 7zip SFX Maker.

That would be a one-liner in the [Tasks] section.

This could be done by scripting. But I, as a user, would prefer to have control about actually import an .ova. Maybe first time installation I imported the gateway but ran our of space with the workstation. On the next try, after cleaning up my disk, I could skip the gateway and only import the workstation.

Sure, we could write a helper dll that can access the VirtualBox API and do all this automatically.

Which framework are you going to use? I don’t think you are right. See here what .NET frameworks are actually preinstalled on what Windows versions:

Even with C++, you have to make sure to install the correct C runtime files. If you have access to an old Visual Studio 6, you might be pretty sure that the runtime is preinstalled on most Windows versions though.


#70

Good day,

I’d need “.NET Framework 1” to get C# running which according to this: http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx is shipped with all versions of XP with at least SP1 and directly integrated since Vista.

Your table only talks about 4.5 and higher, which isn’t necessary.

Have a nice day,

Ego


#71

But on my Windows 10 I don’t have a .NET Framework 1 installed. Seriously: Nobody uses this version any more. You can’t expect a single .NET framework to be preinstalled on all Windows versions since XP.

Anyway, I’ll then wait what results your experimentation will create…


#72

Good day,

don’t worry, version 1.1 is just the lowest version necessary, C# 1.0 of course also works with .net 4.5. Furthermore, C# 6.0 is backwards compatible, unless some exotic new feature is used, which I don’t plan on doing. I’ll however still test my “experiment” with VMs of XP, Vista, 7 and 10, just to be safe.

Have a nice day,

Ego


#73

Thomas:

That would be a one-liner in the [Tasks] section.

This could be done by scripting. But I, as a user, would prefer to have control about actually import an .ova. Maybe first time installation I imported the gateway but ran our of space with the workstation. On the next try, after cleaning up my disk, I could skip the gateway and only import the workstation.

Sure, we could write a helper dll that can access the VirtualBox API and do all this automatically.

No need for a dll. No need for VirtualBox API. Would be a lot easier to
use the vboxmanage command line utility which already comes with VirtualBox.

VBoxManage import

https://www.virtualbox.org/manual/ch08.html#vboxmanage-import

https://www.virtualbox.org/manual/ch08.html

And VBoxManage showvminfo's exit codes could be used to check if such
a VM already exists - so it would be automatically skipped.

Users who want special stuff could still download and import the ova’s
separately; manually.

The way I envision this at the moment is that probably I would keep
building VirtualBox ova’s. Not something I am specifically eager to.
Anyhow. As long I have this not so great task, I would keep uploading
ova’s images with accompanying gpg signatures to the usual location. The
Windows maintainer would download these, gpg verify these, quickly test
these, and then build the Whonix installer exe. Test it. Sign it. Upload it.


#74

Good day,

That was actually how I’ve envisioned it from the start. Is also the reason why my current “programming attempt” tries to stay as modular as possible, to make updates as simple as possible.

Have a nice day,

Ego


#75

Just a hint: The native way in Windows would be to use a X.509 code signing certificates instead of GPG. After signing an exe, Windows will no longer show the “unknown publisher” warning but your name, which gives Windows users a warm feeling.

Cheapest certificate possible (17.22€ / year) is this:

https://en.sklep.certum.pl/data-safety/code-signing-certificates/open-source-code-signing.html

‘Limitation’ is, that “OPEN SOURCE DEVELOPER” is being added to your name.


#76

Good day,

If you’ve got an idea you may want to persue, I’d recommend you not to wait for me. I won’t have time finishing what I “produced” today, nor tomorrow (maths test), so I’ll be able to finish it on saturday, earliest.

Have a nice day,

Ego


#77

No need to waste time, if we both work on competing approches. My concept is finished. If we should opt for yours, there is no point in doing detail work on the InnoSetup script now.


#78

Thomas:

Just a hint: The native way in Windows would be to use a X.509 code
signing certificates instead of GPG. After signing an exe, Windows
will no longer show the “unknown publisher” warning but your name,
which gives Windows users a warm feeling.

Very much worthwhile. Additional gpg signatures however would be good
since those do not depend on certificate authorities.

Another very “low priority” goal for now are deterministic builds. [It’s
very worthwhile to have, but it will take a long time until
deterministic images will be available and until then its usefulness is
smaller. Just something to keep in mind - not adding purposely variable
stuff (when building the same version twice) such as timestamps.]


#79

Good day,

so, after having spent the last few hours on it, here a status update:

First of all, the base is finished. I’ve got a concept (which is very similar to the one I’ve propose in post #51) and was able to overcome all problems, but two. To accomplish all this, I was forced to leave my “SFX-comfort-zone” and move to a (to the user invisible) comand line based approach, using the 7za.exe, offerd by 7-Zip (the project, I mean) as well.

Currently, the installer works in the following way: After showing the usual “disclaimer” and “introduction” pages, the user may (or may not) select, a path for the extraction of both the virtual HDD for the Gateway, as well as for the Workstation (more on that latter). After that, I start cmd.exe in the background. What this does is run the following command: “/K 7za e Whonix_Images.7z Destination”. This runs the 7za.exe found in the /bin folder of my project, which in turn starts to execute the Whonix_Images.7z, which is in the same folder. The destination is set (or should be set) through a “openfiledialog” which is shown to the user prior. While this all happens, all the user see is a nice progress bar, filling with some tastefull green.

Now, at this point I have to take two paths, so bear with me for a moment: What I want to happen in the final version is that, after the GW and WS are extracted, the installation of VBox starts automatically and the user sees no transition whatsoever between the two seperate methods of installation. This is something which seemingly can be done, though I still need to find a way of running the entirety of the VBox installer in cmd for this to work.

For the time beeing though, I was forced to call the installer at this point and go through it by hand. In the final version, I also would like to use the installation destination from before for both VBox and the VHDDs, just with different “Sub-folders”.

After VBox is installed (either way) I simply run vboxmanage (again, with cmd) to create the necessary Debian-VMs and link the VHDDs. While this happens, I (again) show a progress bar. Like I’ve said, in the final “version”, there should really only be one progress bar, as everything else appears unprofessional. While this progress bar fills, I also extract an alternative GUI for VBox, more to that though, when the design is ready in the thread regarding it (the GUI, I mean).

Now, as you may or may not have noticed from how I talked about it, I currently have a problem with setting the destination manually (i.e. by the user). You see, I use this command to run cmd.exe with the needed command:

string strCmdText; strCmdText = "/K 7za e Whonix_Images.7z Insert_Destination"; System.Diagnostics.Process.Start("CMD.exe", strCmdText);

The issue is, that I am unable to find out, how I can mix normal “text” (or string, if you like), with C# code (or any code for that matter). If someone knows something in that direction, I would really apreciate it. Doesn’t even have to be for C#, anything to get me on the right track would be great. The same issue (of course), also plaques the “vboxmanage part”, which is why I manually set fixed locations, to test both of them.

Have a nice day,

Ego


#80

Can you explain a bit more what you mean? The three lines of code seem to show that you know how to handle strings in C#…

You really do this with .NET 1.0?


#81

Good day,

Ok, let me just explain with a snippet of my code (have included the necessary explanations with //):

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;

namespace Whonix_Installer
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void Next_Click(object sender, EventArgs e)
        {
            string strCmdText;
            //Here, I tell the programm to open a command line and run the comment in the quotes. However, this doesn't include the destination from the file dialog below.
            strCmdText = "/K 7za e Whonix_Images.7z";
            System.Diagnostics.Process.Start("CMD.exe", strCmdText);
            this.Hide();
            var form4 = new Form4();
            form4.Show();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
               
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = "Please select a path for the installation";
            fbd.RootFolder = Environment.SpecialFolder.Desktop;
            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                textBox1.Text = fbd.SelectedPath;
        }

        private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
        {
               //Here, the user may choose a destination. This needs to somehow be included in the string where the problem lies.
        }
    }
}

The problem is, that I am unable to mix a string and the code from the folder dialog. Think I have found a solution though.

Have a nice day,

Ego